# Plc motor alternating program



## ElectricMatt (Dec 29, 2016)

So I use a count up with a reset and multiple floats. Float then reset the counter after motor 2 runs. 


Sent from my iPhone using Tapatalk


----------



## MoscaFibra (Apr 15, 2021)

2 ways I have done this in the past - Using a calendar (the siemens BAS has a time of day variable built into the program) so once the CPU has a date set, it was used say, every Tuesday at 5am (usually tried to do any flipping right before people were in, but not while they would be using it). Basically an if statement (if 1 = on then set 2 on and 1 off ect).

Otherwise I would do something similar in ladder logic, have a counter in parallel with the rung, count to 1 when motor a turns on. If counter 1 is greater then 0 turn off motor 1 turn on motor 2. When motor 2's counter = 1 reset counters and have a defined variable that goes off a timer set for every - 7 to 14 days? Depending on your software this could be easy or hard to do. You should be able to reference the date, but I honestly find it easy to just use a timer and counter to count 7 days. I think I am saying the same thing here Matt is, just more confusing. 

Also, there is rarely anything "traditional" with all the companies. Most companies have a way they do it, with a syntax they use in a style they prefer. If it works, it works. The fun comes when an operator does something out of sequence that you would never expect.


----------



## Navyguy (Mar 15, 2010)

What software are you using? Unless you are using a real-world alternating relay, the counter seems to be the easiest option. I use this scenario for my Level III students for an air compressor. Pump 1 runs, then shuts off. Pump 2 runs then shuts off. Pump 1 runs again. If a pump runs more than 30 mins (in class 30 seconds), then the second pump starts. If the pressure drops below a certain level, regardless of the timing both pumps will start.

Cheers
John


----------



## mburtis (Sep 1, 2018)

I'm using automation direct do more designer. Boss ordered a brx and a c more hmi for us to play with. Your air compressor example is exactly the scenario I'm working on. Been playing with timers this morning but haven't quite got it to work yet.


----------

