07-11-2008 12:02 PM
OK. Avoid sequences because I will probably abuse them anyway and shouldn’t start relying on them as a crutch.
As for my application; use a state machine that has one state that enters the concentration and starts the data collection. Connect these two vis using error codes to force the execution. Then have another state that collects the data and when finished checks to see if there is more concentrations to collect for, if not I exit out of the machine. If there is, I go back to the enter concentration state.
I hope that’s correct.
Thanks for the assistance and the discussion on the use of sequences.
Eric
07-11-2008 02:01 PM
07-11-2008 02:12 PM
I was busy trying to create a state machine and finding out what a pain it is without a type def. Started reading up on creating a type def when I ran out of time. Here is the code.
Thanks
07-11-2008 02:23 PM
07-11-2008 02:26 PM - edited 07-11-2008 02:31 PM
07-11-2008 02:29 PM
07-14-2008 12:15 PM
Altenbach,
This is much more than I asked for,Thanks!
You did away with all sequences and made the program flat. Also showed that a statemachine wasn't what I needed for this application. Good discussion anyways. Smercurio_fc thanks for pointing out that I don't need to create a type def for enum. I don't know how to implement a queue of strings but I will try and figure that out when I need to actually create a statemachine. I didn't know that you could disable a control effectively making it an indicator. Also using a while loop to control iterations is basically what the for loop does (no brainer.) I found the code to automatically expand the graph legend, but your right, half the code isn't needed for what I'm doing. I'm still trying to get used to the index capabilities for structures, thanks for pointing that out. The second for loop is used for multiple channels that could be calibrated at the same time. I just defaulted the inputs to this vi so it would run. The initial error condition, even though it says error out, is basically an initial condition to feed to the error condition, Correct?
I think thats everything!
Thanks to Altenbach for cleaning my garbage code and to everyone concerning sequences.
Eric
07-14-2008 12:23 PM
Knoebel wrote:
The initial error condition, even though it says error out, is basically an initial condition to feed to the error condition, Correct?
07-14-2008 01:23 PM
Just jumping in here after granting lots of stars in this thread. Special kudos to Knoebel. It's rare and extremely refreshing when a pretty new poster works the thread just perfectly. Specific questions, relevant follow-ups, code posted to show effort and initiative... And in return, many acknowledged experts were happy to provide valuable help.
Really, just a model thread all the way around. Great signal-to-noise -- at least until my little pat-on-the-back post here.
-Kevin P.