From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Valve sequence

Hi,

 

I have a need for a VI that controls valves (8-port motor valves and solenoid valves) in a loop. I have produced a code (see the attachment) that works with he solenoid valves. The program turns on the solenoid valves for a certain time period and then closes them for other period. However, the problem is that the code sends the command to the valve each time the loop is iterated. This is "fine" with the solenoid valves. However, if I use the same code to control an 8-port motor valve, the valve just turns and turns as it get the command to change position (although the position is the same) each time the loop is iterated. I tried to remedy the situation with feedback loop and comparison function so that the command to the valve would be given only once even if the loop is iterated for n times. This did not solve the problem. Could anyone of you help me with this problem? I have tried to check the discussions on this forum for help, but with no luck.

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

Hi jartzu,

 

to solve your problem is almost always helps to describe the desired algorithm in words as precise as possible!

 

- How do you want to run your sequence?

- When do you want to switch valves?

- How often do you want to switch valves?

- Are there conditions to monitor before switching?

- …

 

Once you answered all those questions you surely have an idea of how to program your statemachine, which most probably solves your issue! 😄

Best regards,
GerdW


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

Hi GerdW

 

Thanks.

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

Hi jartzu82,

As GerdW said you better use a state machine based program. Because switching valves is a considerably dangerous control in some scenarios. Thereby, you need to control them only when you need to. Besides, no need to increase the RAM and memory space consumption by considering a While Loop that does not have a 'time delay'.

Regards,

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 4 of 4
(2,430 Views)