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!
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.
This is how it looks, the peak are activated manually by triggering the sensor.
The basic level trigger detection.vi 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 detection.vi.
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".