OMRON
APPENDIX A – OPC Communications Control
Revision 2.0
Page 139
Appendix A
OPC Communications Control
This appendix contains a list of the available component properties and gives details of the Visual
Basic script interface. These properties can be set in run time by using a Visual Basic script
command – for example: -
OMRONCXOPCCommunicationsControl1.ServerNodeName = “\\NAME”
The Script Interface defines the Visual Basic script interface for the OPC communications control.
See ExecuteVBScript script functions for more information on running Visual Basic Script.
Component Properties
Property Title
Example
Description
DisplayErrors
True
False
When set True, the object will display a message box for any errors.
If set to False, error messages are not displayed.
ProjectName
Name of .OPC file containing the client setup.
ServerComputerName
“MyPC”
This is the name of the PC with the OPC Server.
ServerName
Name of the OPC Server to connect to.
e.g. OMRON.OpenDataServer.1
ServerProjectName
Optional filename, which if specified causes the OPC Server to use
the specified file, if supported by the server.
Script Interface
The Script Interface defines the methods for the OPC communications control.
Functions
Value
Function for getting and setting an OPC item value.
Read
Function to read the value of an OPC item.
Write
Function to write the value of an OPC item.
Value
Reads or writes the value of an OPC item.
Example 1 – Reading a value:
intVal = OMRONCXOPCCommunicationsControl1.Value(“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’.
Содержание 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...