...
The OPC transport handler returns attribute values of type OPCValue. An OPCValue is a complex type that holds the quality, the error code, the timestamp, and the current value of an OPC item. To access the single values the functions value(OPCValue), quality(OPCValue), error(OPCValue), and timestamp(OPCValue) exist. When defining the schema, only the items defined in the path parameter are available in the order they are defined.
Example
PQL
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
output = ACCESS({Source='source', wrapper='GenericPush', transport='OPC-DA', protocol='None', dataHandler='Tuple', options=[ ['host', 'example.com'], ['domain', 'Domain'], ['username', 'admin'], ['password', '12345'], ['progid', 'National Instrum.'], ['path','\\.\Some Item1;\\.\Some Item2'] ], schema=[ ['item1', 'OPCValue'], ['item2', 'OPCValue'] ] }) |
...
Returns the timestamp of the OPC item
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
output = MAP({ expressions = [ ['quality(item)','quality'], ['error(item)','error'], ['value(item)','value'], ['timestamp(item)','timestampe'] ] }, input) |