PDA

View Full Version : Siemens PLC Controller completed


easttn
05/10/2006, 08:36 PM
Hey guys,

Built a custom system for one of the greatest reefers in the business and thought I'd share. As I had Siemens PLCs availabe it seemed natural that I follow what I know.

The hardware is a follows:
1 - 6AV6 545-0AA15-2AX0 - Siemens Touch Panel TP070
1 - 216-2BD22-0XB0 - Siemens 226 CPU AC/DC/RLY
1 - 223-1BH21-0XA0 - Siemens EM223
1 - 231-7PD22-0XA0 - Siemens EM231
Some Din rails, wire, cheap thermocouples, and a NEMA enclosure.

The I/O quantity and general specifications can be found here: Siemens PLCs (http://www.sea.siemens.com/icc04/sec16/16-178_180.pdf)

Gresham and I spent a bit of time tweaking the controls he wanted, and some did change as we went through the list but here was one of the original drafts. You will see the final controls as I progress.
http://img.photobucket.com/albums/v461/easttn/SystemRequirements.jpg

I'll post pics, schematics and code over the next few days.

Stay tuned. This turned out rather well if I do say so myself.

GreshamH
05/11/2006, 06:15 PM
:D I'm gitty with anticipation :D

one of the greatest reefers in the business Dang man, now I'm blushing and gitty:lol:

easttn
05/11/2006, 10:37 PM
We'll start with the guts. Gresham still needs to connect his relays so as to isolate the load from each on the controlling outputs, or inputs. Every single parameter here will set either a silent alarm (burglar), or audible water outside specified parameters, or temp not within specification.

Please excuse the disarray of wires, it will get a tuck and a trim once all the connections are made. These connections are strictly power and control for the 4 units I described above.
http://img.photobucket.com/albums/v461/easttn/Inside.jpg
The top unit is the primary CPU and an add-on for more I/O. The smaller unit is a analog unit that will be used to monitor tank temperature.

Here is the front of the unit and the main display screen.
http://img.photobucket.com/albums/v461/easttn/MainScreen.jpg
This is the default screen when unit is initiated, I wanted the system to default at startup then check for any anomalies. Its only a 10mS time period to check all conditions.

What you see here is the main tank temp, and that of the sump. The TC for the sump is inside the NEMA box so you can see a slight variation in air temperature from inside to out. In the application these TC's will be submerged in water.

There are five primary controls on this screen, Lighting setup and Test, Manual control of all pumps, Temp control, Clock setup, and Maintenance functions. The two other buttons on the touch screen are to reset any alarm once fixed, and to place the aquarium system into a manual mode. I'll splain later.

There are secondary menus behind each of the main five functions. For example, I selected "Lighting Setup and Test", and this screen appears:
http://img.photobucket.com/albums/v461/easttn/TankLightControl.jpg

Gresh told me how many lights he had and named them specifically, this screen allow him to set any of the primary tank lights to any time he cares to. Timer accurate to .001 second per month. All time entered as military time.

When I select Secondary Lighting, this screen appears:
http://img.photobucket.com/albums/v461/easttn/SecondaryLighting.jpg
These lamps can now be controlled at will.

Going back to the main menu, I now select manual pump mode, and these are Gresham's options:
http://img.photobucket.com/albums/v461/easttn/ManualPumpModes.jpg
If any maintenance needs to be preformed, this cuts power to any and all pumps, including his wave machines. Notice the "maintenance Function" here. The following menu is displayed for maintenance:
http://img.photobucket.com/albums/v461/easttn/Maintenance.jpg

The two primary actions here are "Feed Fish", touch the pad and main pumps, skimmer, and motion pumps turn off for 12 minutes. They automatically reengage and the tank returns to auto pilot. The "clean the tank" disengages all power to all the pumps. He can reselect as need to help the cleaning process. Selecting again, all pumps return to the Auto mode as identified in the pump setup menu. "Extend VHO" are for night watching, each time the panel is selected the VHO's are extended by 15 minutes. Once extended time ends, VHOs return to cycle as set in lighting menu.

The download button will allow any parameter being measured to be freeported to a PC. It will also set alarms via pager if something happens while away. This feature depends on the s/w Gresh wants to run on his dedicated PC. It will be something he and I can work out over the next few weeks.

This screen displays the multiple tank temperatures and energizes the heaters, chillers, and ambient air fans to keep the tank at +/- .2 degree F.
http://img.photobucket.com/albums/v461/easttn/TempStatus.jpg

If there is ever a need to change the time of day clock (DST is automatically detected), the values can be entered here.

The next post will dig a bit more into the schematic. The last will discuss code and theory of operation.

GreshamH
05/12/2006, 05:02 AM
Holy smokes, look at the GUI :D My first sighting. Bigfoot really is real :lol:

BeanAnimal
05/13/2006, 10:10 PM
what is the average street price on each component... man I like hte touch screen! I have been looking at them for my controller.

BTW easttn... I etched up a few boards for the goodies you sent my way. I am practicing my SMT soldering before do the real deal! Who needs you professional PCB guys anway :D

I am very pleased with the Laserprinter transfer method for my small projects :)

