07-23-2012 12:51 PM
Search the forums for the phrase "state machine".
Go to File, New ...., in the LabVIEW menu and pick "standard state machine" as a template.
You can reuse a lot of your code. You just need to regroup it into a single while loop with a case structure.
07-23-2012 01:00 PM
In the execute step case, what do I include? In other words, can you help me by showing me where I should put each part from my original program?
Thanks,
Mike
07-23-2012 01:12 PM
You really want the wait AFTER the start pump command. If you don't understand the basic operation, I can't help much more. You placed it in a separate case and that does not make any sense. Either move the wait or implement the state machine as mentioned. Inside one of the states will be your case statement to infuse/withdraw based on the rate.
07-23-2012 01:40 PM
I have the state machine template. My cases are initialize, execute a step, wait, and close. What goes in each case?
07-23-2012 01:45 PM
@Mike227 wrote:
I have the state machine template. My cases are initialize, execute a step, wait, and close. What goes in each case?
07-23-2012 01:54 PM
@Mike227 wrote:
I have the state machine template. My cases are initialize, execute a step, wait, and close. What goes in each case?
Let's start at the beginning. What should go into the initialize case? Hint: What should you be initializing. Answer: The Initialize VISA Serial Port!
Ok, to the end. What should go into the close case? Hint: What should you be closing/cleaning up. Answer: The Close VISA Serial Port!
What should to into the wait? Hmmm....the name isn't quite obvious enough.
What should go into the execute a step? What is left?