# Plc help



## acro (May 3, 2011)

So, I am working on improving my PLC knowledge at my new employer.
We have well over 25 Siemens brains, Each with at least one HMI and all interconnected via ethernet.
Most are Simatic 545 with many different combinations of I/O cards
Each PC in the plant has the ability to monitor and whole process, ack alarms and change variables and parameters.
So it is quite the installation, and I my previous experience has been limited to stand alone Micrologix PLC's many years ago.

I am trying to take small portions of the source codes to get a handle on the basics of the programming structure.

For example this is just a portion of the code that controls one of the Wheelbrators...

*** WHEELBRATOR DISCHARGE CONVEYOR ***

Y 149 RELAY DISCHARGE BELT FWD
Y 150 RELAY DISCHARGE BELT REV

1407 STR NOT Y 150 DISCHARGE CONV REV
1408 STR NOT Y 150 DISCHARGE CONV REV
1409 TMR 115 DELAY AFTER RUNNING IN REVERSE
1410 P=4
1411 OUT C 511

1412 STR X 7 PB START DISCHARGE CONV FWD
1413 OR Y 149 HOLDING CONTACT
1414 AND X 2 EMERG STOP
1415 AND X 9 PB NC STOP DISCHARGE BELT
1416 AND NOT C 297 (1) EMERGENCY STOP
1417 AND NOT C 298 (2) INCLINE CONVEYOR NOT RUNNING
1418 AND NOT C 321 (25) I-SW SAYS DISCHARGE BELT NOT RUNNING
1419 AND C 511
1420 OUT Y 149 DISCHARGE CONV FWD

1421 STR NOT Y 149 DISCHARGE CONV FWD
1422 STR NOT Y 149 DISCHARGE CONV FWD
1423 TMR 116 DELAY AFTER RUNNING FORWARD
1424 P=4
1425 OUT C 511

1426 STR X 8 PB STAART DISCHARGE CONV REV
1427 OR Y 150 HOLDING CONTACT
1428 AND X 9 PB NC STOP DISCHARGE CONV
1429 AND NOT C 297 (1) EMERGENCY STOP
1430 AND NOT C 321 (25) I-SW SAYS DISCHARGE BELT NOT RUNNING
1431 AND C 511a
1432 OUT Y 150 DISCHARGE CONV REV


I do have some support locally, but sometimes I retain it better if I put the effort into my own research.

So, What lanquage is that code written in, and are there any good training facilities?

In the example above, there are 4 groups of code, do each of those have a name? "Block" perhaps?

What does STR stand for?

The C 511 output seems to be a dumping location that is used throughtout all of the programs here.
Is that line just required to complete the systax of the commands? But, it is referenced in two of the other blocks, so, what is it?

In the 1st block, is there a reason the Y 150 output is checked twice?
What is the P=4?

Correct me if I am worng, In the 2nd block. It checks for the FW PB or holding contacts, and then checks the
condition of the EStop and Stop PB. Then it checks to see if the other two conveyors are running, then it will
enable the FWD output.
What is the reason for the AND NOT C 297 ESTOP?


Thanks


----------



## ponyboy (Nov 18, 2012)

There's a user here by the name of NC PLC. He's your guy, pretty much invented the plc


Sent from my iPad using Tapatalk


----------



## NC Plc (Mar 24, 2014)

Aha. I get it man I'm basically a total nerd and I have a very annoying, obsessive love of electrical work and PLC programming. I don't mind the insults, they just make me smile and keep me motivated enough to get my masters after my BS and my license. Who knows, maybe you will have the pleasure of working for someone like me one day. =p

As for the actual thread, I have no idea man. I was able to pull this PDF that I believe you will find very useful:

https://cache.industry.siemens.com/dl/files/825/17514825/att_86329/v1/505-8204-2.pdf

I don't have the time to read through the manual but I am interested in what you posted. I'll be lurking the thread to see what I can learn from it, I've not dealt with those PLCs yet. ^-^


----------



## acro (May 3, 2011)

Thanks for the pdf.

That code had been "compiled" thus the sequential line numbers.

FYI



















Many of these controlled by the various PLC's









Just a couple of these older ones, on the list to replace when we upgrade the machine.


----------



## NC Plc (Mar 24, 2014)

Man seeing those pictures makes me want to jump in there and start playing around and tracing wires to see whats what.

Since you have PCs monitoring everything I assume they do not have any PACs in operation?

