LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture data at set RPM intervals

This one should be easy, but it's driving me crazy!  I have a decreasing rpm signal.  I want to monitor that and then at certain intervals, say every 1 Hertz, capture some values and write them to a file along with the rpm at which that data was captured.  At 100 rpm, the capture can cease.

0 Kudos
Message 1 of 24
(4,202 Views)

My main obstacle for creating this code is not having real signals.  Can anyone give me code to generate a signal that will go from 3600 rpm to 0 rpm while changing amplitude and phase?

 

0 Kudos
Message 2 of 24
(4,174 Views)

Hi Cory,

 

Can anyone give me code to generate a signal that will go from 3600 rpm to 0 rpm while changing amplitude and phase?

Can you show an image of how that signal should look like?

How does a signal look like with a unit of "rpm"? Pulses? Sine waves? How do you define "phase" with a single signal?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 24
(4,167 Views)

Thanks for the reply.  What I am trying to do is very basic.  I have a bandpass filter on the time waveform signals.  I then use the single peak detector to find the amplitude and phase, relative to a tach signal.  I monitor the rpm until it decreases 20 rpm.  At the time, I write the amplitude, phase, and rpm from four separate channels into an array.  I continue the process every 20 rpm until the rpm reaches 100 rpm, then I stop the collection process and write the array to a file.  I will post the section of the vi that includes the signals I am saving.

Thanks!

Ron

0 Kudos
Message 4 of 24
(4,133 Views)

The answer to your question about a 'smart' signal generator would be one that could generate and store a typical single degree of freedom natural frequency.  In other words, as the rpm decreases from 3600 to 100 rpm, the magnitude would increase at a natural frequency location, say 1800 rpm, and the phase would go through a 180 degree phase shift , with the 90 degree point residing at the peak of the resonant magnitude.

 

0 Kudos
Message 5 of 24
(4,132 Views)

I worked for a firm that produced two channel and single channel fft's for decades.  They always said the same thing, what good is phase on a single channel?  That's because they utilized the two channel fft's to look at phase changes across the entire frequency spectrum.  The single channel phase is utilized to compare the heavy spot on a rotor (maximum amplitude) with a point on the circumference of the rotor (tach pulse from the shaft). 

0 Kudos
Message 6 of 24
(4,130 Views)

This is the screen dump of the uncompensated and compensated orbits.  The two lines of magnitudes and phases along the bottom are what I want to save every 20 rpm during the coast down of the motor.

0 Kudos
Message 7 of 24
(4,125 Views)

Hi Coryman,

 What hardware are you using to monitor the data?  Is it just that you want to simulate the data and are unsure how to do so with LabVIEW code? 

DillonL.
0 Kudos
Message 8 of 24
(4,106 Views)

Hi Cory,

 

what I want to save every 20 rpm during the coast down of the motor.

Some simple pseudocode:

var1 := rpm MOD 20
IF var1 < previous value of var1 THEN
  save current calculation results
ENDIF

You need a shift register (or feedback node), the Q&R function and a case structure…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 24
(4,101 Views)

Tiny correction:

 

The Q&R function in LabVIEW is often used for 'modulus' operations but it actually has 2 outputs.  R corresponds to the MOD function in the text pseudo-code.  You'll actually want to use the Q output which is more like "int(rpm / 20)".

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 10 of 24
(4,092 Views)