Loading…
Loading…
Method Name: configure_basic_screen
Method ID: 0x4183
Method Label: Configure
Method Help: This allows you to configure a Basic 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(1243));
- send(76,status);
- lock_dev = _ivar_value(4208);
- if (lock_dev != 0)
- {
- ACKNOWLEDGE(literal_string(1244));
- process_abort();
- }
- if (display_type_code == 0)
- {
- ACKNOWLEDGE(literal_string(1259));
- process_abort();
- }
- if (display_type_code == 3)
- {
- ACKNOWLEDGE(literal_string(1260));
- process_abort();
- }
- screen_number = 62;
- if (comn_disp_template != 1)
- {
- comn_disp_template = 1;
- }
- send_command(206);
- send_command(207);
- send_command(208);
- send_command(209);
- loc_prev_PV_publish = comn_PV_publish;
- if (comn_PV_publish != 1 && comn_PV_publish != 3 && comn_PV_publish != 4)
- {
- comn_PV_publish = 1;
- }
- if (comn_disp_template < 0 || comn_disp_template > 3)
- {
- comn_disp_template = 0;
- }
- 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_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 (display_type_code != 2)
- {
- if (0 == module_type_code)
- {
- sel_PV_publish = SELECT_FROM_LIST(literal_string(1273),literal_string(1274));
- }
- else
- {
- sel_PV_publish = SELECT_FROM_LIST(literal_string(1273),literal_string(1292));
- }
- if (sel_PV_publish == 0)
- {
- comn_PV_publish = 1;
- }
- else
- {
- if (sel_PV_publish == 1)
- {
- comn_PV_publish = 2;
- }
- else
- {
- if (sel_PV_publish == 2)
- {
- comn_PV_publish = 3;
- comn_PV_processing = 0;
- sel_units = SELECT_FROM_LIST(literal_string(1282),literal_string(953));
- if (sel_units == 0)
- {
- comn_units = 238;
- }
- }
- else
- {
- if (sel_PV_publish == 3)
- {
- comn_PV_publish = 4;
- sel_units = SELECT_FROM_LIST(literal_string(1282),literal_string(1293));
- if (sel_units == 0)
- {
- comn_units = 238;
- comn_PV_processing = 0;
- }
- else
- {
- if (sel_units == 1)
- {
- comn_units = 0;
- }
- }
- if (sel_units == 1)
- {
- comn_PV_processing = 2;
- _get_dev_var_value(literal_string(1289),0,16593);
- comn_custom_units = loc_cUnitEng;
- do {
- do {
- _get_dev_var_value(literal_string(1280),0,16587);
- if (comn_custom_EU_LO > 100000000 || comn_custom_EU_LO < -100000000)
- {
- ACKNOWLEDGE(literal_string(1267));
- }
- }
- while (comn_custom_EU_LO > 100000000 || comn_custom_EU_LO < -100000000);
- do {
- _get_dev_var_value(literal_string(1281),0,16586);
- if (comn_custom_EU_HI > 100000000 || comn_custom_EU_HI < -100000000)
- {
- ACKNOWLEDGE(literal_string(1267));
- }
- }
- while (comn_custom_EU_HI > 100000000 || comn_custom_EU_HI < -100000000);
- if (comn_custom_EU_HI <= comn_custom_EU_LO)
- {
- ACKNOWLEDGE(literal_string(1269));
- }
- }
- while (comn_custom_EU_HI <= comn_custom_EU_LO);
- }
- }
- else
- {
- if (0 == module_type_code)
- {
- if (sel_PV_publish == 4)
- {
- comn_PV_publish = 5;
- }
- }
Please login for more