Files
open-insight/LSL2/OIEVENT/POSCHANGED/SCRUBBER_MAINT_MULT.LL_INFO.json
2024-03-25 15:12:53 -07:00

11 lines
1.7 KiB
JSON

{
"header": {
"version": 1,
"type": "record"
},
"body": {
"record1": {
"<1>": "declare subroutine forward_event\r\ndeclare function msg\r\n\r\nforward_event()\r\nCurTime = time()\r\nSelPos = .ll_info->selpos\r\nCurCol = SelPos<1>\r\nCurRow = SelPos<2>\r\nLastSelPos = set_property( @window, '@LastSelPos', SelPos )\r\nCurArray = .ll_info->array\r\nCol = LastSelPos<1>\r\nRow = LastSelPos<2>\r\nLastVal = set_property( @window, '@LastVal', CurArray<CurCol,CurRow> )\r\n\r\nif Col = 3 or Col = 5 then\r\n TCurVal = CurArray<Col,Row>\r\n if TCurVal <> LastVal then\r\n * only set dates if they have changed the time cause they may with to override the \r\n * default date\r\n\t CurVal = iconv( CurArray<Col,Row>, 'MT' )\r\n\t if CurVal > CurTime then \r\n\t CurArray<2,Row> = oconv( date()-1, 'D2/' )\r\n\t CurArray<4,Row> = oconv( date()-1, 'D2/' ) \r\n\t CurArray<5,Row> = CurArray<Col,Row> ;* set end time to start time \r\n\t ;* cause a lot of times they dont charge any\r\n\t ;* time if reactor is down\r\n\t \r\n\t \r\n\t end else\r\n\t if CurVal <> '' then\r\n\t\t CurArray<2,Row> = oconv( date(), 'D2/' )\r\n\t\t CurArray<4,Row> = oconv( date(), 'D2/' )\r\n\t\t CurArray<5,Row> = CurArray<Col,Row> ;* set end time to start time \r\n\t\t ;* cause a lot of times they dont charge any\r\n\t\t ;* time if reactor is down\r\n\t end \r\n\t end \r\n end\r\n .ll_info->array = CurArray\r\nend\r\nRETURN 1"
}
}
}