APPENDIX B – CX-Server Communications Control
GetDeviceConfig
UploadProgram
DownloadProgram
Protect
LastErrorString
Value
Reads the value of an address from a PLC, or writes a value to an address in a PLC. This function
allows logical names.
Example 1 – Reading a value from the PLC using a logical name.
intVal = CXServer.Value("BoilerTemp")
or
intVal = CXServer ("BoilerTemp")
In these examples, the PLC address associated with 'BoilerTemp' will be read from the PLC and
stored in 'intVal'. "Value" is the default property and does not have to be specified.
Example 2 – Writing a value to the PLC using a logical name.
CXServer.Value("BoilerTemp") = 50
or
CXServer ("BoilerTemp") = 50
In these examples, the value 50 will be written to the PLC address associated with 'BoilerTemp'.
"Value" is the default property and does not have to be specified.
Values
Reads an array of values from a PLC, or writes an array of values to a PLC. This function allows
logical names. If an array is used then a SAFEARRAY is returned with all values.
Example 1 – Reading an array of values from the PLC using a logical name.
SomeArray = CXServer.Values("BoilerTemps")
Example 2 – Writing an array of values to the PLC using a logical name.
CXServer.Values("BoilerTemps") = SomeArray
SetDefaultPLC
The 'SetDefaultPLC' function can be used to inform the script parser that a particular PLC is has
been set as the default. Once a default PLC has been set, then it is not necessary (with some
functions) to specify a PLC name. For example,
CXServer.SetDefaultPLC("MyPLC")
intVal = CXServer.Value("BoilerTemp1")
CXServer.Value("BoilerTemp1") = 75
intVal = CXServer.Value("DM50")
Page 142
Gets any element of device configuration
Uploads a program from a PLC
Downloads a program to a PLC
Protects (or releases protection on) program memory
Description of last error that occurred
OMRON
Revision 2.0
Need help?
Do you have a question about the CX-SUPERVISOR - SCRIPT REFERENCE REV2.0 and is the answer not in the manual?
Questions and answers