Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

rpm motor feedback

Ok so maybe a more current RPM reading would help but I think my lag is in my PID loop or some software timing issues.  At the start of a new minute I want to immediately change the motor setpoint and compare that with the delayed tach signal in the PID loop and then do an AO Single Update to output a 0-10 voltage to motor controller which then outputs a proportional 0-90 volt signal to the motor.
0 Kudos
Message 11 of 17
(2,079 Views)
I think I have figured out the lag in my control signal.  The code is performing a raw step based on a linear equation relating setpoint to output voltage.  This is not a PID loop.  The error between setpoint and PV only determines if we should do the raw step or not.  The problem is the slope and intercept are off.  Does this sound right?  The code also does fine tuning using the feedback.  How do I determine if the fine tune settings are right?
0 Kudos
Message 12 of 17
(2,000 Views)
What do you mean by raw steps? Can you post your code? How did you determine the linear equation? I assume you just did calculated it from you voltage values and position. Or is this an equation that was in the user manual for your tach?

What kind of fine tuning are you doing?
--Michelle

National Instruments
0 Kudos
Message 13 of 17
(1,985 Views)
The linear equation relates the output RPM to the output voltage from 1124.  I am measuring the output RPM with a tachometer so I am trying to fit the equation to the tachometer reading when the motor is sent discrete voltages.   My current factor and offset values dont fit the measured RPM from the tachometer too well.  This equation determines my raw voltage step.  I do a raw step when the error between setpoint and pv is large.  When it is small I do a fine tune step that changes the output voltage by a little to correct the motor RPM.  I really dont even think I need feedback because the speed is so stable over the 10-40 RPM range.
0 Kudos
Message 14 of 17
(1,969 Views)
Are you able to post your code so that I can see these two step - raw step and fine tune? Is your data linear? Maybe it isn't as linear as you think, or maybe there is an offset you haven't accounted for and that is why you linear equation is not lining up.
--Michelle

National Instruments
0 Kudos
Message 15 of 17
(1,957 Views)
So we have narrowed it down to a timing issue where we see the motor getting updated 30 seconds later than it should (this usually only happens 1 out 100 times).  I think there is a clock error as we notice the Windows time is not right and it seems to change its rate over time.  Early in the 60 minute run you dont really see the delay in the updating but you see it later in the run.  If the clock error is cumulative then this makes sense.  Now, Get Date/Time function is what I use to determine when an update is due so if the CPU clock is off then would that show up in timing errors in my Labview VI?  What is the clock that sets that function?  I have a 6071E multifuction DAQ card and running in Windows ME and yes I know this is not deterministic but I think the clock is not accurate.  How can I fix the accuracy of the clock?
0 Kudos
Message 16 of 17
(1,902 Views)

Get Date/Time is pulled from your system clock. Since Windows is non-deterministic you cannot rely on an control output to be updated when you expect it to be. This goes for the first time or the one hundred and first time. I think this is the main issue here. If you need better control as far as timing goes, go for real-time. It sounds like you are getting the best you can with the setup you have. Can we see your code?

Message Edited by Michelle_B on 01-27-2009 09:34 AM
--Michelle

National Instruments
0 Kudos
Message 17 of 17
(1,880 Views)