APPENDIX A – OPC Communications Control
OMRON
Page 140
Revision 2.0
Example 2 – Writing a value:
OMRONCXOPCCommunicationsControl1.Value(“MyGroup”, “BoilerTemp”) = 50
In this example, the value 50 will be written to the OPC item ‘BoilerTemp’.
Note:
‘Value’ is the default property so is assumed if omitted. Therefore, the following examples are
the same:
intVal = OMRONCXOPCCommunicationsControl1.Value(“MyGroup”, “BoilerTemp”)
and
intVal = OMRONCXOPCCommunicationsControl1 (“MyGroup”, “BoilerTemp”)
Read
Reads the value of an OPC item.
Example of synchronous read:
intVal = OMRONCXOPCCommunicationsControl1.Read(“MyGroup”, “BoilerTemp”)
In this example, the OPC item ‘BoilerTemp’ in the OPC group called “MyGroup” will be read from
the OPC Server and will be stored in ‘intVal’. The script will wait for the read operation to complete
before continuing to execute the next line. This is identical to the operation of the ‘Value’ method.
Write
Writes the value of an OPC item.
Example of synchronous write:
OMRONCXOPCCommunicationsControl1.Write “MyGroup”, “BoilerTemp”, NewValue
In this example, ‘NewValue’ will be written to the OPC item ‘BoilerTemp’ in the OPC group called
“MyGroup”. The script will wait for the write operation to complete before continuing to execute the
next line. This is identical to the operation of the ‘Value’ method.
Содержание 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...