Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

New target point during motion

Solved!
Go to solution

Hi,

 

I'm new to Softmotion 2015, I used to work with Softmotion 2009.

 

I've tried the new version yesterday and it is working so far. The only thing I have a problem with is when the axis is in motion and I change the setpoint to a new target point, the function wait until profile is complete before giving the new setpoint.

 

How can I change target point during a motion, when the profile is NOT completed. When the new target point is in the opposite direction = decelerate and go do the new setpoint, if in the same direction, just continue and go to the new setpoint.

 

I made a support request but didn't have a quick answer so far. If I remember, this was working well with the old version of Softmotion.

 

Thank you,

Patrick

0 Kudos
Message 1 of 7
(4,189 Views)

Hey paubine,

 

I have a few questions for you:

 

1. What hardware/physical setup are you using?  What drive?  What controller?  What kind of motor are you using?

 

2. Do you have access to the old version of Softmotion you were using?  Do you have access to the program that would show us what you did?

 

 

Thanks!

Eric
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(4,154 Views)

Hi Eric,

 

I'm using an EtherCAT 9144 chassis with a 9263 analog ouput module and a 9411 diff module. A CVS 1458RT is used as a EtherCAT Master.

The drive I'm using is an Allen Bradley Ultra3000 analog drive and it's a generic servo motor.

 

I'm using the lastest version of SoftMotion Module. I use the "straight line" express VI, I also tried the Function Block "Straight Line" but I had problem deploying if the "resource" was a terminal?

 

If I use the express VI, I can send a straight move command and my servo is working perfectly. The problem is that the fonction is waiting the position profile to be completed before getting a new target point (while loop stop and wait). I want the function to be ready to receive a new target and that it adapt the trajectory even during a motion.

 

Thank again for your help.

 

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

Hey paubine,

 

It looks like you can use asynchronous Straight-Line moves to achieve the functionality you would like.  I've attached an example of a very simplified instance that shows that calling a second Straight-Line Move will not wait until finished to do what you'd like.

 

The VI here first references the Axis of motion, and then gives a Straight-Line Move command.  This starts the move while the bottom loop is constantly reading the position of the motor.  The error wire fed out from the first Straight-Line Move express VI enters a while loop that iterates until the "Stop" button is pressed.  Once the "Stop" button is pressed, it will allow the second Straight-Line Move Express VI to begin, which will take over control and move the motor appropriately as shown by the position indicator.  You will need to be sure to switch from Configuration Mode to Active Mode before running.  

 

I'd like to add: This example is a very simple proof of concept.  You will need to make modifications to implement this in your code.  I cannot guarantee this will work as is in your current application.

Eric
Applications Engineer
National Instruments
0 Kudos
Message 4 of 7
(4,132 Views)

Hi Eric,

 

Your example is working fine but not mine.

The same function is inside a loop case... I don't really understand what's going on.

 

When the VI is running at first, I press "start move" and it will go at the setpoint. If I change the setpoint and press on "start move" again, nothing is happening.

 

thanks for helping.

0 Kudos
Message 5 of 7
(4,125 Views)
Solution
Accepted by topic author paubine

The 'Execute' boolean is rising edge sensitive. By wiring a 'True' constant to it, you will never see a rising edge so it will never start a new move. The easiest way to accomplish what you are trying to do is by using the property/invoke node API. Look at the 'Axis Line Move State Machine.vi' shipping example for how to use the property/invoke node API. Long term, it is definitely the way to go when building a real motion application.

0 Kudos
Message 6 of 7
(4,112 Views)

Thanks a lot.

That's what I was looking for.

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