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

Script language
Table of Contents

Advertisement

OMRON
'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.
TCRemoteLocal
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
SetDeviceAddress
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 = CXServer.SetDeviceAddress( "PLC1", NetworkNum, NodeNum, UnitNum,
IPAddress)
Note: The return Boolean value, bValid, is set to True if no errors were detected. However, this does
not necessarily mean that all the parameters used were valid or appropriate for the PLC being used.
Revision 2.0
APPENDIX B – CX-Server Communications Control
Page 149

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents