Join us today!
Changing axis motion direction
You can change the motion direction of an axis by following the steps below.
Select the axis and expand it. Double click on the 'Enc'. (1). Go to Parameter Tab (2) and select TRUE for 'Invert Encoder Counting Direction' option (3). Click on Download (4) and then OK (5).
Select the axis and expand it again. Double click on the 'Drive'. (1). Go to Parameter Tab (2) and select TRUE for 'Invert Motor Polarity' option (3). Click on Download (4) and then OK (5).
Save the changes and activate the configuration.
In case you want to say thank you !)
We'd be very grateful if you could share this community with your colleagues and friends. You can also buy us a coffee to keep us fueled 😊 This is the best way to say thank you to this project and support your community.
twinControls - https://twincontrols.com/
To expand on this subject...
If you are going to be doing a lot of Beckhoff Motion work, I recommend getting yourself familiar with the Drive IDNs (Drive level configuration parameters) and MC_AxisParameters (NC Level configuration parameters). The "NC Settings" tab and "Drive Manager" are graphical interfaces to act on the same configuration settings you can access via Function Blocks.
With the above, you can use FB_SoEWrite/FB_SoERead for Drive IDN's or one of the Tc2_MC2 Function Blocks (MC_WriteBoolParameter, MC_WriteParameter, etc) to dynamically change NC and Drive settings.
For instance, you could update the Encoder Position Offsets of an Axis by using MC_WriteParameter with the MC_AxisParameter value of "AxisEncoderOffset" (LREAL). The MC Function Blocks are abstractions that run through the NC level to act on the Drive level. This is nice, because you can use MC_WriteParameter for parameter "AxisEncoderOffset" and use NC Units for the desired encoder position offset, rather than Drive Encoder counts.
If you are going to use this approach, be mindful of the Motion State Diagram, as many of those parameters (including Invert Motor Direction and Invert Encoder Counting Direction) generally have to be accomplished with the MC_Power software enable of the Axis removed (FALSE).
I'll try to link the appropriate links, though I often mess up links for Beckhoff's InfoSys:
Posted by: @adam-haneyI'll try to link the appropriate links, though I often mess up links for Beckhoff's InfoSys:
To get the proper link from InfoSys you need to right click on the menu item in the left pane.
My blog: https://cookncode.com/twincat
My code: https://github.com/roald87
Another good resource is this blog post about setting servo offsets. It goes into the different methods which are available and their pros and cons.
My blog: https://cookncode.com/twincat
My code: https://github.com/roald87
Thank you very much! I just saw this website today from another post you made.
Geez... all this info would have been great to have before I had to fumble my own way into figuring this out. HAHA!
@adam-haney haha same here :p
My blog: https://cookncode.com/twincat
My code: https://github.com/roald87
- 17 Forums
- 267 Topics
- 942 Posts
- 2 Online
- 722 Members