You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old August 17th, 2003, 01:42 PM   #1
hickman
Member
United States

hickman is offline
 
hickman's Avatar
 
Join Date: Aug 2003
Location: North Central Texas
Posts: 31
Lightbulb how do I 'queue' machines using PLC & relays

I have 12, 3-phase, motor-starters that I want to be able to control. Each motor-starter is 240VAC with a 240VAC coil. Currently, a pressure switch breaks/makes one leg of the coil for control.

I want my program to scan units 1 thru 12. When it finds a unit that needs power, the PLC should allow the unit to come on, but NOT continue scanning until a timer expires (30 sec). The only way I've found to implement this, so far, is to put the 30 second time delay in between units scanned. In other words, I check In_1 for service request. Wait 30 seconds. Check In_2 for service request....

My solution is not very efficient, but it IS do-able. I'm just looking for a more efficient solution.

Thanks in advance for the help!
  Reply With Quote
Old August 17th, 2003, 03:43 PM   #2
Eric Nelson
Lifetime Supporting Member + Moderator
United States

Eric Nelson is offline
 
Eric Nelson's Avatar
 
Join Date: Apr 2002
Location: Randolph, NJ
Posts: 4,346
I really don't understand what you're trying to do, but...

If you want to 'speed up' what you have already, you could look at skipping the delay if a unit is already on. Something along these lines:

Check In_1 for service request
If In_1 is off, enable that starter and start a 30 second timer
If In_1 WAS already on OR when timer expires, check In_2 for service request
etc...

This will advance your queue straight to the next starter (in sequence) that needs power, skipping the ones that are already on. When it finds one that's off, it will turn it on and wait 30 seconds before continuing.

If that doesn't make sense to you, post the code you're currently using and we'll try and 'modify' it for you.

beerchug

-Eric
  Reply With Quote
Old August 17th, 2003, 03:54 PM   #3
Terry Woods
Member
United States

Terry Woods is offline
 
Join Date: Apr 2002
Posts: 3,170
The PLC will and should continue scanning in any case.

It apprears that what you want to do is ignore all requests for 30 seconds after responding to a request.


The Timer...



PREPARE TO
CHECK
MTR
----| |---------(RST) RUN TMR

RUN
TMR
----|/|---------( ) CHECK MTR


RUN +---------+
TMR | |
----| |-------+ 30 secs +-------( ) PREPARE TO CHECK MTR
| |
+---------+


.

On the first scan CHECK MTR is OFF so the (RST) RUN MTR is ignored.
RUN TMR is OFF so CHECK MTR is turned ON.
RUN TMR is OFF so the Timer is RESET and PREPARE TO CHECK MTR is OFF


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Checking for motor requesting start-up...

CHECK MTR was turned ON in the previous rungs.
CALL MTR-X represents your "request to run".



CHECK CALL MTR-1
MTR MTR-1 is ON
---| |-------| |-------|/|---+---( ) Start Mtr-1
|
+---(RST) CHECK MTR
|
+---(SET) RUN TMR

CHECK CALL MTR-2
MTR MTR-2 is ON
---| |-------| |-------|/|---+---( ) Start Mtr-2
|
+---(RST) CHECK MTR
|
+---(SET) RUN TMR


.
While CHECK MTR is TRUE, if a CALL MTR-X comes in, then
turn on the bit to start that motor - this is only a start flag to
the actual motor control rung. The flag will stay on for one scan.

At the same time, CHECK MTR is (RST) to OFF. CHECK MTR is OFF in all
of the following rungs. Those rungs can not evaluate as TRUE. This
is essentially a "jump" to the motor control rungs.

Also at the same time, the RUN TMR bit is SET ON.

Repeat for each motor

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Starting a motor that has just requested statup...




Start Call
Mtr-1 Mtr-1
---| |---+---| |------( ) Run Mtr-1 <<-- output to the motor mag
|
Run |
Mtr-1 |
---| |---+

Repeat for each motor

As long as the CALL for MTR-X remains ON the motor stays on.
You might certainly consider inserting other conditionals... E-Stops, etc.



.
.
  Reply With Quote
Old August 17th, 2003, 06:31 PM   #4
hickman
Member
United States

hickman is offline
 
hickman's Avatar
 
Join Date: Aug 2003
Location: North Central Texas
Posts: 31
Can't post code: using function block in Concept

Concept won't allow me to 'cut n paste'. But what I'm trying to accomplish is load balancing, except I'm only balancing the startup load .

