General Category > Oddball

Programmable Logic Controller

(1/2) > >>

A friend of mine asked for some help in using a PLC to control a machine he has designed and built.  The machine operates in a short cycle (10 secs or so) involving a foot switch, two air operated rams, and a proximity switch.

Using a Click PLC from Automation Direct, I needed to learn "ladder programming", which is totally different from the procedural programming I did for decades.  Luckily there are excellent training videos online.

Looking to try out V1 of the program early next week.

During the last 20 years I've built some relatively simple machines using PLC's ,often controlling air rams and drill spindles for our industrial requirements.  I mainly used Siemens logo controllers and software. They are cheap to buy and easy to programme, with good simulation from the software.   I've also replaced the odd PLC on complex CNC machines as original replacements were not available. That process I didn't enjoy so much but got the machines working eventually. Have fun!

Hugh Currin:
I did a little PLC programming in the lab some time ago. Must have been 10-15 years. The PLCs were from Automation Direct but I don't see that model on their web site anymore. I had trouble getting my head around ladder logic.

I think if I needed one again I'd try to use an Arduino. They use a version of the C language which I find easier than ladder logic. Might be a little more trouble adding I/O, like relays, but quite doable. It looks like the Click PLC has add on modules that would be easy integrate. Also a true PLC may be more robust than an Arduino.

Depending on the situation an Arduino might be a valid substitute, next time. Sounds like you're pretty far into the development now though. Keep us updated.


For me, the first important idea to understand is that the ladder logic uses 0/1 on off bits to represent input switches, outputs, timer expirations, etc., as well as local states.

The second idea to grasp is that any output controlling bits become active only at the end of each scan by the PLC's CPU.  So the order these outputs are turned on within a scan don't matter as long as the logic is correct.

For the machine I'm working on, I identified that there are 5 consecutive states the machine can be in, and I defined 5 bits for these states.  With proper programming only one of these bits will be set at any one time.  The state transitions are caused by a foot switch, a proximity switch, and 3 different timers.  One cycle of 5 states should take 10 seconds.

I have done programming in PLC and smart relays. With the amount of states you listed a smart relay would be the way to go. They have eight inputs and four outputs and expandable. For a little over a hundred dollars. I program them with function blocks.

Regards Don


[0] Message Index

[#] Next page

Go to full version