Uploadprogram; Downloadprogram; Protect; B.27 Uploadprogram - Omron CX-Supervisor Reference Manual

Script language reference
Hide thumbs Also See for CX-Supervisor:
Table of Contents

Advertisement

UploadProgram

B.27 UploadProgram

B.28 DownloadProgram

Note:
Note:

B.29 Protect

138
Appendix B CX-Server Communications Control
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
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.
Note: The 4th and 5th parameters are reserved, and should always be 1 and 0
respectively
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.
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
"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".
The 4th and 5th parameters are reserved, and should always be 1 and 0
respectively
The Protect function can be used to protect (or remove protection from) PLC
program memory. 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 1 (sets protection for CS series PLC)
Dim SetProtection
Dim PasswordString
Dim PasswordNumber
EnableProtection = true
"PLC1",
=CXServer.DownloadProgram
SourceFile,
"PLC1",

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 3.1

Table of Contents