If a unit is running, it should continue to run until it's normal limit switch turns it off. If, however, it is NOT running and wants to start, the PLC should allow it to come on, wait 30 seconds, then move on to the next unit. During that 30 seconds, no other unit should be allowed to start.

Again, I have the Function Block code functional. It's just not as efficient as I'd like it to be. I need to move my timer to only be active when a unit is being serviced (started).

Sorry for being so unclear.

Thanks again for all the help!
  Reply With Quote
Old August 17th, 2003, 11:44 PM   #5
rsdoran
Lifetime Supporting Member
United States

rsdoran is offline
 
rsdoran's Avatar
 
Join Date: Apr 2002
Location: Birmingham, AL
Posts: 7,372
I was wondering if you couldnt use something along the lines of SFCCNTRL...I am not that familiar with Concept so I am just throwing out ideas.

Seems to me you could create a sequencer with time and/or event conditioning..ie when the machine is started I assume the pressure switch is calling so the sequencer would start the motors in order. Once they have all been started the sequencer resets and starts again but since the event (motor is on) is there it moves on to next step. If it sees a pressure switch calling and the motor NOT ON then it times to restart it.

This make sense?
__________________
http://www.patchn.com Industrial Electrical & Maintenance @ www.patchn.com "Tell me and I forget, show me and I remember, involve me and I understand."
  Reply With Quote
Old August 18th, 2003, 02:00 AM   #6
BobB
Lifetime Supporting Member
Australia

BobB is offline
 
BobB's Avatar
 
Join Date: Jun 2002
Location: Sydney
Posts: 4,248
Talking

Pretty easy to control. I do it all the time for sequential start up for pool filtration boards to reduce inrush.
The first rungs in the programme should detect a start signal for a motor. Use a DIFF UP to set a latch. Have the latch run a 30 second timer. When the timer times out, reset the latch.
Use logic in the motor start output rung to allow the first motor to start. Also use an ignore routine if the latch is set and the motor is running.
I normally have a "request or OK to start" rung for each motor. Then place the latch in each output line.
You could also use the same basic first rungs and combine with a shift register but the programming would be more complex.
beerchug
  Reply With Quote
Old August 18th, 2003, 03:08 AM   #7
venkat2k
Member
Canada

venkat2k is offline
 
venkat2k's Avatar
 
Join Date: Aug 2002
Location: Oshawa/St.Catharines
Posts: 17
I just made up a quick code fragment for you to look at.

This is done on RSLogix5. You should be able to convert it to any other processor of your choice.

If I understood you correctly this program should do what you want.

Rungs 7 - 18 can be further simplied into 4 rungs if need be.

the 12 motors are connected to Real World Output Bits 0 - 11
The Pressure Switches are N/O,

make when the pressure is achieved.

These are connected to Real World Input Bits 0 - 11 correspondingly.

(This I/O order is important for the code to work............ design end of it if you want to call it....)
Attached Files
File Type: zip plcs.zip (20.4 KB, 64 views)
  Reply With Quote
Old August 18th, 2003, 03:19 AM   #8
venkat2k
Member
Canada

venkat2k is offline
 
venkat2k's Avatar
 
Join Date: Aug 2002
Location: Oshawa/St.Catharines
Posts: 17
There are probably some who cannot open an RSLogix 5 file, and I have added a PDF file that contains the ladder code for viewing.
Attached Files
File Type: zip plcs.zip (39.3 KB, 114 views)
  Reply With Quote
Old August 18th, 2003, 06:16 AM   #9
Terry Woods
Member
United States

Terry Woods is offline
 
Join Date: Apr 2002
Posts: 3,170
So... Hickman...

What is it about your requirements that my suggestion doesn't satisfy?

If a unit is running, it should continue to run until it's normal limit switch turns it off.

Yeah... got it. If Start Mtr-1, then Run MTR-1 while CALL MTR-1

If, however, it is NOT running and wants to start, the PLC should allow it to come on, wait 30 seconds, then move on to the next unit.

Yeah... got it.
Start MTR-1, and RUN TMR.


During that 30 seconds, no other unit should be allowed to start.

Yeah, Got that too! While RUN TMR don't even look to see if any other motor wants to start. CHECK MTR is disabled.

I need to move my timer to only be active when a unit is being serviced (started).

And that too!

So what's up?

You say...
"But what I'm trying to accomplish is load balancing, except I'm only balancing the startup load."

That simply doesn't make any sense.

You have 12 3-phase motors... (all fed by the same source, I assume)

If all 12 motors are running, the load would be balanced.

