LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a true Boolean to increment a counter

Solved!
Go to solution

I'm also not seeing a need for the second loop.  That sounds like it is just adding unneeded complexity.  Just use the shift register to hold your cound and increment it when your peak detection triggers a TRUE value.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 19
(1,450 Views)

I understand what you guys are saying but I'm a litlle confused on how to pull it off.

0 Kudos
Message 12 of 19
(1,443 Views)

isn't this the same question as last time post? bool crossing will take care of your dwel time and count just once....again, we don't know your application and sampling rates, there are many different ways to get the same results  Smiley Wink

Example_VI.png

0 Kudos
Message 13 of 19
(1,441 Views)

I have this which is close, but still not exactly what I need.

0 Kudos
Message 14 of 19
(1,417 Views)
0 Kudos
Message 15 of 19
(1,417 Views)

Actually now I figured out how to do it, thanks everyone for the help with the shift registers instead of trying to use two loops!

0 Kudos
Message 16 of 19
(1,388 Views)

would this work?

would this work .png

Message 17 of 19
(1,386 Views)

Wow, I can't believe I didn't notice this was the same question I responded to a day or two back.  Getting old... Smiley Sad

 

I made this little VI to show you the simple way and it's pretty much the same as Apok's solution but he added the DAQ code and mine has some nice bells & whistles in case you want to get fancy.

Chart.jpg

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 18 of 19
(1,373 Views)

@NIquist wrote:

Wow, I can't believe I didn't notice this was the same question I responded to a day or two back.  Getting old... Smiley Sad

 

I made this little VI to show you the simple way and it's pretty much the same as Apok's solution but he added the DAQ code and mine has some nice bells & whistles in case you want to get fancy.

 


ahhh...well no.If your value is above your set point and dwells more than the loop iteration, your case statement will add those count. Bool crossing eliminates that and counts only at the crossing and not during the dwell period above the set point.

 

edit: and i failed to recognize your bells and whistle  Smiley Very Happy

0 Kudos
Message 19 of 19
(1,368 Views)