02-11-2015 09:30 PM - edited 02-11-2015 09:47 PM
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.
02-12-2015 07:55 AM
For location control, you will need to have an encoder of some sort, preferrably one embedded with the motor.
02-12-2015 08:02 AM
If you just want the PWM, then you should be set. Use a scope to test the PWM output signal first, though.
02-15-2015 10:48 PM
Hey Timothy,
I've got some problem with the FPGA modification. I've followed all the instructions above. Is the modification valid for myRIO ?
02-16-2015 08:23 AM
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
04-08-2015 06:11 PM
Hello gents,
I'm trying to PID control a dc motor with quadrature encoder using myrio, Is there any help?
04-09-2015 08:46 AM
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
04-09-2015 12:07 PM
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
04-10-2015 04:40 PM
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.
04-13-2015 08:23 AM
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,