Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I control 8-axis motor synchronously in a few miliseconds ?

H every body~   I want to build a 8-axis motor control system by PCI-7358 motion control card ~ But i can't find the suitable function block in NI-motion.   It spent almost nearly 25ms in tracking control !!  The desired optimal time cost is less than 10ms~  How can i do ?


由 bahamurt 在 03-21-2008 07:05 AM 上編輯的訊息
0 Kudos
Message 1 of 10
(5,733 Views)
bahamurt,

do you want to start the axes simultaneously? This can be done by using Start Motion.flx



If this is not the point, please give us some more information about what you want to accomplish.

Thanks,
Jochen Klier
National Instruments


Message Edited by Jochen on 03-25-2008 09:59 AM
0 Kudos
Message 2 of 10
(5,706 Views)
Thank you for your answer~  My time consumering at one point in trajectory is over 20ms.                                                                                   I use the NI-Motion control block to achieve my desired performance, but the build-in function " Load Target Position" , "Load Velocity" , "get encoder position" , "get encoder velocity" can't achieve time interval less 10ms in point-to-point moving on 8-axis setting.                                How can I improve my project to reach my goal ?                   My project is in the attachment.  You can open the "test_motor__input_encoder" file to see what I do.  The time loop will be "Finish late" in every 10ms setting~  THANK YOU VERY MUCH!!
0 Kudos
Message 3 of 10
(5,696 Views)
baharmurt,

let's start with some comments on your code
  1. Always use the error cluster consistently in your subvis.
  2. Use a left to right wiring scheme (inputs on the left, outputs on the right).
  3. Use clusters to reduce the number of single parameters to be passed to your subvis.
  4. You use Set Operation Mode.flx in each vi in each iteration. This is probably not necessary and it consumes a lot of time.
  5. Where are the Start Motion.flx vis to commit the paramater changes?
With this approach you won't be able to get faster loop rates and the question is if this is necessary at all.
Let's step back for a while and have a look at what you try to accomplish from a application's point of view. Obviously you try to update your move constraints quite frequently. What's your goal? Are these new velocity and position values calculated in real-time while the axes are moving or could you pre-calculate the new values before starting the move?
In this case you should think about Contouring (please refer to the shipping examples).

What about the encoder readings? Do you need to acquire these values in a timed deterministic manner or do you just need them as a visual feedback on your screen? In the latter case the timing shouldn't be an issue. Otherwise you should think about either High Speed Capturing (examples!) or about using an external counter device.

Regards,

Jochen
0 Kudos
Message 4 of 10
(5,690 Views)
Thank you for your suggestions !!   The loop time speed is close to 16~17ms in each iteration of command and getting encoder.  Although the time performance don't reach my  expectancy, I can accept the result. The other problem is if I use that Labview Real-time module with Windows RTX system, I don't know whether the time will speed up obviously ? Could the above architecture reach my goal ? Thank you for your help one more time!!  
0 Kudos
Message 5 of 10
(5,668 Views)
LabVIEW Real-Time for RTX is obsolete and it doesn't support motion control boards, so this is not an option. In general real-time operating systems don't speed-up the execution of a program, but they execute them deterministically. That means that on a real-time operating system the timing of the loop iterations in a time-critical process is very stable, whereas on a non-real-time OS there is a lot of jitter caused by other processes that interrupt the loop operations in a non-deterministcal manner.

Again: There might be a better way to reach your goals, but as long as you don't tell me about the requirements of your application, I won't be able to give you advice for alternative approaches.

Jochen
0 Kudos
Message 6 of 10
(5,660 Views)

First, I deeply appreciated your kindness.            My control requirement is the 8-axis robot manipulator motion of the 3-D space. The trajectory of joint space(8-axis motor) is already calculated previously by our trajectory planning algorithm, so the calculations of trajectory will not affect our real-time control. The job what I do is just load the calculated 8-axis trajectory in Labview Motion Control with my control algorithm. This is the reason why I want to keeps a record of my encoder information(my control algorithm will require this data: angle error, velocity error) and I can use it to improve the trajectory tracking. Now the trouble of the control loop time is too long in one point(8-axis) of the trajectory to the next (set motor parameter and get encoder both cost 30ms). This time response is insufficient for my needs (less than 100Hz...) and will cause the bad phenomenon of its motion. My question is how can I reach my goal by the PCI 7358 NI-motion card build-in function of LabView ?  Could other methods be effective?  Thank you for your patience at last !!

0 Kudos
Message 7 of 10
(5,656 Views)
bahamurt,

thank you very much for this explanation. So just to check if I have understood your application requirements correctly here is a brief summary:
  1. The general trajectory of your moves is calclulated prior to the move itself.
  2. During the move you read back velocity and position information and use them in a superordinate control algorithm to refine the trajectory on the fly.
Please correct me, if I'm wrong.
Still this doesn't give me a clear picture of your application, so please answer these questions:
  1. Why do you have to refine the trajectory during runtime.
  2. What are the external impacts that cause your real trajectories to deviate from the pre-calculated trajectories?
  3. Could yo please give me an idea of what you are doing from an application's point of view? Are you trying to track a moving object?
Thanks,

Jochen
0 Kudos
Message 8 of 10
(5,642 Views)
Thank you, Jochen. You always answer me in this problem.
First, your understanding is correct. I put the system architecture in the attachment.
My team will build a robot motion system which combines sensing and moving.
There are two parts of control mission: staic motion and dynamic motion.
Dynamic motion will execute obatacle avoidance and moving object tracking by mobile robot.
Static motion will execute the static goal trajectory tracking by 7 degrees of freedom robot arm.
The robot arm control is my work in my lab. So the (2) and (3) questions you said maybe there are the
dynamic moving and tracking mission in the future because the task will need coordination of vision and detection.
The question (1) what I need encoder record is in order to print trajectory history information to test and verify
my control algorithm. It can improve robot arm static motion tracking in 3D.
My primary target is a robot arm motion control architecture for static object grasping requirement of mobile robot.
We already have used PCI-motion control card to control mobile robot. Next target will coordinate robot arm control
by the same motion card (we have 2 pieces of them).
But the time of control loop of 7-axis robot arm doesn't reach my goal (Desired fequency : up to 100Hz~1000Hz in a loop).
That is problem that I use NI-motion control card presently.
0 Kudos
Message 9 of 10
(5,628 Views)
Thank you very much for the overview picture. This looks like a great project and NI will be very happy to help you to become successful with it.

With this said I want to express my doubts that you will be able to reach your goals with your current hardware setup. NI motion control boards are great for moves with a predefined trajectory. If you need to do rapid on-the-fly trajectory adjustments with real-time requirements you should think of using another platform e. g. a PC or a PXI-system running LabVIEW Real-Time and maybe also LabVIEW FPGA in combination with multifunction DAQ boards or R-Series boards. Another interesting platform could be Compact RIO.

These components in combination with the NI SoftMotion development module provide the flexibility and the performance that you need for your application.

If you consider this approach as an option, you should discuss your application with an NI consultant in your region. In general I think that we have reached a point in this discussion where you should switch to direct communication with NI. I would love to talk face to face to you, but it looks like you are located quite far away from Germany so this doesn't seem to be an option.

Still, I would be more than happy to help you to find a capable person at NI who can help you in a more direct way. If this is an option for you, please send me a direct email (jochen.klier@ni.com) and tell me in which country and city you live.

Thanks,

Jochen


0 Kudos
Message 10 of 10
(5,625 Views)