Share your ladder logic

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

sapperxl

Well-Known Member
Joined
Jul 14, 2011
Messages
93
Reaction score
2
Location
Kemah
I'm curious if anyone is willing to share their ladder logic for their automated brew systems. I've started getting my stuff to make a PLC brewery. I've got a AB SLC500 Fixed Hardware 1747-L30C, expansion chassis and two 4 point analog input modules. I also have RSLinx/RsLogix 500 and AdvancedHMI and have gotten it all to communicate. I'm an instrument & automation tech by trade but I'm really just learning PLC programming so I'm wondering if anyone has any logic they've done I can study and perhaps adapt to my project. Doesn't have to be allen-bradley, I'd love to see anyone's logic. Thanks in advance.

BTW, if anyone wants to embark on a similar project I have two more 1747-L30Cs I'll sell for like $40 each + shipping to HBT members, just PM me.
 
I'm using a SLC503 on my project, the logic isn't fully done yet, too many projects...

But I will say I highly suggest using the 1746-NT4 or NT8 card if you are using thermocouples. If you don't you will have to use some kind of signal conditioner to go from the mV thermocouple input to a mA or 10VDC signal for your analog card. They are pretty cheap on ebay (NT4), I bought my card less than 100$.
 
The SLC500 Fixed Hardware style I have only allows for two modules besides the built in relay / dc sink I/O. My wife's out on maternity leave so I'm doing a lot of this project on the cheap, the fixed hardware style is a lot cheaper then the modular SLC500s. I looked at the different temp input cards and while it is cost effective I thought I'd have better flexibility by getting analog input cards then using 4-20ma temp transmitters. I was planning on using PT100 RTDs then the cheap Chinese 4-20 transmitters ($12/ea probe&transmitter). Thermocouples tend to have more corrosion issues in harsh environments in my experience. I'd love to see what logic you have written even if it isn't finished. I'm going to have to write my logic from scratch anyways unless someone has a system just how I want mine, but I'd like to see the overall structure different people have used and if anyone is using AdvancedHMI I'd love to see that as well. Or even different HMI solutions that don't run up into the thousands of dollars.
 
I used advancedhmi, it works great most of the time, I'm using RSView now. I need to upload my project file off my SLC to get you the logic. I lost it when I reformatted my hard drive. Do you have an activation for RSEmulate500? I have the installer if you have a masterdisk with the activation.

Its a little easier for project development, so you don't have to be connected to the plc.

I'm using the DF1 open source driver from advancehmi in a small service that reads and writes to my plc through a text based file. I then run a PHP script on my server to read and write to that file so I can see my fermentation chamber temperature and change it from a web based application.

Its been an on-going project, and it really hit a speed bump when I moved last year. I just started working on my keggles to get them ready to integrate the brewery into my PLC setup.

But pretty much the way I have it written is a compare value to set value for the HLT. So if I have N7:0 set to 165 then O:2/0 (output to SSR) will be active if N7:0 is less than or equal to I:1/0 (analog input scaled to match N7:0). I'm also going to try the PID instruction and see how that will work out, but honestly I don't think its necessary.

For the boil kettle its a duty cycle style logic. Where 100% the bit will be trigger on and 0% the bit will be off. In between it will be adjusting a set of timers for and on for a set time off for a set time. Like 50% would be on one second off one second.

Also thelearningpit is a great program for teaching ladder logic and is based off of RSLogix500.
 
You can download RsEmulate 500 for free from AB. They did that when they came out with the Micrologix line, it is under the Micrologix download page, but it works with RsLogix 500 and RsLogix Micro. You can get RsLogix Micro for free but it only works with the Micrologix 1000 & 1100 and they go for 300-400 used. I had a hard time getting AdvancedHMI to figured out to communicate properly but finally got it going. Not the best HMI but it will work for what I want and well...it's free. Rockwell is real proud of their software and it is hard to get used copies, even of the old stuff. Thanks for telling me how your system works. I thought about the PID function but I really don't think I'm going to use it for anything. The only place I could see where you would need to use that is maybe HERMS or RIMS and if you had a gas fired burners to maintain temperature. My plan is for an all electric brewery mainly just because it'll be easier and cheaper to control.
 
