Loading…
Loading…
Method Name: XStatus1b6_SIS_TrippedByLCPEnab_method
Method ID: 0x4363
Method Label: Tripped by the LCP Enable
Method Help: Enable or disable the reporting of the Tripped by the LCP Enable
{ int qBitEnabled, q08; char qq[3]; long ids[2]; _set_device_status(0xFF,0); _set_xmtr_device_status(0xFF,0); _set_all_resp_code(1); _set_resp_code((8),0); qBitEnabled = 0; if((_ivar_value(16543) & 0x40) > 0) { qBitEnabled = 1; } _iassign(16415,(qBitEnabled)); save_values(); send_trans(129,7,qq); send_trans(129,0,qq); ids[0] = 16415; if ((_ivar_value(167) == 1)) { acknowledge("|en|Tripped by the LCP Enable: %{0}\n\nTo change, disable Protection.", ids); } else { _set_resp_code((16),0); send_trans(130,113,qq); if(16 == qq[0]) { ACKNOWLEDGE("|en|Access restricted\n\nInstrument was set to 'Out of Service' by another master."); acknowledge("|en|Tripped by the LCP Enable: %{0}", ids); } else { _set_resp_code((16),1); _get_dev_var_value(("|en|Tripped by the LCP Enable"),0,16415); save_values(); q08 = _ivar_value(16415); if(qBitEnabled != q08) { qBitEnabled = _ivar_value(16543); if(q08) { qBitEnabled = qBitEnabled | 0x40; } else { qBitEnabled = qBitEnabled ^ 0x40; } _iassign(16543,(qBitEnabled)); send_trans(130,113,qq); if(q08 > 0) { DELAY(2,"|en|Tripped by the LCP Enable reporting has been enabled."); } else { DELAY(2,"|en|Tripped by the LCP Enable reporting has been disabled."); } } } } if(_ivar_value(16415) > 0) { send_command(48); if(_ivar_value(4140) & 0x40) { ACKNOWLEDGE("|en|The instrument is reporting an active Alert."); } else { ACKNOWLEDGE("|en|The instrument is not reporting an active Alert."); } } }