04-11-2024 05:25 AM
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?
04-11-2024 05:38 AM
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!
04-11-2024 05:48 AM
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.
04-11-2024 05:54 AM
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.
04-11-2024 07:42 AM
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.
04-11-2024 07:52 AM
Hi,
Sure, i will upload the VI.
Thanks