# Small PLC and control help

1. Aug 25, 2011

### zmxn1029

Hey guys

I have a project that I am about to start working on.

I am going to need a small level PLC to implement the design to control a few very small motors to move conveyers and a few pounds of weight, as well as a few various sensors.

The machine will need to do various things based off certain input commands, but they will all be very similar, such as operating the motors for different amounts of time and changing commands when certain sensors do certain things. Touch screen input would be a plus.

I have absolutely no knowledge of PLCs at all, so I could use some help here.

What kind/brand of equipment should I be looking for? I am very limited with programming, so it needs to be fairly straight forward, and ideally somewhat of a "drag and drop" type of programming similar to Simulunk, as opposed to C.

Any answer, no matter how simple and basic will help me a lot.

Thanks

Last edited: Aug 25, 2011
2. Aug 25, 2011

### dlgoff

I don't know how much you are willing to pay but National Instruments makes http://sine.ni.com/industrial/" [Broken] software.

Last edited by a moderator: May 5, 2017
3. Aug 25, 2011

### mdjensen22

May I inquire as to the reasoning for using PLCs if you are not familiar with them? Customer demand, etc. (just curious)?

You could start at http://www.automationdirect.com/adc/Shopping/Catalog/Programmable_Controllers They have a lot of information and resources available. In addition, they have a lot of technical support and forums dedicated to PLC systems.

I haven't used PLCs in about a decade, so I'm not sure who makes what anymore...
Good luck.

4. Aug 25, 2011

### zmxn1029

Thanks for the responses guys..

As far as money goes, I think the ~$500 or$600 I've been seeing is doable for the PLC.

mdjensen22 -This project is for a capstone design course for my BS. Do you think I'd be getting in over my head to start a PLC project with little to no experience with them? I have about 12 weeks to complete the project at this point. The PLC programming and implementation will be the hardest part. Without divulging too much details, I just need it to control various small motors, stepper motors, maybe some lights, etc.

dlgoff - Can the NI programmable automation controllers be implemented used the standard Labview license one would expect to have through school? I don't have a way to know at the moment exactly what license I have available and what its capabilities are. I have used in before for basic AM/FM modulation type projects, but thats about it.

5. Aug 25, 2011

### mdjensen22

This is achievable in 12 weeks IMO (from ground zero) - You might want to start small and add other components in (sensor controls the lights, then add a simple motor, then add a stepper, etc.). This way you have something tangible to show.

As a student, you may be able to get samples of these parts, so you don't break the bank. A nice letter/e-mail to any of the distributors or manufacturers might go a long way.

6. Aug 25, 2011

### fleem

I've been very pleased with Galil. They can support a wide variety of motor types and sell controllers with lots of general purpose IO as well. Be careful grabbing any old PLC. You'll need one that has tried and true motor control algorithms--unless they're just PM motors with no position sensing and you only need to turn them on and off.

Last edited: Aug 25, 2011
7. Aug 26, 2011

### skeptic2

Do you have any experience with relay logic? Could design a circuit to do what you want to do using real relays? If so, you shouldn't have any problems with PLCs.

8. Aug 27, 2011

### zmxn1029

I have 0 experience with relay logic.

What kind of programming do the various brands of PLCs use? Is it typically a ladder logic style? Real coding such as C? Or an easyier "drag and drop" style like I mentioned earlier such as simulink.

Like I said earlier, I have absolutley no idea what I'm getting into and could use a push in the right direction. Is there any resource/cite out there with a decent amount of easy to read information for beginners getting into this type of thing?

I know this project is going to be pretty basic as far as controls is concerned, but I could use any and all advice.

9. Aug 27, 2011

### skeptic2

My experience with PLCs was in '82 & '83 and I haven't kept up with the advances over the years, so PLCs today may offer a lot more features and functions than I'm familiar with. The most important part is not only knowing what you want your circuit to do but to understand exactly how the circuit needs to work in order to do what you want. The PLCs that I used would light up the current path so it was possible to see the circuit working.

Ladder logic begins with two vertical lines at the left and right sides of the screen with the relay coils attached to the right line. The relay circuit to activate the coil is built up to the left of the coil.

I found that designing and editing relay logic was far easier and faster than writing code to do the same thing. The PLC I worked on interfaced to a microcomputer that handled a few functions the PLC couldn't do. Even though the PLC did perhaps 3/4 of the functions of the system and was about 140 screens long, I spent more than half my time at an installation waiting for the uC programmer to fix bugs in his program. I'm not faulting the programmer, I'm saying that the PLC is much easier to program.

