Go Back   AnandTech Forums > Software > Programming

· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· AMD Video Cards
· Nvidia
· Displays
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Home and Garden
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2015
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions

Thread Tools
Old 01-28-2013, 03:17 PM   #1
Senior Member
Join Date: Apr 2000
Posts: 609
Default PLC punch to the face

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...
Your premier New England surfboard shapers
McDermott Shapes
gregulator is offline   Reply With Quote
Old 01-31-2013, 12:02 AM   #2
Join Date: Mar 2012
Posts: 122

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.
My PCs:
Main/Gaming Rig @ 4.0GHz
Laptop (Celeron B830 @1.8GHz)
frankthetank195 is offline   Reply With Quote
Old 01-31-2013, 07:38 AM   #3
Diamond Member
ControlD's Avatar
Join Date: Apr 2005
Location: Midwest, USA
Posts: 5,033

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 by ControlD; 01-31-2013 at 07:43 AM.
ControlD is offline   Reply With Quote
Old 01-31-2013, 09:35 AM   #4
Senior Member
Join Date: Apr 2000
Posts: 609

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!
Your premier New England surfboard shapers
McDermott Shapes
gregulator is offline   Reply With Quote
Old 01-31-2013, 09:54 AM   #5
Diamond Member
ControlD's Avatar
Join Date: Apr 2005
Location: Midwest, USA
Posts: 5,033

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.
ControlD is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 12:55 AM.

Powered by vBulletin® Version 3.8.8 Alpha 1
Copyright ©2000 - 2016, vBulletin Solutions, Inc.