Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Sudden large motor movement in NI Motion

I am using flex motion to control a stepper motor and I am trying to very quickly (continuously) update the motor position. To do this I load the updated target position for the corresponding axis and call flex_start. I do this very rapidly without waiting for motion completion on that axis. This works fine for a while, but suddenly the motor turns at very high speed (much faster than the programmed velocity limit) in some direction. After manually hitting the disable switch on the driver the motor stops and then after enabling again it moves slowly (that is with the programmed velocity) to the correct position after the next target position upload. Are fast updates without waiting for completion too much for the controller? (I'm using a PXI 7344 controller, MID 7604 driver, a 2-phase closed-loop stepper, labwindows/CVI).
Any help is much appreciated.
Thanks,
   Martin
0 Kudos
Message 1 of 7
(4,403 Views)
Martin,

when the problem occurrs are there any errors or is there any unusual status information? Please make sure to check for modal errors in a polled mode to catch errors on the board that occurr during active moves. The easiest way to track status and error information is using 1-D Interactive in MAX that can run in parallel to your application.

Here are some general ideas:
  1. Use the latest NI-Motion driver and firmware (version 7.6).
  2. Use a different approach for your application. Updating the motor target position in a fast loop might not be the best way to tackle your application. Please have a look at the Contouring feature of the 7344. With Contouring you can load target position arrays to the board and run through these positions in a hardware timed manner. If you need to adjust your positions during runtime, you could download only small chunks of the position array at a time.
Suggestion #2 might or might not be a good solution for your application. Please provide more information about what you try to accomplish. Do you have to calculate the new target positions during runtime? If so, at which intervals do you need to calculate them?

Kind regards,

Jochen Klier
National Instruments

P. S.: I will be out of office until Wednesday and won't be able to post another answer until then.
0 Kudos
Message 2 of 7
(4,387 Views)
Jochen,
 thanks for the suggestions. I upgraded to NI-Motion 7.6 (from 7.0) and the problem has not (yet) occurred since. I'm still hesitant to run without the wait_for_completion check, since a sudden movement would wreck my really expensive equipment.
 The application that I am describing is the remote control of a translation stage via a quadrature encoder. I mounted an encoder (an external one, NOT the encoder of the stepper motor) in a hand-held box and I am reading its value with a multifunction M-series DAQ board. I then map the encoder angle to the desired position of the translation stage. The read and update happens in its own thread. This gives me a real-time jog-style remote control of the stage. If I wait for motion completion, the motions gets kind of "jerky". Is there a more elegant way to do this?
 Thanks for the help,
  Martin

0 Kudos
Message 3 of 7
(4,367 Views)
Martin,

there is a much more elegant solution for your task. You could use the encoder in your handheld box as a master device and your axis as a slave device in electronic gearing mode. Please refer to the shipping examples to learn more about this option.
In general this meanst that you have to connect the encoder to a spare encoder input on your 7344. After enabling electronic gearing, the axis will follow the encoder with a selectable gearing ratio. This operation runs completely onboard.

I hope this helps,

Jochen
0 Kudos
Message 4 of 7
(4,358 Views)
Jochen,
 thanks for your post. The electronic gearing is an interesting and convenient option. Unfortunately, I am using all 4 of my ports on the 7344. Is there any chance of using the extra digital inputs to read the encoder(s) (I actually have 2 encoders to controll 2 axis)?
Thanks a lot,
 Martin

0 Kudos
Message 5 of 7
(4,356 Views)
Martin,

that's a real pitty. Unfortunately I don't see a way to use e. g. trigger inputs or other digital inputs as an encoder input. The only thing I can think of is using the DAQ board to read the encoder position and then generate an analog output signal, that is proportional to the position and connect this signal to an analog input of the 7344. This analog input could be used as gear master for an axis, too.

Still, I don't like this idea very much due to the fact, that you could run into some signal noise issues and that the analog inputs of the 7344 provide only 12 bit ADCs, which gives you only a travel range of +/- 2048 steps. Of course you could amplify this range by using a higher gearing ratio, but this would result in quite rough moves, but depending on your application this still might be an option.

So, just to make sure: Are you running the axes in closed loop mode, so that there are no encoder inputs left?

The easist solution would be to use a board with more axes, like the 7356. Is this an option in any way? If yes, you may ask your local NI branch for a hardware upgrade and they should be able to offer the board at a much lower price.

Regards,

Jochen
0 Kudos
Message 6 of 7
(4,349 Views)
Jochen,
 thanks for the suggestion. I have one of the 4 ports that uses an open loop stepper. I can use this free encoder input to command the other axes (I'll have to control them in turn, but that's o.k.).
 Thanks a lot for your help,
Best Regards,
  Martin

0 Kudos
Message 7 of 7
(4,344 Views)