LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I have problem with multiwriters datasocket

I use datasocket with multiwriters in the same item. When writers write in the socket, I receive 2 or 3 data from one writer at the place of the data of the other writers. (the frequency data is 4 Hz/writer)
0 Kudos
Message 1 of 3
(2,938 Views)
DataSocket is not designed to protect data integrity from multiple writers. You can have multiple writers, but it does not queue or protect the data coming from the writers. Each time you read from an item it will just get the current value of the item. It sounds like you have a need for handshaked or queued operation where the socket will keep data on the queue until read so you don't lose any data from the writes. Datasocket doesn't have handshaking or queues as part of its functionality, so you would have to implement that yourself. You could use other datasockets as handshake items or switch to TCP communication instead.

For example, you could have datasocket items (integers) called ReadyToRead and ReadyToWrite, that the writers check before wri
ting and the reader checks before reading.

Hope that helps,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 3
(2,938 Views)
In first thank for your answer Chris.
In second, I wish more explains about datasocket: You write what datasocket have no queue or handshake, how can it detect new data?
If I want to use handshake, could you explain, step by step,how I can implement this fonctionalty
Thanks for your help, best regards

Christian
0 Kudos
Message 3 of 3
(2,938 Views)