LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Datasocket Server data persists

If I write to the datasocket server, the data that was written will persist until it is overwritten. This allows it to be read my mulitple readers I guess. In my situation, however, I need to have the data on the server "erased" after it is read one time. Is there a server manager setting that will allow this?
0 Kudos
Message 1 of 2
(2,491 Views)
Hi,

I think that Data Sockets are not that smart. They work as a global variable; what you write them, they stay until the Data Socket server is shutdown. What I did once was making the reader read the value and overwriting with a 0 value which would be the signal that there's no new value to be read. Another option is the writer to add a prefix to the real data (a 1 for instance) so the writer writes "1 + the data" and the reader reads it and writes a zero instead. The reader knows that if the string starts with 1, it has sense, filters it and uses the data. If it starts with zero, there's no new value to be read.

Makes any sense?

Marce
0 Kudos
Message 2 of 2
(2,485 Views)