LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save perticular frame of data from DAQ using write to measurement file?

Hi

 I am using DAQ to read 5k samples at the rate of 1 KHz. So i could see a time frame of 5 sec on my time frame (graph) and after every 5 sec graph will refresh. Now the problem is how to capture a perticular graph(frame)  as and when required.  I used following vi to capture the frame using capture button (enable logic) but it never captures the frame which i wanted. rather it captures some other frames after enabling capture button.

Please let me know how to resolve this.

0 Kudos
Message 1 of 4
(2,415 Views)

Hi Sukesh,

 

there is no loop in your VI: how will you ever read more than 5s of data?

(Ar you using the RunContinuosly button? Never do that unless for debugging!)

 

rather it captures some other frames after enabling capture button.

Think DATAFLOW!

That button is read as soon as your VI starts. When you press the button AFTER you see the new data in the graph the next iteration has already started and so you will trigger saving data for the 2nd iteration after the one you wanted to save…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,386 Views)

Hi GredW

Thank you for the response. I use to run it continuously as i need real time ( I presume data frames appears 5 sec past data as it saves in the buffer and puts it for processing) an stop at the convenient frame to save the results. However I can save the graph by using export to xls sheet manually. But it failed during above code. 

Now accordingly should I use a while loop and control the enable to measure file?. In that case let's say "count " is the variable for counting. If I found a proper time frame at when count =4. Now if enable is provided to measurement file block, will it saves the present frame at count =4 or 5.? 

Let me know what can I do to save the present visible frame with a single click?

 

Thanks 

Sukesh

 

 

 

0 Kudos
Message 3 of 4
(2,373 Views)

Hi sukesh,

 

of course you should use a while loop to have your VI run longer!

 

The other problem is all about DATA FLOW: you need to wire the correct data to the filewrite routine. Maybe a shift register will help...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,371 Views)