Loading…

Method Name: valve_characteristic_function_method

Method ID: 0x421A

Method Label: Custom Curve

Method Help: Used to read/write user defined transfer function. The curve can have 19 data points.


  • {
  • char status[3];
  • int select_read_write;
  • int select_use_unuse;
  • int unuse_flag;
  • int c_no;
  • int c_no_puls;
  • int max_c_no;
  • int global_var_ids[2];
  • float x_work_old_plus;
  • float y_work_old_plus;
  • _set_device_status(0xFF,0);
  • send_trans(152,0,status);
  • if (status[0])
  • {
  • display_response_status(152,status[0]);
  • DELAY(2,literal_string(1317));
  • process_abort();
  • }
  • select_read_write = SELECT_FROM_LIST(literal_string(1386),literal_string(1322));
  • if (select_read_write == 0)
  • {
  • _MenuDisplay(16931,literal_string(461),0);
  • }
  • else
  • {
  • max_c_no = 19;
  • c_no = 0;
  • c_no_puls = 1;
  • unuse_flag = 1;
  • send_command_trans(130,0);
  • if (write_protect_status_flag & 0x01)
  • {
  • ACKNOWLEDGE(literal_string(1324));
  • process_abort();
  • }
  • DELAY(2,literal_string(1387));
  • do {
  • if (unuse_flag != 0)
  • {
  • c_no_puls = c_no + 1;
  • select_use_unuse = SELECT_FROM_LIST(literal_string(1388),literal_string(1389));
  • if (select_use_unuse == 0)
  • {
  • switch (c_no)
  • {
  • case 0:
  • if (valve_characteristic_function_xvalues_01 < x_work_old_plus || valve_characteristic_function_xvalues_01 > 99.9)
  • valve_characteristic_function_xvalues_01 = x_work_old_plus;
  • _get_dev_var_value(literal_string(1390),0,16932);
  • x_work_old_plus = valve_characteristic_function_xvalues_01 + 0.1;
  • if (valve_characteristic_function_yvalues_01 < y_work_old_plus || valve_characteristic_function_yvalues_01 > 99.9)
  • valve_characteristic_function_yvalues_01 = y_work_old_plus;
  • _get_dev_var_value(literal_string(1391),0,16933);
  • y_work_old_plus = valve_characteristic_function_yvalues_01 + 0.1;
  • break;
  • case 1:
  • if (valve_characteristic_function_xvalues_02 < x_work_old_plus || valve_characteristic_function_xvalues_02 > 99.9)
  • valve_characteristic_function_xvalues_02 = x_work_old_plus;
  • _get_dev_var_value(literal_string(1390),0,16934);
  • x_work_old_plus = valve_characteristic_function_xvalues_02 + 0.1;
  • if (valve_characteristic_function_yvalues_02 < y_work_old_plus || valve_characteristic_function_yvalues_02 > 99.9)
  • valve_characteristic_function_yvalues_02 = y_work_old_plus;
  • _get_dev_var_value(literal_string(1391),0,16935);
  • y_work_old_plus = valve_characteristic_function_yvalues_02 + 0.1;
  • break;
  • case 2:
  • if (valve_characteristic_function_xvalues_03 < x_work_old_plus || valve_characteristic_function_xvalues_03 > 99.9)
  • valve_characteristic_function_xvalues_03 = x_work_old_plus;
  • _get_dev_var_value(literal_string(1390),0,16936);
  • x_work_old_plus = valve_characteristic_function_xvalues_03 + 0.1;
  • if (valve_characteristic_function_yvalues_03 < y_work_old_plus || valve_characteristic_function_yvalues_03 > 99.9)
  • valve_characteristic_function_yvalues_03 = y_work_old_plus;
  • _get_dev_var_value(literal_string(1391),0,16937);
  • y_work_old_plus = valve_characteristic_function_yvalues_03 + 0.1;
  • break;
  • case 3:
  • if (valve_characteristic_function_xvalues_04 < x_work_old_plus || valve_characteristic_function_xvalues_04 > 99.9)
  • valve_characteristic_function_xvalues_04 = x_work_old_plus;
  • _get_dev_var_value(literal_string(1390),0,16938);
  • x_work_old_plus = valve_characteristic_function_xvalues_04 + 0.1;
  • if (valve_characteristic_function_yvalues_04 < y_work_old_plus || valve_characteristic_function_yvalues_04 > 99.9)
  • valve_characteristic_function_yvalues_04 = y_work_old_plus;
  • _get_dev_var_value(literal_string(1391),0,16939);
  • y_work_old_plus = valve_characteristic_function_yvalues_04 + 0.1;
  • break;
  • case 4:


Please login for more