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?
Solved! Go to Solution.
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.
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.
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.