Trying to put something together with DS32

ALarios

Member
Join Date
Jan 2004
Location
Chicago
Posts
5
Hi guys and gals, I need help to whomever can donate a little time. My boss just purchased DS32 and asked me to to put together a program that will replace a lot of hardware we have.

Basically we have eight units (and when I say units it can either be an automatic toilette or faucet) and have them set up to a counter/Timer set up, where there is a pulse sent to a unit activating it, two seconds later a second pulse sent to the second unit, and then to the third unit we come back to the first unit. As this is happening there is a counter set up to each unit counting each actuation. I'm sure this PLC DL150 (the one we have) will do the job. I was looking at the DRUM programming and it seems that this will do the trick, but after reading I still don't know where to start. Can someone help me get me started?

Thanks a lot for yout time!
 
ALarios,

To activate 8 units, each for 2 seconds, and count how many times each has been activated, you could use a drum function. For only 8 outputs, I probably would not bother. I would just do it using timers and counters, logic for the Automation Direct DL150 as follows: Every 2 seconds, Timer T0 will turn on its output bit (T0) and cause Counter CT0 to add 1 count. When CT0 reaches a count of 9, it will reset and start over at 0. When CT0 reaches 1, turn on Unit 1 with Output Y1, and use Counter CT1 to keep up with how many times unit 1 has been activated, and so on for all 8 units.

Rung 1: Input = Timer 0 N.C. bit to restart T0 every 2 seconds , Output=Timer 0, Timer T0 set for 2 seconds (200 x 0.01).

Rung 2: Input = T0 N.O. bit, Output = Counter 0, CT0 set for 9 counts. Add reset comand for CT0 to be when CT0=9, or just the "done bit" from itself, which is a "CT0" N.O. bit.

Rung 3: Input = Compare statement: Counter CT0 =1; Output= Unit 1 (Y0 relay output) paralled with Counter CT1, CT1 counts number of flushes for Unit 1.

Rung 4: Input = Compare statement: CT0 =2; Output= Unit 2 (Y1 relay output) paralled with Counter CT2, CT2 counts number of flushes for Unit 2.

Rung 5: Input = Compare statement: CT0 =3; Output= Unit 3 (Y2 relay output) paralled with Counter CT3.

Rung 6: Input = Compare statement: CT0 =4; Output= Unit 4 (Y3 relay output) paralled with Counter CT4.

Rung 7: Input = Compare statement: CT0 =5; Output= Unit 5 (Y4 relay output) paralled with Counter CT5.

Rung 8: Input = Compare statement: CT0 =6; Output= Unit 6 (Y5 relay output) paralled with Counter CT6.

Rung 9: Input = Compare statement: CT0 =7; Output= Unit 7 (Y6 relay output) paralled with Counter CT7.

Rung 10: Input = Compare statement: CT0 =8; Output= Unit 8 (Y7 relay output) paralled with Counter CT8.

That's all! Just 10 easy rungs. I am sure you will want to add your own bells and whistles, once you get it up and running. Happy Programming, [email protected].
 
Last edited:
Lancie's solution is simple, and a good alternate to a drum timer. However, a drum timer is certtainly a reasonable approach.

Picture a mechanical drum timer, and it makes operation of the programmed one easier to understand. The Directsoft manual has some very good examples. The drum timer is a slightly difficult one to understand in just a verbal explanation. The best bet is to simply start programming one, and play with it a little, and watch what happens.
 
Last edited:
Thanks for your help Lancie 1 and Tom, I'll give it a try and let you know if I have any questions, I really appreciate your time... (y)
 
Hi Lancie, this is ALarios from the PLC forum. Thans again for your help, however, I'm lost. I've never programmed with DS32 so some of these instructions aren't that clear. Thank you for being patients. So far this is what I've gather from your response:

Rung 1: Timer 0 (this timer is at the end of the rung, correct? Where it says NOP?) There are two inputs on this timer, the bottom input line is where the 200 goes, being (200 x 0.01), the top input line, I'm not sure. And the Normally Closed contact you're talking about goes at the beggining of the Rung? Do I name that N.C. bit "TO"?

Rung 2: The beggining of the rung has a N.O. bit this time, do I also name it TO? Now the output for this rung, the counter, again two inputs is the bottom (900 x 0.01)? Didn't really understand the second part of this rung.

