02-22-2023 05:59 AM
I hope someone can help with this issue. I'm still new to Labview and hope someone can help create this code.
I have a device (single photon detector) that generates a pulse (5V) if it detects a photon, and no pulse if there is no photon. The rate of these pulses would be 5kHz max.
The code should work as follow: if a 5V pulse is detected, it should return 1, if no pulse is detected, should return zero. Then an array of zeros and ones will be created.
I'm reading from the single-photon detector using a DAC device (PCI-5122), which is also triggered. So the code should work only when it receives a trigger, which is at a frequency of 5kHz. The code should not miss any of these pulses.
Any help?
Thanks in advance.
02-22-2023 06:02 AM
What do you have so far?
02-22-2023 06:05 AM
Hi MK,
@MK_17 wrote:
The code should work as follow: if a 5V pulse is detected, it should return 1, if no pulse is detected, should return zero. Then an array of zeros and ones will be created.
Suggestion:
IF voltage >= 4.0 % whatever limit is suitable to you
THEN
output "1"
ELSE
output "0"
ENDIF
Hint: never compare for "==5" when you deal with real-world analog measurements…
02-22-2023 07:15 AM
Hi,
so far i'm using the vi example code in order to display the waveform, it can be found under Hardware Input and Output»Modular Instruments»NISCOPE (High-Speed Digitizers)»Demos»niScope EX Quick Start.vi
I believe since the waveform can be shown, then i can do some analysis on it. But i'm not sure how to do it. The waveform displayed is of the format cluster waveform.
02-22-2023 07:19 AM
Hi Gerd,
thanks for the suggestion. That's what i'm planning to do, but how to do this is what i'm struggling with, especially since the code i'm using (Hardware Input and Output»Modular Instruments»NISCOPE (High-Speed Digitizers)»Demos»niScope EX Quick Start.vi.) gives the waveform as a cluster format.
How to return an array after analyzing each waveform one by one and that can be displayed and saved later?
02-22-2023 08:03 AM
Hi MK,
@MK_17 wrote:
How to return an array after analyzing each waveform one by one and that can be displayed and saved later?
Quite easily: