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: 

Forward and reverse limit switch does not stop motion. PXI-7344

Hi Adam,

 

I suggest that you stick to MAX to troubleshoot this issue.  I am a little confused on how you're using the Halt/ Kill modes. It is important to understand the difference and use what applies to your application. Here is a good document that explaines the Stopping Modes . Also, I was wondering what is the sittings on your PID Gains (Kp, Kd, Ki); Do you have reasonable values?

 

Thanks and have a great day.

 

Esmail Hamdan | Applications Engineering | National Instruments  

0 Kudos
Message 11 of 13
(1,212 Views)

Hi Esmail,

I'm familiar with the different stopping modes. The problem with a halt is that it requires encoder feedback in order to stop properly (hence the PID values make a big difference). I should of explained our end application better, but we're using an optical encoder within a magnetic resonance imaging scanner. We occasionally loose encoder feedback to to EM interference (this requires a separate solution altogether). So we need our limit switches to function as a stop even when our servo system becomes unoperational (hence the kill rather than a halt). 

 

I checked another thread (http://forums.ni.com/ni/board/message?board.id=240&message.id=8846&query.id=3926216#M8846) and they suggested adding a line of code which calls "Set u32.flx" (Attribute = Stop Type on Switch, Value = 2). Apparently the "value = 2" changes the default behaviour of the limit switch to call a kill rather than a halt. We added this to our VC++ application and it seems to have solved the problem for our acutal program. I can now litterally disconnect the encoder (simulating and EMI problem) and prompt the system to move either in the forward or reverse direction and the corresponding limit switch will actually kill the motor once triggered. 

 

 

I am wondering now how this "Set u32.flx" can be configured in MAX though, so far there doesnt' seem to be a way to access these low-level controls in MAX. This isn't a show stopper for us, since we only use our VC++ application when we're down in the MRI, but it would be nice to know if these attributes are accessible in MAX.

 

Thanks,

Adam

0 Kudos
Message 12 of 13
(1,165 Views)

Hi Adam,

 

MAX is a wonderful tool for troubleshooting, but changing the default behavior and other lower level attributes are not available in this program.  

 

Cheers, 

 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 13 of 13
(1,144 Views)