FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
10-25-2021 11:45 PM - edited 10-25-2021 11:46 PM
With a SoftMotion axis configured as "modulo", it had been observed in a variety of cases that the position command value is failing to rollover at the defined modulo.
For example, with MC_CamIn (see attached for cam definition):
The consequence of this is that for sufficiently large commanded position, the axis stops:
MC_GearInPos and MC_MoveRelative behave similarly.
Am I missing something in the setup?
Test axis: IndraDrive, MPB-20 firmware. CODESYS SoftMotion 4.10.0.0. ctrlX CODESYS Softmotion Adapter 1.10.0.3.
Solved! Go to Solution.
10-27-2021 06:13 PM
for me it looks like modulo is configured in the drive too, but the SoftMotion driver expects that the drive does not do modulo handling. This will be done by the SoftMotion.
So I would recommend to check/change the position data format from “Modulo” to “Absolute” in the drive.
10-27-2021 11:21 PM
Thanks, eschwellinger.
and I still see the physical axis come to rest once the commanded position becomes sufficiently large:
I did verify that by setting S-0-0278 to its maximum value, namely 214748.3647 = (2^31 - 1) / 10000, I could force the commanded and actual positions to rollover simultaneously:
In this case it looked like I was able to run in "endless" mode without error.
Setting the max. travel range this high has implications on our absolute encoder evaluation - we'll review internally how best to handle this.
If you edit your post to include a reference to my comments here, I'll accept yours as the answer.
11-04-2021 08:04 PM
As an alternative to the workaround described above, I've found that SoftMotion parameter dwBusModuloMask may be used to force rollover of the position command at a value compatible with the internal drive modulo. This approach will (in typical cases) allow us to retain the drive's absolute position reference while maximizing the internal position resolution. For example, setting dwBusModuloMask = 2^18 - 1 = 262143, we may configure the axis as follows:
Running the cam described in the original post now yields the following. Note that the position command value rollover now corresponds with the actual drive position.
I've tested this configuration for 4+ hours and see no problems and no position drift. Moreover, the position is retained on program restart or power cycle. Both forward and backward operation has been verified.
@eschwellinger: Am I missing anything? Was there a specific reason you did not suggest adjusting dwBusModuloMask?
Also, following the documentation I've assigned dwBusBandWidth a value of 262144 = 2^18. What does this parameter do?
11-16-2021 08:08 PM - edited 11-17-2021 06:49 AM
First of all, my preference would be to set the max. travel range to 2^31-1. This is how SoftMotion expect drives to behave.
dwBusModuloMask is an internal variable, so I would not recommend to set it.
The thing with the max. travel-range and the absolute mode of the drive would be an important info for the commissioning guide.
Instead of using the internal variable dwBusModuloMask I would recommend to use:
SMC_SetBusBandWidth
But as I said... usually this should not be needed.