From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Motion Load Accel/Decel VI

Greetings,

I could use some advice on using the Load Accel/Decel in RPS/s VI for NI motion.  My application requires me to rotate a vector motor at some speed for a length of time and then change the speed on the fly.  These speed changes need to happen in a set time.  Example:  Start at zero and ramp to 2000 Rpm in 5 seconds, hold for x Time, then Accel to 3000 Rpm, hold for x Time, then retreat to 100 Rpm.  Sounds easy but here is the problem.  I am trying to control the ramp time from speed to speed using the Load Accel/Decel RPS/s.  I can seem to get from 0 to any speed by doing the math ((2000-0)/60 sec)/5 sec = 6.667 Rps/s.  Here I can get the desired acceleration from 0 to 2000 Rpm in approx 5 seconds.  The problem is when I try to accelerate from 2000 - 3000 Rpm.  According to the formula ((vf-vi/60)/5 sec) ((3000-2000)/60)/5 sec = 3.33 RPs/s.  Now I would think that it would accelerate from 2000(vi) to 3000(vf) at 3.33 RPS/s but when I load these values and execute the start move the velocity retreats to around 1000 Rpm.  Its almost like the motion driver is using the accel/decel to control the velocity and ignoring the velocity setpoint that is loaded.  Am I using this VI in the wrong manner?

Regards,

Wade

0 Kudos
Message 1 of 7
(3,278 Views)

Hi Wade,

 

What Motion card are you using with your system? Also how are you telling the system to move to the next speed? From what I've read in the help document for the Load Accel/Decel in RPS/sec.VI, it seems like all it does is set the acceleration or deceleration ceiling and you will have to tell it to move from one speed to the next.

Austin
Staff Software Engineer
NI
0 Kudos
Message 2 of 7
(3,219 Views)

Hello Austin,

I'm using the PCI 7344 I believe (the PCI 4 axis card).  I am setting the mode to velocity, setting the velocity in RPM, then writing to the load accel/decel RPS/s.  Then I execute the start move function.  If I start from 0 Rpm to a setpoint this seems to work based off the math I'm doing to calculate the required accel.  I will give you an example.  I start from 0 to 1500 Rpm in 5 sec.  Based off the math ((1500/60)/5) this gives me 5 RPS/s.  I load this into the function and time it to reach speed is approximately 5 secs.  If I want to change from 1500 to 2000 Rpm and I use the change in velocity ((500/60)/5) this gives me 1.66 Rps/s.  If I load this into the function after I have reloade the velocity to 2000 Rpm the speed actually slows down for some reason.  I assuming maybe because this accel rate is less than the previous loaded accel rate and it is calculated deceleration.  Its almost like the driver is ignoring the loaded velocity and using the accel rate as a master.  If I add the 1.66 Rps/s to the 5 Rps/s it gets to 2000 rpm way to fast.  I hope I explained it thouroughly.

0 Kudos
Message 3 of 7
(3,215 Views)

Can you show your vi?

 

Ben64

0 Kudos
Message 4 of 7
(3,207 Views)

Hi Wade,

 

Since you've opened up a service request I think it'll be best to just continue working on the issue there. When we reach a conclusion I'll come back to the forum and post what we found out. In the mean-time if any other users would like to weigh in it would be appreciated.

Austin
Staff Software Engineer
NI
0 Kudos
Message 5 of 7
(3,182 Views)

Hello Ben,

     I've attached a VI which is similar to the one I've developed to try and accomplish a velocity change on the fly.

0 Kudos
Message 6 of 7
(3,137 Views)

Some things you can try/check:

 

Set the Accel/Decel before the new velocity.

Look at the help file for the Load Accel/Decel in RPS/sec, in the Using This VI section there is a link "NI 73xx Acceleraton in RPS/s". Check if the acceleration you're trying to set is achievable with the PID update rate you are using (probably the default value).

 

I would avoid Read Velocity in RPM vi and use the previously set RPM value instead.

 

Ben64

0 Kudos
Message 7 of 7
(3,128 Views)