120
Jump Register
The text display has the ability to store screens in memory, so a mechanism was added for the host to easily recall a
stored screen e.g. for use as an alarm message. In order to do this within a script a register has been introduced which
can be set from 1 to 255 by the host system. The
<JR
n
>
Jump Register BEKA command is used to set the value of the
register to n. The register will remain set to the value until either the host changes it or the script clears it by execution
the
*GR
n
Goto Register command where
n
matches the value of the register.
NS
WTPress Key 1 or 2
*LAloop
*GK1,one
*GK2,two
*GR100,error1
*GR200,error2
*GTloop
*LAtwo
CM7,0
WTScreen 2
EL
*GTloop
*LAone
CM7,0
WTScreen 1
EL
*GTloop
*LAerror1
CM7,0
WTHost Alarm 1
EL
*GTloop
*LAerror2
CM7,0
WTHost Alarm 2
EL
*Gtloop
Here the operation is the same as for the Goto Key example, but has been extended to allow the host to put up an alarm
message. If the host issues a
<JR100>
command then the message “Host Alarm 1” will appear on the display and the
Jump Register will be reset to 0. Similarly, if the host were to issue a
<JR200>
command then “Host Alarm 2 “ will
appear on the display and the Jump Register will be reset to 0.
Note that setting the jump register to any other number will not have any effect and the register will remain set to that
number until the host changes it.
Delays and Waits
In the real world humans need time to input data and make decisions on it, thus it is often necessary for the display
device to wait for the operator to catch up. Delay Times are set with the
*DT
n
command where
n
is the time to wait in
100ms intervals.
OE1
*DT5
OD1
Would turn on the output 1 of the text display for 500ms.
In the same way we might want to wait for an operator to press a key but get back to the main program flow if they
were away from the process. So we have the
*WK
n
,
t
Wait for Key command, where
n
is the key required ( or 0 for
any key ) and
t
is the time that the system will wait before moving on in 100ms intervals.