CHAPTER 6 – Functions and Methods
OMRON
Page 66
Revision 2.0
Remarks
Argument
Type
Description
returnstate
bool
1 if the function is successful otherwise 0.
plcname
string
Name of PLC to be opened. If the PLC is being accessed using
a communications component, e.g. the Omron CX-
Communications Control this parameter should be the control
name and PLC name separated by a dot e.g.
“OMRONCXCommunicationsControl.controlPLC”.
Typical Example
ClosePLC(“controlPLC”)
The PLC called controlPLC is closed. No further communications with the PLC will take place until
it is reopened.
DownloadPLCProgram
Syntax
returnstate = DownloadPLCProgram(plcname, filename, processed)
Remarks
Argument Type
Description
returnstate
bool
Returnstate
is ‘1’ if the function is successful, or ‘0’ otherwise.
plcname
string
Name of PLC to download the program to.
filename
string
Name of the file on disk to download to the PLC. If a drive and
path are not specified, the current directory is assumed, which
may not be the same as the application directory. If a filename
is specified as “” the user is prompted at runtime for a filename.
processed
bool
processed
is set to ‘TRUE’ when the operation is actually
completed.
Typical Example
DownloadPLCProgram(“controlPLC”, “Prog01.bin”, done)
The program stored in the file ‘Prog01.bin’ in the current directory is downloaded to the PLC
‘controlPLC’. Before continuing, the script waits up to five seconds for the action to succeed.
Note:
The operation may not be complete 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 upload to be completed create an On
Condition script containing the code to be executed after the upload, with the processed
flag as the expression (e.g. ‘done’).
Содержание CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Страница 2: ...CX Supervisor Script Language Software Revision 2 0...
Страница 3: ......
Страница 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Страница 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Страница 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Страница 13: ......
Страница 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Страница 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Страница 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Страница 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...