Active; Tcgetstatus; Tcremotelocal; Setdeviceaddress - Omron CX-Supervisor Reference Manual

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

Advertisement

Active

B.21 Active

B.22 TCGetStatus

B.23 TCRemoteLocal

B.24 SetDeviceAddress

136
Appendix B CX-Server Communications Control
Returns the connection status of a specified PLC.
VBScript Example
bActive = CXServer.Active("MyPLC") ' bActive is a CX-
Supervisor point
In this example, the connected status would be read from 'MyPLC' and stored
in CX-Supervisor point 'bActive'. If 'MyPLC' is connected 'bActive' would be set
to True.
Return status data for the specified temperature controller.
Example
Dim bTCStatusResponse
bTCStatusResponse = CXServer.TCGetStatus("E5AK")
'Heating output is bTCStatusResponse(21)
'Cooling output is bTCStatusResponse(22)
'Alarm 1 output is bTCStatusResponse(23)
'Alarm 2 output is bTCStatusResponse(24)
'Alarm 3 output is bTCStatusResponse(25)
'Stopped status is bTCStatusResponse(28)
'Remote status is bTCStatusResponse(30)
In this example, the device status is being read from "E5AK" as an array of
bytes. The response from the temperature controller is stored as an array of
bytes in bTCStatusResponse.
The TCRemoteLocal command will execute the Remote/Local command for
the specified temperature controller:
Example - in this example, the "E5AK" device is being set to local mode:
'Set the device to local mode
CXServer.TCRemoteLocal "E5AK", 1
Example - in this example, the "E5AK" device is being set to remote mode:
'Set the device to remote mode
CXServer.TCRemoteLocal "E5AK", 0
This function can be used to set key elements of a device address (the
network number, node number, unit number and Ethernet IP address). The
numbers are in the range 0 to 255, with -1 being used to denote "ignore this
parameter". This function is for advanced users only.
Note: this method does not interpret or verify the data passed, and it is
possible to pass invalid data that will prevent a device communicating. Care
should be taken to ensure that all data passed is valid. This method should not
be used while a PLC is open and communicating.
Example:
NetworkNum = 1
NodeNum = 2
UnitNum = -1
iPAddress = "10.0.0.1"
bValid
=
NetworkNum, NodeNum, UnitNum, IPAddress)
CXServer.SetDeviceAddress(
"PLC1",

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 3.1

Table of Contents