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

Script language
Table of Contents

Advertisement

APPENDIX B – CX-Server Communications Control
SetDeviceConfig
This is a function that can be used to set any element of CX-Server device configuration. All the data
is passed in textual form. 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:
Device = "PLC1"
Section = "NET"
Entry = "IPADDR"
Setting = "10.0.0.1"
bValid = CXServer.SetDeviceConfig Device, Section, Entry, Setting
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 device being used.
Only the following Section, Entry and Setting parameter value combinations are currently supported:
Section = "ADDRESS", Entry = "DNA", Setting = "0"..Setting = "255" - this can be used
to set the network number
Section = "ADDRESS", Entry = "DA1", Setting = "0"..Setting = "255" - this can be used
to set the node number
Section = "ADDRESS", Entry = "UNIT", Setting = "0"..Setting = "255" - this can be used
to set the unit number
Section = "ADDRESS", Entry = "IPADDR",
"255.255.255.255" - this can be used to set the Ethernet IP address
Other parameter values may work, but should only be used on Omron advice.
GetDeviceConfig
This is a function that can be used to read any element of the CX-Server device configuration. All the
data is passed (and received) in textual form. This function is for advanced users only.
Example:
Dim Setting
Device = "PLC1"
Section = "NET"
Entry = "IPADDR"
Setting = CXServer.GetDeviceConfig Device, Section, Entry
Page 150
OMRON
Setting = "0.0.0.0"..Setting =
Revision 2.0

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents