137
W&T
OPC
Subject to errors and modifications:
OPC variables for Web-IO
The full variable names begin with the device name of the I/O
server to which they are allocated. This would look as follows using
the example of a server named „Box1“:
Box1.E.0 — Box1.E.11
(VT_BOOL, R): State of the inputs
Box1.A.0 — Box1.A.11
(VT_BOOL, R/W): State of the outputs
Box1.N.0 — Box1.N.11
(VT_I4, R/W): Counter states for the counters of inputs E.0
—
E.11
Both rising and falling edges are counted, i.e., a simple pulse
on the input raises the counter state by 2. The counters can be
reset by writing the value 0.
5.8.7 Access using Visual Basic or VBA
Aside from the underlying custom interface, this OPC server offers
only an automation interface as per the new OPC standard 2.0. If
you are familiar with the old OPC automation standard 1.0: The
differences between the two versions are considerable. Besides
that you need a minimum of Visual Basic Version 5.0 or Office
97 to use the new interface. The complete interface
specification can be found at the homepage of the OPC
Foundation, http://www.opcfoundation.org. But for a quick
impression the following examples (Excel macros) should be
informative. For Visual Basic to be able to use the OPC interface,
the entry „OPC Automation 2.0“ must be checked in the list of
references. (In Visual Basic 6.0 you get to this list from „Project/
References...“, or for Excel through „Tools/References...“ in
Visual Basic Editor.)
Example: List variables
This example uses the name space browser to get all available
variables of the OPC server and enters them in column 1 of the
current Excel table.
Содержание 57630
Страница 8: ...8 W T Content...
Страница 22: ...22 W T Assigning the IP address...
Страница 44: ...44 W T configuring the network parameters...
Страница 194: ...194 W T Diacnostics and testing...
Страница 211: ...211 W T Decalration of conformity Subject to errors and modifications 7 9 Declaration of Conformity...