03-07-2012 06:05 AM
Dear all,
I have labview 8.6.1 installed on the PC.
I have a cycle in RT with 10ms execution rate that produces an array of 10 numbers every 10 ms,
I have a cycle on the PC with 1s execution rate that reads the data every 1s. Therefore the numbers to be read on the PC are 1000 every cycle.
How to set the shared variable in order to pass the data between the loops at different speed without loosing data?
Thanks
Max
03-07-2012 06:59 AM
You have to use an RT FIFO for keeping the data in the buffer in RT so for every 1000ms you have 100 sets of data that you can write to that shared variable but the data is not guarantied instead you can use TCP/IP communication for sending the data so for every 1000 ms you can send the data from the RT and in the host you can read the data and keep it in a queue that you can use for data logging and plotting.
03-07-2012 07:33 AM
Dear Anand,
thank you for you reply.
Regarding the RT FIFO, it is not clear to me your idea. It looks like you propose to write from RT every 1000ms 100 sets of data, whereas I would like to write from RT 10 numbers every 10 ms and read 1000 data every 1000ms.
Regarding TCP/IP, where could I find examples for RT / PC communications?
Thanks
Massimo
03-07-2012 08:37 AM
Ok I go with your Idea. Instead of writing to the Shared variable write it to a FIFO or Queue. Then for every ms write the data to the shared variable and in the Host you create a Queue and write the data that you read from the shared variable and then read the queue so you will not loose any data. I would suggest that it would be better if you increase the read rate in the Host in a parallel vi.