I have never seen compiled PLC code before. Honestly, I never considered that RLL is high level and that PLCs compile our programs to execute them. Are you only able to see the compiled code? There should be a way to see the RLL programs (assuming that is even what they are programmed with). I saw some RLL stuff in the manual so I assumed these boys were programmed in RLL.


----------



## dawgs (Dec 1, 2007)

Time to start updating.


----------



## acro (May 3, 2011)

Correct, no PAC's that I am aware of.

There is some ladder logic, but that seems to be limited to my boss's PC. All the source code is on the network, and what i have been exposed to to this point. But frankly, there is so much logic and data collecting going on, I can't see how it could all be done with ladder logic.

For example, one of the brains controls a station where molten metal is placed into a cup. In this cup made of refractory sand, is some sort of two wire sensor and some other material in it.








http://bremencastings.com/quality-control

This cooling curve data is graphed on a windows PC, along with certain alloy concentrations. Somehow controlled by the PLC.


----------



## acro (May 3, 2011)

dawgs said:


> Time to start updating.



They have 3 plants absolutely full of these linage machines. As long as they are readilly available on ebay and other sources, what is the advantage?


Profibuss communicates with the Rexroth drives, RS 232 to the HMI's and ethernet/fiber for the network.


----------



## NC Plc (Mar 24, 2014)

Is that sensor in contact with the molten metal or is it measuring the temperature of the cup? I'm guessing it's a sample of sorts to gauge... maybe how correct the metal alloy currently being melted/mixed/smelted/whatever is? Does the PLC measuring that analogue input stop the process if the cooling curve is not within the acceptable boundaries for whatever alloy is in the cup?


----------



## acro (May 3, 2011)

Well, the sensor is completely submerged in the molten iron. There is some sort of material in the cups that can fall out, and that will cause the test to fail. At the end of the test, the refractory cup crumbles into just plain sand.

The test gives a graphical cooling curve, and the percentages of carbon, silicon and strontium in the metal. Again - only two conductors in the sample cup.

PLC gives a fault if certain tests are not performed at certain intervals. Same basic test, but the sample is drawn at different points in the process. PLC says which sample to get and when.


----------



## acro (May 3, 2011)

Very much like these. You can see the extra material in the bottom of the cup. The sensor is in that small glass tube inside the cup.

The molten metal(2,500 deg F or so) is poured into these.










In other parts of the process, the operator must peridically test the temperature of the iron being poured. This is controlled and displayed by other brains and also compared to a data table based on the desired alloy being poured. Various alloy's have differing target temperatures. This is conveyed to the operator by LED displays. Part numbers are entered on other interconnected HMI's.


----------



## NC Plc (Mar 24, 2014)

That's pretty nifty. Does your employer have dedicated in-house plc guys or do you guys outsource it when and if there is a catastrophic failure of some sort?

Have you seen any of the PID loops? It sounds like your place of employment might have hundreds of them.


----------



## acro (May 3, 2011)

Well, the driving force behind the PLC proliferation is the 72 year old owner. Believe it or not, he does most off the code and screen design for all of the plants. He is based at plant in another city and can see any plant from his office or home. I will be meeting with him weekly. This week, he was checking my knowledge of grounded leg delta systems like what is used at out plant. So our discussions this week where limited to various 480v distribution topics and also the induction furnace we have.

Beyond that, my boss is the local PLC guy and quite smart himself, and I was hired to grow into his backup.


----------



## NC Plc (Mar 24, 2014)

If you think I'm asking you a lot of questions imagine how my boss feels when I am basically playing 20 questions with him 3-5 hours a day. :whistling2:

Anyway, back to the compiled language in your OP. How did you pull it? Is that how it comes out when you plug your programming device (I assume a laptop) into the PLC? When you upload a program and watch it while it is running, do you see RLL or that compiled code?


----------



## acro (May 3, 2011)

NC Plc said:


> If you think I'm asking you a lot of questions imagine how my boss feels when I am basically playing 20 questions with him 3-5 hours a day. :whistling2:


I am sort of the same way, but I am also 1st learning all of the processes and machinery in the plant before I tackle the PLC portion. I also want to do my own homework so I can ask intelligent questions.


Regarding the data - there are ???.src files on the network drives. These are used somehow to load into the PLC's. But, they are live copies.

No laptops - remember the ethernet. I have not yet been part of a program change and upload.

