![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
![]() ![]() Join Date: Aug 2002
Location: Ontario
Posts: 57
|
motor alternating directsoft 32 on a DL06
I've been trying to program an DL06 plc (directsoft 32) to alternate up to 10 pumps, so far it's been a nightmare. I'm using a counter to advance to the next pump when the previous pump shuts down. No problem getting that to work, big programming issue is when one or more pumps are not available. The motors are controlled by a transducer with start/ stop setpoints for each motor. I've done 2,3 and 4 pump programs like this and those work alright. Is there something else I should look into in Directsoft, like the EDRUM box or shift register... something that will simplify the numerous amount of coils and contacts I'm using
|
![]() |
![]() |
#2 |
Member
|
Look at the INC instruction.
If Counter = 2 and Pump 2 is not available then increment Counter. You'll need to add this logic for each pump in your alternator. If you need to alternate Lead and Lag pumps, try using 2 counters. Add the above statement for both counters and add one other statement for in case both counters are the same. If Counter 1 = Counter 2 then increment Counter 2. |
![]() |
![]() |
#3 |
Member
![]() ![]() Join Date: Aug 2002
Location: Ontario
Posts: 57
|
I guess the biggest problem I'm having is when there's a pump not available, otherwise I can get the program to work... and since my customer wants 8 on-off setpoints to control the pumps it gets a little mind boggling
|
![]() |
![]() |
#4 |
Member
|
Your requirements are far from clear as to exactly what you are trying to do, what inputs you have available from each pump such as a contact which indicates whether the pump is running, what outputs you require, and the number of pumps running simultaneously ( one or more) etc.
|
![]() |
![]() |
#5 |
Member
![]() ![]() Join Date: Aug 2002
Location: Ontario
Posts: 57
|
Here are my requirements,
DV1000 for pump status and pressure display, entering maximum run time and start-stop setpoints 1 transducer input for pressure 10 outputs for pump start/ stop 10 inputs for pump available 10 inputs for pump running maximum run timers for each pump start a pump at 1 pressure setting, if that pump can't keep up with demand and pressure drops start another pump and so on up to 10 pumps. Stop pumps at various setpoints. If some pumps are disabled, skip those and start the next available. If pump is running for the maximum amount of time stop that pump and start the next available one |
![]() |
![]() |
#6 |
Member
|
Use a counter to keep track of the next pump in the sequence. When all pumps are off as a starting point the counter should either be reset to zero or set to 1 for Pump1.
Use a rung with pressure, pump available and the relevant counter bit in series, and with a latch contact around the counter bit. When the rung is true then the pump starts and also latches the counter bit so that incrementing the counter will not stop this pump. The counter is also incremented when this rung is true to move to the next pump in the series. Add a rung below this with the next pump in the sequence available contact in series with the counter bit such that if the next pump is unavailable the counter increments to the next pump. These rungs are then repeated for each pump in the sequence. |
![]() |
![]() |
#7 |
Member
|
Here’s how I would approach your requirements.
I would use a UDC (Up Down Counter) to keep track of how many pumps need to be run. So if you need one pump the current value of the UDC will be 1, if you need 6 pumps the UDC current value will be 6. Each time you need another pump you increment the UDC, if you need one less pump you will decrement the UDC. Now you need some logic to set the pump sequence. You associate a V memory location for each pump, this memory location will be used to set the order in which the pumps will run. So you could use V2001 = Pump 1, V2002 = Pump 2 ... V2012 = Pump 10. Then you assign a value to the V memory locations for the pump run sequence. You will use two counters to do this, one to keep track of the last pump run and another to assign the number. So lets say that Pump 3 was the last pump run, when we go assign the next sequence we will assign a value of 1 to V2004 (Pump 4), a value of 2 to V2005 (Pump 5), a value of 3 to V2006 (Pump 6) and so on. For any pump that is not available you would assign a value of 20 to it’s V memory location. Now the pump run logic is pretty simple. The logic to run the pumps is – If V2001 >= UDC (current value) then run Pump 1. If V2002 >= UDC (current value) then run Pump 2. If V2003 >= UDC (current value) then run Pump 3. If V2004 >= UDC (current value) then run Pump 4. If V2005 >= UDC (current value) then run Pump 5. If V2006 >= UDC (current value) then run Pump 6. If V2007 >= UDC (current value) then run Pump 7. If V2010 >= UDC (current value) then run Pump 8. If V2011 >= UDC (current value) then run Pump 9. If V2012 >= UDC (current value) then run Pump 10. So here’s an example, we’ll say Pump 3 was the last pump run and Pump 6 and Pump 2 are not available to run, here is what your run logic will be - If 7 >= UDC (current value) then run Pump 1. If 20 >= UDC (current value) then run Pump 2. If 8 >= UDC (current value) then run Pump 3. If 1 >= UDC (current value) then run Pump 4. If 2 >= UDC (current value) then run Pump 5. If 20 >= UDC (current value) then run Pump 6. If 3 >= UDC (current value) then run Pump 7. If 4 >= UDC (current value) then run Pump 8. If 5 >= UDC (current value) then run Pump 9. If 6 >= UDC (current value) then run Pump 10. Now the UDC current value will determine how many pumps will be on. |
![]() |
![]() |
#8 |
Member
![]() ![]() Join Date: Aug 2002
Location: Ontario
Posts: 57
|
Calistodwt, I have been using the counter increment and SET/ RST coil method but there's way too many coils and contacts. I'm trying to get away from using so much logic
Tark, I think the UDC seems like a better solution so I'll give that method a try Thanks |
![]() |
![]() |
#9 |
Member
![]() ![]() Join Date: Aug 2002
Location: Ontario
Posts: 57
|
Tark, i'm just having some trouble understanding what you mean by assigning v memory for each pump, would this be the counter memory?
|
![]() |
![]() |
#10 |
Member
|
Not assign but associate. V2001 holds the sequence number for Pump 1, V2002 holds the sequence number for Pump 2, etc.
|
![]() |
![]() |
#11 |
Member
![]() ![]() Join Date: Aug 2002
Location: Ontario
Posts: 57
|
okay, I think I see what you're saying
first sequence LOAD a K1 in V2001, K2 in V2002... K10 in V2012 next sequence LOAD a K10 in V2002, K1 in V2002, K2 in V2003... I would need 10 of these sequences |
![]() |
![]() |
#12 |
Member
![]() ![]() Join Date: Aug 2002
Location: Ontario
Posts: 57
|
Tark, thanks a lot for the help... I think I have everything pretty well figured out now. In your example can you offer any advice on how you would get the sequence of 7,20,8,1,2,20,3,4,5,6 into v memory. I have it working but it required lots of rungs and logic to load the various combinations of numbers in v memory
|
![]() |
![]() |
#13 |
Member
|
Creating the sequence is the hard part. If you use a Pointer you can create the sequence with 7 rungs.
To use a pointer you’ll need 4 memory locations to keep track of the sequence.
This Program is an alternator. It sets the order in which 10 pumps should be run. It writes a value from 1 - 10 in memory locations V2001 - V2012. If a pump is NOT available it writes a value of 20 to that memory location so that pump is not run. An Up-Down Counter should be used to enable/disable the total required pumps. By comparing the UDC's value to the memory locations. Rung 1 – Load the default values at Start-Up Pointer = O2001, Pump Step = 1, Bad Pumps and Total Pumps = 0. Rung 2 – If the Pointer is pointing to a VMemory location higher than V2012 then reset the Pointer to point to V2001 (Pointer values are in HEX) Rung 3 - If the Total Pumps (Pump Step + Bad Pumps) is greater than 10, then we have set all the values for the sequence so we reset (Pump Step, Bad Pumps, and Total Pumps) for the next sequence. (Also increment the Pointer) Rung 4 - First Step of the sequence. We check if the pump that the Pointer is pointing to is NOT available. If the pump is NOT available we write a value of 20 to that memory location (so the pump won't run). We increment the Pointer to look at the next pump on the next scan. We increment Bad Pumps to help keep track of the Total Pumps run. Set the Unavailable Pump bit to disable then next run. Note - The Pointer is incremented in Binary. Also note that compare statements are done in HEX Rung 5 - Second Step of the sequence. If the pump is available (not need to check it was checked in Rung 4) then we write the Pump Step to the memory location by use of the Pointer. We increment the Pump Step and Pointer for use on the next pump. Note - The Pointer is incremented in Binary. Rung 6 - Last Step in the sequence. We reset the Unavailable Pump bit for the next pump. We add the Pump Step and Bad Pumps to determine how many pumps we have run through. When Total Pumps = 11, we have run through all the pumps, we are done. Rung 7 - Non Sequence step. This rung is used to prevent the Pointer from getting hung on a pump that is not available. This ensures that the Pointer always starts on an available pump. Note - The Pointer is incremented in Binary. Also note that compare statements are done in HEX |
![]() |
![]() |
#14 |
Member
|
I was asked for some information on how pointers work. I decided to create a webpage on how to use pointers in AutomationDirect PLCs since I didn't think there would be enough room to cover the subject in a post.
Here's the link if anyone else is interested - http://www.mcsintegrations.com/demos/pointerdemo.htm |
![]() |
![]() |
#15 | |
Lifetime Supporting Member
|
Quote:
FYI.. there are some examples of using pointers on Automatin direct's examples page. |
|
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
RSView 32 | hhuong | LIVE PLC Questions And Answers | 8 | December 28th, 2013 02:46 AM |
Which PLC for 32 low voltage inputs and 32 240V AC outputs? | thobjo | LIVE PLC Questions And Answers | 14 | September 16th, 2005 11:15 PM |
Automation Direct DL06 | Steve Etter | LIVE PLC Questions And Answers | 28 | January 21st, 2005 09:48 AM |
DirectSoft 32 data logging | djkbb5 | LIVE PLC Questions And Answers | 2 | November 17th, 2004 09:33 AM |
Directsoft 32 | Jnelson | LIVE PLC Questions And Answers | 6 | October 9th, 2003 09:01 PM |