Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to Belnd many moves

Solved!
Go to solution

My final goal is to control a 3 axis system using a crio 9074 and EtherCAT AKD drives. 

At the moment I'm only simulating my code to find the best structure.
In my project I have a  coordinate system with 3 axis and I'm using a state machine to control my line moves. The individual points and their parameters (vellocity, acceleration, jerk) are stored in a RT-FIFO.
I would like the transition from one move to another to be as fast as possible. 
As I need to set values for velocity and acceleration I've decided against using a contoured move and am using the blend at deceleration function.

But I haven't quite understood how to achieve "flow control"".
Form my testing I've determined that if I send more then on straight line command while a move is in progress I get an error.

To circumvent that I've added an idle state in my state machine which checks if the current move is completed and then goes to get an new position point from the FIFO and then starts a new straight line move. But with this solution, I fear, that I will add an unwanted delay between moves. 

Thanks for the help.
Daniel

0 Kudos
Message 1 of 6
(3,016 Views)

For a continuous move you should not run a sequence of straight lines moves. Please check out the Contour move if you do not need a stop between every point. There are examples available in the NI Example Finder for the Contour move.

 

Regards,

Wolfgang Z.

0 Kudos
Message 2 of 6
(2,973 Views)

But as far as I've understood, a contoured move does not allow me to set the parameters velocity, acceleration and jerk, or did I miss something?

Why would you suggest against using many line moves?
I first wanted to use the offline trajectory generation, but moved away from that concept, when I found out I can't actually use that profile to move my drives.

0 Kudos
Message 3 of 6
(2,970 Views)
Solution
Accepted by topic author schpongo

I you run a contour move the parameters velocity, acceleration and so on are a result of the points you determine before. Please note that the time between the points you write to the drive is constant. If you have an array with the values [0, 10, 100, 1000] and you write the these values to the drive every 1 ms then the difference between point 100 and 1000 is larger than the difference between 0 and 10. The result is that the velocity is higher if you move from 100 to 1000 because you have to move from point 100 to 1000 in only 1 ms.

If you want to calculate the moves between the points before then you can calculate the trajectory offline and use it later in the contour move.

 

Please check the examples for Offline Trajectory in NI Example finder. This example demonstrates using the Solve Profile method to display a coordinate Velocity-Time contour move.

C:\Program Files (x86)\National Instruments\LabVIEW 2017\examples\motion\PropertyNodes\Offline Trajectory\Offline Coordinate VT Contour.vi

 

If you are looking for examples which use blending to sequence lines and arcs or blending to sequence lines without stopping motion then check out these examples.

 

C:\Program Files (x86)\National Instruments\LabVIEW 2017\examples\motion\PropertyNodes\Coord Arc and Line Blending/Coord Arc and Line Blending.lvproj

 

C:\Program Files (x86)\National Instruments\LabVIEW 2017\examples\motion\ExpressVIs\Blending Coordinate Arcs and Lines/Blending Coordinate Arcs and Lines.lvproj

 

Regards,

Wolfgang Z.

0 Kudos
Message 4 of 6
(2,956 Views)

I'm still wondering why you would suggest against blending several line moves together. 

I've looked at all the examples, but sadly they don't always lead to me fully understanding a certain "option". 


But if I've understood you correctly, if I create a motion Profile using the polyline straight line method and solve profile, the points that are generated, are generated in a way, that if I use them in a contoured move my velocity, acceleration and jerk parameters are "respected" ?

0 Kudos
Message 5 of 6
(2,952 Views)
Solution
Accepted by topic author schpongo

So to answer my own question.
Using the contour move with a set of points [][] generated by the straight line method using a polyline will result in a contour move which respects the velecoty, acceleration and jerk fed into the straight line method. 
This seems to be superior to blending several straight line moves, as all the point which are supposed to be traveled to are actually traveled to. 

 

If you combine this functionality with a contour table, one can achieve a nice continuous move, which can be updated while in progress.

Creating a polyline profileCreating a polyline profileupdating the contour table with the created tableupdating the contour table with the created table

0 Kudos
Message 6 of 6
(2,937 Views)