If it were me, I would put this on the living room wall beside the thermostat, so people can SEE it!

easttn
05/13/2006, 10:14 PM
Bean,

The S7 200 line is no longer built in the US (Thanks again NAFTA), bide your time on EBAY. One piece at a time, you can prolly get it all for much less than the aquacontroller.

BeanAnimal
05/13/2006, 11:22 PM
please don't temp me into another project! That screen is making me drool!

zapata41
05/14/2006, 02:20 PM
ok well i'm interested in this. i know nothing about plc's but feel i go wing one of them with some help. i have found most of the equip you have listed on various places for quite cheap. now if i could only find a touch screen for cheap. also how do you go about programming one of these. using a computer or something like that. or is it all done on the touch screen

Tim

Stonepost
05/14/2006, 06:39 PM
I wan't one....lol

Sohal11
05/15/2006, 09:22 PM
Wow! This is something that I need to follow up on. More input. :D

easttn
05/16/2006, 06:15 AM
Thread 1 (http://archive.reefcentral.com/forums/showthread.php?s=&threadid=185408&perpage=25&highlight=rugrats&pagenumber=7)

Thread 2 (http://archive.reefcentral.com/forums/showthread.php?s=&threadid=188880&perpage=25&highlight=Siemens&pagenumber=1)

Good luck all.

perpetual98
05/16/2006, 08:17 AM
I've got some Allen-Bradley stuff at home, but I have no clue how to work it. I can program the AB Micrologix to do some limited stuff, but I can't for the life of me figure out how to program the PanelView to do the GUI. AB stuff isn't terribly easy to learn on your own unfortunately.

easttn
05/16/2006, 07:20 PM
Niether was SIemens, look at the dat we first started the first thread. Never give up.

GreshamH
05/16/2006, 09:38 PM
<a href=showthread.php?s=&postid=7379858#post7379858 target=_blank>Originally posted</a> by easttn
Niether was SIemens, look at the date we first started the first thread. Never give up.

It's been quite a while since I got the first one, which went from the box it was sent in, to the one it now sits in :D I got it to reconize itself, bout it :p

perpetual98
05/17/2006, 08:24 AM
I've gotten some basic ladder done, but I can't do anything with the GUI. I've gotten the computer to recognize the panelview and I can send stuff to the panel, but I have NO idea how to get the panelview to talk to the PLC. Whenever I think I find some info on the Internet, there's another page one click later that contradicts the previous page.

Anyway, here's a thread that I started a while back.

http://www.myreef.com/smf/index.php?topic=3.0

H20ENG
05/17/2006, 07:59 PM
Damn Charles, You've been busy!!!!
That touch panel is the Dogs Danglies!!!

Gresh, Do you ever read your PMs? :D

GreshamH
05/18/2006, 12:04 PM
Nah, I'm ignoring you (j/k) :D PM sent ;)

BeanAnimal
05/20/2006, 11:00 PM
Gresh your box is full...

Instead of me explaining the SSR stuff... you can read a better version from the pros :)

Here is a decent site that has a basic run down of SSR applications. The nav menu on the right will also get you to motor, heating and other types of apps (other than lighting).

http://solid-state-relay.crouzet-usa.com/kb/ssr_kb_lighting.shtml

Bean

easttn
05/21/2006, 01:17 AM
You don't need the SSR's. Use your PLC to control the coils on the relays I sent long ago. Follow the stuff I sent. Take your time.

C

GreshamH
05/23/2006, 01:47 AM
It requires more then you sent :D I have a bunch of SSR's all ready, so why not?

I've been following what you sent via the 4' x 8' schematic :D Man that thing is huge :lol:

easttn
06/02/2006, 09:58 PM
C'mon Gresh, let's see what's happening.

I like this thread, it doesn't get buried in a day.

GreshamH
06/03/2006, 11:32 AM
Got my 20 float switches, TC wire, and new Dell computer. I'm just waiting on the Din rail, relays, and some other assorted stuff.

I'm moving it in to a larger box to accomadate the relays.

After reviewing in the in's and out's, it looks like I may need to have some more programming done for some new features I added (controll of the linear actuators, skimmerair input kill, etc).

I'm having my float switch holders being machined as we speak :D

GreshamH
06/07/2006, 10:44 AM
OK, got most my stuff lined up to get this puppy rolling...

http://i5.photobucket.com/albums/y188/GreshamH/IMG_3761.jpg

Got the touch panel put into a new enclosure, 30 relays, and DIN rail.

http://i5.photobucket.com/albums/y188/GreshamH/IMG_3778.jpg

It'll all fit nicely into it's new home :D PLus room for termianl blocks to boot...

http://i5.photobucket.com/albums/y188/GreshamH/IMG_3769.jpg

Gotta love my new relays. They have a force on switch and indictor lights, plus a filter :D

BeanAnimal
06/07/2006, 11:41 AM
Where did you source the relays? Cost?

I see you decided to avoid the SSRs :)

