PLC punch to the face

gregulator

Senior member
Apr 23, 2000
631
4
81
I am working on an industrial control application, and originally we were going to just use a microcontroller (a 16-bit PIC) but the more we think about it, the more we think a PLC might be the answer. The task is simple: an encoder will likely tick in the 50-100us range, and we need to turn a digital output on every 10ms of ticks or so. We may need a few other operations to happen in parallel, but nothing too complex. Certainly not taxing a PIC by any means.

However, it is an industrial environment and needs to run 24/7/365 for a few years in a somewhat harsh environment, and I know PLCs are qualified for such demanding tasks. This is my first time looking at them, and I want to cry... ladder logic hurts my coding soul. I am looking at the "scan rate" and they seem to execute loops in the ms range, and I am not sure that this will be fast enough. I normally code PICs to be all interrupt driven, and I am not sure I will have enough control/speed over the interrupts on the PLC. Does anyone have experience with them? Are my speed requirements too much for a PLC? Also, I cannot believe you have to pay for the RSLogix software package to program these things...
 
Mar 6, 2012
122
0
0
I don't personally code with PLCs, but I work with the guy who does. I've seen the beasts PLCs run around my workplace, and it's really impressive. One being shipped this week runs lots of I think 10 servos, 5 pressure sensors, grippers, feeders, clamps, etc. All this off of one PLC, so I know they have the power. A separate safety PLC handles all of the safety features of the machine.
 

ControlD

Diamond Member
Apr 25, 2005
5,440
44
91
I program PLCs (and any other controls related equipment) for a living and I can't think of any model off the top of my head that will fit your needs, and certainly the Allen Bradley PLC you are looking at isn't going to fit the bill.

You will be limited to the scan time of the PLC regardless of how fast you can read the inputs from the encoder, and like you said most PLCs have scan times in the ms range. Typically the PLC reads the inputs at the beginning of the scan and writes the outputs at the end of the scan. This will be much longer than the speed you require. I know the newer high end Bosch-Rexroth controllers has scan down in the ns range with a small program, but cost-wise I think this would be prohibitive. You are also going to be limited by whatever the particular controller's I/O bus scans at. For high performance motion control a servo system is generally used which doesn't have these problems but I don't think that fits your needs either.

I think you would be better off using something other than a PLC and placing it in a IP65/IP67 rated enclosure and calling it a day. There could I suppose be specialty PLC controllers out there designed for high speed I/O applications I just haven't seen them.

Just FYI, most modern PLCs don't need to be programmed in ladder logic if you don't prefer that style of programming. I'm not sure about Allen Bradley and RSLogix because AB is way too expensive for their own good but other powerful PLC systems such as Siemens and any of the CodeSys based systems (Bosch-Rexroth, Beckhoff, etc.) have at least three different programming languages to choose from.
 
Last edited:

gregulator

Senior member
Apr 23, 2000
631
4
81
Dave, thanks for your input! I will look into some of those other PLCs. But yes, we may in fact just roll our own and throw it in a IP rated box. I still want to buy one to have in house to mess with, looks like a MircoLogix 1000 works with the free version of RSLogix, any other suggestions for models that work with a free coding environment?

It looks like there are "high speed" inputs that may be able to handle the encoder speed, but I am not sure how the reaction time works in response to this. Can you put it into counter and throw an interrupt and cause another IO to turn on? Or do I still have to wait for the full scan time to complete?

Thanks again!
 

ControlD

Diamond Member
Apr 25, 2005
5,440
44
91
Any of the CodeSys based PLCs (most of the European manufacturers with the exception of Siemens) have free programming tools available for them. If you Google CodeSys you will get to their site and be able to register and download the programming software if you want to see how it compares to a more ladder oriented programming style such as RSLogix. If the free version of RSL is good enough for you however you might be better served going that route because you will find many more users of that platform in the USA.

As far as I know you are still going to be constrained by the scan time when it comes to writing the output table from the PLC to your actual physical outputs. I might be wrong on this however. I know with Siemens (and most likely AB) you can do a quick read of particular inputs directly rather than waiting for the input table to be refreshed. It might be possible on some controllers to write individual outputs in the same manner. I can foresee some issues going this route due not having you inputs and outputs synchronized but you might ask your local supplier what is possible with the controller you are interested in.