Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching single waveform on NI 5114 causes error, "may not be used for fetching multiple waveforms"

Hi everyone.

 

I've run into some problems doing a, what I think is, very basic measurement setup. I'm new to Labview and its instrument control, so if I have missed anything basic I'm sorry. 

 

The hardware setup is one PXI chassi, containing an AWG (PXI-5412) and digitizer (PXI-5114). I want to record the pulse response from the DUT. The code can be made a lot prettier and readable, right now I've just tested some other variables which is why there's a lot of junk code. Everything runs fine up until the niScope-fetch VI, which gives an error (error code -1074118613) saying that "This function may not be used for fetching multiple waveforms.". I've tried other fetch functions, but all give the same error. Snippet 

 

My questions are:

1. How can I remove the error?

2. Is this way of solving the problem overly complicated?

3. If so, what is a smarter way of doing it? 

Again, all I want to do is to generate a pulse from the AWG and record the response on the digitizer. The pulse should have variable amplitude and length. Yes, I'm aware of that I'm currently generating a square wave, that is just for current testing and shouldn't be there. 😉 The real scenario will use an arbitrary waveform shaped like a pulse instead. 

 

I greatly appreciate all and any help!

 

With best regards,

Niclas

0 Kudos
Message 1 of 6
(4,445 Views)

I don't see where you are initiating an acquisition before trying to fetch one. Are you able to get a signal when you use one of the NI-Scope examples?

0 Kudos
Message 2 of 6
(4,442 Views)

Yes, the scope works fine. My thought with this setup is to start generation and acquisition at the same time, using the "TClk Initiate"-VI. 

0 Kudos
Message 3 of 6
(4,438 Views)

Okay, I understand better. I have not done this sort of acquisition. I do see an example call niScope EX Multi-Device Configured Acquisition (TClk).

0 Kudos
Message 4 of 6
(4,428 Views)

I encountered another odd problem. I did another solution with the approach to init everything, set the trigger on the scope and start an acquisition and then afterwards start generating the pulse on the AWG. The code looks like this:

 

snippet.png

 

And this worked fine. For the first time. It worked only once, and when I tried to run the program again I got the exact same error message as before: "This function may not be used to capture multiple waveforms". As you see, I reset all settings between each run to make sure nothing interferes. I'm missing something, but don't know what.

0 Kudos
Message 5 of 6
(4,422 Views)

Hi Nicsjo,

 

This error occur because of a faulty configuration of the Configure Horizontal Timing.vi. The Num Records parameter is set to 5096, but should be 1 for a single record acquisition.

If 5096 is the amount of samples that you would like to acquire, use the "Min Record Length" parameter in the Configure Horizontal Timing.vi for that.

 

Best regards,

Klas Andersson

AE, NISW

0 Kudos
Message 6 of 6
(4,402 Views)