We do use some laptops for configuring and monitoring some ADAM modules, but even those are mostly tied directly into the network infrastructure.


----------



## NC Plc (Mar 24, 2014)

I have no idea what .src files are, none of the directsoft 5 programs I've toyed around with have them.

I have pretty limited experience with ethernet when it comes to PLCs. The only connection I use to my DL06 is a direct cable (looks like a usb to serial, I would have to double check to make sure). They have the capability I've just never attempted to connect my second DL06 to my first one. Honestly I have no idea if the second one is any good, I need to get around to making sure it's operational eventually.

The network stuff will be over my head for a while. Though, he said they will finally pay for me to have some automation direct classes, so that is exciting. I think they are going to invest in a trainer that has a PID loop simulator as well since I don't have a PID simulator right now. Though I looked around and found a good cheap one for only 60-70.

I'm sure this is a stupid question, but is ADAM universal or is it only for siemens?


----------



## acro (May 3, 2011)

Upon further reflection, it may be likely that an actual PC handles part of the sampling I described, but that is getting us away from my initial questions.

ADAM is universal, and a good cheap way to get serial inputs into the system - verses a dedicated Siemens serial card.


----------



## acro (May 3, 2011)

This week we discussed the PLC systems, so many of my basic questions where answered today. But I have much more to learn.

Due to the complexity of the complete installation, 95% of the code is written in the language I provided the example from. Ladder logic is mostly limited to some slight live changes done to the system, but these live copies are always compared to the programming code before large changes are made.

The system instruction set is based on the TI 505 that Siemens took over from Texas Instruments, but all the hardware is either Siemens or CTI(Control Technology Inc)

The STR command starts every "rung", and the code structure is such that columns 6-17 are the actual instruction, if the very 1st column is a number. 1st 5 columns are numbers for reference only. The "compiler" will correct the line numbers later - after any changes have been made. If the 1st character is not a number, the line is treated as a comment. Any characters after 17 are also treated as comments.


----------



## acro (May 3, 2011)

dawgs said:


> Time to start updating.


In addition to the 2nd hand market, CTI fully supports the 505 platform, and continues to develop it.

http://www.controltechnology.com/Home


So, "upgrading" is not really required in our case.


----------



## Jhellwig (Jun 18, 2014)

acro said:


> They have 3 plants absolutely full of these linage machines. As long as they are readilly available on ebay and other sources, what is the advantage?
> 
> 
> Profibuss communicates with the Rexroth drives, RS 232 to the HMI's and ethernet/fiber for the network.


The Ti 505 platform is obsolete to seimens(it all used to be texas instrument stuff till siemens bought them out). There is a company that still supports it called CTI. You can get brand new processors and cards from them. However it is a nightmare to work with. CTI even makes 505 card adapters for the even older 500 ti series.

I used to work at a plant that was full of the 500 series and 505 series ti plcs. We had to take a stack of cards when one went bad in hopes of getting a good one. They "updated" it to new CTI processors and a profibus network controling all the remote 500 and 505 racks. That was a nightmare. They lost a ton of diagnostics and introduced a ton of troubles. If a rack faulted it would actualy fault out cards on a different rack making you chase your tail till you found it. They did have a program that showed it all as ladder logic though. Much of it was just there as a i/o passthrough for the provox dcs which was then upgraded to deltaV. Was to many systems to keep straight. We had provox dcs, deltaV dcs, controllogix, modicon and ti systems all talking to eachother. I had to troubleshoot it all from a poorly managed database and little to no access to the programs.


----------



## acro (May 3, 2011)

Sounds similar, but it is the environment I have to learn to support.

Why limited access to the programs?


----------



## Jhellwig (Jun 18, 2014)

It was just the way it was. I worked for a subcontractor and the company we were working at had their own automation people. They considered everything proprietary even down to the programing. The bad thing was that I knew nothing about the systems they had till I started working there but got a better understanding of it than their own automation guys. I would have to argue with them to get them to fix what needed fixed and they would always say it was a wiring problem.

One thing good I can say about CTI is you can at leaset get new cards and components to keep the old 505 systems going. Your company needs to look at updating though as is has been discontinued by the original manufacture and is only a matter of time before parts becone nla. Where I used to work didn't update until the system manufactures completly stopped supporting the legacy equipment before they decided to pick a new system to convert to. That was a massive expensive mess.


----------

