Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I load velocity real time?

Solved!
Go to solution

Hi, guys,

I'm working on my project now. Right now, I use PCI 7344, UMI 7764, AC/DC sevro motor, their Amplifiers and UAB Camera. 

I try to fix braiding point of braiding machine at x direction. Usually, the braiding point oscillates around a point in x direction.

At first, I need to get position of braiding point using USB cam, which I did. The positions I got from UAB cam is in real time.

Then I need to feedback the position to Motion control loop. I'm planning to use the position to calculate the responding velocity, which is in real time, too.

Motor will move by this velocity. So, it is supposed to get that motor will decrease or increase based on braiding point moving.

 I don't know if we can do this. I didn't find the relative post yet.

Anyway, thank you in advance. Any idea and clue is really appreciated.  

  

Guangli 

0 Kudos
Message 1 of 20
(5,164 Views)
Solution
Accepted by topic author guangli

Guangli,

 

as the feedback camera is coming from an USB camera and with the additiional calculations required to analyze the images, the real-time behavior of your system is probably not extremely tight. The delays and jitter of the additional motion control operations are probably in the same order of magnitude as the delays and jitter introduced by the image processing. If this is ok for you, could do the following:

  1. Load a maximum travel velocity and acceleration/deceleration values for the axis
  2. With "Load Velocity Override" you can scale the velocity between 0 and 100 %. The axis transitions from one velocity value to the next one at the acceleration value that you have set before.
  3. If you need to switch the move direction, you will have to use "Load Velocity" and "Start Motion". This operation is much more time consuming than loading a velocity override value, but typically you shouldn't have to call this sequence too frequently.

I hope this helps,

Jochen Klier

National Instruments

Message 2 of 20
(5,163 Views)

Jochen wrote:

Guangli,

 

as the feedback camera is coming from an USB camera and with the additiional calculations required to analyze the images, the real-time behavior of your system is probably not extremely tight. The delays and jitter of the additional motion control operations are probably in the same order of magnitude as the delays and jitter introduced by the image processing. If this is ok for you, could do the following:

  1. Load a maximum travel velocity and acceleration/deceleration values for the axis
  2. With "Load Velocity Override" you can scale the velocity between 0 and 100 %. The axis transitions from one velocity value to the next one at the acceleration value that you have set before.
  3. If you need to switch the move direction, you will have to use "Load Velocity" and "Start Motion". This operation is much more time consuming than loading a velocity override value, but typically you shouldn't have to call this sequence too frequently.

I hope this helps,

Jochen Klier

National Instruments


hi Jochen,
Thank you very much for your response. Here is my answers for your asking:
2, At first, I need the velocity at a constant value, V. Then, I will change it  at 90%~110%*V, which I guessed to satisfy the project. The delay is fine for me if the velocity can be changed per second.
3, I don't have to change the direction of velocity. 
I think I am able to do this, rihgt? I will try to do it today. I will tell you my result later.
Best!
Guangli  

 

0 Kudos
Message 3 of 20
(5,154 Views)

Hi, Jochen,

I think I got it. I just check the code now. The percent input is 0~150 rather than 0~150%, right? I didn't put it into the real project. I'm not sure if I can get the excellent result, yet. I will update it later.

One more question is: I just put motion loop to my Image processing loop. I don't use breakpoint, which is ok?

THKS!

 

Guangli 

0 Kudos
Message 4 of 20
(5,142 Views)

Guangli,

 

the breakpoint feature is meant to generate a trigger at a specific position while the axis is still moving. This allows to trigger other operations like an A/D conversion or an image acquisition exactly at certain positions of the axis. I don't know, if this is a requirement for your application but it could be a useful feature for you.

 

Jochen

0 Kudos
Message 5 of 20
(5,137 Views)

Hi, Jochen,

Actually, I want to run image processing loop first and then go to motion loop when I got the position of braiding point.

Right now, I only run them parallel. That spent me a lot time to define template because it already and always moves.

Does LV have the command, which can know it has the signal in position output of previous loop? Is it clear?

Thank you. 

0 Kudos
Message 6 of 20
(5,125 Views)

Hi Guangli,

 

there are several ways in LabVIEW to communication between parallel loops. For your application I would recommend to use queues or notifications.

Please refer to the shipping examples and to the LabVIEW manuals for more detailed information.

 

Regards,

Jochen

Message 7 of 20
(5,120 Views)

Hi, Jochen,
How was your weekend?
I didn't use queues for my parallel loop. I put my motion start in same while structure with image processing.
Right now, I cannot feedback my position to motion loop. At first, I cannot wire position output from IMAQ Match Pattern 2.VI to input of Load Velocity Override.vi. So, I use Convert to Dynamic Data Express.vi, which is shown in the attached screen shot. When I  read the velocity, I didn't the responding changing with input.

 Is something wrong with this part?Smiley Sadbraidingpointpattern_screenshot.jpg

0 Kudos
Message 8 of 20
(5,089 Views)

Hi Guangli,

 

there is definitely something wrong with this part of the code. Your FOR-Loop outputs huge data arrays with 10 million data points and you try to pass this data to the Velocity Override function.What exactly do you expect to happen here? Velocity Override accepts a single Override Percentage value. Passing a data array doesn't make sense here.

Please note, that the FOR-Loop output's it's data after all iterations are finished.

 

Regards,

Jochen

Message 9 of 20
(5,079 Views)
I change my code, which is shown in first figure. It kind of works now.But, the velocity update not smoothly. Its figure is shown in 2nd figure. Is this right? I mean velocity. Like you said, velocity just likes this if we use velocity override?
Thank you!
velocityupdate.jpg
braidingpointpattern_screenshot.jpg 

 

0 Kudos
Message 10 of 20
(5,068 Views)