LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare analog signal with threshold in real time

Solved!
Go to solution

Can you please check what I did? for the counter, I find problem. And for the voltage I'm not sure if it's correct. Thank you

0 Kudos
Message 11 of 22
(931 Views)

That one's saved in 2018 again (sorry!)


GCentral
0 Kudos
Message 12 of 22
(928 Views)

Sorry! This is the file on 2015 version

0 Kudos
Message 13 of 22
(924 Views)

So I guess now you're happy with the voltages and locations, but for the count you need to connect it to the new count each time (not an array of coerced/converted times). So just connect the "# Found" to the Add instead of the I32 from the Times, and you'll be set.

 

With that minor modification, it should do what you want 🙂


GCentral
0 Kudos
Message 14 of 22
(917 Views)

Ok, I will see. I have quesion: Now the location and voltage are for the values greater than thershold because for the voltage and location, it seems for me that they are no relation with comparaison, juste to more understand.

And my quesion is if I would do the same thin for values lower than thershold, I do the same thing for location and voltage. End for values equal to threshold. Thank you

0 Kudos
Message 15 of 22
(914 Views)

Can you see the file, I would see what the programm gives as results, I stock them in TDMS file. So, I discover that the location, voltage don't have any relation with comparator. You can see the programm to understand what I mean.

0 Kudos
Message 16 of 22
(908 Views)

I would that the programm detect the location and voltage where the voltage is greeater than threshold, and these values I think depend on sample frequency. And at the end, count how many time the values were greater than threshold. Thank you for your help

0 Kudos
Message 17 of 22
(906 Views)

@mimi99 wrote:

Ok, I will see. I have quesion: Now the location and voltage are for the values greater than thershold because for the voltage and location, it seems for me that they are no relation with comparaison, juste to more understand.

And my quesion is if I would do the same thin for values lower than thershold, I do the same thing for location and voltage. End for values equal to threshold. Thank you


Yes - that's true. The evaluation is being done by the Peak Detector, because that seemed to be working for your application. If you need to split the array of data into multiple different criteria, for example, <0.5, between 0.5 and 1, more than 1, etc, then a different method should be used.

 

Here's a possible modification:

thresholding.png

 

Note that part of the output to TDMS is broken in this modification because I'm using a 1D array of doubles, which don't directly contain time information (I'm not sure what the "dates" value was really anyway?)

 

You could make the same modification you already made with the shift registers to log them over multiple iterations.

 

Edit: To get the counts in this case, take the Array Size of the "Above", "Below" and "Between" arrays as needed.


GCentral
0 Kudos
Message 18 of 22
(904 Views)

I think the peak detector is not necessary for my programm, I will remove it. So, How Can I do? Have you an idea?

0 Kudos
Message 19 of 22
(903 Views)

Thank you so much

I will see your programm

0 Kudos
Message 20 of 22
(901 Views)