Operate a series of valves in RSLOGIX 5000

megatomic

Member
Join Date
Mar 2010
Location
Florida
Posts
5
Hello guys/gals, I am relatively new to programming in RSLOGIX 5000 v17 and have a question on how to operate a series of valves. They are tagged SOV1664 thru SOV1668 and are on consecutive discrete outputs on the same DO card. These are simple solenoid valves with no limit switches. 150msec duty each. When the first valve is popped for 150msec the program will cycle the next. When the enable to operate these valves goes inactive the program will remember which valve was operated last. When the enable is active once again, the program will pop the next valve.

And so on.

Thanks in advance.
 
Welcome to the forum megatomic.

Increment a counter every 150mSec and also increment it with a one shot every time the enable goes true.
If the counter.acc = 0 turn on valve 1
If the counter.acc = 1 turn on valve 2
etc.

You could also use an SQO instruction instead of a counter but the counter is simple to program and easy to understand.

A032410.jpg
 
Last edited:
Thanks for the welcome and also for the advice Alaric. It's interesting you mention the SQO command, I was sitting here trying to figure out how to make an SQL command work. I will try your method and see how it works for me.

This stuff is fun, there are so many ways to do the same thing.
 
SQL loads the assigned inputs all at the same time then using compares you determine what actions to take. The SQO is handy as it does the same it activates the assigned outputs at the same time. In the SQO statement a good use is to control a small stepper motor. Both instructions are usually avoided as there are better methods in the ease of troubleshooting. If you want some samples of SQL and SQO both being used in the same program let me know
 
Thanks guys. I wrote the logic this morning and made a few modifications as needed. I may have to build in some time delays, but that's no problem. I was just getting twisted on how to best sequence through my system.
 
Since you are popping valves for 150mS, it sounds like the timing may be critical to you.

For this reason, I would put the code in a Periodic task, set for 150mS, and this will give you your timing to better accuracy than a timer.

In my code attached, I have allowed the target count to be altered, so that you can introduce a pause between the valve-popping if required, just set Wrap_Value higher than 5.

The OTU of Cycle_Counter.CU is required, so that subsequent executions of the code allow the counter to count each time, without it the counter never sees the rung false so will not increment.

There is no need to advance the count when the Enable is turned on, because the counter always advances before the outputs are enabled, it will always re-start with the next valve.

Using a SQO, this job could be done with just 2 instructions !! (omitted to say not allowed for the Enable control on this, but easy enough, just use a MVM to clear the outputs when not enabled, and condition the SQO rung when enabled).

Valve_Pop1.jpg Valve_Pop2.jpg Valve_Pop3.jpg SQO_Code.jpg SQO_Pattern.jpg
 
Last edited:
SQO solution in 5 instructions.

Compact, but hides what is going on too much...!

All examples posted are in a Periodic Task, set for 150mS.

SQO_Code.jpg
 

Similar Topics

Hi! I've bought WAGO PFC200 controller to automate my smart home installation. After that I've noticed, that I also need to buy e!****PIT or...
Replies
1
Views
2,868
Our Proface HMI SP-5B10 is getting hanged & i have GP-PRO EX in an VM ware workstation 12 player. Now kindly guide me to operate the Machine from...
Replies
2
Views
1,836
Hello there, We're trying to build a prototype for a 3D food printer. The main control board for the printer sends out PWM signals. For...
Replies
19
Views
4,673
Hi all i just got a cnc huyndai hit 8s lathe, and do not know how to operate that machine, just wonder if anyone live around orange county...
Replies
1
Views
1,659
Hello: I have CPU313C-2DP , I want to operate it 20 hour separeatlly every 24 hour how I can do that?
Replies
4
Views
2,117
Back
Top Bottom