LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Strip chart on the datasocket reader

On each timer tick the dswriter sends 4 datatypes: 3 attributes and 1 array. The problem is that, in the dsreader, the contents of the array is plotted 4 times on every timer tick. It seems like the ON_DATA_UPDATED event is triggered one time for each datatype(?). I have tried to run a test in the ON_DATA_UPDATED case to plot only if the datatype is an array, but the test always returns true. It seems like testing is useless since all the datatypes are on the server everytime ON_DATA_UPDATED is triggered(?).

What can I do to plot the array only one time?

thanks and regards,
Roy Ivar Moe
0 Kudos
Message 1 of 2
(2,659 Views)
You may be trying to do auto-updating on the DataSocket write connection. If you are in auto-update mode, every change to the item or attribute will automatically change on the server, therefore you will get 4 update messages on the reader, one for the array and one for each attribute. You want to use manual mode and set the array value and each of the attributes and then manually update by calling DS_Update in the writer. There are several datasocket examples that show you how to use attributes. Look at the sample in \cvi\samples\datasocket\WriterAttr as a guide.

Best Regards,

Chris Matthews
National Instruments
Message 2 of 2
(2,659 Views)