CodeSys Import/Library #7
Replies: 1 comment 5 replies
-
Hi @MatthewReed303, With this project I want to bring trajectory generation into the PLC world with open-source code rather then relying on properitary PLCopen implementations by manufactures as Beckhoff or Codesys. The library will "only" take care of calculating position, velocity, and acceleration for up to 6 sychronized moveable axes. For the actual movement you have to switch the drives that you are using into a mode, where they expect data to be send to it cyclically and then send the generated data (e.g,) to it over the bus (e.g. EtherCAT). I usually try to avoid ncmotion, because I don't like that it doesn't utilize the computation power of drives at all. Most drives can do trajectory generation themselves just fine with operation modes (profile-position, profile-velocity) and for most cases, where no synchronized movement is required, I use operation modes (e.g. to move from A to B with 1 axis).
If your drives support these actions then there is nothing really in the way to test this library. The trajectories that this library can calculatd will totally work fine for a 3-axes pick-and-place application. Regarding the usage of this library in codesys I have to say that at the moment I am using a Beckhoff Library (Tc2_System), which probably won't work in Codesys. However, this dependency is only required for monitoring the performance, because I want to implement a Benchmark for the library - I use Tc2_System.GETCPUCOUNTER to test how long trajectories take to compute. When I do the first release I want to get rid of this dependency to make the library directly installable on Codesys as well. For TwinCAT
For Codesys (not tested)
You could also export to PLCopenXML and then import it in Codesys after removing the references to Tc2_System. For synchronized movement of axes you can have a look at the Please keep in mind, that I am not done with testing the implementation more thoroughly and haven't actually field tested it. Cheers, |
Beta Was this translation helpful? Give feedback.
-
Hi There,
This looks like a great project. Will you have similar functions compared to PLC Open Motion? I have been looking through the code to find the Beckhoff library but can't find it, I understand it's not complete yet. How can I import into Beckhoff Twincat to test and then export via PLC Open XML to test with CodeSys and a Raspberry Pi?
I have custom motor drivers (Odrive Robotics and Simple FOC) but they don't support industrial protocols such as CANopen CIA402 etc I would like to use and do some motion control projects at home with them and this looks very promising. I take it I can just map the required variables straight to my drives without using proper axis configs and Axis_Ref etc? Here is a Reddit link I made earlier regarding trying to create a custom Axis_Ref. https://www.reddit.com/r/PLC/comments/p38o1s/plc_open_motion_control_axis_ref_structure_codesys/
Will it be possible to do sync/coordinated motion? Maybe even read G-Code for a simple 3axis pick and place gantry-type robot? How is Encoder Actual position feedback handled? Can motion be paused/halt and stopped etc? Sorry for all the questions, just wondering what the plans and future of this project?
Thanks,
Matthew
Beta Was this translation helpful? Give feedback.
All reactions