If all 12 motors started at the same time, the load would be balanced.

Could it be that you are really trying to balance motor run time?
(If so, do a search on-site for "bubble" as in bubble-sort)

I'm pretty sure that this is a "terminology" issue.

Maybe you could expand on what you mean by "load balancing" and "balancing the startup load".
  Reply With Quote
Old August 18th, 2003, 10:11 AM   #10
hickman
Member
United States

hickman is offline
 
hickman's Avatar
 
Join Date: Aug 2003
Location: North Central Texas
Posts: 31
Terry said: [Maybe you could expand on what you mean by "load balancing" and "balancing the startup load".]

The power company won't allow us to start more than one unit at a time due to the extra power consumption upon startup. Once the startup period (approximately 30 seconds) has past, then I can allow another unit to start. I want to balance startup load: that extra load upon startup.

It doesn't matter, in this case, how many units are "running" at any given time. The prerequisite is that we don't "start" more than one unit at a time.

Hope that helps clear it up. I knew I'd have problems conveying my question. Sorry about that! banghead

Thanks for all the help!
  Reply With Quote
Old August 18th, 2003, 11:46 AM   #11
Allen Nelson
Member
United States

Allen Nelson is offline
 
Join Date: Apr 2002
Location: West Chester, PA
Posts: 1,368
Terry's code

he code that Terry posted will do exactly what you want.

What follows is just a modification of it that may make it a little easier to follow:

START_M01 ALLOW_ANY_START STOP_M01 Motor01
-------| |------------| |------------+-----|/|-----+----------( )
| |
Motor01 | | ALLOW_ANY_START
-------| |---------------------------+ +---------(RST)


START_M02 ALLOW_ANY_START STOP_M02 Motor02
-------| |------------| |------------+-----|/|-----+----------( )
| |
Motor02 | | ALLOW_ANY_START
-------| |---------------------------+ +---------(RST)

... duplicated for each of the 12 motors......


ALLOW_ANY_START +--- TIMER -+ ALLOW_ANY_START
-------|/|------------------| 30 sec |------------------(SET)
+-----------+



Once a motor is started, ALLOW_ANY_START is reset. Since it reset, no motor will start (but any running motor will continue to run). When 'ALLOW' is reset, the 30 second timer delays setting it. Once set, the next motor can be started.

This is EXACTLY what Terry posted (I just put the timer after the code, and combined his motor permissive (CHECK_MTR) and timer enable (RUN_TMR) bits into a single permissive (ALLOW_ANY_START). He also included some PLC-startup logic which is important, but not part of the core logic.

The way you describe your logic, it can take up to 5 1/2 minutes for a motor to be started after the system determines that it needs to be started, which, I agree, is not efficient.

Some caveats associated with the above logic:
1) The concept of "the next motor is started" In this logic, "next" is going to be determined by scan order (assuming that two motors are needed to start during the 30-second wait time.)

2) In the logic above, there is an assupmtion that the START_M01 bit is coming from some logic in the PLC that will remain set while waiting for Motor01 to come on. If the START bit is fleeting (an operator PB, or a PLC one-shot), then you need to capture the fact that the bit is set, and keep it set until Motor_01 is started (which, again, Terry covered, in his "CALL M-01" vs. "START M-01" bits. The only thing that might be missing would be a sealing branch around the CALL bit. )
__________________
  Reply With Quote
Old August 18th, 2003, 01:28 PM   #12
Thomas
Member
United States

Thomas is offline
 
Thomas's Avatar
 
Join Date: Mar 2003
Posts: 167
Think of it as start inhibit

Is the order in which the motors are started important?

I had been thinking about merely one-shotting all the motor start bits to initiate a self latched timer. You could then use the timer not energised (assuming AB, sorry) as the enable for the motor start or demand scan sequence.
__________________
The doctrine of human equality rests on this:
that there is no man really clever
who has not found that he is stupid.
- G. K. Chesterton
  Reply With Quote
Old August 18th, 2003, 04:23 PM   #13
hickman
Member
United States

hickman is offline
 
hickman's Avatar
 
Join Date: Aug 2003
Location: North Central Texas
Posts: 31
PLC continues to scan regardless....

I tried Terry's code. And I AM using one-shots to try each motor. The PLC continues to scan to the next input that way. I need to pause the process until the timer expires. I've done that with the timer at the top-left of the graphic. It waits 5 seconds after supply power is restored. Then, it allows the processing to begin. I just can't seem to figure out how to place the timer mid-stream. Must be brain melt-down.
Attached Images
File Type: jpg screen_shot.jpg (81.0 KB, 699 views)
  Reply With Quote
