10-26-2010 10:29 AM
I an relatively new to LabVIEW. My typical application is testing. For example, I set a number of registers, modes, blah, blah, then perform a test. Finally, I return registers to their original state. The problem lay in that, if I get an error in the process, the rest of the code, including the part where I return registers to proper values, is not run.
Any suggestions on how best to handle this in LabVIEW?
DH
Solved! Go to Solution.
10-26-2010 10:33 AM
Sounds like your preceeding error is preventing the clean-up from running.
Don't propogate an error cluster that could carry an error to functions that required to clean-up and place it in a safe state.
Instead run the error cluster around those functions and use a Merge Error node to make sure you don't loose the message.
Ben
10-26-2010 12:38 PM
Thanks, Ben.
DH
10-26-2010 02:08 PM
Becareful of ordering though. Many people use the error clusters as a means of enforcing order. You many have to use a sequence diagram or other means to ensure proper exeuction order.
A
10-26-2010 02:43 PM
By sequence diagram, do you refer to what LabVIEW calls a "flat sequence" structure?
You point is well taken. If I understand your terminology, I can envision the solution.
DH
10-26-2010 04:03 PM
Flat or stacked.
Good luck.
A
10-28-2010 05:33 AM
Hi,
I will go for flat sequence.
Ohiofudu
CLD