Here is a link to download a PLC simulator. http://www.tri-plc.com/trilogi.htm I have not tried it and have no idea if it is any good. It's something you might try to see how it works.

10. Aug 28, 2011

### yungman

11. Aug 28, 2011

### fleem

In choosing a language, the first question to ask is whether you'd prefer seeing your program as a sequence of instructions executed chronologically, or a set of state machines executed simultaneously (which is what ladder logic is). For me, sequential languages are far easier to learn and to use for many reasons, one of which is that you can see an entire sequence of instructions in one place on the screen. With ladder logic you can't fit nearly as much code on the screen, and even if you could there might be a rung elsewhere in the ladder that intimately affects what you are looking at, because there is no meaning to the order that the rungs appear in the ladder. Also, I don't believe the human brain is designed to communicate instructions as a set of state machines. When I instruct someone to do something of any complexity I tell them the order they must do each step in the order that the steps must be taken. I don't hand them a set of rules to follow where each rule tests for the completion of some other rule and the order I hand them the rules is of no consequence. If I had a teacher that taught that way I'd drop the class pronto! Ladder Logic was designed solely to appeal to electrical engineers who had already been forced to make their designs in the form of state machines constructed of relays. Just because its old technology doesn't mean humans can learn it more easily.

In choosing a controller (assuming it supports the language you like), the first question to ask is do you actually need motor control functionality (PID loops, control of motors acceleration, position, etc.) or are you working simply with on/off motors and a handful of position sensor switches. If the latter, then you probably don't need to spend the extra money on a controller that has full-fledged motor control. The Galil company I mentioned earlier has controllers that are cheap, in spite of the very professional/commercial-looking web site.

12. Aug 28, 2011

### skeptic2

To say that ladder logic is a set of state machines executed simultaneously shows a lack of understanding of ladder logic. If in a "sequential" computer language, a combination of AND and OR statements are used to determine the value of a variable, that statement is executed no more sequentially than is an equivalent statement in ladder logic. The "state" of the coil or the boolean value of the variable in the "sequential" program are no different. The state of the coil can be used just as sequentially as the variable in subsequent statements.

As I mentioned above the values of the coils are used sequentially in ladder logic. Just as with computer programs, the organization and readability of the program is the responsibility of the programmer. Saying that a rung somewhere else in the the ladder may affect what you're looking at is the same as saying that an operation somewhere else in a program may affect the result of a different operation. (duh) Furthermore, with ladder logic you can see the states of the relays and coils as the program is running without having to step through the program line by line in a debugger to observe the values of the variables.

On the contrary it was designed to be maintained by electricians. It's a lot cheaper to send in an electrician to find out why a machine control isn't working than it is to call in the programmers from the supplier only to discover that one of the sensors isn't working.

Of course, if you need a PID controller then a PLC isn't what you want. Even in the application I was involved in, we needed a microcomputer to handle a few functions the PLC couldn't do. Still it was far more time consuming to debug and modify the code for the few functions the microcomputer handled than it was to modify the program of the PLC.

Last edited: Aug 28, 2011
13. Aug 28, 2011

### fleem

@zmxn1029,
In light of the previous post, it might be a good idea to google 'ladder logic' vs. other languages. For example, the wikipedia article on ladder logic states:

"Ladder logic can be thought of as a rule-based language rather than a procedural language. A "rung" in the ladder represents a rule. When implemented with relays and other electromechanical devices, the various rules "execute" simultaneously and immediately."

So each rung is a rule, all rungs (effectively) execute simultaneously using the current state variables, then changes to those variables are available in the next scan (the next iteration of the state machine). (Although later additions to ladder logic provided, by popular demand, some constructs that allow things to be more sequential)

A procedural language (effectively) executes consecutive statements sequentially, where any result of one statement is immediately available to the next statement. Then of course there are also flow control statements that can be used to specify where the 'next statement' should be, like a jump or function call.

Last edited: Aug 28, 2011
14. Aug 28, 2011

### skeptic2

And the sentence immediately following your quotes says, "When implemented in a programmable logic controller, the rules are typically executed sequentially by software, in a continuous loop (scan)." While I can agree that a rung can be considered a rule, I always considered it more of an IF statement composed of various AND and OR clauses. Just as that rung of ladder logic is considered to be executed simultaneously, an IF statement with its ANDs and ORs that constitute equivalent logic can also be considered to execute simultaneously. In neither case are the sequential statements (rungs) considered to execute simultaneously.

