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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using LabWindows/CVI Drivers for the Agilent DSO-X 4104A

Hello,

 

I am trying to use CVI to read the current on an Agilent  DSO-X 4104A O-scope.

Currently I have initialized and set the trigger source, but am having trouble adjusting the horizontal axis of the O-scope remotely.

The current value of the axis scale is 100.0us/0.0s and I want to remotely change it to 5.00ms/0.0s.

I have tried using the various functions found in the NI driver to no success.

Here's one thing that I have tried, but has not worked

 

agx2k3k_ConfigureWindowTimebase (OSCOPE, 0.0, 5.0e-06, 0.5E-6); 

 

Also,

I am trying to pull the max value of the current of the reading from the device, but am unable to get a readable value.

I have tried using both agx2k3k_ReadMinMaxWaveform and agx2k3k_ReadWaveformMeasurement, but they don't give me a readable value.

 

Any help is appreciated.

 

Thanks in advance.

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

First of all I did not understand your notation of "100.0us/0.0s".

Does it mean "100 microseconds per division"?

 

Second, the function did not look quite right to me. That function is for the delayed (zoomed) acquisiton.

Maybe the instrument did not obey because because it was not in delayed mode.

I recommend you to use the agx2k3k_SetAttributeViReal64 function with the AGX2K3K_ATTR_TIMEBASE_SCALE attribute.

 

In the past, I remember having the same issues with another Agilent scope.

It resisted switching to some certain horizontal time/division settings when commanded remotely while it was possible setting that time/div value manually from the front panel.

I could not solve it and I had to live with one of the settings it obeyed.

 

Generally IVI-C drivers are provieded with their source code. You can always add the source file to your project and debug.

I have also seen even some NI-certified drivers fail because of incorrect commands sent by the driver.

 

So, this is a chain reaction.

You should send the correct command, at the correct time by calling the correct function, and make sure the driver function sends the correct command.

 

Hope this helps,

S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 6
(4,585 Views)

Yes, I meant 100 microseconds per division.

 

This is what I tried and it did not work. 

status = agx2k3k_SetAttributeViReal64 (OSCOPE, "CHAN1", AGX2K3K_ATTR_TIMEBASE_SCALE, 2e-3); 

 

It gives me the following error: The channel or repeated capability name is not allowed. 

Am I doing anything wrong? The channel I want to change is 1 and the value I want to change it to is 2e-3.

 

Also, how do I access the source .c file for the driver?

 

Thanks

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

Horizontal time/division setting is not channel based.

All channels are effected from this setting.

 

So, you should pass "" (empty string)  or VI_NULL as channel name.

This is stated in the function help.

 

The driver source file is in c:\program files\ivi foundation\ivi\drivers\agx2k3k folder.

S. Eren BALCI
IMESTEK
0 Kudos
Message 4 of 6
(4,547 Views)

Thanks love u

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

You are welcome Smiley Wink

I am glad it worked for you.

 

PS: If your problem is solved with my help please mark my post as the solution.

S. Eren BALCI
IMESTEK
0 Kudos
Message 6 of 6
(4,512 Views)