Join us today!

Notifications
Clear all

Codesys OOP motion template Axis Beckhoff TwinCAT

11 Posts
3 Users
2 Reactions
722 Views
runtimevictor
Posts: 156
Topic starter
(@runtimevictor)
Estimable Member
Joined: 2 years ago

Hello,

I have obtained the OOP Motion Codesys library as a template for an Axis of motion...
It seems to me a good library and I would like to use it in TwinCAT...
After installing the library in TwinCAT I don't know how to make an example since I don't know how to link the axis in PLC, because in TwinCAT it asks us for AXIS_REF from, for example, the TC2_MC2 library to be able to link...,

How can I solve it in the best way to use this library?

I attach the library and the document, I also attach a photo so you can see that there are some examples of the library provided,
any help or suggestion would be great...

Greetings, Victor.

 

Reply
10 Replies
8 Replies
TwinControls
Admin
(@beckhoffsupport)
Joined: 2 years ago

Member
Posts: 71

@runtimevictor Hi, Have you checked this tutorial ? It shows how to add a virtual axis and link it to the PLC.

Reply
runtimevictor
(@runtimevictor)
Joined: 2 years ago

Estimable Member
Posts: 156

@beckhoffsupport ,

what you indicate is not the problem, the issue is that if you look at the FB class provided by Codesys it does not contain AXIS_REF, and what I am asking is what would be the best way to take advantage of the library...

Reply
Moderator
(@treyem)
Joined: 2 years ago

Member
Posts: 16

@runtimevictor You will need to develop a class that implements the interface itfAxis. You will then need to provide the implementation specific to Beckhoff's specifications. Page 6 of the pdf you sent contains this excerpt below.

 

2022 09 14 08 06 56 Techncial Lay out
Reply
runtimevictor
(@runtimevictor)
Joined: 2 years ago

Estimable Member
Posts: 156

@treyem ,

Yes, that is how I have started, but I would like if someone can get the source code of the Codesys library? In this way I would have the Axis Class FB that they provide and it would be very useful for me to make the TwinCAT one...

Reply
Moderator
(@treyem)
Joined: 2 years ago

Member
Posts: 16

@runtimevictor,

I don't think they will give that up to us. The library you sent is a template. It's up to the user to write the implementation for the specific vendor.

 

The advantage is you can use the same methodology on any Codesys platform so your work is easier to create and troubleshoot.

Reply
runtimevictor
(@runtimevictor)
Joined: 2 years ago

Estimable Member
Posts: 156

@treyem ,

I'm going to try to ask codesys to see what they answer me.., source code library Codesys OOP Motion template Axis...

Reply
Moderator
(@treyem)
Joined: 2 years ago

Member
Posts: 16

@runtimevictor 

We'll see what they say. Since there is no implementation in the template they gave you, you can copy and paste the declarations into your own project and use that as your start point.

Reply
runtimevictor
(@runtimevictor)
Joined: 2 years ago

Estimable Member
Posts: 156

@treyem ,

that's the work I'm doing right now, if anyone else is interested, I can make the repository on GitHub to share and wait for help....

Reply
runtimevictor
Posts: 156
Topic starter
(@runtimevictor)
Estimable Member
Joined: 2 years ago

Hello,

In the end I have created an organization on GitHub, TcMotion, to create this Axis Motion OOP component with the PLCOpen template...
Any help or desire to collaborate is welcome, send me the username or email of your GitHub account so that I can send you the invitation...
I hope that you will be encouraged and in the future that it will be an awesome of motion...

https://github.com/TcMotion

Thank you all and I hope we can collaborate... 😉 👍 .

Reply
runtimevictor
Posts: 156
Topic starter
(@runtimevictor)
Estimable Member
Joined: 2 years ago

Hello,

I have a question and I don't know what is the best way to solve it, I would be grateful if someone could help me solve it in the best possible way...
I attach a photo, the project is hosted on GitHub in the TcMotion organization, anyone who wants to be part or collaborate is also welcome to the community...

I would like to be able to choose the best way to get the Done output of MC_MoveAbsolute?...

https://github.com/TcMotion/Component_Motion_OOP_Axis/issues/6

194095965 dc7cf7c1 5941 43aa b463 aa61f9cbea0a
Reply
Share: