Turning on motors in sequence using indirect addressing.

TL140

Lifetime Supporting Member
Join Date
Jun 2014
Location
South Carolina
Posts
152
So I have a problem that I am trying to overcome. I have X amount of motors (I'm trying to make the program scaleable). Let's say that a system has three motors. Each motor has a Hand/Off/Auto setup. I need the motors to start in a sequence. The outside program should read the sequence and turn on each motor individually as the conditions occur to make them do so.
Here is the real thorn in my side. The motor sequence is decided by a few things. The PLC is recording the hours that the motor gets run, so I want to start the first one if it has the least amount of operating hours on it. If system demands are too much after a fixed amount of time, then the second one with the second least operating hours comes on.
The second thorn in my side is that since each motor has a Hand/Off/Auto function, the sequence should skip over whichever motor is not in auto, but have the very next one come on at the second condition that is stated.

I'm using the Automation Direct Do-More series CPU. I'm 90% sure this can (and should) be done with indirect addressing and possibly casting, but I am having a difficult time piecing this one together.

Any advice is much appreciated.

-TL
 
Equalizing pump hours can lead to all pums to fail allmost same time.
However, Ron have maded example of 12 fans rotation. It is indirectly programmed, so it can examped easily.

You need two differend order groups. First one is pump run times (compare all pumps). After you have ordered pump runtimes, then look only available pumps, and make another order group. (Move zero or big number for pump, which is not available, and order pumps again)

http://www.plctalk.net/qanda/showthread.php?t=49120
http://www.plctalk.net/qanda/showthread.php?t=51640
 
Equalizing pump hours can lead to all pums to fail allmost same time.
However, Ron have maded example of 12 fans rotation. It is indirectly programmed, so it can examped easily.

You need two differend order groups. First one is pump run times (compare all pumps). After you have ordered pump runtimes, then look only available pumps, and make another order group. (Move zero or big number for pump, which is not available, and order pumps again)

http://www.plctalk.net/qanda/showthread.php?t=49120
http://www.plctalk.net/qanda/showthread.php?t=51640

This looks to be exactly what I needed. Thanks.
 
For pump amount up to 4 or 5 programming is not too bad if you simplify code with Karnaugh's map. (16 or 32 dfferent sequences)

Indirect is good for 6 or more pumps.
 
For pump amount up to 4 or 5 programming is not too bad if you simplify code with Karnaugh's map. (16 or 32 dfferent sequences)

Indirect is good for 6 or more pumps.

From the post by Ron, I really like the cleanliness of the programming. Now, what I need to find is a clean way to pack up my hourmeter compare lol:book:
 
This should work, just make sure that index is allways between array start and end values. If you PLC have array sorting, min and EQ comparing, comparing goes easy.



if clock_pls then (* "1" state several PLC cycles *)

if index<=10 then (*increment hourmeter if pump is running. Increment is done only one time/Clock pulse*)
if pmp_run_array[index] = true then
pmp_hour_meter_array[index] := pmp_hour_meter_array[index] +1 ;
End_if;
index:=index+1; (* increment index value *)
End_if;
End_if;

if Not clock_pls then (*zero to index*)
index:= 0;
end_if;

if index <0 then (*init index counter*)
index:=0;
end_if;



 
Last edited:

Similar Topics

Hi! I am trying to run the 'SimpleSample' (https://infosys.beckhoff.com/content/1033/TF5100_TC3_NC_I/Resources/3438746891/.zip ) to understand the...
Replies
2
Views
98
We have a Pinnacle power supply from Advanced Energy which we'd like to control using TwinCAT 3, via an EL6002 and RS-232. I got the...
Replies
2
Views
738
I have 3 koyo PLC's in series. The 1st and 3rd are reporting values correctly but the 2nd is reporting negative values. The values in the PLC and...
Replies
3
Views
1,399
I'm very new to the PLC world, and was wondering if I could take an .apb file and turn it into a .mer file. Is this possible? And if so, how would...
Replies
4
Views
1,257
I need to sort pumps based on runtime from shortest to longest then turn them on in order that they are sorted. I know I can create an array for...
Replies
16
Views
3,821
Back
Top Bottom