![background image](http://html1.mh-extra.com/html/omron/cx-supervisor-script-reference-rev2-0/cx-supervisor-script-reference-rev2-0_reference-manual_744212155.webp)
APPENDIX B – CX-Server Communications Control
OMRON
Page 142
Revision 2.0
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
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”)
Содержание CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Страница 2: ...CX Supervisor Script Language Software Revision 2 0...
Страница 3: ......
Страница 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Страница 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Страница 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Страница 13: ......
Страница 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Страница 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Страница 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Страница 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...