Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

flex_config_inhibit_output

hi,
 
i want to use flex_config_inhibit_output to stop the motor's motion, the NI MOTION function doesn't give enought infomation about : u8 axis, u16 enable, which value match enable and axis ?
 
thank u
0 Kudos
Message 1 of 3
(3,623 Views)

Hi,

My guess is that for the u8 axis argument it is the same for all the other flex_ functions that requires an axis specified. You can use the macros NIMC_AXIS1, NIMC_AXIS2, NIMC_AXIS3 and NIMC_AXIS4. You can find those macros defined in the header file MotnCnst.h in folder “C:\Program Files\National Instruments\NI-Motion\FlexMotion\Include”.

 

I’m not sure for the value of u16 enable argument, but my guess it is either a value 1 or 0 for enable/disable or a bitmap of enabled axes.

 

I usually configure the inhibit output settings using MAX – Axis Settings.

To disable the axis in your program just call:

flex_stop_motion(boardID, axis, NIMC_KILL_STOP, 0xFF);

flex_enable_axis(boardID, NIMC_AXIS_CTRL, NIMC_PID_RATE_250, 0);

To enable the axis call:

flex_enable_axis(boardID, NIMC_AXIS_CTRL, NIMC_PID_RATE_250, axis_map);

flex_stop_motion(boardID, axis, NIMC_HALT_STOP, 0xFF) );

 


Regards,

0 Kudos
Message 2 of 3
(3,613 Views)
Mekhatria,

flex_config_inhibit_output() can't be used to directly stop the motor. You should use it to enable or disable the inhibit output by setting enable=1 (enabled) or enable=0 (disabled). After that the axis gets stopped and the drive is disabled when an following error occurrs or when you call flex_stop_motion() with stopType=2 (NIMC_KILL_STOP).

I hope that helps,

Jochen Klier
National Instruments Germany

Message Edited by Jochen on 11-02-2006 10:09 AM

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