This was not true with the PLC I programmed (30 years ago) and doesn't seem to be supported by the sentence in Wikipedia you chose not to include in your quote. With the PLC I programmed, once a coil was activated or deactivated, that state was available on the very next rung.

15. Aug 28, 2011

### fleem

@skeptic2,
I see what you mean now. This differs from my (also ancient) experience.

Perhaps its been implemented both ways by different companies. My experience was definitely with the simultaneous execution, also a long time ago. It might be because the company developed PLCs and I worked beside the developers. Maybe I worked with some internal form of the language. I interpreted the wikipedia article like this:

If you interpret the second sentence your way, I thought it seemed to contradict the first sentence. I presumed that the author of that second sentence was trying to point out that the LL interpreter typically is not a massively parallel computer (for economy's sake) and so it simulates simultaneous execution of rungs by executing them sequentially internally by buffering the output of each rung so that any changed variables are not available to other rungs until the next scan. The author might also have meant that the scans were executed sequentially--its hard to tell. As the first sentence says (and as I said), the language I used had the rungs effectively executed simultaneously. Also, the outputs of a PLC running ladder logic are updated only after the scan is complete, further mimicking simultaneous execution. I also had a language construct that let the output of one row be the input of the next, but that was only to save screen space.

Last edited: Aug 28, 2011
16. Aug 28, 2011

### skeptic2

This is likely true.

17. Aug 29, 2011

### mdjensen22

Since this is supposed to be your 'capstone' project, may I inquire as to what you want to achieve from this project?

Since you are not familiar with PLCs, are you using this as an avenue to learn something new, or do you have other motives such as avoiding something you don't like (coding)?

What do you hope to do after school or after this class?
Will using the PLC approach over other alternative better serve your end goals?

I think answering these questions will help guide you on your way.

18. Aug 31, 2011

### zmxn1029

The main idea behind this project is mixing various liquids stored in containers on a rotating carousel into another (small container). A stepper motor will be used to rotate the carousel (weighing roughly 8 pounds, maybe 10), and small actuated valves to release liquid from the containers, gravity fed.

The control system will require input at the start prompting the user as to what liquid to dispense. For example, dispense from container 'A' and 'D'. The carousel will need to move to liquid 'A', dispense, move (possibly in backwards rotation) to liquid 'D', dispense, and return to a home/default position.

There will be a couple sensors needed to input to the PLC, where the machine wont operate or carry out any command if a certain criteria isnt met, for example I dont have a container in place for the machine to dispense into, it wont cause a spill.

For a stepper motor capable of moving weight of several pounds, is a controller necessary, or can the PLC output do that?

What kind of small motors/valves/actuators would one suggest that can be simply plugged into the output of a PLC for simple on/off operation?

http://www.omega.com/ppt/pptsc.asp?ref=EZSerTextPLC&ttID=EZSerTextPLC&Nav=

What about the PLC shown in the link here? I dont know what to look for. I feel like a woman reading engine specs.

Ladder logic or another form of simple 'programming' is a must, I am not capable of C or anything similar, nor do I want to be.

Any and all input is appreciated,

19. Aug 31, 2011

### dlgoff

Without knowing how many inputs and types, I'm probably guessing here. But it sounds like you need something fairly simple to program and isn't overkill, which I think your linked Omega Integrated PLC is. Instead take a look at the Omega http://www.omega.com/ppt/pptsc.asp?ref=OCSXL_Series" [Broken]; which is still is an overkill probably, but may be useful for your "user input" as well your "programming input".

The fun begins by learning how it operates. It's documentation will explain how to use and program it.

Last edited by a moderator: May 5, 2017
20. Sep 19, 2011

### zmxn1029

Bringing this back up to the top guys...

We have decided we will probably be going with an AB Pico controller. Does anyone have any experience with these? They seem to fit the description pretty well of what we are trying to do. Soft ware is free, operates on basic ladder logic, etc.

Now I have a couple other questions.

What sort of actuated flow valves are there available that can be directly connected to the controller output? I need something normally closed, and the Pico will open it for a few seconds at a time. Im having a hard time finding anything that I'm looking for, but I may not be searching in the right places.

Aditionally, I'd like the PLC to dispense from different containers/valves based off an input. I'll need about 10 choices, so something like a pot switch that could create a voltage such as 1V, 2V, etc, up to 10V into an input on the PLC, and based off this value the PLC will dispense accordingly. Any suggestions?

Thanks again for the replies

21. Sep 19, 2011

### skeptic2

It would be best to contact Allen Bradley and ask them what they have. If they don't have any normally closed I/O modules then you might have to invert your logic.