Loading…
Loading…
Method Name: configure_screen
Method ID: 0x4182
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);
- _add_abort_method(16774);
- ACKNOWLEDGE(literal_string(1231));
- send(76,status);
- lock_dev = _ivar_value(4208);
- if (lock_dev != 0)
- {
- ACKNOWLEDGE(literal_string(1232));
- process_abort();
- }
- if (display_type_code == 0)
- {
- ACKNOWLEDGE(literal_string(1227));
- process_abort();
- }
- if (screen_number < 62 || screen_number > 69)
- {
- screen_number = 62;
- }
- _get_dev_var_value(literal_string(1233),0,16579);
- PUT_MESSAGE(literal_string(1230));
- send_command(206);
- send_command(207);
- send_command(208);
- send_command(209);
- if (comn_disp_template < 0 || comn_disp_template > 3)
- {
- comn_disp_template = 0;
- }
- if (comn_PV_publish < 1 || comn_PV_publish > 5)
- {
- 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 = 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 = 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 > 3)
- {
- comn_disp_template = 0;
- }
- _get_dev_var_value(literal_string(1234),0,16580);
- save_values();
- if (comn_disp_template == 3 || comn_disp_template == 2)
- {
- do {
- do {
- _get_dev_var_value(literal_string(1235),0,16588);
- if (comn_chart_low_limit > 100000000 || comn_chart_low_limit < -100000000)
- {
- ACKNOWLEDGE(literal_string(1236));
- }
- }
- while (comn_chart_low_limit > 100000000 || comn_chart_low_limit < -100000000);
- do {
- _get_dev_var_value(literal_string(1237),0,16589);
- if (comn_chart_hi_limit > 100000000 || comn_chart_hi_limit < -100000000)
- {
- ACKNOWLEDGE(literal_string(1236));
- }
- }
- while (comn_chart_hi_limit > 100000000 || comn_chart_hi_limit < -100000000);
- if (comn_chart_hi_limit <= comn_chart_low_limit)
- {
- ACKNOWLEDGE(literal_string(1238));
- }
- }
- 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(1239),0,16581);
- }
- }
- if (comn_disp_template == 0)
- {
- do {
- send(202,status);
- if (status[0] != 0 && status[0] != 16)
- {
- display_response_status(202,status[0]);
- ACKNOWLEDGE(literal_string(1096));
- process_abort();
- }
- DELAY(5,literal_string(1240));
- }
- while (status[0] == 16);
- do {
- send(205,status);
- if (status[0] != 0 && status[0] != 16)
- {
- display_response_status(205,status[0]);
- ACKNOWLEDGE(literal_string(1096));
- process_abort();
- }
- DELAY(5,literal_string(1240));
- }
- while (status[0] == 16);
- ACKNOWLEDGE(literal_string(1241));
- save_values();
- process_abort();
- }
- loc_prev_PV_publish = comn_PV_publish;
- if (comn_PV_publish < 1 || comn_PV_publish > 5)
- {
- comn_PV_publish = 1;
Please login for more