Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

question on flex_start()

Hi,

I'm using FlexMotion 7.5, LabWindows 7.1 on Windows 2000. The hardward is PCI-7344 (4 axes). My application has a series of movements which drive all axes back and forth between 90 degree and -90 degree using flex_start() function. After each call to this function, I keep checking (timeout in 30 seconds) two bits returned by flex_read_axis_status_rtn(). They are NIMC_MOVE_COMPLETE_BIT and NIMC_AXIS_OFF_BIT. Another thing is that I use an external tool to hold all the axes still, meaning the axes could never reach the destination (+/-90 degrees. My purpose is to saturate the DAC counts).

During the test, I saw the axes moved a little back and forth (due to the slack of my tool) to execute the series of movements. But I don't understand why. By theory, the two bits I'm checking should not be set (The move will never complete (NIMC_MOVE_COMPLETE_BIT) and axis not killed (NIMC_AXIS_OFF_BIT, since I didn't see the orange LED on the amplifier box turned on indicating the axis is killed. BTW, the following error trip is set to 300 degree).

So my question is how NI Motion decides a move is complete.

Thank you.
JasonJ
0 Kudos
Message 1 of 5
(3,552 Views)
Jason,

with NI-Motion you can configure the Move Complete Criteria. Please have a look at this link:
What Exactly Do the Motion Axis Status Bits Mean?

This is an excerpt from the NI-Motion function help that explains the options that are available for flex_config_mc_criteria. Please have a look at the full function description in your NI-Motion function help file.

D0 Profile Complete (PC):
1 = Profile must be complete (default)
0 = N/A (cannot reset)

D1 Motor Off (MOff):
1 = Motor is off or killed
0 = Motor off status not considered (default)

D2 Stop:
1 = Run/Stop must be stopped
0 = Run/Stop not considered (default)

D3 Delay:
1 = Move complete only after delay
0= Move complete not delayed (default)

D4 In-Position (In Pos):
1 = Must be within deadband of target position
0 = Ignore in-position status (default)

Best regards,

Jochen Klier
National Instruments












0 Kudos
Message 2 of 5
(3,548 Views)

Thanks, Jochen. Can I have one more question on this "The Profile Complete bit is set (true) when the trajectory generator has successfully output all the points for the move."?

How does the trajectory generator work? Does it keep outputing all the points for the move without regarding the actual positions? In other word, will it work the same way with or without any real movements on the motor? If so, normally how fast can it finish outputing the points?

Thank you.

Jason

0 Kudos
Message 3 of 5
(3,539 Views)
The trajectory generator generates the dynamic setpoints for the PID loop to generate the position profile. The duration of this profile is defined by the values for target position, velocity, acceleration and deceleration.With these values you can calculate how long a move will take theoretically.

In fact the trajectory generation is finished after this time, as it doesn't care if the motor has been able to follow or not. In an ideal world, the motor would follow the trajectory profile perfectly. In reality there are many effects that cause more or less significant deviations of the real move from the theoretical profile.

Does this answer your question?

Jochen
0 Kudos
Message 4 of 5
(3,532 Views)

Thank you very much. That's the answer I was looking for.

Jason

0 Kudos
Message 5 of 5
(3,512 Views)