Beckhoff questions.

L D[AR2,P#0.0] and puxiret.

I can see that I can setup the "soft PLC" that TwinCat PLC basically is. That is what L D[AR2,P#0.0]'s suggestion points to. The only configuration in that dialog is what kind of code that TwinCat must generate, i86, ARM, or "BC" code.

Setup of the actual hardware target is absolutely nowhere to be found.
I thought that I could specify for example a CX1020 CPU with a PSU with EtherCat connectivity on the right side and extra serial ports on the left side.

I mean, I guess it is of some importance if there is a K-bus or an EtherCat bus on the CPU.
And I also look in vain for settings of the RT OS. Can be priorities be set for the PLC code and "other" tasks respectively ?
 
JespertMP:
With TwinCat you can make your software first and chose compiler ( i86, ARM, or "BC" code) after that, normaly I use i86 because I use CX1000.

http://www.beckhoff.com/images/embedded_pc/cx1020.jpg
http://www.beckhoff.com/english.asp?embedded_pc/cx1000_2.htm
Where you can see that all connectivity is on left side and terminals on right side.

It is importante to chouse your bus before you buy the PLC but the software for the plc it´s the same.

About RT OS I never use this but i thinks it is the same...
 
Last edited:
JesperMP said:
It is dawning on me that I have to be "online" in some way.

Hope you have already figured out - to be "online" you must actually do "login". Why "login"? Beats me.

Been there, done that. Don't look for intuitiveness in this software - a true professional is the one who does things the hardest way possible. Or so some tend to think.

P.S. Ever had to use SAP? You get the drift...
 
So here is how I first learned TwinCAT on my own:

1) Go to PLC Control and start a new PC project making MAIN an LD file.
2) Create this program:
FirstProject2.JPG

3) Save the program and then Project->Build
4) Go to System Manager and start a new project
5) Right Click I/O Devices and Append Device
6) From the list, expand Miscellaneous and select Printer Port
7) Right click PLC - Configuration, select Append PLC Project
8) Navigate to the directory where you saved the PLC program and select the file. (It must successfully build before the .tpy file is created)
9) Expand down the project that was just added until you get to the outputs and look for MAIN.Output1
FirstProjectSM.JPG

10) Right click MAIN.Output1 and select Change Link
11) From the list select Output 0 (Pin 2)
12) In the menu, Actions->Generate Mappings
13) Actions->Check Configuration
14) Actions->Activate Configuration
15) At this point, your TwinCAT Icon by the clock should be green
16) Go back to your program in PLC Control, Online->Login
It will ask to download the new program, click Yes
17) Online->Run
You now have a program running that controls Pin 2 of your parallel port.
18) Put a volt meter on Pin 2 and Common of your parallel port (hopefully you have a port)
19) In PLC Control double-click the variable "Bit"
20) Online->Write Values
At this point "Bit" and "Output1" should be true and you will see voltage on your volt meter

In short, we have written a program, linked to physical IO, downloaded and put in run mode, then changed the value of an internal bit!
 
hey hi! can u please send some sample project with system manager to [email protected]


JesperMP:

In beckhoff you have System Manager and PLC Control, in PLC Control you only make de program, in System Manager you can add all your hardware.

I have a lot of experience with beckoff systems in LightBus and ProfiBus. If you need some project with System Manager I can send to you.
 
Back when I was learning, I found System Manager (SM) much simpler than the programming environment (TwinCAT-PLC). SM was written by Beckhoff (I think) and the later is mostly CodeSys. I had actual hardware, which makes SM fairly automatic since it finds the buses and modules connected automatically, as Archie showed. I also had Bob Trask of Beckhoff demonstrate how simple it is.

In SM, I don't recall that you ever specify the CPU. You select ("Choose Target") a "run-time" system to link to, which can be the same PC or any Beckhoff PLC connected over the ethernet that has a "route" established. The run-time can be on anything from a top-end CX1030 to a non-PC processor (BX, maybe even BC), it all acts pretty much the same. To keep your head straight, a local CPU shows as blue on the bottom bar or red if a remote.

You do specify the CPU in the programming screen, as shown above. This is for the "compile for" choice. For example, I once tried compiling my main project for a BX9000 and it wouldn't compile because I use a dbl float variable which that simple CPU doesn't support.

One big "trick" is to always click the "Activate Configuration" icon after making edits in System Manager, so it downloads to the hardware. The purpose of linking your PLC code (*.tpy) to SM is so you can link PLC variables to real I/O (or module status I/O). I define the variables I will link as global, otherwise you see them in SM as "Main.Out1" as Archie shows rather than simply "Out1". I use a lot of I/O arrays like "DigIn[]". There is a way to link an array to a group of I/O channels in one fell swoop (Array Mode), but it usually doesn't work for me. You load the program on the PLC from TwinCAT-PLC (via "Online", where you can view PLC variables and add breakpoints in PLC code).