You need a bigger box to fit wire duct in there and make it look cleaner (and bigger!). I saw some 4'x6' nema 4 boxes on ebay the other day. Maybe you could squeeze the stuff into one of them :D

Nice job gresh... I am etching boards for my controller today (though I found a few small errors and may need to etch again (I hate patching with jumber wires).

Wanna split a box of wire duct from eBay?

BeanAnimal
06/07/2006, 11:44 AM
I am also trying to source #18 #22 #26 stranded MTW wire in rainbows of colors and small quantities. I shudder to think of the cost of a 250' put up of each color. I also don't like THHN as it is just to darn stiff. Any ideas anybody?

perpetual98
06/07/2006, 11:47 AM
I've used mouser.com and jameco.com for some of my parts sourcing, but not wire. We sell wire where I work, but nothing that small unfortunately. Get me some manufacturer part number and stuff that you're after. My sister works for a cable harness manufacturer and I also have some other contact that may be able to help.

Eric

BeanAnimal
06/07/2006, 11:54 AM
Thanks Eric.. when I get home this afternoon I will gather up what I can. You would think that companies would sell grab bags of wire cut offs. Most of the stuff I need is 24" or less in length.

I use mouser and jameco sometimes as well. Surpluss sales of nebraska and allelectronics are great too. Newark.com has great prices lately. Digikey is expensive but has some oddball stuff.

Here is a link to the best serach engine I have found

http://www.findchips.com/

Put a part number in and it will tell you who has it!

GreshamH
06/07/2006, 02:11 PM
<a href=showthread.php?s=&postid=7515067#post7515067 target=_blank>Originally posted</a> by BeanAnimal
Where did you source the relays? Cost?

I see you decided to avoid the SSRs :)

You need a bigger box to fit wire duct in there and make it look cleaner (and bigger!). I saw some 4'x6' nema 4 boxes on ebay the other day. Maybe you could squeeze the stuff into one of them :D