TI thought I'd have better flexibility by getting analog input cards then using 4-20ma temp transmitters. I was planning on using PT100 RTDs then the cheap Chinese 4-20 transmitters ($12/ea probe&transmitter). .

Link? This would save me about $200.

My program is HERE. The logic is in place for full control of valves and any kal based design. There is also a simple alarm handler, and two-state device routine.

I am using AdvancedHMI talking over the Ethernet Driver to a NET-ENI (Ethernet to DF1) to the PLC (ML1200 L40-AWAR with 1762-IF2OF2). You can read a bit more in depth at MY THREAD :).

Almost forgot. Here is my AdvancedHMI Main Screen. Using a Dell Venue Pro to control it!

Q5wENcn.jpg


If you have any questions feel free to shoot me a PM!
 
Ebay just search for 4 20 ma temp transmitter. I ordered five this morning for $40. I still gotta get the RTDs, but just search for PT100 and a bunch will pop up just make sure you get the three wire ones. Also on the transmitters I've seen some that have the zero and span screws filled with RTV so I stayed away from them. I'll post my experience with them when I get them. Thanks for sharing I appreciate it.

Sent from my SAMSUNG-SGH-I537 using Home Brew mobile app
 
muhteeus, I see you went with a separate temp controller instead of the PLC PID function, was that just to simplify the logic or does the 1200 not have the PID function? I'm thinking about going that way using like at STC-1000 or something just because the SLC500 5/01 processor can't use the PID function and I'm not sure how well Maxkling's compare method will actually control temps. I'd like to stay within +/- 3 degrees of target. I'm not really familiar with the micrologix, but playing with RsLogixMicro I see some of the ML1100s have the PID function. I work for an oil major so all our equipment is the high dollar stuff so I'm not used to working with the limitations of the non-astronomical priced equipment.
 
muhteeus, I see you went with a separate temp controller instead of the PLC PID function, was that just to simplify the logic or does the 1200 not have the PID function? I'm thinking about going that way using like at STC-1000 or something just because the SLC500 5/01 processor can't use the PID function and I'm not sure how well Maxkling's compare method will actually control temps. I'd like to stay within +/- 3 degrees of target. I'm not really familiar with the micrologix, but playing with RsLogixMicro I see some of the ML1100s have the PID function. I work for an oil major so all our equipment is the high dollar stuff so I'm not used to working with the limitations of the non-astronomical priced equipment.

Yes, I chose to go with the discrete PID control due to cost concerns (3x Aubers are cheaper than an RTD card for the ML1200). My controller does support PID loops :).

As far as maxkling, Gap control CAN be quite accurate for slow processes. I am able to control 2000gallon tanks to +-3F with a steam valve and gap control. Though the oscillation period is about 2-4 hours :).

And I agree with your assesment of the limitations. I have been using ControlLogix processors, and going down to a 10 year old ML1200 has been... interesting. The only real annoying things have been the lack of the CPT instruction, and the STI setup.
 
I was playing with the emulator today at lunch and what I think I'm going to do for temp control is use GRT & LES with like a 5 second TON delay to turn the element on and off and analog inputs with the 4-20ma transmitters to get my PV for the vessels. I'm thinking that'll get me where I want, have to give it a shot when I get home and can play with my equipment. I got another week offshore. My SLC500 are relay output so I really don't want them cycling a ton but I've got some extra output contacts and a spare SLC500 if they get worn out. Kinda wish I'd got a discrete output though, oh well. If I have too many problems I did find a $40 temp controller on ebay that has 4-20ma output so I can still get a temp reading on my HMI. What's getting me now is I've troubleshot a lot of PLCs as a tech but have never written my own original logic and the program control is giving me a headache. I'll figure it out tho.
 
muhteeus, I couldn't get your logic file to open in RsLogix Micro or RsLogix 500. Kept giving me a unexpected file format error...not sure why.
 
Back
Top