10-29-2019 08:03 AM
Hello,
I am using labview2018, I am acquiring data from a VI running on Crio 9047 and writing data on csv file on another VI running on my Computer through variable
acquistion (rate is 50k)is proper but when writing data in csv file, a single writing is only possible, if I try to write more number of files, ist showing error : not enough Memory to complete this Operation.
sometime even my LabVIEW gets close after this error.
my VIs are attached
10-29-2019 09:57 AM
Why do you have a timeout on your dequeue in your save VI? I don't see a need for this. You can also skip the Wait in the upper loop in the save VI since the queue itself will provide the wait functionality. I would avoid writing single elements to your file. File I/O is the bottle neck. Change your processing to write data once per second but write all the data that has been queued during that time in a single write. To do this you flush the queue once a second, process the array of elements from the flush and then call a single writ e to the file. I would use a single stop button to stop your processing. I prefer to use actual messages for communications with queues so you can have an explicit stop message which would stop your consumer. Why are you calling the queue status? It servers no purpose in your code.
10-29-2019 11:08 AM
thanks for Input but,
How would i flush the Queue after 1 seconds ?
I did some changes but now after every saving of 4-5files (can save data for around 30 seconds only) my LabVIEW gets closed.
10-29-2019 11:58 AM
STOP USING THE NETWORK PUBLISHED SHARED VARIABLE!!! I actually deem them evil, especially in this situation where you need a Stream communication, not a Tag. What you really should have here is a Network Stream or TCP/IP connection to stream the data from the cRIO to your PC, which then saves the data. It would eliminate one of your loops (the Network Stream/TCP connections would act as the queue).
10-30-2019 02:06 AM
hello,
actually I am new to the LabVIEW, can you please tell how to use Network streams in this application?
10-30-2019 03:03 AM
Hello Vishal
You can find more about Network Stream in the links given below.
http://www.ni.com/documentation/en/labview-comms/latest/g-prog/streaming-data-using-network-stream/
Refer examples as well.
-Rahul
Hit KUDOS for Thanks
10-30-2019 04:35 AM
hello
I created writre and read Network streams for my application but my writer is not taking the data in acquire VI please have a look
10-30-2019 06:18 AM - edited 10-30-2019 06:18 AM
Your Write To Stream needs to be inside of your acquisition loop.
10-30-2019 06:22 AM
even i did some chnages but the Network stream write loop ,it is not taking the data
please have a look in this code
10-30-2019 06:54 AM
hello crossrulz thanks for your Reply i did the required changes as told by you
but reading of sampling is not Happening .
do the Reader has to respond ? so that the while loop will run and reading of the sampling will be done