Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using more than 4 quadrature encoder input for MyRIO

Solved!
Go to solution

Hey dess1088,

 

Thanks for your help. Actually, I am confusing about the pins connections in the attachment. Before this, I have connected my motor encoder through MSP port (port C) but there is nothing happen. The encoder doesn't gives a signal. Did you directly connecting the motor encoder through this port?. I have used SPG30-300K motor and FD04A as motor driver.

 

 

0 Kudos
Message 21 of 33
(6,140 Views)

For location control, you will need to have an encoder of some sort, preferrably one embedded with the motor.

0 Kudos
Message 22 of 33
(6,126 Views)

If you just want the PWM, then you should be set. Use a scope to test the PWM output signal first, though.

 

0 Kudos
Message 23 of 33
(6,124 Views)

Hey Timothy,

 

I've got some problem with the FPGA modification. I've followed all the instructions above. Is the modification valid for myRIO ?

0 Kudos
Message 24 of 33
(6,096 Views)

Hey Nabieyl,

 

It should be able to modified without trouble. Can you be more specific with your problem? And can you send screen shots of the errors/code? I currently do not currently have access  to LabVIEW.

 

Tim

0 Kudos
Message 25 of 33
(6,083 Views)

Hello gents,

I'm trying to PID control a dc motor with quadrature encoder using myrio, Is there any help?

0 Kudos
Message 26 of 33
(5,897 Views)

Good morning Horus55,

 

That is a very vague question. What part of the motor are you controling? I've posted a code I used to control the number of revolutions of the motor.

 

The quadrature encoder attached to the motor outputs a series of step signals along with a directional bit. I counted the number of ticks to figure out how far the motor had turned. 

 

Then, I subtract the actual distance turned from the desired distance turned. This gives the error value (how far the motor still needs to turn).  This becomes the input for the PID, which will output a value. The output from the PID is then sent  back to the Motor driver as a PWM signal. 

 

That is a very brief and general idea of PID control. Be more specific next time.

 

Tim

0 Kudos
Message 27 of 33
(5,871 Views)

Horus55

 

I found another thread specifically in PID in myRIO, here is the link. Since the PID design will be directly related with the model of your specific system, the information you find will probably be very general and you will need to adapt it to your project.

 

WenR

0 Kudos
Message 28 of 33
(5,867 Views)

The motor has 2 PWM, one for clockwise and the other for counter clockwise. I wanna control the position but dunno how!
Is that enough?
Thanks in advance.

0 Kudos
Message 29 of 33
(5,852 Views)

Hi Horus55,

 

I'm afraid your question is still pretty vague. 

 

If you have two PWM lines (one for forward and one for reverse), you could make two subVIs / sections of code - one to generate a PWM signal for moving forward, and another for moving in reverse. I personally think Tim's post (dess1088) does a great job of addressing a general application architecture for motion control. Without a more specific question, we can't really provide a more specific answer.

 

Thanks,

Andrew T.
"His job is to shed light, and not to master" - Robert Hunter
0 Kudos
Message 30 of 33
(5,828 Views)