04-30-2012 03:54 AM
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.
05-01-2012 11:38 AM - edited 05-01-2012 11:42 AM
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,
05-03-2012 11:54 PM - edited 05-03-2012 11:57 PM
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.
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);
08-09-2012 01:35 AM
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
08-10-2012 08:53 AM
Hello YGraphPopup,
Are you referring to TeamViewer online meeting software?
Have you tried increasing the timeout?
08-11-2012 09:30 AM
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
08-12-2012 10:59 AM
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
08-13-2012 02:43 AM - edited 08-13-2012 02:51 AM
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
08-13-2012 06:35 AM
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);
08-13-2012 06:24 PM
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.