Loading…

方法名称: SOV_calib_method

方法ID: 0x4782

方法标签: SOV Test Calibration

方法描述:


  • {
  • float qa, qb, qc, qd, qe, mpp; int q, q0, q1, q2, q3, q4, q5, q6, q7, q8; char S[3];
  • int z;
  • int i;
  • int qTvl_convergence;
  • long T1, T2, loopTimer, convergenceTimer, currentTime;
  • int eResult, eResult2;
  • float qSOV_start_press, qPress_convergence;
  • float qd7, qTravelAbs, qPressure, qPressAbs;
  • float T, H1, p_trip, p_reset, p_delta, gamma, qTarget_travel;
  • long ids[4];
  • float sov_results_trip_pressure, sov_results_reset_pressure;
  • int sov_results_press_units;
  • float qCycle_counter_deadband;
  • int cycle_counter_value;
  • int qSOV_test_option_bit_5;
  • int qSOV_test_option_bit_6;
  • int qSOV_test_option_bit_7;
  • float qSOV_pulse_duration;
  • float qSOV_alert_trip_pressure;
  • float qSOV_alert_reset_pressure;
  • float qSOV_monitoring_time;
  • float qEPPC_sat_time;
  • int bChanged;
  • int nIteration;
  • float p_supply;
  • int MAX_ITER;
  • int ePreviousState;
  • int eCurrentState;
  • float sov_pulse_previous;
  • float c;
  • int nCycleCounter;
  • int MAX_ITER_C;
  • float sov_results_trip_pressure_previous;
  • float sov_results_reset_pressure_previous;
  • _set_device_status(0xFF,0);
  • _set_xmtr_device_status(0xFF,0);
  • _set_all_resp_code(1);
  • _set_resp_code((8),0);
  • if(((_ivar_value(16532)&0x18)>0)) { ACKNOWLEDGE("|en|This instrument's Relay Type is set to a High Cv Spool Valve. This is not supported by this version of the DD. Please use a version of ValveLink Software or ValveLink Mobile that supports the High Cv Relay Type to properly configure this instrument."); process_abort(); };
  • bChanged = 0;
  • nIteration = 0;
  • p_supply = _fvar_value(16439);
  • MAX_ITER = 10;
  • ePreviousState = 0;
  • eCurrentState = 0;
  • sov_pulse_previous = 0.0;
  • c = 1.0;
  • nCycleCounter = 0;
  • MAX_ITER_C = 3;
  • sov_results_trip_pressure_previous = 0.0;
  • sov_results_reset_pressure_previous = 0.0;
  • send_trans(129,35,S);
  • send_trans(129,40,S);
  • send_trans(129,41,S);
  • if(!(((inst_level & 0x0100) && !(inst_level & 0x0040))))
  • {
  • ACKNOWLEDGE("|en|This Instrument Level does not support this procedure.");
  • }
  • else if(((_ivar_value(16530) & 0x01) > 0))
  • {
  • ACKNOWLEDGE("|en|Actuator Style has been set to double Acting. For SOV testing, Actuator Style needs to be set to single acting.");
  • }
  • else if((_ivar_value(16532) & 0x02) == 0)
  • {
  • ACKNOWLEDGE("|en|For SOV testing, Relay Type needs to be set to Special App.");
  • }
  • else if(_ivar_value(16486) != 10 || _ivar_value(16489) != 1 || _ivar_value(16491) != 0)
  • {
  • ACKNOWLEDGE("|en|The DVC output terminals have not been configured for SOV testing. Enable this feature in Manual Setup or rerun Device Setup before proceeding");
  • }
  • else
  • {
  • send_trans(129,0,S); _vassign(16452,16427); save_values(); if(1==_ivar_value(167)) { ACKNOWLEDGE("|en|Protection must be disabled to perform this operation."); process_abort(); } if((_ivar_value(16427))) { if(((_ivar_value(16465) & 0x01C0) == 0x0100)) { _get_dev_var_value(("|en|WARNING! Output will not track input and the SIS safety function will be disabled when Instrument Mode is Out of Service."),0,16452); } else { _get_dev_var_value(("|en|WARNING! Output will not track input when Instrument Mode is Out of Service."),0,16452); } save_values(); if(_ivar_value(16452)>0) { ACKNOWLEDGE("|en|Instrument Mode is still In Service."); process_abort(); } else { send_trans(130,6,S); } } send_trans(129,0,S); if((1==_ivar_value(16472)) || (5==_ivar_value(16472))) { if(1==_ivar_value(16472)) { ACKNOWLEDGE("|en|Access restricted\n\nInstrument was set to 'Out of Service' by a secondary master."); } else { ACKNOWLEDGE("|en|Access restricted\n\nInstrument was set to 'Out of Service' by a primary master."); } process_abort(); } _add_abort_method(17167); DELAY(1,"|en|Please wait...");
  • if(1 - SELECT_FROM_LIST("|en|WARNING! Calibration will cause sudden changes in instrument output and loss of process control.","|en|Continue;Exit"))
  • {
  • DELAY(1,"|en|Please wait...");
  • send_trans(129,29,S);
  • send_trans(129,35,S);
  • send_trans(129,11,S);
  • send_trans(129,20,S);
  • send_trans(129,80,S);
  • save_values();


请登录以获得完整内容