Omron CX-SUPERVISOR - SCRIPT REFERENCE REV2.0 Reference Manual page 164

Script language
Table of Contents

Advertisement

OMRON
Currently supported parameter values are as described for the SetDeviceConfig method.
UploadProgram
The UploadProgram function can be used to read a program from a PLC. The program is read in
binary form, and stored in a user-specified file. This function should not be used at the same time as
any other PLC communications. The project and PLC will automatically be opened if required. This
function is for advanced users only.
Example:
Dim SourceFile
Dim DestinationFile
Sourcefile = ""
DestinationFile = "c:\test1.bin"
CXServer.UploadProgram "PLC1", SourceFile, DestinationFile, 1, 0
The first parameter is the PLC name.
The second parameter is the source file name. To upload the current program this should be an empty
string, but may also be set to the name of a file in the root directory of a memory card, e.g.
"Example.obj".
The third parameter is the name of the local file to store the program. A '.bin' file extention is typical
for a binary file.
th
Note: The 4
and 5
DownloadProgram
The DownloadProgram function can be used to write a program to a PLC. This function should not
be used at the same time as any other PLC communications. The project and PLC will automatically
be opened if required. This function is for advanced users only.
Note: Care should be taken with this function to ensure that the program written is valid for the PLC
to which it is downloaded.
Example:
bValid =CXServer.DownloadProgram "PLC1", "c:\test2.bin", "", 1, 0
The first parameter is the PLC name.
The second parameter is the local source file name. A '.bin' file extention is typical for a binary file.
To download the current program the third parameter should be an empty string, but may also be set
to the name of a file to download to the root directory of a memory card, e.g. "Example.obj".
th
Note: The 4
and 5
Revision 2.0
APPENDIX B – CX-Server Communications Control
th
parameters are reserved, and should always be 1 and 0 respectively
th
parameters are reserved, and should always be 1 and 0 respectively
Page 151

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CX-SUPERVISOR - SCRIPT REFERENCE REV2.0 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents