Loading…
Loading…
Method Name: configure_screen_offline
Method ID: 0x425E
Method Label: Configure
Method Help: This allows you to configure a Advanced display screen
- {
- char status[3];
- char temp_screen_number;
- char sel_PV_publish;
- char sel_PV_processing;
- char sel_units;
- int lock_dev;
- unsigned char loc_prev_PV_publish;
- _set_device_status(0xFF,0);
- _set_xmtr_device_status(0xFF,0);
- _set_all_resp_code(0);
- _set_xmtr_all_resp_code(0);
- display_type_code = 1;
- temp_screen_number = SELECT_FROM_LIST(literal_string(1553),literal_string(1517));
- screen_number = temp_screen_number + 62;
- if (screen_number < 62 || screen_number > 69)
- {
- screen_number = 62;
- }
- if (comn_disp_template < 0 || comn_disp_template > 5)
- {
- comn_disp_template = 0;
- }
- if (comn_PV_publish < 1 || comn_PV_publish > 9)
- {
- comn_PV_publish = 1;
- }
- if (comn_PV_publish == 1 && (comn_PV_processing < 0 || comn_PV_processing > 3) || (comn_PV_publish == 2 || comn_PV_publish == 5) && (comn_PV_processing != 0 && comn_PV_processing != 1) || comn_PV_publish == 4 && (comn_PV_processing != 0 && comn_PV_processing != 2) || comn_PV_publish == 3 && comn_PV_processing != 0)
- {
- comn_PV_processing = 0;
- }
- if (comn_PV_processing == 0)
- {
- comn_units = 240;
- }
- else
- if (comn_PV_processing == 2)
- {
- if (comn_PV_publish == 1)
- {
- if (comn_units != 0)
- {
- comn_units = 0;
- }
- }
- else
- if (comn_PV_publish == 4)
- {
- if (comn_units != 57 && comn_units != 0 && comn_units != 16 && comn_units != 17 && comn_units != 136 && comn_units != 138)
- {
- comn_units = 57;
- }
- }
- }
- else
- if (comn_PV_processing == 3)
- {
- if (comn_PV_publish == 1)
- {
- if (comn_units != 57 && comn_units != 0 && comn_units != 16 && comn_units != 17 && comn_units != 136 && comn_units != 138)
- {
- comn_units = 57;
- }
- }
- }
- else
- if (comn_PV_processing == 1)
- {
- if (comn_PV_publish == 1)
- {
- if ((comn_units < 1 || comn_units > 14) && (comn_units != 145 && comn_units != 237 && comn_units != 238 && comn_units != 239 && comn_units != 170 && comn_units != 171))
- {
- comn_units = 238;
- }
- }
- else
- if (comn_PV_publish == 5)
- {
- if ((comn_units < 1 || comn_units > 14) && (comn_units != 145 && comn_units != 237 && comn_units != 238 && comn_units != 239 && comn_units != 170 && comn_units != 171))
- {
- comn_units = 6;
- }
- }
- else
- if (comn_PV_publish == 2)
- {
- if (comn_units < 32 || comn_units > 35)
- {
- comn_units = 32;
- }
- }
- }
- if (comn_custom_EU_HI == comn_custom_EU_LO)
- {
- comn_custom_EU_LO = 0;
- comn_custom_EU_HI = 100;
- }
- if (comn_chart_hi_limit == comn_chart_low_limit)
- {
- comn_chart_low_limit = 0;
- comn_chart_hi_limit = 100;
- }
- if (comn_decimal < 0 || comn_decimal > 3)
- {
- comn_decimal = 0;
- }
- if (comn_trend_duration < 1 || comn_trend_duration > 24)
- {
- comn_trend_duration = 1;
- }
- if (comn_disp_template < 0 || comn_disp_template > 5)
- {
- comn_disp_template = 0;
- }
- _get_dev_var_value(literal_string(1521),0,16580);
- save_values();
- if (comn_disp_template == 3 || comn_disp_template == 2)
- {
- do {
- do {
- _get_dev_var_value(literal_string(1554),0,16588);
- if (comn_chart_low_limit > 100000000 || comn_chart_low_limit < -100000000)
- {
- ACKNOWLEDGE(literal_string(1523));
- }
- }
- while (comn_chart_low_limit > 100000000 || comn_chart_low_limit < -100000000);
- do {
- _get_dev_var_value(literal_string(1555),0,16589);
- if (comn_chart_hi_limit > 100000000 || comn_chart_hi_limit < -100000000)
- {
- ACKNOWLEDGE(literal_string(1523));
- }
- }
- while (comn_chart_hi_limit > 100000000 || comn_chart_hi_limit < -100000000);
- if (comn_chart_hi_limit <= comn_chart_low_limit)
- {
- ACKNOWLEDGE(literal_string(1525));
- }
- }
- while (comn_chart_hi_limit <= comn_chart_low_limit);
- if (comn_disp_template == 3)
- {
- if (comn_trend_duration < 1 || comn_trend_duration > 24)
- {
- comn_trend_duration = 1;
- }
- _get_dev_var_value(literal_string(1526),0,16581);
- }
- }
- if (comn_disp_template == 0)
- {
- ACKNOWLEDGE(literal_string(1528));
- save_values();
- process_abort();
- }
- loc_prev_PV_publish = comn_PV_publish;
- if (comn_PV_publish < 1 || comn_PV_publish > 9)
- {
- comn_PV_publish = 1;
- }
- if (display_type_code != 2)
- {
- if (0 == module_type_code)
- {
- if (pild_options == 1 && (comn_disp_template != 4 && comn_disp_template != 5))
- {
- sel_PV_publish = SELECT_FROM_LIST(literal_string(1529),literal_string(1530));
- }
- else
- if (pild_options == 1 && (comn_disp_template == 4 || comn_disp_template == 5) || pild_options == 0)
- {
- sel_PV_publish = SELECT_FROM_LIST(literal_string(1529),literal_string(1531));
- }
- }
- else
- {
- if (pild_options == 1 && (comn_disp_template != 4 && comn_disp_template != 5))
- {
- sel_PV_publish = SELECT_FROM_LIST(literal_string(1529),literal_string(1530));
- }
- else
- if (pild_options == 1 && (comn_disp_template == 4 || comn_disp_template == 5) || pild_options == 0)
- {
- sel_PV_publish = SELECT_FROM_LIST(literal_string(1529),literal_string(1531));
- }
- }
- if (sel_PV_publish == 0)
- {
- comn_PV_publish = 1;
- }
- else
- {
- if (sel_PV_publish == 1)
- {
- comn_PV_publish = 2;
- }
Please login for more