View Single Post
  #3   Spotlight this post!  
Unread 29-01-2012, 19:17
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: Labview Motor Ramp up/down voltage

Quote:
Originally Posted by windtakers View Post
How do you ramp the voltage of a motor in labview.
write the LabVIEW equivalent of this:

Code:
if (new>prev) {
  if (new<=prev+max) {output=new;} else {output=prev+max;}
  }
else {
  if (new>=prev-max) {output=new;} else {output=prev-max;}
  }
prev=output;
"new" is the current cycle's output you want to filter

"output" is the filtered value to output

"prev" is the value you output in the previous cycle

"max" is the max change in output you want to allow per cycle.


Last edited by Ether : 29-01-2012 at 20:57. Reason: duh. coding error
Reply With Quote