PLC Commands SECTION 6 Functions and Methods
70
Typical Example
PLCMonitor("controlPLC")
The monitor dialog for the PLC called controlPLC is invoked. This dialog can
be used to check PLC status, change mode, etc.
6-6-7 SetPLCMode
Syntax
returnstate = SetPLCMode("plcname", mode, processed)
Remarks
Typical Examples
SetPLCMode("controlPLC", "STOP", done)
In this example, the mode of the PLC called 'controlPLC' is changed to
"STOP".
6-6-8 SetPLCPhoneNumber
Syntax
Returnstate = SetPLCPhoneNumber("plcname", numbertext)
Remarks
Typical Example
SetPLCPhoneNumber("controlPLC", "01234 987654")
The phone number for the PLC is changed to the required value.
6-6-9 UploadPLCProgram
Syntax
returnstate = UploadPLCProgram(plcname, filename,
processed)
plcname string Name of PLC to be monitored.
Argument Type Description
Argument Type Description
returnstate bool 1 if the function is successful otherwise 0.
plcname string Name of PLC
mode string A value for the new PLC mode. Valid modes
are 'STOP', 'DEBUG', 'RUN' and 'MONITOR'.
processed bool processed is set to 'TRUE' when the operation
is actually completed.
Note: The mode may not be changed immediately after the statement has been
executed. The processed flag 'done' is set at a later time when the operation
has been completed. Therefore, if using statements that require the operation
to be completed create an On Condition script containing the code to be
executed after the mode is set, with the processed flag as the expression (e.g.
'done').
Argument Type Description
returnstate bool 1 if the function is successful otherwise 0.
plcname string Name of PLC to change the number of.
numbertext string New phone number for the PLC.