Can DataSocket Read/Write Array Data Types from an OPC Server?
Primary Software Version: 8.2
Primary Software Fixed Version: N/A
Secondary Software: N/A
I would like to publish data to my OPC Server in the form of an array. Can DataSocket read/write an array data type from my OPC Server?
DataSocket does have the ability to read array data types from an OPC Server, though this has not been tested extensively. DataSocket does not have the ability to write array data types at this time.
Matrikon has an OPC Server Simulator that publishes an array of numbers, which can be read with DataSocket.
When a waveform chart is front panel bound using DataSocket to an array typed OPC item, the data is not interpreted correctly and no data is charted. When a waveform graph is front panel bound using DataSocket to an array typed OPC item, then the array data from the OPC Server is plotted as a single plot, not as multiple plots. If a separate plot for each element in the array of data is desired, read the data in using the DataSocket Read function and pass the data to the chart.
Kepware's KepServer OPC servers also allow the publishing of array data types, but issues can arise when publishing arrays consisting of a single element. Single element arrays are converted to non-array data types by KepServer, causing the variant to array conversion to fail. It may be necessary to attempt to convert the variant to an array first, then use the error status of this operation to determine if the variant was actually an array. If the first conversion failed, you would then convert the variant to a non-array data type.
External link: Matrikon OPC Simulation Server
Report Date: 06/21/2002
Last Updated: 11/28/2011
Document ID: 2MKBB3BH