Hi Urs,
i guess it is a problem concerning discarding objects.
So first of all, you should use DS_OpenEx() instead of DS_OPEN(). This is recommend by CVI. For the diffrence of these two command please consult the CVI help files.
Here is a small suggestion for a structur of a Data Reader:
1. Open a connection and get a handle to the data source using DS-OpenEx. You must specify whethter to configure the DataSocket object manual or automatic updating.
2. Read the data from the source using DS_GetDataValue. If you configure the DataSocket object for automatic updating, the callback function is called when the data changes on the data source. You then must call DS_GetDataValue t read the data. If you configure the DataSocket object for manual updating, there is no callback function. Instead, you must call DS_Update before reading the data with DS_GetDataValue.
3. Process the data according to your requirements
4. Close the connection and discard the handle using DS_DiscardObjHandle.
So you should use DS_DiscardObjHandle after having received your Data.
I hope this helps
For further investigation, I should know what system you use for your OPC server as well as which version of LabWindows/CVI you use.
Regards
Kilian