I did have some problems in TwinCAT versions over a year ago, where SM would get out of synch between which channel you clicked and what data it showed (always 1 behind) and also with the auto-mapping of PLC variables not working right (over-lapping in memory). I think the later was also caused by me using arrays of structures. It does take a bit of practice to get used to the handshakes between TwinCAT-PLC, SM, and the hardware, but it does work amazingly once you get it down.

Re your question of managing the PLC brain PC like you would a desktop PC, it is better not to. Beckhoff loads a special image of WinXPE with all the drivers needed. I expect they interact thru most PC hardware using Windows, so maybe you could add new hardware and drivers. For example, I have installed a USB-ethernet adapter with no problem. Most hardware would be USB since their PC bus (to the left) is fairly special (PC-104 I recall). You can run the PLC brain on your own desktop PC, but you must buy the full programming environment (TwinCAT-PLC) to do that, which costs maybe $1200 vs $500 for the "run-time" license. They will only load the run-time on their own PC's (I asked ~5 yrs ago). But for enough volume, they might work a deal. After all, Hans is a capitalist.
 
Last edited:
PLC Programme Example

Hey. I started using Beckhoff and did an example project (traffic lights). I wrote that by myself in structure text and also visualized it. Now i want to know if there is maybe some step by step tutorial for some project in structure text (in TwinCAT PLC) where it will be included everything, the most important for me is connecting to modules and make it work physically so i can see it.

Thank you.
 
Left side is from Beckhoff, therefore you can't add modules by yourself, except for the PC104 form factor modules that can be added in CX controllers. See: http://www.beckhoff.com/english/embedded_pc/cx1500_mxxx.htm?id=97337455643

You can also connect communication terminals into the EtherCAT terminals which I prefer, doing that you get the communication terminals you need and separate them from the controller, therefore if the controller dies for any reason you will be able to put a new controller without any special things inside. See: http://www.beckhoff.com/english/ethercat/sonder_el6xxx.htm?id=1633319923
Notice you can have RS232, RS485... installed in that way.

Hope this helps!
 
damjaniii,
If your "traffic light" example is changing variables in the PLC code, you can link those to real I/O to make actual lights turn off & on. You do that via System Manager in TwinCAT2, which you find under the System heading in TwinCAT3 (Visual Studio).

There are tutorials on Beckhoff's website showing how to configure a new PLC, plus many examples of PLC code. You haven't told us exactly what hardware you have, so nobody can help much. If you are just using their free PC simulator, I doubt you can make anything happen in the real world.
 
as simulation is not dependent of the target you can do without.
target is under plc configuration or under target setting both in resources
and yes a simple starter would be nice try the trafficlight.
it is also on the codesys forum (i uploaded it) (shooter)
to get correct config is hard (however if you have the hardware it is a piece of a nice applecake.
if you send your .pro or better an export of your program we can help you.
for now use the RT that came with the software.
 
I'm intern in a company so i can use a lot of modules, theres is HW for almost everything... I defined my next assigment and it is going to be "broken wire detection". The wire should supply electricity (220V) to a heater and i should check, using encoder, if the wire is cut, there should be some kind of error or alarm. I was reading today about EL5021 and im thinking of using it to acomplish my goal. I have a lot to study from the Beckhoff documentation, but if u have any other useful link or literature it is very welcomed :) Thank you :)
P.s. it is first time im dealing with this kind of programming, i was programming C# and software development in it, but i am really interested and i really want to learn as much as i can :)
 
Hi, we used Beckhoff and we have a problem with KL9260 is off. we want to bypass disabling that module but can't disable it. Does anyone have to face this case?
 
Jesper, hi. When I first started using Beckhoff, I had many problems getting used to it. I was more familiar with Rockwell and Siemens. You need to memorize many acronyms, and sometimes the help, as you mentioned earlier are a bit cryptic. But once you get used to it, it is useful and many people like this PLC, so for an integrator, becoming fluent in this technology is an asset.
 
Last edited:

Similar Topics

I am using a Beckhoff PLC and trying to convert a REAL to 2 WORDS to send over Modbus. Does anyone know how to do this? Also how would I convert...
Replies
5
Views
843
Hello Long time lurker. I am flailing around trying to figure out how to implement MODBUS TCP on a W2000 IPC that controls one of my company's...
Replies
10
Views
5,935
I would be using Beckhoff EL1002 Digital input module for my EMO switch. Attached is the connection details of the same. I presume that the 24V DC...
Replies
5
Views
2,850
I would be using Beckhoff EL1002 Digital input module for my EMO switch. Attached is the connection details of the same. I presume that the 24V DC...
Replies
0
Views
1,689
Hi, I'm trying to import a Rockwell/AB EDS to Beckhoff but I'm not sure how to import/install the EDS. It is a PowerFlex 525 EDS. Is there a way...
Replies
1
Views
118
Back
Top Bottom