Value Appendix B CX-Server Communications Control
130
B.2 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.
B.3 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
Active Function for returning the connection status of a
specified PLC.
TCGetStatus Function for returning the device status of a specified
temperature controller
TCRemoteLocal Function for switching a specified temperature controller
into Remote or Local mode
SetDeviceAddress Sets PLC Network, Node, and Unit number and IP
address
SetDeviceConfig Sets any element of device configuration
GetDeviceConfig Gets any element of device configuration
UploadProgram Uploads a program from a PLC
DownloadProgram Downloads a program to a PLC
Protect Protects (or releases protection on) program memory
LastErrorString Description of last error that occurred