![background image](http://html1.mh-extra.com/html/omron/cx-supervisor-script-reference-rev2-0/cx-supervisor-script-reference-rev2-0_reference-manual_744212158.webp)
OMRON
APPENDIX B – CX-Server Communications Control
Revision 2.0
Page 145
vbArray 8192
Array
WriteArea
Writes a block of memory to a specified area in a PLC.
Examples of synchronous write:
MyString = “TestString”
CXServer.WriteArea “MyPLC/DM50”, 10, MyString
Dim newValue(2)
newValue(1) = 0
newValue(2) = 1
CXServer.WriteArea “BoilerTemp”,2,newValue
In the first example, the contents of ‘MyString’ will be written into DM50 to DM54. Any additional
data in ‘MyString’ will be ignored (i.e. if ‘MyString’ is 15 characters in length then the first 10
characters will be written to DM50 to DM54 and the remaining 5 characters will be ignored – {Note:
each PLC address holds 2 characters}). The second example shows that a logical name can be used.
The script will wait for the write operation to complete before continuing to execute the next line.
RunMode
Reads the current operating mode of a PLC (Stop/Program, Debug, Monitor, Run), where
0=Stop/Program mode, 1=Debug mode, 2=Monitor mode and 4=Run mode.
Example
intMode = CXServer.RunMode(“MyPLC”)
In this example, the operating mode would be read from ‘MyPLC’ and stored in ‘intMode’. If
‘MyPLC’ was in ‘Monitor’ mode then ‘intMode’ would be set to the value 2.
TypeName
Reads the PLC model name of a PLC (e.g. C200H, CQM1H, CVM1 etc).
Example
strPLCType = CXServer.TypeName(“MyPLC”)
In this example, the PLC model type will be read from ‘MyPLC’ and will be stored in ‘strPLCType’.
IsPointValid
Checks if a Point name has been defined in the CX-Server project file.
Содержание 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...