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
(1,230 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 LV2020 on Win8.1+cRIO
0 Kudos
Message 2 of 4
(1,221 Views)

Hi GerdW

 

Thanks.

0 Kudos
Message 3 of 4
(1,218 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
(1,200 Views)