PDA

View Full Version : PLC Programming



Scott Brandstetter
03-16-2017, 10:46 PM
I am looking for advice for how to begin to understand the very basics, I mean very basics, of PLC programming. I don't know where to start and would like some ideas. I travel every week and always have evening time in my hotel so if the start is learning via videos, great, just tell me what course online to take. I see that there are programming kits that are supposedly designed for newbies that include a small PLC, accessories, and videos, maybe thats where I start.

My main reason is curiosity, but, I have real reasons with my paying job to better understand. I design packaging equipment and I normally explain my ideas with drawings and features and let the experts do their thing....welders, electricians, programmers, etc. I have a really simple (in my mind simple) add on I would like to add to a piece of packaging equipment that would require air cylinders, photo eyes, and a vacuum. This idea would add so much functionality to my latest machine and would ultimately add a larger group of clients, that I want to build a prototype. (I know, I could use my old method and explain it, pay money, and have it built, but, I want to create it with my own hands)

If any of this makes sense and you have some guidance for me, I would really appreciate any responses. Thanks in advance.

Todd Willhoit
03-17-2017, 12:04 AM
Does your equipment currently use a PLC? If so, providing the make and model will help Creekers point you in the right direction. That said, there are several programming languages:
http://www.kronotech.com/PLC/Languages.htm

Here is some basic theory and simple programming examples using ladder logic.
http://www.plcs.net/contents.shtml

Rich Engelhardt
03-17-2017, 4:55 AM
Before you get into anything else, you need to know and understand how logic gates function.

Jerry Bruette
03-17-2017, 11:28 AM
Scott,

I don't know how to program a PLC, but I fix machines that are run by PLC's. Some of the programs are so complex even the engineers at work don't like to modify them.

I'll second Todd's question of does the machine currently use a PLC. Even more important, does the PLC have enough room for the inputs and outputs needed to operate the cylinders and to turn the vacuum on and off when needed?

Could you build the mechanical addition to the machine and then turn it over to a programmer to modify the program?

Just curious, how will you generate the vacuum...with a pump or using a vacuum generator that uses compressed air? What type of packaging are you doing, product into cartons, bubble wrap on cards, bags? Not trying to be nosy just being curious.

Michael Weber
03-17-2017, 1:00 PM
Buy something like this https://www.automationdirect.com/adc/Shopping/Catalog/Programmable_Controllers/CLICK_Series_PLCs_(Stackable_Micro_Brick) and play with it. You will need its software, a cable and perhaps documentation but it's all inexpensive. Lots of other choices. Google micro plc.

Malcolm McLeod
03-17-2017, 2:51 PM
I've been working as an Automation Engineer for a couple of System Integrators for longer than I'd like to admit. I've worked on logic controllers ranging from $20 'smart' relays to modular Rockwell ControlLogix PLCs with 10,000+ IO points - where the CPU alone runs $18k. And Visualization from small 2-line displays, to $1MM+ SCADA. Learning was 50% OJT - someone threw me in the room with a problem and said, "More, better, faster, NOW!" The other half of training was split between working with really smart people (40%) and classes hosted by vendors (10%). ...What do you want to know?:cool:...:rolleyes:...;)

Same questions as the other responses - What are you using currently? Do you have access to the software development packages? To laptop to run them on? Communications cables?

