Component Properties
A.1 Component Properties
A.2 Script Interface
A.3 Functions
A.3.1 Value
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.
Property Title
DisplayErrors
ProjectName
ServerComputerName "MyPC
ServerName
ServerProjectName
The Script Interface defines the methods for the OPC communications control.
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.
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'.
Example 2 - Writing a value:
OMRONCXOPCCommunicationsControl1.Value("MyGroup",
"BoilerTemp") = 50
In this example, the value 50 will be written to the OPC item 'BoilerTemp'.
Appendix A OPC Communications Control
OPC Communications Control
Example
Description
True
When set True, the object will display a
False
message box for any errors. If set to
False, error messages are not displayed.
Name of .OPC file containing the client
setup.
"This is the name of the PC with the
OPC Server.
Name of the OPC Server to connect to.
e.g. OMRON.OpenDataServer.1
Optional filename, which if specified
causes the OPC Server to use the
specified file, if supported by the server.
Appendix A
127