Loading…

Method Name: custom_char_method

Method ID: 0x431F

Method Label: Custom Characterization Table

Method Help: Enter the Set Point values and Travel Targets for each of the 21 Custom Characterization points. Set Point values are non-characterized travel.


  • {
  • int q;
  • char S[3];
  • int m;
  • int n;
  • int i;
  • int j;
  • int c;
  • int r;
  • int k;
  • int RO;
  • int s;
  • float fRoundingFactor;
  • float x0;
  • float x1;
  • float x2;
  • float x[21];
  • float y0;
  • float y1;
  • float y2;
  • float y[21];
  • long ids[9];
  • _set_device_status(0xFF,0);
  • _set_xmtr_device_status(0xFF,0);
  • _set_all_resp_code(1);
  • _set_resp_code(8,0);
  • send(151,S);
  • if (_ivar_value(16804) > 2)
  • {
  • ACKNOWLEDGE(literal_string(2015));
  • return;
  • }
  • ;
  • DELAY(1,literal_string(2223));
  • q = 0.9;
  • fRoundingFactor = 0.0;
  • if (q < 1)
  • fRoundingFactor = 0.5;
  • send_command_trans(129,0);
  • s = 0;
  • RO = 0;
  • if (1 == _ivar_value(167) || _ivar_value(16427))
  • {
  • RO = 1;
  • }
  • send_trans(133,0,S);
  • save_values();
  • if (_ivar_value(16675) < 85)
  • {
  • if (1 != RO)
  • {
  • send_trans(133,7,S);
  • send_trans(133,1,S);
  • send_trans(133,7,S);
  • }
  • else
  • {
  • ACKNOWLEDGE(literal_string(2308));
  • process_abort();
  • }
  • }
  • for (i = 0; i <= 3; i++)
  • {
  • send_trans(134,i,S);
  • save_values();
  • }
  • n = _ivar_value(16679);
  • for (i = 0; i < n; i++)
  • {
  • x[i] = (_ivar_value(resolve_array_ref(16722,i + 1)) - 2048) / 81.92 * 100.0;
  • if (x[i] < 0.0)
  • j = x[i] - fRoundingFactor;
  • else
  • j = x[i] + fRoundingFactor;
  • x[i] = (j + 1.0) / 100.0;


Please login for more