02-18-2020 12:25 PM
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.
02-18-2020 01:30 PM
@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!
02-18-2020 02:56 PM
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.
02-18-2020 10:57 PM
@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!
02-19-2020 06:11 AM - edited 02-19-2020 06:19 AM
@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
02-19-2020 06:18 AM - edited 02-19-2020 06:22 AM
@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....
Disregard...I got it. As I was writing this I remembered.
02-19-2020 07:10 AM
Disregard...I got it. As I was writing this I remembered.
You remembered the Not Function from Boolean Palette?
02-19-2020 07:12 AM
@UliB wrote:
Disregard...I got it. As I was writing this I remembered.
You remembered the Not Function from Boolean Palette?
Sure didn't.....do now! Thank you!
02-19-2020 09:45 AM
@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....
Disregard...I got it. As I was writing this I remembered.
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.
02-19-2020 12:13 PM
@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....
Disregard...I got it. As I was writing this I remembered.
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.