Rung 3: Input: "Compare statement: CT0 = 1"...so at the beggining of this rung is a counter in a compare statement? The second part to this (the output) is YO my first output on the PLC correct? in parallel to the first counter.

Rungs 4, 5, 6, 7, 8, 9 and 10 are pretty much the same I can see. As long as I get the first one I cn do the rest.

I'm sorry if this is basic stuff, but after reading and trying to make sense I found myself lost again.

Thanks again for your help Lancie.
 
Since you're contemplating using a drum (sequencer) and a timing function is required, perhaps one of the first things to decide is whether to use external timing or to put time values in the drum steps. An external timer has the advantage that the presets are easier to change. IIRC, you need to accept and download to the processor timing changes within the DRUM instruction.

Tom Jenkins is right, the best way to learn the DRUM instruction is to just jump in and make one. Set one up with only three or four steps controlled by pushbuttons and connect a couple of the DRUM outputs to Y0-Y2. Run the thing while online and examining the DRUM to see how it reacts as it steps through the cycle.
 
Hey guys, I have a quick question I'm in the middle of putting this program together and got stuck.

When I try to "accept" the program there is an error message that says..."Rung contains too few STR instructions:

Can someone explain what this means? The book isn't too clear about it.

Basically I'm trying to compare Counter 1 (CT1) to Counter 0 (CT0). If CT1 matches CT0 then YO sends a pulse (output) and CT1 registers a count. So I'm using a Load set to "1" the input being a N.O. bit under that I have a CMP branched off looking at "CT0" and then my outputs (being my CT1 and my YO).

When I try to accept it, it gives me that error message.

Thanks guys!

A Larios
 
Its hard to tell from the text description, but try breaking it into two rungs, one for each "output".

To post ladder type the word "ladder" enclosed in square brackets, then type the ladder logic using standard keyboard characters.

|
| X1 X5
|--| |--------+-|/|------(Y0)
| Y0 |
|--| |--------+
|



When you have finihed type "/ladder" enclosed in square brackets.
 
Wow, this thing is harder than I though, (at least for me). The timer isn't counting 1-2-3-4... it counts 1-10-20-35-50-65....and i can't get it to reset after it reached the preset number I gave it.....
 
What kind of timer are you using? A "standard" timer (TMR) will only reset when the input to it drops out. It will only turn on when it reaches the setpoint, not reset. It also uses tenths of a second for the input units(k20=2seconds). To get a fast timer (k20=0.2second) use the TMRF. When you see the timer count, you are limited by the communication speed and will not see how fast it is timing. Don't let this worry you, it is normal.
 
Regarding the "Too few STR instructions"...

I think ALarios is fighting with your "paralleled with counter" instructions, Lancie... ;)

DS won't let you do this:

|
|----]=[----------+-------------( OUT )
| |
| | +-----+
| +-------------| CNT |
| | |
|----] [------------------------| |
| +-----+


Instead, try replacing the above with this:

|
|----]=[------------------------( OUT )
|
| OUT +-----+
|----] [------------------------| CNT |
| | |
|----] [------------------------| |
| +-----+


Regarding your last "Timer not resetting" post... Lancies' 'Rung 1' should look like this:

| T0 +-----+
|----]/[------------------------| TMR |
| | T0 |
| | K20 |
| +-----+


This is called a 'self resetting' timer, and it WILL reset!

beerchug

-Eric
 
The timer is actually timing correctly.

What you are seeing is the lag in the comms that makes it appear to count erratically.

The only way I have been able to see "real" time data was to hook up through a ecom card.
 

Similar Topics

I am trying to examine a proximity sensor during acceleration: what I am trying to accomplish is "during acceleration if there is no change in...
Replies
5
Views
1,801
Was wondering if this was possible, or if anyone has had experience with it.
Replies
4
Views
1,934
Hello everyone, Right now I'm trying to understand the Modicon M340's DDM 16022's configuration. I am using Unity Pro software. It states that...
Replies
6
Views
2,173
Hi All, Please help me understand. Unidrive from Control Techniques rates the drive as a 200-240V input and 200-240V output. Given it is AC...
Replies
5
Views
1,983
Back
Top Bottom