Loading…

Method Name: th_calib

Method ID: 0x4150

Method Label: Calibrate Sensor

Method Help: Calibrate Zero and Span.(Zero first)


  • {
  • long idc[5];
  • char status[3];
  • int use_abort_method;
  • int ret;
  • int cal_art;
  • char xmtr_status[25];
  • int cmd;
  • int gasi;
  • int uniti;
  • int maxGas;
  • int maxUnit;
  • int altgas;
  • SET_NUMBER_OF_RETRIES(10);
  • _set_all_resp_code(0);
  • _set_xmtr_all_resp_code(0);
  • _set_device_status(0xFF,0);
  • _set_xmtr_device_status(0xFF,0);
  • _add_abort_method(16721);
  • ret = SELECT_FROM_LIST(literal_string(1542),literal_string(1543));
  • cal_art = ret;
  • if (cal_art == 0)
  • {
  • PUT_MESSAGE(literal_string(1544));
  • _iassign(16712,0);
  • }
  • else
  • {
  • PUT_MESSAGE(literal_string(1545));
  • _iassign(16712,1);
  • }
  • send(192,status);
  • if (_ivar_value(16712) == 6)
  • {
  • DELAY(4,literal_string(1546));
  • process_abort();
  • }
  • if (_ivar_value(16712) == 5)
  • {
  • DELAY(4,literal_string(1547));
  • process_abort();
  • }
  • switch (_ivar_value(16709))
  • {
  • case 0:
  • case 2:
  • case 3:
  • break;
  • case 7:
  • break;
  • case 4:
  • DELAY(4,literal_string(1548));
  • process_abort();
  • break;
  • case 5:
  • DELAY(4,literal_string(1549));
  • process_abort();
  • break;
  • case 6:
  • DELAY(4,literal_string(1550));
  • process_abort();
  • break;
  • case 10:


Please login for more