Automation Direct - Sprinkler Controler

gregbazar

Member
Join Date
May 2007
Location
Never Never Land
Posts
6
I have decided to learn PLCs - just for fun, and thought I would have a crack at my sprinkler system.

Here is what I have:
- 11 sprinkler zones, 2 drip zones
- Automation Direct D06 PLC
- 24VAC power via Y0-Y16 relays


I have a basic system written for single zones. I created a minute counter, and a day counter that activate Y0 for drip, and Y1 for sprinklers. Every X days, the sprinkler zone runs for Y minutes.

It all works great for the single zone that I have so far.

So here is my question. I want to cycle through all the zones in each system (1-11 for sprinkler, and 1-2 for drip).

What is the best way to do that? I initially thought of using an OUT coil that used a pointer do discover what zone should be watered right now.

Since that doesn't seem possible, I thought I would ask for help.

How can I cyle through each of the zones, after the previous finished without writing a whole new block of code for each zone, with seperate timers for each?

Thanks for helping a newbie.

Greg
 
Create a Zone counter. Use a compair instruction for each zone. If Zone counter equals 1 then run zone 1. If Zone counter equals 2 then run zone 2.
 
Milldrone - I am looking at the pointers to see if I missed something,

Tark - That is where I was heading, but it seemed very inefficent to have 16 rungs of the ladder, with the accociatied timers for each zone all checking every microscecond "is it my turn?"

If I were doing this in C or somethign of the like, I would have an array of zones and their start time, and run druation. A simple while loop would rip through it and activate the appropriate zone in about 10 lines of code.

Going the way I am going, I will have 10 ladder runs for each zone with seperate timers etc.

Since only one zone is active at a time ( I am also hooking up a pressure sensor to my well because it just can't push that much water any more), I thought it would be nice to increment some memory register through all the stored values.

Counter 1 checks duration of run in Vxxxx, which is a pointer to the real value for zone 1. The next pass through, Vxxxx has been updated to point to the zone 2 value etc.......

Thanks for the help and input.
 
Ok, I have done some more reading on pointers, and the seem close to what I want, but I cannot figure out this:

- How do I activate an output (Y0-Y12) via a memory location.

I wan to do this: OUT (V3030)

Where V3030 contains Y0 or Y1 or Y2 depending on what zone / run I am on.
 
I'm thinking pointers are not needd for this.


You could just use a shift register. Just put one bit into it and shift it over every x minutes. Look at which bit is 'hot' and fire the correct/coroponding valve.

Funny, I have a Dl06 watering my indoor plants :)

Dave
 
gregbazar,

Pointers are used in a plc to increment or chose a memory location for use somewhere else in the program. Thus you can use one or two rungs of ouput logic and increment timer values for each zone. In the thread I referenced, the plc mimics with outputs in playback mode what it had seen in record mode. When button x0 was pushed for two seconds then button x13 was pushed for 30 seconds it would record this. Then during playback the ouputs would mimic the button pushes for which output and duration.

That said the way I would setup a sprinkler timer would be like Tark suggested. Pointers can be hard to follow what the original programmer was thinking. If you use pointers documentation is a must.

hint: one way to access an ouput location is via the word "vy0"
 
Last edited:
Milldrone - Thanks

I just talked to the guys at AD and here is what they suggested.

Do what you want to do to VC0 and then write that register to VY0 to activate the appropriate output.

Since VY0 is a bit register for the 16 outputs, you can control what is on or off dynamically, using shift left and shift right commands.

I think I am on to something here!

;)
 
gregbazar,

If this is a practical exercise not just a play one, you should think about future expansion of your system. If you box yourself in with the Vmem it can be hard to fix later on. Shoot, even if this is a play exercise see if you can expand at a later date.

P.S. Don't forget about documentation. I can't tell you how many times I could'nt figure out why I had done something in a particular manner simply because I forgot to document.
 
gregbazar,

Hint: Leave some empty vmem next to what you are using. Not a problem with a simple sprinkler control, but if you were doing something that filled up the cpu processor. You can box yourself in trying to be memory efficient.
 
Good Day Gregbazar,

Another possible approach is to load a given bit pattern and send it to an OUT FORMATTED (OUTF) for the appropriate “Y” address / zone. Using the OUTF can allow various combinations and in the same rung, you can load a new preset to the timer
 
Last edited:
Marksji - I'm in Lubbock TX too! what a small world.

If I add an extra card, I will just add extra memory ranges correct?

I have already seen what Milldrone was talking about with memory locations. It is a pain in the buttwha when you run our of "slots".
 
Adding a I/O card won't get you any more memory, but it will get you more outputs. For example you could put a 8pt relay output card in slot 1 and have 8 more outputs (Y100 - Y107). The memory for Y100-Y107 is already in the DL06.
 

Similar Topics

Hi, I have been trying to run drive via Sysmac studio. I can ping the drive. I can see the logic bits going on/off as per command. But, drive is...
Replies
20
Views
315
Anyone tried Automation Directs new CM5 HMI. We've been the EA9's for a few years now with minimal complaints. A few failures here and there but...
Replies
11
Views
1,033
I'm using an Automation Direct GS20 VFD for the first time and I have a question for the Automation Direct gurus regarding the recommendation of a...
Replies
2
Views
1,033
I've been looking at the Automation Direct PLCs off and on over the years, but most of my customers are Allen-Bradley almost exclusively and won't...
Replies
8
Views
1,695
Hi all, I am making a test rig to be able to wire in any DL06 (or DL05) And create a HMI in red lions crimson 3.1 to test all the inputs and...
Replies
4
Views
895
Back
Top Bottom