Contact and Coil | Nearly In Control



The TwinCAT 3 Review

Edit: Note that I have posted an updated TwinCAT 3 Review in 2014.

So back in 2010 I wrote about my first impression of TwinCAT 2 and later that same year I wondered if automation programmers would accept TwinCAT 3. I was lucky enough to be involved in the TwinCAT 3 beta, and now that the 32-bit version of TwinCAT 3 is available for general release we’ve deployed 2 production systems based on TwinCAT 3, and will likely deploy more in the future. What follows are my impressions of the current state of TwinCAT 3 based on our experiences with those 2 systems.

I think the best way I can describe TwinCAT 3 to the non-initiated is by comparing it with Allen-Bradley’s ControlLogix platform with their RSLogix 5000 programming environment. I say that because I’m familiar with that platform, and so are most of my North American readers (I assume). It speaks well of Allen-Bradley that they are the de-facto default control system platform around here.

We often fall back on car analogies, and I don’t want to break with tradition. If ControlLogix is the Ford Taurus of control systems (common, reliable, with lots of performance for most tasks, lots of room, and fairly maintenance free) then TwinCAT 3 is something like the Rally Fighter. That is, it’s road legal, fairly rare, requires lots of TLC and understanding and may not be as reliable, but will take you places you’ll never get to go in a Ford Taurus.

When it comes to speed, TwinCAT 3 with Beckhoff’s EtherCAT I/O is a beast. I can’t stress this enough. We’re running both production systems of TwinCAT 3 with both a 0.5 millisecond logic scan time and a 0.5 millisecond I/O bus scan time and we’re only using about 10% to 15% of the available horsepower of each system. You can see and react to things in the TwinCAT 3 system that you’ll just miss in a ControlLogix processor. For instance in one case we’re driving an output off of an absolute encoder and the repeatability of turning on that output is much better than anything we’ve seen with any other controller.

Furthermore, data accessibility is light years beyond any traditional PLC. In one test I moved a 400 kB block of data from the real-time (ladder logic program) to a .NET program running under windows on the same PC and all I can say is that it’s nearly instantaneous. That’s an advantage of having the HMI and real-time executing on the same physical hardware.

That’s not even getting into the new C++ integration (which I haven’t used).

Any TwinCAT 3 vs. ControlLogix system comparison will also certainly favor the Beckhoff solution when it comes to price. At least I can’t seen any case yet where that’s not true by a significant margin. I can’t say exact prices, obviously, but I’m confident that’s generally a true statement.

Does that mean I think the competition is a hands-down blow-out in favor of TwinCAT 3? No. In fact if you’re considering trying TwinCAT 3 I can’t even go so far as to give you my blessing right now. It has problems.

TwinCAT 3 crashes with a blue screen. Regularly. There, I said it. That’s the dirty secret. Everyone’s fears about PC-based control on the factory floor were around stability and in our experience TwinCAT 3 isn’t stable yet. This is odd to me because we have another system with TwinCAT 2 and it’s solid as a rock. Unfortunately our TwinCAT 3 system crashes with a blue screen regularly, and the crash report always shows that it’s some kind of memory violation in their Tc*.sys files, which are the system files responsible for running their real-time system under ring 0 of the OS (as far as I understand). I’ve never even seen blue screens with Windows 7 until trying out TwinCAT 3. There are actually two different times that it crashes: (1) randomly, and (2) when I try to do an online change.

Beckhoff’s response was that we were running it on 3rd party hardware. They loaned us a Beckhoff industrial PC to try. We tried it for a week and we didn’t see any random crashes, but it still crashed the real-time when I tried to do an online change, and it also crashed the IDE almost every time I recompiled the program. In fact that’s the reason we had to stop the test with Beckhoff’s hardware after only one week. I needed to compile a change and couldn’t get it to compile. It did work on our 3rd party PC (an HP desktop PC).

Now, I don’t think these are insurmountable problems. Beckhoff is still coming out with new versions on a regular basis. Their new support for 64-bit windows operating systems is on the horizon. TwinCAT 2 seems stable and I’m sure TwinCAT 3 will get there eventually. However, for the moment, if you’re considering the plunge, I suggest waiting about a year before bothering to check it out. If you just need the speed, consider TwinCAT 2, as even though it doesn’t take advantage of multiple cores it will likely do what you need and is a much more mature product at this point.

· ·


  • Krzysztof Michalski · February 17, 2013 at 5:06 pm

    It looks very promising, but it will take some time for me to see it in production system. Here it’s not uncommon to encounter Siemens S5 PLCs, and noone likes changes. I’m lucky bacause I work with GuardLogix, but convincing somebody to replace our old S7 with AB is impossible. If it works – don’t touch it – they say.

    Anyway, I’m really impressed with speed of TwinCAT3 – 1ms scan time for entire production system? Wow. Scott, can you estimate what speed you would achieve with ControlLogix on these particular systems? How much faster is TwinCat compared to AB?

    I see one downside of TwinCAT – reliability. Even if it wouldn’t crash, I think that PC’s are less reliable than ‘normal’ PLCs. But I might be wrong – I haven’t (yet) seen PC reliable enough to use it as PLC.

    Thank you for great article.

  • Author comment by Scott Whitlock · February 28, 2013 at 2:39 pm

    @Krzysztof Michalski – as a general rule of thumb, I figure you can get scan times *at least* 10 times faster with TwinCAT than you can with a ControlLogix. Your mileage may vary, of course.

    We have a couple Beckhoff industrial PCs around, the kind that mount in the panel. I’ve had no problems in term of reliability. Maybe a network port died on one, but the nice thing was I just stuck a USB-to-Ethernet converter into one of the USB ports, loaded the driver and I was back in business. With a PLC solution you have to use proprietary hardware.

    For other systems with non-industrial PCs, we just make sure to have backup hardware around, and nothing is specific to that hardware. Those systems can tolerate a few hours of downtime though. No matter what, you need to have a backup on the shelf.

  • Yegor · April 4, 2013 at 10:03 am

    It seems based on CoDeSys 3, only built into Visual Studio instead of a standalone IDE. That’s interesting because TwinCAT 2.x is essentially a rebranded CoDeSys 2.x. Anyway, you might want to try CoDeSys as it may have a different runtime.

  • Author comment by Scott Whitlock · April 6, 2013 at 5:03 pm

    @Yegor – TwinCAT certainly has some kind of CoDeSys base. You can see that by the files in the TwinCAT install directory. However, I believe it’s only using the programming structure of CoDeSys, not the runtime. Security researchers recently found some major security problems with CoDeSys runtimes, but their proof of concept code didn’t work on my test system of TwinCAT 3, and when I inquired to my local Beckhoff representative, he said that TwinCAT didn’t use the CoDeSys runtime, so that all seems to add up.

  • Paul · November 17, 2014 at 3:30 pm

    Interesting review, and one of the few reviews easily accessible currently that is not from Beckhoff, or a parrot of Beckhoff’s own promotional material. Would you care to update your review now that TwinCAT 3 has had some time to mature? That would be very helpful to us, and others I’m sure.

  • Author comment by Scott Whitlock · November 26, 2014 at 10:25 pm

    @Paul – ok, I revisited my thoughts on TwinCAT 3. Thanks for the prompting!

Leave a Reply



Theme Design by