Loading…

Method Name: set_PST_defaults_abort

Method ID: 0x433F

Method Label: Exit PST Calibration

Method Help:


  • {
  • float qa;
  • float qb;
  • float qc;
  • float qd;
  • float qe;
  • float mpp;
  • int q;
  • int q0;
  • int q1;
  • int q2;
  • int q3;
  • int q4;
  • int q5;
  • int q6;
  • int q7;
  • int q8;
  • char S[3];
  • int i;
  • int j;
  • int k;
  • long ids[3];
  • float qLowerLimit;
  • float qUpperLimit;
  • float qPressLimit;
  • float qPressDevAlertPt;
  • float qb5;
  • float qSupplyPress;
  • _set_device_status(0xFF,0);
  • _set_xmtr_device_status(0xFF,0);
  • _set_all_resp_code(1);
  • _set_resp_code(8,0);
  • save_values();
  • DELAY(1,literal_string(2223));
  • send_trans(129,35,S);
  • switch (_ivar_value(16434))
  • {
  • case 7:
  • qb5 = 0.689;
  • break;
  • case 12:
  • qb5 = 68.9;
  • break;
  • case 10:
  • qb5 = 0.703;
  • break;
  • default:
  • qb5 = 10.0;
  • break;
  • }
  • q1 = _ivar_value(16529);
  • q2 = -(_ivar_value(16532) & 0x01);
  • q3 = -_ivar_value(16508);
  • if (2 == q1)
  • q1 = -1;
  • if (!q2)
  • q2 = 1;
  • if (!q3)
  • q3 = 1;
  • k = q1 * q2 * q3;
  • qSupplyPress = _fvar_value(16405);
  • if (qSupplyPress < qb5 * 2.5)
  • {
  • qLowerLimit = qb5 * 0.3;
  • qUpperLimit = qb5 * 1.5;
  • }
  • else
  • if (qSupplyPress < qb5 * 4.0)
  • {
  • qLowerLimit = qb5 * 0.6;
  • qUpperLimit = qb5 * 3.0;
  • }
  • else
  • {
  • qLowerLimit = qSupplyPress * 0.15;
  • qUpperLimit = qSupplyPress * 0.85;
  • }
  • if ((_ivar_value(16530) & 0x01) == 0)
  • {
  • if (-1 == k)
  • {
  • qPressDevAlertPt = 1.5;
  • qPressLimit = qUpperLimit - 0.20 * (qUpperLimit - qLowerLimit);
  • }
  • else
  • {
  • qPressDevAlertPt = 2.0;
  • qPressLimit = qLowerLimit + 0.20 * (qUpperLimit - qLowerLimit);
  • }
  • }
  • else
  • {
  • qPressDevAlertPt = 5.0;
  • qPressLimit = -0.8 * qSupplyPress;
  • if (qPressLimit < qb5 * -3.5)
  • qPressLimit = qb5 * -3.5;
  • if (-1 == k)
  • {
  • qPressLimit = -qPressLimit;


Please login for more