Nice job gresh... I am etching boards for my controller today (though I found a few small errors and may need to etch again (I hate patching with jumber wires).

Wanna split a box of wire duct from eBay?

Yah, since I needed some Icecubes, I just went with all Icecubes for a cleaner look :D

Hmm, bigger :D

Got a link to the wire duct, I may be interested :D

The relays I got from automationdirect.com (IIRC, I'll check later for sure) for about $10 w/ base and filter. Bight be more like $11, but they were pretty cheap from this place.

What type of wire should I run for my floatswitches? I have 2 pair 24awg solid core w/ sheilding right now. Will that be fine?

I may be down on splitting wire as well, lets take this to email :D

GreshamH
06/07/2006, 02:12 PM
<a href=showthread.php?s=&postid=7515141#post7515141 target=_blank>Originally posted</a> by BeanAnimal
Thanks Eric.. when I get home this afternoon I will gather up what I can. You would think that companies would sell grab bags of wire cut offs. Most of the stuff I need is 24" or less in length.

I use mouser and jameco sometimes as well. Surpluss sales of nebraska and allelectronics are great too. Newark.com has great prices lately. Digikey is expensive but has some oddball stuff.

Here is a link to the best serach engine I have found

http://www.findchips.com/

Put a part number in and it will tell you who has it!

Jameco is a local supply house for me :D Gotta love will call :lol:

I use all the others mentioned above as well :D

H20ENG
06/07/2006, 06:38 PM
I like those relays except for one thing: you cannot look inside to inspect the contacts for burning, etc. They are handy for troubleshooting, a quick test, etc.
I have used automation direct a few times and they are consistently the cheapest. I have yet to be disappointed in any of their products, too. I like the relay bases and the matching plug-in MOVs (or diodes).
Make sure the relay is seated good in the socket. I had one running a halide (I know, it should have been a lighting contactor:rolleyes: ) that one of the relay pins started to heat up from my not seating it all the way. Give them a good wiggle to get some fresh metal to metal contact.
Heckuva day you have planned, wiring it all up:D

GreshamH
06/07/2006, 06:57 PM
<a href=showthread.php?s=&postid=7517918#post7517918 target=_blank>Originally posted</a> by H20ENG
I like those relays except for one thing: you cannot look inside to inspect the contacts for burning, etc. They are handy for troubleshooting, a quick test, etc.
I have used automation direct a few times and they are consistently the cheapest. I have yet to be disappointed in any of their products, too. I like the relay bases and the matching plug-in MOVs (or diodes).
Make sure the relay is seated good in the socket. I had one running a halide (I know, it should have been a lighting contactor:rolleyes: ) that one of the relay pins started to heat up from my not seating it all the way. Give them a good wiggle to get some fresh metal to metal contact.
Heckuva day you have planned, wiring it all up:D
Thanks for the tips :D I did see how easy it could be for them not to be seated all the way, it's definitly something I'll keep an eye on.

For wiring it up, I figured I'd call in a few favors with people, whatchyah doing this weekend :lol: (just kidding, I have a BAR meeting to attend on sat and I work sun)

BeanAnimal
06/07/2006, 08:34 PM
Boxes of 1" duct go on sale on ebay all the time. It's like $250 for 30 6' pieces or something... beat $650s at graybar though.

I will have to dig out my BOM that I compiled a while back.

I am fed up with the limitations of EAGLE PCB and the fact that it corrupts files at the drop of a hat and is limited to a 3" x 4" board.. I need to find a better "free" PCB package. I used PROTEL but am not goin got pay $5000 to DIY some boards :)

WIth regards to the wire, yeah we will need to talk. It may take me a few days to finish some of these jobs up and have some free time. PM me and we can take this to email (or another thread). The shielded wire should be fine for the float switches.

I plan on running #18 for my 5A relay outputs inside the panel. NEC says you can do it as long as there is suitable overcurrent protection that can not be "replaced" with a higher value. I plan on using 5A push button breakers like you would find on a power strip.

Bean

H20ENG
06/07/2006, 09:09 PM
Man I work Sunday too. If you and I could get together, we'd finally get a bunch of stuff finished:)

Bean,
Automation Direct has the wire duct, too. Not sure if its competitive, though. They started carrying it right after I ordered a big box of stuff from them, then had to get the duct from mcmaster.:rolleyes:

perpetual98
06/08/2006, 07:53 AM
We sell Iboco duct and another kind at work. I might be able to get you guys a deal.

Eric

nyvp
06/15/2006, 11:30 AM
anyone willing to build one for someone else? Pm if you are.

Nathan4Wvu
07/05/2006, 08:52 PM
Man that thing is sweet!! MORE MORE MORE PICS!!

easttn
07/06/2006, 09:15 AM
Gresham,

I have your last piece of code for the GUI, PM when you would like to do a trade.

Its not a hostage situation. :D

Thanks,
Charles

GreshamH
07/06/2006, 11:17 AM
Sounds like it though :lol:


"we've got your code, hand over the frags of the code get's it"

If I send the frags now, I'll be wiped out of any of that lineage, and that ain't gonna happen. You got to give me more time bro, that list was fricken 4 pages long and contained all named corals known to man, and some that aren't :D I've aquired a few, and have been promised some from others, but work has been keeping down from doing the actual trading :(

easttn
07/06/2006, 11:07 PM
Gresham,

It was a wish list. 30% would be awesome, you have other stuff I'll never find in TN. Please don't try to complete the list, I did this for fun not greed.

C

GreshamH
07/07/2006, 05:07 AM
No worries, no one person could complete that list :lol: Your more then right about other stuff that you won't find in TN though :D We're the great Cali coral filter out here, especially the crowd I run in :lol:

easttn
07/07/2006, 10:36 AM
Take as long as you need. When you need the code just ask.

C

H20ENG
10/18/2006, 08:08 PM
Gresham,
HOWZIT? Get it running? I pull mine out of the box once in awhile and get frustrated. I need to really crunch this manual and get it going.

GreshamH
10/20/2006, 11:54 AM
It's not :( I still need to by the wire, wire ducting and some terminal blocks. I was just going to get a bunch of mini termianl blocks that are din rail mountable, but now I'm looking at simply getting a few "euro" style blocks and be done with it. That way I don't have to buy 150 just so I can have 3 colors :)

We need to spend some time together, there's seveal things I need help with (acrylic and electronics). When's a good time for you :D

perpetual98
10/20/2006, 11:59 AM
GreshamH, speck out what you need for terminal blocks and whatnot and PM it to me. I work at an Allen-Bradley distributor and can get you terminal blocks in smaller quantities.

Eric

easttn
10/20/2006, 11:40 PM
Jeeezee I give up.

GreshamH
10/21/2006, 12:45 AM
<a href=showthread.php?s=&postid=8383982#post8383982 target=_blank>Originally posted</a> by easttn
Jeeezee I give up.

Ahhh man, don't give up so easy. I a mear few months away from geting this puppy running now :lol:

Really though. Work has been 110% for 8 months and that push just ended. I have a few months now to get my stuff in order, before I'm off to the trenches (nation wide LFS tour :D) )

GreshamH
10/21/2006, 12:46 AM
<a href=showthread.php?s=&postid=8379685#post8379685 target=_blank>Originally posted</a> by perpetual98
GreshamH, speck out what you need for terminal blocks and whatnot and PM it to me. I work at an Allen-Bradley distributor and can get you terminal blocks in smaller quantities.

Eric

I'll put a list together then, thanks :D

Squiddy
11/02/2006, 06:49 PM
How many terminals do you need? I have a bunch of Phoenix Contact terminal blocks like this:

http://eshop.phoenixcontact.com/phoenix/images/productimages/size1/3006182_01.jpg

I don't know if you have seen this kind before but they come as single blocks that are din mountable. There are 8 blocks in that picture above. I could send you some depending on how many you need.

J.

easttn
11/23/2006, 01:42 AM
No giving up. Just that you need to have this to accept the next projectc.

How's it going my friend.

Happy T-Day.

Chaz

BeanAnimal
11/23/2006, 02:42 AM
Yum Yum... cheap AB parts in small quantities.... I smell a side business for Eric.


Bean

Squiddy
11/23/2006, 11:21 AM
Nooo you can't give up! Look what I'm playing with today:

http://members.shaw.ca/jeremywarren/FTL20.jpg

Couldn't find float switches anywhere so I'm using this... a vibrating level sensor from Endress & Hauser.

I'm using a Modicon Micro PLC that has 24 I/O and 10-12 analog I/O.

http://www.roseburgtractor.com/110cpu612.jpeg

Have built a HMI using Labview but might go to using some kind of SCADA software instead. All good fun!

Just looking for a nice sealed enclosure for the PLC, relays and I/O strips... something that has a window in it. Anyways, will keep you guys updated.

easttn
12/13/2006, 08:46 PM
Bean,
Clear your email.

GreshamH
12/20/2006, 03:44 AM
Ok, a new job description and no graphics/ads to produce, so I have time and resources to resume this project. I need to update the program though, I have two 18" linear actuators to raise my canopy, as well as my lighting rig :) I want to change the height the lights are thru out the day. I also want to ad the Canopy door actuator to the "too hot" alarm (to raise the doors).

Even though I have the tank for this, I'm getting a new one made from a better company. THe owner is giving me a screaming deal. Guess I'll have two 5'x4'x16" eurobraced acrylic tanks :) Maybe one will turn into the new Reef Nutrition test tank at work :)

Squiddy
12/20/2006, 10:52 AM
Good to see someone else back at it! I need to take some pictures of my setup now. Got the ventilation fans installed last night and it's all coming together.

Sparkss
01/26/2007, 09:15 PM
over a month now... any updates ? :)

GreshamH
01/30/2007, 12:57 PM
Glad to see your on my case Tom :lol:

No updates, but I may have one soooooon :D

Sparkss
01/30/2007, 01:25 PM
tick tock Gresh :D

Icefire
02/01/2007, 06:18 AM
Starting mine this week with a GE 90 Micro PLC.
How the Panel communicate with your PLC?

easttn
02/01/2007, 05:28 PM
standard db9 cable. Only need 4 wires though Tx, Rx, Gnd, and power.

Here is the symbol table. (Mods this is not any propritery s/w it's just the I/O assignments). To help others with address assignments for PLCs.

http://img.photobucket.com/albums/v461/easttn/PLCIO.jpg

GreshamH
02/01/2007, 05:28 PM
The touch screen?

easttn
02/01/2007, 05:32 PM
Its an eye test. :D Seriously, if you ned it I'll post as a PDF. Gresh, how are you doing my RC friend.
Chaz

Icefire
02/01/2007, 05:33 PM
Nice.

I have setup a 5$ 0.2*C accuracy probe (lm35 chip) which give 10mV/*C

Problem is my PLC is 0-10V with 10mV accuraccy. Any way to have my probe output multiplied by 10? That would give me 0.1*C resolution on my PLC.

BeanAnimal
02/01/2007, 06:15 PM
You need an instrumentation amp... (OP-AMP) circuit or a purpose built amp. eBay is the place to look for probe amps unless you want to DIY.

Icefire
02/01/2007, 06:42 PM
Yeah that's what I tought, I wanted it dead sample plug in, my probe have 3 wire. +5 - +30V, ground, output.

I'll make an opamp circuit

Icefire
02/01/2007, 08:03 PM
With an LM324 op amp it's worst

BeanAnimal
02/01/2007, 08:19 PM
?

Icefire
02/01/2007, 10:02 PM
With a non-inverting gain of 10, I get 2.546 volts but the PLC's value fluctuate +-0.2V.

Icefire
02/02/2007, 01:06 AM
http://www.allaboutcircuits.com/vol_3/chpt_8/7.html/conversion

I'll try a 4-20ma transmitter. basicly using a 25 ohms resistor to set a 0.1V (10*C) to 0.5V (50*C) converted to 4-20ma.

I can set the range I want with the resistor

easttn
02/02/2007, 08:45 AM
Icefire,

Are you using Thermocouples or RTD, if RTD how many wires?
Nice link thanks.

BeanAnimal
02/02/2007, 11:16 AM
Yeah the op-amp circuit needs to be fairly precisse due to the impedence problems. You can use an LM-324 but the supporting circuitry has to be a bit more complex. Burr-brown makes some very nice instrumentation amps that are much better suited to the application.

There is also a good app-note on the national site regarding PH amp design. I will see if I can dig it up.

GreshamH
02/02/2007, 12:04 PM
<a href=showthread.php?s=&postid=9134852#post9134852 target=_blank>Originally posted</a> by easttn
Its an eye test. :D Seriously, if you ned it I'll post as a PDF. Gresh, how are you doing my RC friend.
Chaz

Couldn't be better. Like you I changed jobs, and we're in similiar fields now. I left my job being Beaver Patrol, to that of Bikini Inspector. Maybe we'll see each other on the job some day :lol:

Serioulsy, I'm OK and still at Reed :D

I need to talk to you about this, I'm ready to get this project finished and move on to another :D

Icefire
02/02/2007, 12:06 PM
Bean I was using LM324.

best49erfan
12/10/2007, 07:03 AM
Gesh,
for your actuators, or the motor driven or pneumatic?