LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DSO-X 2014A ReadDelayMeasurement

I need to measure Time Interval between Channel A and Channel B and I am using the IVI drivers agx2k3k.

Can not find any function that perform this Measurement.

0 Kudos
Message 1 of 15
(5,950 Views)

Hi,

 

Have you checked the product manual to make sure your device has that functionality?  The IVI drivers simply wrap basic commands into easy to use functions, so if a function doesn't exist to do that, it may not be possible.

 

Best,

Jeff S.
National Instruments
0 Kudos
Message 2 of 15
(5,939 Views)

I checked the programming guide and found that the funtion you required is supported. The command is :MEASure: DELay.

 

After went through the agx2k3k IVI driver, it seems that the delay interval measurement function had already been implemented.

 

Please refer to APIs: agx2k3k_ConfigureMeasurementDelay, agx2k3k_ReadWaveformMeasurement.

 

The only issue is that the agx2k3k_ReadWaveformMeasurement function didn't support delay measure between two channels. I changed the source code a little bit (see attachment, I changed a few lines of code in agx2k3k_ReadWaveformMeasurement function). Wish it will work for your scenario. Due to I didn't have a live instrument for testing, there may have issues when you using them, please feel free to let me know if you have any problems. Smiley Happy

 

Here is a simple example for your reference:

 

// Step1: specifies the channel name for source1 and source2

// e.g. "CHAN1" and "CHAN2"

agx2k3k_ConfigureMeasSource (vi, "CHAN1", "CHAN2");

 

// Step2: specifies the slope and edge number on source1 and source2

// e.g. "+1" means first positive slope

agx2k3k_ConfigureMeasurementDelay (vi, "+1", "+1"); //

 

// Step3: read the delay measurement

agx2k3k_ReadWaveformMeasurement (vi, VI_NULL, AGX2K3K_VAL_DELAY, 5000, &result);

 

Message 3 of 15
(5,908 Views)

Hi,

I have tried the 3 steps :

// Step1: specifies the channel name for source1 and source2

// e.g. "CHAN1" and "CHAN2"

agx2k3k_ConfigureMeasSource (vi, "CHAN1", "CHAN2");

 

// Step2: specifies the slope and edge number on source1 and source2

// e.g. "+1" means first positive slope

agx2k3k_ConfigureMeasurementDelay (vi, "+1", "+1"); //

 

// Step3: read the delay measurement

agx2k3k_ReadWaveformMeasurement (vi, VI_NULL, AGX2K3K_VAL_DELAY, 5000, &result);

 

but have RUN-TIME ERROR, see attachment

 

I have DSO-X 2014A on my desk, is it possible to connect my scope via TeamViewer for dubugging and fix problems?

 

Thanks

  

0 Kudos
Message 4 of 15
(5,855 Views)

Hello YGraphPopup,

Are you referring to TeamViewer online meeting software?

 

Have you tried increasing the timeout?

Jacob R. | Applications Engineer | National Instruments

0 Kudos
Message 5 of 15
(5,845 Views)

Hi

 

I agree with Jacob's suggestion, because this error is caused by a VISA read timeout in STEP3

 

For example:

// Step3: read the delay measurement

agx2k3k_ReadWaveformMeasurement (vi, VI_NULL, AGX2K3K_VAL_DELAY, 10000, &result);

 

When the function read the waveform from instrument, it will wait for data acquisition before transmit them to PC.

 

This error may also caused by no signal connected to instrument Channel OR the signal doesn't match the trigger level. So please make sure there appears a waveform on the screen of instrument front panel after STEP 1-2 have been executed.

 

Thanks,

 

Charles

0 Kudos
Message 6 of 15
(5,838 Views)

Hi,

I think that driver is not compatible with Instruments DSO-X-2014A because also simple measurement like Ripple test on a power supply output is causing a TimeOut Error on the step "agx2k3k_ReadWaveformMeasurement" .

Please find attachment.

Is it possible to connect my SCOPE via a remote and try to solve problem?

Thanks

 

0 Kudos
Message 7 of 15
(5,829 Views)

Hi,

 

I am afraid it might be difficult to create a cross company remote control connection to help you directly.

 

Also, I think this driver should be compatible with DSO-X-2014A. Because this model is listed in driver's support list in readme.txt. Would you please run Initialize.vi (LabVIEW) OR InitizlizeWithOption (C) function seperatly and see if there is any error raised?

 

I highly suggest you to manipulate the tool - NI I/O Trace. It is readlly a powerful tool when investigate instrument driver issues.

 

Thanks,

 

Charels

0 Kudos
Message 8 of 15
(5,822 Views)

Hi Charles,

Init with options is PASS.

I have used the NI Spy to trace (attached, have no clue how can be helpfull for me) the Error I have on "agx2k3k_ReadWaveformMeasurement" using following Code:

checkErr( agx2k3k_InitWithOptions (SCOPE_DSO2014_RESOURCE_NAME, VI_TRUE,
            VI_FALSE,
            "Simulate=0,RangeCheck=1,QueryInstrStatus=1,Cache=1",
            &agx2k3k));
 checkErr( agx2k3k_AutoSetup (agx2k3k));    
 agx2k3k_ConfigureAcquisitionType (agx2k3k, AGX2K3K_VAL_NORMAL);
 /* Configure channel */ 
 agx2k3k_ConfigureChannel (agx2k3k, "CHAN1", 0.2, 0, AGX2K3K_VAL_AC,1.0, VI_TRUE); 
 agx2k3k_ConfigureChanCharacteristics (agx2k3k, "CHAN1", 1.0e6,1.0e6);      

 agx2k3k_ConfigureAcquisitionRecord (agx2k3k, 5e-3, 1000, 0.0);
  /* Configure trigger */ 

 agx2k3k_ConfigureTrigger (agx2k3k, AGX2K3K_VAL_EDGE_TRIGGER, 1);   
 agx2k3k_ConfigureEdgeTriggerSource (agx2k3k, "CHAN1", 0.0,
          AGX2K3K_VAL_ALTERNATE);
 agx2k3k_ConfigureTriggerCoupling (agx2k3k, AGX2K3K_VAL_AC);
 agx2k3k_ReadWaveformMeasurement (agx2k3k, "CHAN1", AGX2K3K_VAL_VOLTAGE_PEAK_TO_PEAK, 5000, val);

0 Kudos
Message 9 of 15
(5,817 Views)

Hello,

In your NI I/O Trace capture the step number 108 is red because it failed with an error code. The function that failed is viWaitOnEvent. "Timeout expired before operation completed."

Please try to increase the timeout to multiple different types of values, such as 10000, 15000, 20000 and see what happens.

 

Jacob R. | Applications Engineer | National Instruments

0 Kudos
Message 10 of 15
(5,802 Views)