LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using an encoder to read RPM

Since you changed the Digital Configuration to PeriodMeasurement, you don't need a shift register.

 

To round number to an integer, use the Round to Nearest functions (there are 3).  If you want 0.01 rounding, then multiply by 100 before rounding.  If you prefer 1995 to 2004 = 2000 rounding, then divide by 10 before rounding.  Scale back after rounding to restore of original magnitude.

 

To check if the speed is within range, use the In Range and Coerce function with your high and low limits wired.

 

Look at the help for the Waveform Chart to see how to show two waveforms.  You can use Build Array to combine separate signals onto one chart.  I prefer to include the upper and lower limits on the chart.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 11 of 23
(1,439 Views)

@Michael I was writing this and working on it and actually got to what you've suggested! 

Here is what I have now. 
Two inputs from encoders.(Disregard CTR5 for now) Both read out correct RPM. 

I used "round to the nearest" to clean up the decimal issue.

Got both of them to plot on the same chart. 

I used the "In range and Coerce" and set my upper and lower limits. 

I decided that due to the nature of my system, there is an alternating sin wave to the RPM, meaning I run 2000RPM with a +-/ 200rpm at 20hz, I took the mean of each speed and then divided to get a ratio. I think this will be easier to set my limits for this. 

I've yet to run it in practice yet, but hope to by the end of the week. 

 

I can't remember though, how do I change the boolean so I can wire to "STOP IF TRUE" and not "CONTINUE IF TRUE"? 

 

Thanks for all the help thus far!

 

RPM with alarm.JPG

0 Kudos
Message 12 of 23
(1,433 Views)

What DAQ Card are you using for data acquisition? There may be a very easy way to do this depending on the card that you have.

Tim
GHSP
0 Kudos
Message 13 of 23
(1,421 Views)

@ryan1776 wrote:

 

I can't remember though, how do I change the boolean so I can wire to "STOP IF TRUE" and not "CONTINUE IF TRUE"? 

 


Click on it!

0 Kudos
Message 14 of 23
(1,404 Views)

@aeastet wrote:

What DAQ Card are you using for data acquisition? There may be a very easy way to do this depending on the card that you have.



NI 9149 Chassis (ethernet) and a 9401 digital I/O

 

 

0 Kudos
Message 15 of 23
(1,396 Views)

@RavensFan wrote:

@ryan1776 wrote:

 

I can't remember though, how do I change the boolean so I can wire to "STOP IF TRUE" and not "CONTINUE IF TRUE"? 

 


Click on it!


Click on what? The stop button? I see that, you can change to "STOP IF TRUE" or "CONTINUE IF TRUE"

I need to be able to wire this to a stop button in a much larger VI that's wired for "STOP IF TRUE" which of course, the way it's written will stop all the time. I know there's a way to invert that. I thought it was with the "SELECT" function in the comparison pallet. But maybe not. 

This one....

ryan1776_0-1582114716743.png

 

Disregard...I got it. As I was writing this I remembered. 

ryan1776_0-1582114923364.png

 

 

0 Kudos
Message 16 of 23
(1,397 Views)

Disregard...I got it. As I was writing this I remembered. 

ryan1776_0-1582114923364.png


You remembered the Not Function from Boolean Palette?

Not.png

0 Kudos
Message 17 of 23
(1,387 Views)

@UliB wrote:

Disregard...I got it. As I was writing this I remembered. 

ryan1776_0-1582114923364.png


You remembered the Not Function from Boolean Palette?

Not.png


Sure didn't.....do now! Thank you! 

0 Kudos
Message 18 of 23
(1,385 Views)

@ryan1776 wrote:

@RavensFan wrote:

@ryan1776 wrote:

 

I can't remember though, how do I change the boolean so I can wire to "STOP IF TRUE" and not "CONTINUE IF TRUE"? 

 


Click on it!


Click on what? The stop button? I see that, you can change to "STOP IF TRUE" or "CONTINUE IF TRUE"

I need to be able to wire this to a stop button in a much larger VI that's wired for "STOP IF TRUE" which of course, the way it's written will stop all the time. I know there's a way to invert that. I thought it was with the "SELECT" function in the comparison pallet. But maybe not. 

This one....

ryan1776_0-1582114716743.png

 

Disregard...I got it. As I was writing this I remembered. 

ryan1776_0-1582114923364.png

 

 


Exactly.  That is what you asked for.  A way to change from Continue if True to Stop if True.

 

Now is sounds like you are asking for something else that you didn't ask for before now.

0 Kudos
Message 19 of 23
(1,367 Views)

@RavensFan wrote:

@ryan1776 wrote:

@RavensFan wrote:

@ryan1776 wrote:

 

I can't remember though, how do I change the boolean so I can wire to "STOP IF TRUE" and not "CONTINUE IF TRUE"? 

 


Click on it!


Click on what? The stop button? I see that, you can change to "STOP IF TRUE" or "CONTINUE IF TRUE"

I need to be able to wire this to a stop button in a much larger VI that's wired for "STOP IF TRUE" which of course, the way it's written will stop all the time. I know there's a way to invert that. I thought it was with the "SELECT" function in the comparison pallet. But maybe not. 

This one....

ryan1776_0-1582114716743.png

 

Disregard...I got it. As I was writing this I remembered. 

ryan1776_0-1582114923364.png

 

 


Exactly.  That is what you asked for.  A way to change from Continue if True to Stop if True.

 

Now is sounds like you are asking for something else that you didn't ask for before now.


Nope. That was exactly what I was trying to do. 

My first attempt using the "select" was a way, but long version. 

Then "UliB" give me a the simpler cleaner way I didn't know about.... hence the  "Sure didn't (know about it).....do now! Thank you!" Because I didn't know about it. 

0 Kudos
Message 20 of 23
(1,357 Views)