Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

High speed torque control with PCI-7342

I am trying to control a motor by having it go through a predefined torque profile. Ideally, I would like the profile sample rate to be 1ms or better.

The motor drive is configured for torque control, so the +/-10V output from the 7342 corresponds directly to torque of the motor. I'm not worried about closed loop control, so there is no torque feedback.

My first attempt was to simply drive the DAC channel directly using the Load DAC vi and continually update it with new values. Unfortunately, this only updates the torque value once per scan, and the vi will not run any faster than about 5ms per iteration. Also, every time the DAC value is loaded, there is a very sharp step in the torque output, not a smooth transition.

My seco
nd attempt was to take advantage of the contour move capability to allow the controller to update the output at a much higher rate. By setting the PID controller to only proportional control, the "position" demand actually becomes a torque signal. However, there are two problems with this. One is that the minimum interval time for contouring is 10ms. The other problem is that the 7342 controller uses spline interpolation for contour moves, when the profile has sharp corners at 10ms, the splining artifacts become rather significant.

Is there any way I can achieve decent torque control at 1ms with this hardware?
0 Kudos
Message 1 of 6
(3,344 Views)
Those are two ways to control a motor drive in torque mode. The limiting factor of loading a DAC value is the software processing speed and PCI bus - have you tried using a faster computer? Attached is a simple VI that shows torque control through the DAC - you're probably already using something similar to this, but just in case.
As for the contouring, unfortunately there is no way to not use the cubic splining if it is unsatisfactory. Have you tried looking into using buffered or blending moves? Blending might help with the sharp corners, and buffering could speed up the interval time.

Hope this helps-
Julie S
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,344 Views)
Thanks for the suggestions.

The VI you attached is the same method I used.

I'm using a 2.4 GHz computer, so there isn't anything fast enough to make a large difference in processing time of the VI.

I am currently using buffered moves for the contouring. While the moves are no longer dependant on cycle time of the VI, the absolute minimum update time allowed by the Config Buffer VI is 10 ms.
0 Kudos
Message 3 of 6
(3,344 Views)
Could you post a section of your code that runs so slowly with the Load DAC VI? You are correct that the minimum update time for Config Buffer is 10ms, but the Load DAC should be quick enough for you. Perhaps instaed of loading just the next torque value, you can have an algorithm that interpolates values in between to gradually update the torque value instead.

-Julie S
0 Kudos
Message 4 of 6
(3,344 Views)
Here is the vi I was using. It already does basically what you suggested. The user describes the desired torque profile in the table, and the program interpolates the output value for each step.

Even though the inner loop of the vi is fairly small, it only runs about every 5 ms at full processor utilization. Even though the vi interpolates, it can still only sends step commands every 5 ms cycle, which is nowhere near as smooth as the motor control loop running at 125 microseconds. Unless there is some method of compiling or optimizing the code, I don't know any way to run it faster.
0 Kudos
Message 5 of 6
(3,344 Views)
This VI has quite a bit of other processing - have you tried using just the DAC VI and timing that? If the stripped down version runs at the same speed, then that is as fast as the software can communicate over the OS and the PCI bus to the controller.

The torque control is software timed, so you won't be able to get it as fast as the hardware timed controller loop. Torque is generally used without feedback, so it just outputs the torque value and does not monitor it.
0 Kudos
Message 6 of 6
(3,344 Views)