View Single Post
  #2   Spotlight this post!  
Unread 15-02-2012, 14:57
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: PID Velocity Control

Quote:
Originally Posted by j.cole View Post
Should this code work to get the velocity of the motor using an encoder. (See pictures they should explain better than I could). Plug that number into the process variable and see if it works. I'm going to increase the refresh rate to get a more accurate reading.
Does the "50" in Capture1.PNG mean 50 milliseconds? If so you are copying CurrentRotations into PreviousRotations every 50ms, which is 0.05 seconds not 0.5 seconds (as stated in Capture.PNG).

Can't you just use a feedback node to compare CurrentRotations to the previous value?

Reply With Quote