Most vendors have good websites that include white papers and very specific programming examples.
Look at www.PLCtalk.net (http://www.PLCtalk.net), www.MrPLC.??? (http://www.MrPLC.???), and a couple of other forums. Like SMC, they can be good resources for answers to very specific questions.
Go to the distributor for the PLCs you use now. They may offer seats in training sessions for the hardware/software you buy as a means to cement their relationship? Often at nominal or zero cost.
Call the vendors Tech Support. This may require a support service agreement be in place, but your company may already have such?

Best suggestions I have for new guys is to KNOW the process they are programming for and to learn to be a pessimist. How will the process break? What will fail? What happens when the operator pushes the wrong button? What happens when 'X' doesn't happen, but you wanted it to? Does the program just sit there? Do you alert the operator, or make him guess? I tell them any idiot can write code to make something work like it is supposed to - when everything is working like it is supposed to. You set yourself apart, when it still works like it's supposed to when something isn't working.

Dick Latshaw
03-17-2017, 9:58 PM
I tell them any idiot can write code to make something work like it is supposed to - when everything is working like it is supposed to. You set yourself apart, when it still works like it's supposed to when something isn't working.

Heh. You just described what differentiates really good software from really bad software, and I've seen a ton of both kinds. And it's been that way since I started programming way back in 1963 on an IBM 1620 (Not that I'm old or anything :D).

Scott Brandstetter
03-17-2017, 11:12 PM
Thanks for the replies everyone. Most of my equipment has a PLC, some more complex than others. I think I want this to be an independent unit because the functionality can be used in a variety of ways in a packaging environment, not located in the same place in each situation.

I've spent a fair amount of time researching PLC's, how they are programmed and how air cylinders work with a PLC, different types of air cylinders, etc. I think I am going to order parts from Automation Direct including a simple Click PLC, power supply, couple different air cylinders (need one with an 8 inch stroke and the other a 1 inch stroke. They offer a free software package to help me with the programming and it seems they have a lot of resources for me to learn from. Doesn't seem like a large investment to possibly learn a new skill. I think the hard part, not necessarily with my project but with PLC programming is the logic gates or symbols and learning what they do, or don't do. Should be fun to learn I think. Oh, and I will be using ladder logic programming. Seems to be the most common.

To get an idea of what I want to do, I will give a very simple explanation. I want to be able to take a piece of "paper" and transfer it from one place to another, and release it. I'm thinking I will use a simple fan to keep the "paper" adhered to a "plate" and one air cylinder to move it 8 inches horizontal and the other to move it 1 inch vertical.

Thanks again for the help. Love the creek.

Todd Willhoit
03-18-2017, 1:12 AM
Sounds like a basic pick-and-place operation. With limited information, I would look at a venturi vacuum system rather than a fan. A fan is probably not the best method to hold something. You want your maintain control of the object.

Regarding having it as separate unit, keep in mind that the code can be a module added to an existing program. If structured properly, the only thing to change would be the I\O assignments. Adding a new rack, CPU, communications, and I\O cards is expensive. Utilizing extra I\O or an extra slot would be more economical and simplify handshaking between machine processes. There are valid reasons that support either scenario.

Malcolm McLeod
03-18-2017, 9:35 AM
Sounds like a basic pick-and-place operation. With limited information, I would look at a venturi vacuum system rather than a fan. A fan is probably not the best method to hold something. You want your maintain control of the object.

Regarding having it as separate unit, keep in mind that the code can be a module added to an existing program. If structured properly, the only thing to change would be the I\O assignments. Adding a new rack, CPU, communications, and I\O cards is expensive. Utilizing extra I\O or an extra slot would be more economical and simplify handshaking between machine processes. There are valid reasons that support either scenario.


^+1 Keep your costs down; use existing CPU, IO, and power supply. A single CPU also makes integration MUCH easier. I assume your new module will need to coordinate actions (integrate) with the rest of the 'machine'; this integration is easier if you don't have to setup communications between 2 different CPUs, which may speak a different native language.

Sounds like you'll have both a compressed air source and a couple of solenoid valves (to control the air to the cylinders), so add another solenoid to control air to a venturi vacuum generator. You get vacuum and control of it with only 2 additional devices.

Also I don't want to discourage you, but I've seen dozens of label applicators and/or literature placement robots in use on packaging lines. There are probably many more I've not seen. ...Perhaps one would adapt to your process and reduce your R&D? You'll have to decide what you're 'selling': a product, a service (enhancing a machine's function), a 'feature', or some combination of all?

Hope this helps.