LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data saving

Screenshot 2024-04-11 121917.png

 

 

Hi, 

I am new to LabView. I would like to save the flowrate data to an excel file. The data is continues and i would like to save it when the case structure becomes false. How can i do it?

0 Kudos
Message 1 of 6
(367 Views)

Hi nadimroshan,

 


@nadimroshan wrote:

I am new to LabView.


Yes, as can be seen by this while loop inside the event case.

It should be the other way around: the event structure belongs inside the while loop…

 


@nadimroshan wrote:

I would like to save the flowrate data to an excel file. The data is continues and i would like to save it when the case structure becomes false. How can i do it?


You mean you want to save data inside the while loop when the "start flowrate" button returns to FALSE state?

Which data should be saved? Only the flowrate value of the last iteration?

 

When you want to handle the action "case structure becomes false" (aka "start flowrate" switches from TRUE to FALSE) you could use the PtByPt-BooleanCrossing function to detect this action. Then use another case structure upon the detected "falling edge" action…

 

Why is "flowrate" orange when the wire is blue? Notice that coercion dot?

Why is there a local variable "start flowrate" when the corresponding terminal is unused?

Again: don't use (long running) loops within event cases! Events should be handled/executed as fast as possible!

Best regards,
GerdW


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

Hi GerdW,

I will answer your questions.

1). You mean you want to save data inside the while loop when the "start flowrate" button returns to FALSE state? - Yes, that is what i would like to do.

2) Which data should be saved? Only the flowrate value of the last iteration? - I would like to save values from all the iterations from when "start flowrate" is true until it returns false. 

3)Why is "flowrate" orange when the wire is blue? Notice that coercion dot? - Yes, i have noticed it and changed the data types.

 

Thanks for all your suggestions.

 

0 Kudos
Message 3 of 6
(348 Views)

Hi nadimroshan,

 


@nadimroshan wrote:
I would like to save values from all the iterations from when "start flowrate" is true until it returns false.

Then you should stop the while loop when "start flowrate" turns FALSE and save the autoindexed array using WriteDelimitedSpreadsheet AFTER the loop.

Best regards,
GerdW


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

Can you upload your VI instead of giving us a screen capture?

 

I do not want to step on Gerd's toes as he is helping you...but I bet it would benefit him greatly if he had your VI to study.

0 Kudos
Message 5 of 6
(317 Views)

Hi,

Sure, i will upload the VI.

Thanks

0 Kudos
Message 6 of 6
(307 Views)