Showing results for 
Search instead for 
Did you mean: 

Basic level trigger detection

The thing I'm trying to do in this VI is read data from an arduino. I have 2 sensors who give a signal around 500 when not triggered. When this signal becomes above that it should store the time it was triggered. This needs to be done for both sensors, so that I can calculate the time difference for a speed calculation later on.
But this doesn't seem to work for some reason. The threshold detector doesn't work accordingly. When the signal becomes above 540, it doesn't detect it except for a few times.
The program needs to work continuously and I'd like it to be send to a second pc via wifi.


If any more info is needed I'd be happy to answer.


Thanks in advance!





0 Kudos
Message 1 of 6

What does your data look like? If it goes from below 540 to above 540 you should see a trigger. If it goes from above 540 to below 540, you will not see a trigger. If all points are above 540, you will not see a trigger.

0 Kudos
Message 2 of 6

The data is basically between 490-510. When the sensor is triggered this shoots op to about 600 or higher

0 Kudos
Message 3 of 6

Please post a waveform where the function is not working as you expect.

0 Kudos
Message 4 of 6

This is how it looks, the peak are activated manually by triggering the sensor.


The basic level trigger does seem to work better now that I'm on another PC. However it still doesn't send a value (t) from the basic level trigger


0 Kudos
Message 5 of 6

You are showing charts though, which show the current array + history. You need to look at a graph to see what is actually being put in to trigger detection VI.


If you need to analyze a stream of values, rather than a whole waveform, you may want to look at "threshold detector ptbypt".

0 Kudos
Message 6 of 6