Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling two motors

Hello all,

I have two motors with a dial disk (0-360 degree) attached to their shafts. There is a hole on each disk on degree 0 that are used to detect their speed separately by photo sensors. I set a speed for motor1 and control it by sensor1. After a while, its speed will be at the desired speed using the sensor1 and a control loop. Then motor2 starts to spine. By another control loop, it can adjust its speed with motor1. Until this step, everything is straightforward and clear. I have a strobe that flashes according to motor1 period. Fir example if the motor1 period is 1ms the strobe is flashing every 1ms so motor1 disk seems constant. If two disks on two motors seem constant, it means they are at the same speed. Now, I have two motors at the same speed. At this step, I want to make two holes on two motors to the same degree. For instance, if hole on motor1 seems constant at degree 90, the hole on motor2 should be at the same position(the phase of two motors should be the same.)

I think I should use cascade control but I do not know how can I use it in this situation.

Could you help me?

0 Kudos
Message 1 of 8
(3,297 Views)

Hi Mmehrabin,

 

What kind of motor are you using? DC motors? Stepper motors?

 

Are you using any NI hardware and software?

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 8
(3,249 Views)

Thank you for your reply. I use two DC motors and NI cRIO FPGA. 

0 Kudos
Message 3 of 8
(3,239 Views)

Can you also let me know what c series module you are using to read the sensors and control the motors?

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 8
(3,232 Views)

NI 9381 for motors and I used PWM, NI 9401 for optic sensors.

0 Kudos
Message 5 of 8
(3,224 Views)

Thanks for that information! Right now you have a tachometer. Like you mentioned already, you were able to measure the speed using the disk with a hole in it. In this case, you need something that measures position. Technically, the setup you have right now is somewhat measuring position as well, just not very accurate. The one hole on the disk marks only one spot, everytime the motor moves over the hole, you know it completed one revolution. To make it more accurate, you need more holes or more position markers. Instead of poking more holes on your disk, I think an encoder is much better. NI sells encoders, but you can get cheaper ones else where. Once you can accurately measure the position of the two motors, syncing them will be a lot easier. 

 

Can you also let us know what your overall application is and why you are using DC motors over steppers? How fast are you motors spinning?

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 8
(3,210 Views)

Thank you so much for your reply. My exact question is how I can have two parameters to control a motor. The first parameter is its speed and the next one is the position of the hole. We have done this project in C programming on Arduino by changing timing interrupt in timers. I think it can be implemented by a nested or cascade control loop in LabVIEW. There should be a loop to control the phase inside of another control loop that controls the motor speed. I can not provide encoder for the motors. 

0 Kudos
Message 7 of 8
(3,206 Views)

Can you explain in more detail how you did it with the arduino? 

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 8 of 8
(3,192 Views)