LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help! - Datasocket read/write problem

Here are two basic read/write datasocket vis... that do not work properly.

Start the DS engine, run both vis, modify the string array in read.vi or resize the write.vi window and you will see that the indicator display in write.vi is wrong.

Can anybody tell me why?

Thanks a lot for your help.
MichelC
0 Kudos
Message 1 of 3
(2,445 Views)
From what I see, the elements being written and read are not synched to the same iteration number, and thus are not array-indexed the same, therefore, you'll have a difference in the array index # for what was written and what was read. In other words, the DSS-read is not always at the same iteration # (index #) as the DSS-write when the write and read occur.
However, with that thought, you could remove all looping and simply DSS-write the whole array to your DSS-read. Then you keep the indexing equal on both ends. When you send and receive a whole array, no looping is needed, so the process also is quicker.
Well, that's how I see it, good luck with it, Doug
Message 2 of 3
(2,445 Views)
The iterations do not have to be the same since each element in the array is written to a different DS item. It is true that one can write the whole array to the server (and that works fine), but I still do not understand why these vis are not working properly.
MichelC.
0 Kudos
Message 3 of 3
(2,445 Views)