Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

SoftMotion Straight-Line Move Type: How to Finish the Move Within a Set Time?

Solved!
Go to solution

I have a motion control application with a few stepper motors.

 

Every 50 ms a target position and velocity are computed for the motors and I want to move them to that target position, within 50 ms. At the next iteration this is done again.

 

I know that the SoftMotion Module uses S curve profiles for the Straight-line move type but I don't know how it converts the supplied max.velocity, max.acceleration, and max.jerk to create a resulting profile.

 

I know for some "incompatible" values of the three parameters, the maximum velocity may not be reached etc...

 

I was just wondering if anyone know how exactly the maximum values supplied translate to the resulting profile that SoftMotion creates? This is so that I can supply appropriate values in order to complete the motion by a specific time.

0 Kudos
Message 1 of 5
(3,428 Views)

Hello JonathanDeng,

 

LabVIEW runs an algorithm in the background but you should be able to set the necessary values depending on what are you using to program this. I am attaching an image of the properties of the Straight-Line Move of the Express VIs of NI SoftMotion pallete.

 

Please, tell me more about your application in specific, I am not sure what are you doing to achieve this.

 

Regards,

PedroR

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

Hi Pedro,

 

Thanks for the help!

 

What I'm trying to accomplish is a kind of feedback system with the stepper motors.

 

The stepper motors are attached to a body that can measure a force applied. After measuring the force, a type of "imaginary" spring-damper system computes a corresponding velocity, change in position etc... Then the stepper motor moves the body according to the computed values.

 

I'm trying to run this loop using the NI scan interface with a 50 ms control period.

 

I've tried using the straight-line velocity mode method to achieve this but based on what I've tried so far I don't think it's possible to command position change on the steppers in the supplied time span of 50 ms.

 

I have a feeling that the straight-line move modes are meant for moves over longer period of time, not so much for quick control like I'm trying to do?

 

Thanks,

Jon

0 Kudos
Message 3 of 5
(3,367 Views)
Solution
Accepted by topic author JonathanDeng

Jon,

 

That's interesting so you are applying a force with some system then a different system measures the force applied, computes this and send the "setpoints" to LabVIEW and then move the stepper with this values. Am I right?

 

Well, anyway, this shouldn't be a problem, what you need to mind is the configuration you have set, in the end, if the motor and the driver are capable, the controller is not going to limit the speed so much. I would try a faster control loop and the configuration.

 

There is not an easy way to see the S curve generated by LabVIEW but the main variables are the des/acceleration, smoothing, and velocity. If you are missing some values, the smoothing takes over and the curve is calculated based on it.

http://zone.ni.com/reference/en-XX/help/371093P-01/nimclvfb/slmoveprops/

 

Regards,

Pedro Rojas

0 Kudos
Message 4 of 5
(3,352 Views)

Okay, thanks for the help Pedro!

 

I ended up getting the path correct within the control period but it was a bit of a weird method.

 

Basically I'm using the straight-line-move (absolute position based) method assuming the intial velocity is always zero. I have a code to calculate the required jerk, acceleration, cruise velocity to reach the calculated position at the end of the control period.

 

Initially my plan was to continously read the velocity from the stepper motors. Then apply an acceleration, jerk, and cruise velocity to reach the set position based on that initial velocity. The problem was my stepper motors only read discrete velocities so most of the time the value they read was zero. So in the end I just tried assuming the initial velocity was always zero, although I think this is making the motion not very smooth.

 

Thanks,

Jon

Message 5 of 5
(3,336 Views)