opc icon indicating copy to clipboard operation
opc copied to clipboard

Reading OPC data from device

Open emilesalem opened this issue 1 year ago • 1 comments

from connection.go

//OPCDataSource defines constants for Sources when reading data from OPC:
//Default implementation is OPCCache.
//From the cache
OPCCache int32 = 1
//From the device
OPCDevice int32 = 2

there doesn't seem to be a way to read from device, can you confirm this?

emilesalem avatar Sep 20 '22 18:09 emilesalem

there doesn't seem to be a way to read from device, can you confirm this?

This is correct. Currently, the read routine has OPCCache hard-coded: https://github.com/konimarti/opc/blob/master/connection_windows.go#L312

Patches are welcome if you would like to implement a user-specified parameter for either OPCCache or OPCDevice.

konimarti avatar Sep 20 '22 19:09 konimarti