LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable drive upon LabView error

I'm running a closed loop PD position controller in Labview 8.5 and NI PCI-6259 M series card and BNC-2120.  I'm sending an analog voltage signal (+/- 10) to a Copley Xenus amplifier (current command) as well as a +5v signal to enable the amplifier.  The controller uses position for feedback.  When labview errors out, the daq card stays in its current state (and keeps sending the 5v enable signal).   For safety reasons, how can I configure my system so that this signal stops being sent out, and the amp is disabled?

 

Maciek

0 Kudos
Message 1 of 14
(3,986 Views)
What do you mean by "errors out"?  This function is usually taken care of in firmware by a motion controller.  I can't think of a sure way to assure this in software.
0 Kudos
Message 2 of 14
(3,985 Views)

The other day, the actuator encountered an unusually large disturbance.  The PD controller in labview tried to send a voltage command which was larger than 10v, and that caused an error.  The program stopped, but the daq card kept sending a 5v enable signal to the amplifier.

0 Kudos
Message 3 of 14
(3,982 Views)
I still need more information.  Did your program stop due to an error in an error cluster, or did it crash.  If it crashes, there isn't much to do.  If you get an error, then disable the drive before the program stops.
0 Kudos
Message 4 of 14
(3,971 Views)

The program crashed.  I shut off the amp.  The actuator shaft, which is positioned vertically, dropped to its lowest position due to gravity (it's a linear actuator).  The daq card kept pumping out a high force command, due to the large position error created by the disturbance, as well as the 5v enable signal.  Upon turning the amp back on, the PD controller saw a large difference between desired and actual position, and the actuator shaft shot up forcefully, creating a very dangerous situation.  In the program, I have a case structure which won't enable the amp. unless the difference between desired and actual position is small enough.  But the amp stays enabled when labview crashes.

 

m

0 Kudos
Message 5 of 14
(3,964 Views)

I'm sorry...  The program errored out.  It didn't crash.  Is it possible to make labview send a default command (like 0v instead of 5v) when it errors out?

 

m

0 Kudos
Message 6 of 14
(3,963 Views)
Yes, on an error you can disable the drive.  Another common function of motion controllers is to make the current position the commanded position when the axis is enabled.
0 Kudos
Message 7 of 14
(3,948 Views)

I'd prefer to disable the drive upon an error.  How does one do that?

 

m

0 Kudos
Message 8 of 14
(3,909 Views)
You are enabling is by sending is 5V or 0V, I'm not sure which.  When you get an error, send the opposite.  The easiest way to do that is to have the disable code inside a case structure.  Wire your error cluster to the input of the case structure.
0 Kudos
Message 9 of 14
(3,898 Views)

Ok, so that approach should work for errors.  But how can you disable the amp when labview crashes?  I just tried it and the daq card keeps sending out 5v - enable signal to the amp after I closed the program down.  What can be done?

 

m

0 Kudos
Message 10 of 14
(3,893 Views)