open-insight/LSL2/OIEVENT/WRITE/SPC_CLEAN_HF_AKRION..json
2024-03-25 15:12:53 -07:00

11 lines
1.8 KiB
JSON

{
"header": {
"version": 1,
"type": "record"
},
"body": {
"record1": {
"<1>": "declare function rowexists, msg, dialog_box\r\ndeclare subroutine forward_event\r\n\r\n$insert spc_limits_equ\r\n$insert msg_equates\r\nequ CrLf$ to char(13):char(10)\r\n\r\nif rowexists( 'SPC_CLEAN_HF_AKRION', .control_id->text ) then\r\n return 1\r\nend else\r\n if .tech_sig->text <> '' then\r\n * NOW CHECK TO SEE IF THE OCAP IS REQUIRED\r\n Delta = .delta->text\r\n TermNo = .term_no->text\r\n Type = .hftype->text\r\n if Type = 'Qual' then\r\n HFMax = xlate( 'CONFIG', 'SPC_LIMITS', HFParticleAkrionQualMax$, 'X' ) \r\n end else\r\n HFMax = xlate( 'CONFIG', 'SPC_LIMITS', HFParticleAkrionHFLastMax$, 'X' ) \r\n end\r\n * IF TERMNO THEN THEY HAVE ALREADY GONE THROUGH THE OCAP AND EVERYTHING IS OK\r\n if ( Delta > HFMax ) and ( TermNo = '' ) then\r\n * OCAP REQUIRED\r\n MsgInfo = ''\r\n Text = 'Please follow the Akrion HF \"Out of Control Action Plan\".':CrLf$\r\n Text:= 'This will guide you to a term number...Click OK to view OCAP.' \r\n MsgInfo<mtext$> = Text\r\n MsgInfo<micon$> = '!'\r\n Void = msg( @window, MsgInfo )\r\n RetValue = Dialog_Box( 'SPC_OCAP', @window, 'SPC_SC1_HF_OCAP':char(245):'*CENTER' )\r\n\t .term_no->enabled = 1\r\n\t .term_no->text = RetValue\r\n Void = set_property( \"SYSTEM\", \"FOCUS\", @window:'.TERM_NO' )\t \r\n end else\r\n .entry_id->text = @user4\r\n return 1\r\n end\r\n end else\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You must sign this Akrion HF SPC Control entry first...' \r\n MsgInfo<micon$> = 'H'\r\n Void = msg( '', MsgInfo )\r\n end\r\nend\r\nreturn 0"
}
}
}