Loading…

方法名称: configure_basic_screen

方法ID: 0x4183

方法标签: Configure

方法描述: 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(1498));
  • send(76,status);
  • lock_dev = _ivar_value(4208);
  • if (lock_dev != 0)
  • {
  • ACKNOWLEDGE(literal_string(1499));
  • process_abort();
  • }
  • if (display_type_code == 0)
  • {
  • ACKNOWLEDGE(literal_string(1515));
  • 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(1529),literal_string(1550));
  • }
  • else
  • {
  • 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;
  • }
  • else
  • {
  • if (sel_PV_publish == 2)
  • {
  • comn_PV_publish = 3;
  • comn_PV_processing = 0;
  • sel_units = SELECT_FROM_LIST(literal_string(1539),literal_string(1197));
  • if (sel_units == 0)
  • {
  • comn_units = 238;
  • }
  • }
  • else
  • {
  • if (sel_PV_publish == 3)
  • {
  • comn_PV_publish = 4;
  • sel_units = SELECT_FROM_LIST(literal_string(1539),literal_string(1551));
  • 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(1546),0,16593);
  • comn_custom_units = loc_cUnitEng;
  • do {
  • do {
  • _get_dev_var_value(literal_string(1537),0,16587);
  • if (comn_custom_EU_LO > 100000000 || comn_custom_EU_LO < -100000000)
  • {
  • ACKNOWLEDGE(literal_string(1523));
  • }
  • }
  • while (comn_custom_EU_LO > 100000000 || comn_custom_EU_LO < -100000000);
  • do {
  • _get_dev_var_value(literal_string(1538),0,16586);
  • if (comn_custom_EU_HI > 100000000 || comn_custom_EU_HI < -100000000)
  • {
  • ACKNOWLEDGE(literal_string(1523));
  • }
  • }
  • while (comn_custom_EU_HI > 100000000 || comn_custom_EU_HI < -100000000);
  • if (comn_custom_EU_HI <= comn_custom_EU_LO)
  • {
  • ACKNOWLEDGE(literal_string(1525));
  • }
  • }
  • while (comn_custom_EU_HI <= comn_custom_EU_LO);
  • }
  • }
  • else
  • {
  • if (0 == module_type_code)
  • {
  • if (sel_PV_publish == 4)
  • {
  • comn_PV_publish = 5;
  • }
  • }
  • }
  • }
  • }
  • }
  • }
  • else
  • {


请登录以获得完整内容