LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

my code doesn't allow to catch all triggered events

Solved!
Go to solution

I will attach my current code and describe the problem with it.

 

Two channels are connected to an ni-oscilloscope pci5122 (with max sampling rate 60 MHz).

One channel is triggering, the other Is from an external device.

The code now is supposed to give the trigger pulses (which are regular 1.6 us pulses at 5kHz repetition rate) along with the pulses from my device (they are seldom, appears with rep rate less than 1kHz or around 500 Hz, 40ns wide), the latter pulses are based on some external measurement I do in the lab.

 

At the end, I should have two sets of data, and I will analyze them on an external software (e.g. matlab).

 

Currently I’m able to extract these data, and no problem with their analysis.

 

However, the data somehow is missing some pulses. The oscilloscope should be able to measure at a rate of 60 MHz, while the output of my code is much less than 5kHz. (for example, if I run the code for one second, I get only about 1kHz data, while I should retrieve 5kHz triggered events).

 

Maybe the problem is with the triggering of the acquisition. The acquisition loop should work only when a trigger is ON. The trigger should start the acquisition and not vice versa. I’m not sure this is the exact problem, but just a guess.

 

I really hope that someone can help with this. 

0 Kudos
Message 1 of 2
(641 Views)
Solution
Accepted by topic author MK_17

I think you need to set it up to take multiple record acquisitions.  Without it, your scope only takes one record at a time and there is some downtime waiting for Windows and LabVIEW to do stuff where it isn't attempting to trigger to fill the next record.

 

There's a "number of records" input on the "niScope Configure Horizontal Timing.vi" that you left unwired that I believe is how it's done.

 

There's an example that ships with NI-scope "niScope EX Multi Record.vi" that I think might be helpful too, since it seems that your current code was derived from an example.

0 Kudos
Message 2 of 2
(595 Views)