From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Limitless number of records and Software Event/Interrupt

Hi, I am developing a logger using that on an analogue rising edge captures the next 1-3us of the waveform using a PXI-5152. On the rising edge I want to use a fetch.vi to grab the record and also trigger a software event / interrupt to action some code.  I need the card to continue sampling ready for the next trigger an unlimited amount of timesIe;1. Pretrigger sampling2. Rising edge – interrupt software telling that a record is complete3. Software fetches record and processes data, whilst card goes back to step 1.  I know that multi-record fetching allows multiple records to be captured, but it is only of the defined size and the acquisition is not flagged up as complete until all records are captured.  I have put -1 in as the number of records in the niScope Configure Horizontal Timing.vi  for unlimited records, but this still doesn’t give me an event/interrupt on the rising edge to action the captured data. I understand that using a ref trigger (which I am using to detect edges) actually stops the sampling.  Ive seen in the examples start triggers are used to start the sampling and a software ref trigger (which is never triggered) to keep the card sampling – but I understand this creates one long record, where I need multiple records. The only way I can see to do this at the moment is to re-arm the ref trigger after the fetching of a record but I assume this comes with high overheads. In short what Im asking is:1.      How can I trigger a software event from an external analogue trigger in the PXI-5152?2.      How can I capture limitless amount of records? ThanksSteven  
0 Kudos
Message 1 of 8
(8,062 Views)

Woops, I seemed to mess up on the formating of my post, here it is easier to read;

 

Hi, I am developing a logger using that on an analogue rising edge captures the next 1-3us of the waveform using a PXI-5152. 

 

On the rising edge I want to use a fetch.vi to grab the record and also trigger a software event / interrupt to action some code.  I need the card to continue sampling ready for the next trigger an unlimited amount of times

Ie;

1. Pretrigger sampling

2. Rising edge – interrupt software telling that a record is complete

3. Software fetches record and processes data, whilst card goes back to step 1.  

 

I know that multi-record fetching allows multiple records to be captured, but it is only of the defined size and the acquisition is not flagged up as complete until all records are captured.  I have put -1 in as the number of records in the niScope Configure Horizontal Timing.vi  for unlimited records, but this still doesn’t give me an event/interrupt on the rising edge to action the captured data. I understand that using a ref trigger (which I am using to detect edges) actually stops the sampling. 

Ive seen in the examples start triggers are used to start the sampling and a software ref trigger (which is never triggered) to keep the card sampling – but I understand this creates one long record, where I need multiple records. The only way I can see to do this at the moment is to re-arm the ref trigger after the fetching of a record but I assume this comes with high overheads. 

 

In short what Im asking is:

1.      How can I trigger a software event from an external analogue trigger in the PXI-5152?

2.      How can I capture limitless amount of records? 

 

Thanks

Steven  

Message 2 of 8
(8,059 Views)

Hi,

Within Labview, if you go to Help >> Find Examples >> Search niScope >> Scroll down to "niScope EX Fetch Forever".

 

The niScope Configure Trigger Software is polymorphic and can be configured to the analogue edge. You then have to set constants/controls to the trigger level and trigger source.

 

I hope this may help.

Ashish Naik
Automotive Business Development Manager
National Instruments UK
0 Kudos
Message 3 of 8
(8,026 Views)

Thanks for your reply.  Ive been using bits from the examples and am close to achieving the set up with the PXI 5152 I need for the records capture I need.

 

What is really holding me back is generating a User Event / Interrupt to kick start some code on receiving a trigger at the PXI 5152 card.

 

Ive seen examples with DAQmx using the devices clocks or trigger as the clock source for timed loops in a Real Time OS.  This would allow me set up the loop to complete 1 cycle for every trigger which would then give me the “action code on trigger” affect Im after.  But I cant find the equivalent NI-SCOPE setup for this – any ideas?

 

A little more information about what Im trying to achieve.  I have a PXI-5152 to capture high speed analogue, the rising edge of which is the trigger.  Also I am using a PXI-6220 DAQ card to capture slow Digital and Analogue signals.

At a rate of 3.5KS/s the slow Digital and Analogue signals take one sample and log to Hard disk.  This is based on software timing control of the while loop.  At random intervals the high speed analogue will pulse, triggering the system.  At this point I want to use an Interrupt to jump to a section of code that grabs the record and takes a single sample of the slow speed signals.

 
Message 4 of 8
(8,012 Views)

Hi Steven,

 

Although there are many similarities between the DAQmx programming of Multifunction DAQ boards and NI-SCOPE programming of High Speed Digtizers, there are some fundamental differences.  The event or interrupt capability that you reference for DAQmx in LabVIEW does not have an equivalent in NI-SCOPE.  I can however suggest some options to implement similar  behavior. First of all, I am assuming you are working with LabVIEW.  Please let me know if this is not the case. 

 

You can make use of an NI-SCOPE property node to poll the digitizer to determine if the digitizer has acquired a new record since the last time you fetched data.  Two potential options are the "Fetch Backlog" property and the "Records Done" property.  You could have two separate loops running, one for the slow operation and one to fetch data from the digitizer.  In the digitizer loop you would query the digitizer to determine if a new record is available, and then using a case structure, call the Fetch only when new data is ready. If you need to pass data between the two loops, a queue would be an option to look at.

 

If you only want to sample from the slow system when you acquire a record, then this could be included in the same loop within the case structure.  Alternatively, you could also export the reference trigger on the digitizer as a clock for the DAQ board to tell it to sample at the same time.  This would provide a hardware timed solution, assuming this is in fact the type of behavior you are looking for.

 

- Jennifer O.

 

 

0 Kudos
Message 5 of 8
(7,980 Views)

Hello, I have been trying to look for the EX fetch forever example to use with our PCI5922, when i go to.

 

"Help >> Find Examples >> Search niScope >> Scroll down to "niScope EX Fetch Forever".

 

But when i click on the example, labview tells me it can not be found.  All of the other NIscope examples seem to work though.    Can this example be downloaded online somehwere?

 

 

Thanks

0 Kudos
Message 6 of 8
(7,085 Views)

Hi

 

I don't know why that example does not exist any more but I have attached the VI here. If you copy the VI in the "...\LabVIEW X\examples\instr\niScope" folder it will then be usable from the Example Finder.

 

Hope this helps

 

Rich

NI|UK 

0 Kudos
Message 7 of 8
(7,066 Views)
Thank you!!
0 Kudos
Message 8 of 8
(7,057 Views)