04-09-2014 11:07 AM
Hello All,
I created Labview VI to PID control the angle position of DC Motor (12V gear motor) (0 to 360 deg). free rotate potensiometer (2kohm) is attached to the motor shaft for feedback signal supplied with 5v, the potensiometer is reseting at 0 degree. Ardunio board is used just as I/O board. Motor drive is used to operate and control the motor direction using two PWM signals (IN1 & IN2) from ardunio.
IN1 IN2
PWM PWM FWD
PWM 1 REV
1 1 OFF
I tested the motor with ardunio and labview vi to control speed (PWM duty cycle) and direction , it works fine.
when i used the motor position PID control (attached) , i am not geting any good response , the motor keep rotate in forward direction , and sometimes in the reverse direction, and not stop on the desired angle. I changed the PID parameters with no vail.
attached are snapshoot of the VI and the labview file
urgent help is need as i need to submit it for my project
05-12-2014 09:57 AM
Just as an FYI, all your Arduino VIs should be inline (the Arduino resource wire should never branch) and therefore you should only have one Close VI.
Regarding the PID controller, I see no loop timing. When using PID control, you need to have a consistent loop execution rate. When you do implement the loop timing, you need to make sure that it is long enoug for all the VIs in the loop to execute (when using LIFA or LINX, your loop rate will be limited by those VIs).
Also, you should consider switching to LINX instead of LIFA. LIFA is no longer officially supported. Find info about LINX at http://www.labviewhacker.com/linx.
04-03-2015 05:19 AM
did you complete ur vi? as i have the same problem