From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Motion and Vector Space Question

I have an x-axis stage and a y-axis stage with 2 different leadscrew pitches, i.e.: one table has a 5 turns per inch leadscrew and the other has a 50 turn per inch leadscrew. Consequently, the stepper motors attached have to operate at different speeds (10x difference) in order for the tables to have the same velocity. I have this accounted for in the axis configuration settings in the NI MAX explorer. When I am configuring automated moves in LabView and set up a "vector space" composed of the two axis, it seems that the motors operate at the same speed and ignore the MAX settings. I thought that after intializing the controller, the current axis settings would be carried over and applied through the vector space and to the actual move
(a 2D move made in Motion Assistant). Am I missing something? Do I need to load the velocity for each axis with a flexmotion VI somewhere in the code? I'd like to command the motrs to move at 2 different speeds so the tables move at the same velocities. Any comments would be appreciated. An abbreviated sample of some of the code is attached. Thanks. ROB
0 Kudos
Message 1 of 7
(3,856 Views)
Rob,

you should be able to adjust the pitch of the leadscrews by setting the stepper steps per revolution and/or the encoder steps per revolution settings in MAX accordingly (in your configuration these settings should differ by the factor of 10 for your two axes)
In your application you then have to use the Load Velocity in RPM.flx and the Load Accel/Decel in RPS/sec.flx in order to get the same resulting velocities on both axes. If you do it like this you still have to account the factor of 10 for your target position calculations.
I couldn't find out if you have proceeded like that in your application as the vi you have attached is missing a crucial subvi.

If you are using a four axes board like the PCI-7344 or the PCI-7334 there is another option:

You
could use a third axis that acts as a master for one of your axes (I would prefer the axis with the 5 inch per leadscrew). Your real axis has to be configured to follow the master axis by a factor of 1/10. In your application you configure a vector space for the master axis and the axis that is not configured as slave. Your physical signal connections need to be done to this axis and the slave axis.
Please examine the LabVIEW gearing examples for more information.

In this case you should enter the same values for stepper steps per revolution and/or the encoder steps per revolution in MAX for both axes as the pitch adjustment is done by the gearing.
The advantage of this method is that now you can set the same velocities, accelerations and even target positions for both axes and you never again have to account the pitch factor.

Best regards,

Jochen Klier
Applications Engineering Group Leader
National Instruments Germany GmbH
0 Kudos
Message 2 of 7
(3,856 Views)
Thanks for the reply. My next step was to go in the first direction you suggested. I added the load velocity and load acceleration flexmotion VI's, but did not see a change. Attached is another sample VI. Am I using them in the appropriate manner? If the "initialize controller" VI can check MAX for the motor steps/rev, why can't it pull in the motor velocities I specified under the "axis configuration" tab in MAX? They differ by 10x there.
I suppose I could do a shortcut and fudge the steps/rev for one motor (by 10x) in MAX. But I'd like to be able to have control of the VI block diagram to have the motors do what I want.
ROB
0 Kudos
Message 3 of 7
(3,856 Views)
Rob,

it's always a good idea to set move parameters like velocity and acceleration in your application and not in MAX. On the other hand if you have specified these parameters in MAX the initialize controller.vi should load these parameters, too. Please make sure that you have pressed the apply button in MAX after configuring them.

As far as I can see (a subvi is still missing) you are using the vis to load velocity and acceleration in the appropriate manner if the steps/rev settings in MAX are the same for both axes. Otherwise your velocity and acceleration settings in your application would annihilate the settings in MAX.

Regards,

Jochen
NI-Germany
0 Kudos
Message 4 of 7
(3,856 Views)
Thanks again for the reply. Which subvi is missing? Where? I agree, it is better to control parameters within the application rather than count on the MAX settings. However, the initialize controller.vi is not loading the predetermined settings from MAX, in which I have clicked "apply" more times than I can remember, believe me. Judging from what you said, I should expect this to be straightforward. But, it's not behaving as we both would expect.
It's good to hear that I'm using load velocity and acceration VIs correctly. But I'm not seeing the changes in motion I want to see. Both motors still run at the same speed, meaning the stages travel at different speeds. In fact, the motor speed appears to be about 4 rpm (where this comes from, I have
no idea), instead of the 100 and 1000 that I specify. This makes no sense.
Oh well. Maybe I will start from scratch.
Thanks again
ROB
0 Kudos
Message 5 of 7
(3,856 Views)
Rob,

the missing vi is called 2D Straight Line Move-Start MC.vi. Without it it's a bit hard to tell but now I think I know where the problem comes from:
You are loading velocity and acceleration data for the singel axes but then you define a vector space. If you use the vector space you need to load a vector velocity for the vector space. You do this with the same vis but as you connect the vector space resource output to the axis or vector space input, the Load Velocity in RPM.flx interprets the velocity value as a vector velocity. Please examine the Two-Axis Vector Move with Position Monitor.vi that ships with the NI-Motion driver

If you don't want to keep the different pitch factors in mind all the time during programming,
the best way to proceed is the gearing approach I've mentioned in my initial answer.
Follow this link for an example:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E5D156A4E034080020E74861&p_node=DZ52480&p_source=External

The idea of this example is to create elliptical moves with an xy-table but the configuration of the axes and the vector space should meet your needs when doing linear moves, too.

Regards,

Jochen
NI-Germany
0 Kudos
Message 6 of 7
(3,856 Views)
Thanks again. I was one step ahead. I removed the vector space and got the results I wanted. I just have to double up the code (instructions for each individual axis) if I go this route. It certainly is a limitation that one can't use a vector space directly if they have non-matching tables or motors. I will check out the gearing method that you mentioned. This may be required for me to do some complex contoured shapes.
Cheers
ROB
0 Kudos
Message 7 of 7
(3,856 Views)