LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to avoid assigning a value to a false condition in my case structure. how to do it

In my while loop, i am storing the ramp output data into excel file. I want this to happen only when one case condition is true.I don't want the data to be stored for false condition because unnecessary record is entered in excel file.I want the excel file storing part outside the case structure. But if i don't assign anything to false condition, it gives me error. How to solve this..
0 Kudos
Message 1 of 3
(2,596 Views)
I'm not sure I understand why you say "I want the excel file storing part outside the case structure".
From the rest of your description, it sounds like you want to write to file only if something is true. That means that you put the write to file function inside the TRUE case.

You can pass the file refnum into the case and back out again, if you need to. Pass it straight thru in the FALSE case, and thru the WRITE FILE function in the TRUE case.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 3
(2,596 Views)
Hi,

I am attaching a vi which shows easy file writing taking minimum time & memory.

If your requirement does not match to above vi, then if you are using LV 6.1 version, there is an option called Use "Default if unwired". So pass the data incase of true condition & use above option incase of false condition.

I dont understand why are u putting writing data into excel file code outside your case structure. As you want to write only when a condition is true, better to keep file writing inside the case itself.

Best Regards,
Nirmal Sharma
India
Message 3 of 3
(2,596 Views)