Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

MAX not killing motor when limit switch active with analog feedback

Solved!
Go to solution

I just switched my motor to use analog feedback instead of encoder feedback but now it doesn't kill the motor when the limit switch is activated. I'm using a PXI7358 with a servo motor, along with a PXI6363 and PXI6221. The PXI6221 reads raw strain gauge measurements from a 6-axis force sensor mounted on the endpoint of my linear actuator (powered by the servo motor). LabVIEW performs a calculation on the strain gauge voltages and outputs via the PXI6363 a single voltage that's proportional to the force in one of the axes. I feed that analog voltage to the analog input for Axis 1 on my PXI7358.

 

Previously I had used an encoder for the feedback and whenever I reached the forward or reverse limit switch the motor would immediately stop. Now that I'm using analog feedback, the actuator sails right through the limit switch and doesn't stop, even though I see the LED light up in MAX indicating that the limit switch is active.

 

In a LabVIEW VI I can kill the motor when the limit switch becomes active, but I'd like for this to transcend LabVIEW and happen in MAX instead. Sometimes, apparently, there's a slightly non-zero voltage being output by the 6363 and the actuator moves very slowly in one direction and if I'm not looking it runs the risk of crashing into the end stop since it doesn't honor the status of the limit switch. 

 

Any suggestions? Thanks.

0 Kudos
Message 1 of 3
(3,894 Views)
Solution
Accepted by topic author matthewg

Matthew,

 

what you see is expected behavior. The good news is, that you can change it, but let me first explain, what's going on here:

 

When an axis hits a limit switch, the default operation is to halt the axis. That means, that the current feedback value becomes the current setpoint. With encoder feedback this results in a full stop of the axis, which is typically the desired behavior. With analog feedback (e. g. force) this means, that the axis tries to keep the current force value, which  doesn't necessarily mean, that the axis stops.

 

The solution is to stop the axis with a kill command, which sets the DAC to zero and asserts the inhibit output line to deactivate the drive. You can configure the axis to stop with a kill command when a limit switch becomes active by using "Set u32.flx" (Attribute = Stop Type on Switch, Value = 2).

 

I hope this helps,

Jochen Klier

National Instruments 

 

 

0 Kudos
Message 2 of 3
(3,882 Views)

Excellent, this works. Thanks for your help.

 

Matthew

 

0 Kudos
Message 3 of 3
(3,871 Views)