Old August 18th, 2003, 06:18 PM   #14
Terry Woods
Member
United States

Terry Woods is offline
 
Join Date: Apr 2002
Posts: 3,170

I tried Terry's code.

And I AM using one-shots to try each motor.

The PLC continues to scan to the next input that way.

I need to pause the process until the timer expires.

I've done that with the timer at the top-left of the graphic. It waits 5 seconds after supply power is restored. Then, it allows the processing to begin.

I just can't seem to figure out how to place the timer mid-stream. Must be brain melt-down.


Is that graphic supposed to represent "my" code? It sure doesn't!

Isn't it the case that any one of the motors might want to start at any time? Perhaps Mtr-3 wants to start, then Mtr-8, then Mtr-2...

In your scheme if your counter was at "4" just as In3 came ON for Mtr-3 you would have to wait until you tried 5,6,7,8... all the way through the list until you restarted the list again before you could try Mtr-3.

DON'T USE THE SELECTOR!

Instead of using Chk_1, Chk_2, etc in your AND_BOOL's, use CHECK_MTR in all of them.

Add another pair of SR's in parallel with each of the Start_# SR's.



In_1----->+----------+ +--------+
| AND_BOOL |------+-------->|S1 SR |---> Start_1
CHK_MTR-->+----------+ | In_1->o|R |
| +--------+
| +--------+
| |S1 SR |---> Check_Mtr
+-------->|R |
| +--------+
| +--------+
+-------->|S1 SR |---> Run TMR
|R |
+--------+


.
.
Use the RUN TMR to start the timer. When the Timer Times out, Turn ON CHK_MTR and Turn OFF RUN TMR.

This way, the very next motor that wants to come on (any of the 12) can... after the 30-second delay.

Also, be sure that the motor is not already on (as I showed in my original code). Otherwise you'll be stuck on timing out on the first motor in your code sequence.

A thought just occurred... I'll bet you are really limited in the number of logic blocks you have...?

Last edited by Terry Woods; August 18th, 2003 at 06:21 PM.
  Reply With Quote
Old August 18th, 2003, 09:33 PM   #15
hickman
Member
United States

hickman is offline
 
hickman's Avatar
 
Join Date: Aug 2003
Location: North Central Texas
Posts: 31
Quote:
Is that graphic supposed to represent "my" code? It sure doesn't!
You're right. It's not your code. It's the code that I wrote initially. It's already in place, and running just fine. My purpose it to fine tune the app.

Quote:
Isn't it the case that any one of the motors might want to start at any time? Perhaps Mtr-3 wants to start, then Mtr-8, then Mtr-2...
Yep. You're right. They'll get serviced in that order. Yes, they'll have to wait 'til the SELECTOR comes around again. THIS IS my problem. My current code works without flaw, I just want to make it more effecient. This is the primary example of one of the things that needs to be more efficient.

Quote:
Instead of using Chk_1, Chk_2, etc in your AND_BOOL's, use CHECK_MTR in all of them.
If I do that, multiple units that request service at the same time, can start simultaneously (ie. a power outage and all t-stats go high. Power comes up with ALL units requesting svc at the same time). That defeats my purpose. I want to achieve exactly the opposite. I want to NOT allow multiple units to start at the same time.

Also, the SELECTOR uses the output of the counter to scroll thru the motor list. It tries each motor in sequence due to the counter output. Show me a different way to do it and I'll definitely try it.

Quote:
I'll bet you are really limited in the number of logic blocks you have...?
Concept has approx 2 dozen logic blocks, including AND, NOT, OR, XOR, ROL, ROR, SHL & SHR.

I'm still trying to figure it out. I don't give up easily.

Last edited by hickman; August 18th, 2003 at 09:38 PM.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
PC to PLC Protocol TheRixta LIVE PLC Questions And Answers 13 December 17th, 2008 12:56 PM
Omron PLC and ethernetmodule question wwauters LIVE PLC Questions And Answers 3 February 21st, 2005 11:35 PM
Generator Engine Control CaseyK LIVE PLC Questions And Answers 28 January 31st, 2005 08:56 PM
PLC used with CNC machines OAS LIVE PLC Questions And Answers 7 March 22nd, 2004 08:15 PM
PLC hook up check LIVE PLC Questions And Answers 10 July 31st, 2003 01:26 AM


All times are GMT -5. The time now is 08:09 PM.


.