LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding pause/continue of syringe pump

Hello labview community!

I am currently working on a syringe pump and trying to edit the block diagram such that I can pause the inner while loop whenever i want. However, whenever i press continue it keep resetting back to 100 rather than continue at the point where it stopped. (You can see from the water UI, it keep resetting back to the start) Can anyone please shed some light to me? (: I am new to labview and slightly weak in the logic part. Much appreciated! (attached is the VI)

Thank you in advance!

0 Kudos
Message 1 of 4
(2,555 Views)

Hi Lucas,

 

trying to edit the block diagram such that I can pause the inner while loop whenever i want.

There is no "pause" button in your VI. I also don't see any logic involved with some "pause" management…

 

However, whenever i press continue it keep resetting back to 100 rather than continue at the point where it stopped.

There also is no "continue" button in your VI - so what are you talking about?

 

- Why do you open the COM port with each iteration again, but close it only once after the loop? (You only need to configure the port once before the loop!)

- I have the strong feeling you should implement your logic into a statemachine…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,544 Views)

Hi GerdW,

Thank you for the reply. I realized also i am not making any sense in my question. I ran the program again and i see that the whenever i hit the run button, i manage to pause the iteration at the outer loop, and when i hit run again, the iteration of the outer loop continues. Now i see why it does not affect my coding because my coding is inside the inner loop rather than the outer while loop. Is there any way to solve this or switch it around?

And sorry for the confusion! What i meant for continue, is that if i pressed the run button again!
As for the COM port, ill take a look at it, thanks!


0 Kudos
Message 3 of 4
(2,533 Views)

Hi Lucas,

 

Is there any way to solve this or switch it around?

I would put all this into a statemachine.

From your description you will need (atleast) states like init, run, pause, stop…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,527 Views)