12-17-2014 12:23 PM
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.
12-17-2014 12:29 PM
I understand what you guys are saying but I'm a litlle confused on how to pull it off.
12-17-2014 12:29 PM - edited 12-17-2014 12:39 PM
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
12-17-2014 12:54 PM
I have this which is close, but still not exactly what I need.
12-17-2014 12:54 PM
this
12-17-2014 01:24 PM
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!
12-17-2014 01:26 PM
would this work?
12-17-2014 01:40 PM
Wow, I can't believe I didn't notice this was the same question I responded to a day or two back. Getting old...
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.
12-17-2014 01:48 PM - edited 12-17-2014 01:50 PM
@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...
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