11-23-2012 08:26 AM - edited 11-23-2012 08:37 AM
I have simple program to control VICI pump over serial interface.
The problem for me is that I need to see amount of dispensed liquid. I have based it on "elapsed time" express vi.
But unfortunately it does not work the way I need. When I press pump start it starts to count time and as a result volume of liquid. When I press stop the volume stops but when I press Start pump again it continues the volume not from the moment I stopped but considering all the time elapsed since the first start.
I know that it is because Elapsed Time is still running. I could not find the way to Pause it.
Is there a way around it?
I am using LabView 8.6.
Solved! Go to Solution.
11-23-2012 09:27 AM
Sergey,
When you press Stop, the VI stops running. Are your referring to setting the Run switch to False?
I would put the volume (Injected ml?) on a shift register and add to it the amount dispensed in each iteration. The calculation would still be based on time, but incremental time rather than total elapsed time.
I do not think there is any direct way to pause the Elapsed Time.vi. You could store the difference between Target Time and Elapsed time in a shift register when you enter the pause mode and then use that difference as the new Target Time when you restart.
Lynn
11-29-2012 07:41 AM
I did take a look at the shift registersounds interesting but could not find the way to insert it. It requires For or While loop. I have tried to use While loop but it stops Run button operation(as soon as I press run could not stop it(pause) or stop the program). Prbably it is something very simple but as I am programming from time to time I have not enough experience to solve it myself.
11-29-2012 09:41 AM - edited 11-29-2012 09:41 AM
@Sergey(PSU) wrote:
...The problem for me is that I need to see amount of dispensed liquid....
11-29-2012 09:44 AM
Sergey,
What apok showed is the basic idea.
You really need to convert your architecture to a state machine to allow the Pause mode. It will be tricky and complicated to do it with your present structure.
Lynn