Just found out about Beckhoffs TwinCAT3

theColonel26

Lifetime Supporting Member
Join Date
Feb 2014
Location
West Michigan
Posts
784
So I am a .net/C# Developer by desire and PLC Programmer by necessity. So I just found Beckhoff TwinCAT which seems to allow you to write traditional Ladder Logic and augment and enhance it with C++ or a .net Language.

So what kind of price do the corresponding PLCs go for?

Do they have anything PLC CPUs/Embedded PCs in the $300-$500 range? That is that also allows IO expansion modules.
 
The price for just the hardware (no licenses) starts at around 200€ (their just released CX7000), going all the way to several thousand € for their 32-core machines. Say for their midperformance CPUs (like the CX5140), it starts somewhere at around 1000€, all depending on the configuration. In software terms, what you pay for is then the runtime license. The higher the performance of the CPU, the higher is the license cost for the runtime and additional libraries. But to answer your question, yes, they have embedded PLCs in the 300-500USD range, but then you are on their lower end of performance (which is still not bad I would say, depending of course on your application requirements). Because they are PC-based controllers, you get very high performance even with the lower spec based ones.

For that price-range I would suggest you to start to look at their newer lines of PLCs:
CX7000:
https://www.beckhoff.com/english.asp?highlights/cx7000/default.htm?id=973374299344013

CX8100:
https://www.beckhoff.com/english.asp?highlights/cx8100/default.htm?id=97337477619629

Not sure the CX9020 would fit that bill:
https://www.beckhoff.com/english.asp?embedded_pc/embedded_pc_series_cx9020.htm?id=97337455631

I've personally recently bought the CX8190 to play around with, and it's quite a nice little PLC. Another good thing with the lower performance CPUs (from the price perspective) is that the licenses cost less than the more powerful siblings.

With the lower performance CPUs you normally don't get a full-blown Windows (like Win7 or Win10), but rather a slimmed-down Windows (like Windows CE). In the CX7000 line it's not even Windows but something Beckhoff calls TwinCAT-OS (which I've yet not figured out exactly what it is... RT-patched Linux derivate?).

However, if you just want to try it out, you don't have to spend a single cent as the runtime is free for seven days, and once the time has elapsed, you can renew it for another seven days like this for infinity. The development environment is also completely free.
 
Thanks for the info guys.


So I would assume they don't provide a free library to access their hardware. So if you wanted to write your own .net software from scratch you are forced to buy a runtime to use the hardware, correct?
 
So I would assume they don't provide a free library to access their hardware. So if you wanted to write your own .net software from scratch you are forced to buy a runtime to use the hardware, correct?
If your goal is to control Beckhoff IO through .NET, then you do not need TwinCAT. The purpose of TwinCAT is for things such as easier IO control, real-time tasks (timing predictable), and online monitoring while the applications is running. In .NET you will not be able to monitor your variables as the application is running and your scan time will be unpredictable. If the garbage collector decides its time, then your scan will most likely slow down for that period.


If you don't care about what TwinCAT offers, then you can use just an IO slave. The ethernet devices are controlled by ADS/AMS which is an open protocol with several open source implementations including one from Beckhoff. You could also use a BK8100 with a simpler protocol over RS232. I have an open source protocol for it on SourceForge.


Another option is TX1100 TwinCAT IO. I have never used it, but from what I understand it gives you a System Manager style linking of your custom software to Beckhoff IO.

On another note... I checked the pricing for the CX8190 which runs about $600 with a TwinCAT 3 license. When the CX7000 comes available, its target price is in the $300 range.
 
C++

If you want to integrate C++ to your ladder logic you couldn't use the cheapest EPC. Because this feature is supported in EPCs with performance class 30 or above. So, the cheapest EPC with this feature is CX9020.
By the way, you can test your code on your PC without any license.
 
If your goal is to control Beckhoff IO through .NET, then you do not need TwinCAT. The purpose of TwinCAT is for things such as easier IO control, real-time tasks (timing predictable), and online monitoring while the applications are running. In .NET you will not be able to monitor your variables as the application is running and your scan time will be unpredictable. If the garbage collector decides its time, then your scan will most likely slow down for that period.


Why couldn't you monitor variables while the app is running? if it is running in Mono you can.



On a more general .net note, yes this would be the case, if you write object-oriented code, but can't you write a memory unsafe main thread, run it through the mono AOT compiler and run it on a Linux distribution with an RT Kernal patch. Then you would have real-time C# code, And you could interface it with managed asynchronous code in other threads, to handle more complex operations.


If you want to integrate C++ to your ladder logic you couldn't use the cheapest EPC. Because this feature is supported in EPCs with performance class 30 or above. So, the cheapest EPC with this feature is CX9020.
By the way, you can test your code on your PC without any license.
That is good to know and sucky
 
Last edited:
Maybe this is something I am not familiar with. Are you saying you can use your IDE to see all of your variable values and edit them without pausing the program?
Well in that sense yes, you are right, you would have to pause the program to do that from the debugger. Now on the other hand you could create a feature in your program to handle alot of this.



The reason I am asking these questions is that I have been contemplating creating an Open Source Ladder/PLC programming software. I have been designing the architecture in my head for some time now. The UI seems somewhat straightforward, designing the next layer structure that makes up the LAD language seems pretty straightforward. What is not straightforward is what form the actual runtime should take. It could be a completely interpreted language at runtime, compiled to IL and run in the CLR or it could be compiled to native. All of these have their pros and cons.



P.S. Yes I know this would be a very big undertaking. But hopefully, by the time my kids are older and I have more free time on my hands, I can all get other people to help work in it with me.
 

Similar Topics

sir, while running program in codsys an error occur 'C0138: No matching 'FB_Init' method found for instantiation of FbPowerPlantControl.' how to...
Replies
1
Views
48
Hallo, i try to find solution, but not founded yet. so i try to create new thread, please help if you have insight. i installed the RS Logix...
Replies
0
Views
563
Hi all, I have two active PLCs and both can be found in RS Linx. When I try to find it through communications in Logix designer (who active), It...
Replies
2
Views
539
Hello, When I try to open a program I get this message "Module profile could not be found. This could indicate the module profile is not...
Replies
3
Views
1,554
PLC5. Theres an intermittent fault in the plant on auto startup, hunting for address duplicates, noticed an address is assigned to an OTU twice...
Replies
5
Views
1,167
Back
Top Bottom