From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9512 problems with overshooting position

I have inherited some code with a strange bug to do with SoftMotion. We have 4x ISM-7401D motors with non-NI encoders on the shafts. They are driven by 4x NI 9512 controllers sitting in a cRIO 9035 crate. We're currently running LabVIEW 2017, SoftMotion 17.0 and CompactRIO 17.0.

 

The code compensates for backlash in a mechanical goniometer. If a motor is moving clockwise it moves directly to the final position. If a motor is moving anti-clockwise it first moves to a calculated temporary position that is beyond the final position, so it can always approach the final position in a clockwise direction.

 

The bug occurs only when the backlash correction is required, and certain acceleration and velocity parameters make it more likely to happen. The motor will jolt or shudder, then move far beyond the temporary position at high speed, stopping at a random position. What happens next depends on how far out of position it is; If it's still relatively close to the final position it will get there and the "done" status will be true, if it's a long way off it will return part of the way and the "done" status will remain false.

 

The vi attached is as stripped down as I could make it, having been extracted from a very large project. I have added some things to help me debug, but the core of the code is as it is in the live system. The current velocity and acceleration parameters are very effective at replicating the fault. The bug is consistently repeatable with all combinations of hardware (all motors have been tried on all controllers.) I have also rewired the interface between the crates and the motors and encoders.

 

Any advice gratefully received!

 

0 Kudos
Message 1 of 2
(2,101 Views)

Have you tried one of the LabVIEW examples? 

For example, Axis Straight Line Move.lvprj

0 Kudos
Message 2 of 2
(1,938 Views)