Loading…

Method Name: shutdown_1b2_SISProgramFlow_method

Method ID: 0x435A

Method Label: Program Flow Failure Shutdown

Method Help: Shutdown on Travel Program Flow Failure Shutdown. Upon shutdown, the instrument attempts to drive its output pressure to the zero input current condition and no longer executes its control functions.


{ int qOkToEditFlag, qBitEnabled; long ids[2]; char qq[3]; float qa, qb, qc, qd, qe; int q, q0, q1, q2, q3; char S[3]; _set_device_status(0xFF,0); _set_xmtr_device_status(0xFF,0); _set_all_resp_code(1); _set_resp_code((8),0); send_trans(129,0,S); _vassign(16452,16427); save_values(); send_command_trans(129, 22); qBitEnabled = 0; if (_ivar_value(16644) & 0x04) qBitEnabled = 1; _iassign(16415,(qBitEnabled)); send_command(48); qOkToEditFlag = 0; ids[0] = 16415; if ((_ivar_value(167) == 1) || (_ivar_value(16427))) { if(_ivar_value(4139) & 0x04) { acknowledge("|en|Program Flow Failure Shutdown: %{0}\nThe instrument is reporting an active Alert.\n\nTo change, place 'Out of Service' and ensure Protection is None.", ids); } else { acknowledge("|en|Program Flow Failure Shutdown: %{0}\n\nTo change, place 'Out of Service' and ensure Protection is None.", ids); } } else { if((1 == _ivar_value(16472)) || (5 == _ivar_value(16472))) { if(1 == _ivar_value(16472)) { if(_ivar_value(4139) & 0x04) { acknowledge("|en|Program Flow Failure Shutdown: %{0}\nThe instrument is reporting an active Alert.\n\nAccess restricted. Instrument was set to 'Out of Service' by a secondary master.", ids); } else { acknowledge("|en|Program Flow Failure Shutdown: %{0}\n\nAccess restricted. Instrument was set to 'Out of Service' by a secondary master.", ids); } } else { ACKNOWLEDGE("|en|Access restricted\n\nInstrument was set to 'Out of Service' by a primary master."); if(_ivar_value(4139) & 0x04) { acknowledge("|en|Program Flow Failure Shutdown: %{0}\nThe instrument is reporting an active Alert.\n\nAccess restricted. Instrument was set to 'Out of Service' by a primary master.", ids); } else { acknowledge("|en|Program Flow Failure Shutdown: %{0}\n\nAccess restricted. Instrument was set to 'Out of Service' by a primary master.", ids); } } } else { qOkToEditFlag = 1; } _set_resp_code((16),1); send_trans(129,0,S); } if(qOkToEditFlag) { if((_ivar_value(4139) & 0x04) && (0 == _ivar_value(16415))) { ids[0] = 16508; _get_dev_var_value(("|en|WARNING! The instrument is reporting an active alert. Enabling the shutdown will cause the valve to move to its Zero Power Condition (%{0}).\n\nProgram Flow Failure Shutdown"),(ids),16415); } else { _get_dev_var_value(("|en|Program Flow Failure Shutdown"),0,16415); } save_values(); if(_ivar_value(16415) != qBitEnabled) { if (_ivar_value(16415) == 0) { _iassign(16644,(_ivar_value(16644) ^ 0x04)); } else { _iassign(16644,(_ivar_value(16644) | 0x04)); } send_command_trans(130, 128); DELAY(2,"|en|Program Flow Failure Shutdown has been sent to the instrument."); } } }