LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Agilent 33120A: wrong Sine Waveform Amplitude

I have an Agilent 33120A function generator, and I control it with LabVIEW 8.2.1 and CVI 6.0 via GPIB and RS232 interfaces.

I've been using the driver downloaded from NI site but I found a strange problem.

Here the steps to reproduce it (I hope):

  1. power-down the 33120A, then power it up
  2. control the instrument with CVI, and generate for example a sine wave with 300 mVPP amplitude (hp33120a_ConfigureStandardWaveform function with Amplitude input to 0.3)
  3. close CVI communication with instrument
  4. set waveform amplitude to mVRMS with the 33120A fron panel buttons
  5. re-open CVI communication
  6. control the instrument with CVI again, and try to generate a sine wave with 300 mVPP amplitude again (hp33120a_ConfigureStandardWaveform function with Amplitude input to 0.3). A 300 mVRMS sine wave is generated.

After some tests, I found out that you have to set waveform amplitude to mVPP with the 33120A fron panel buttons before controlling it with CVI; otherwise the mVRMS setting is not changed by CVI driver. Or you must power-down then  power-up the function generator, andthis setting isresetted to mVPP (instrument default?)

 

If you use LabVIEW everything works fine.

If you use a 33220A function generator with the same driver everything works fine.

 

Is this an expected behaviour, or is this a driver bug?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 14
(5,322 Views)

Hi Vix,

unfortunately I don't have the necessary hardware to reproduce this issue.

Since it sounds like a driver bug I have opened CAR 829082, so that we will further investigate the problem.

 

Best regards,

Serena M.

0 Kudos
Message 2 of 14
(5,294 Views)
Sorry, the correct CAR number is 190748.
0 Kudos
Message 3 of 14
(5,292 Views)

The link to the driver is for the IVI driver, can you please confirm if you are using the IVI driver?

We also have a Plug and Play LabWindows/CVI driver that is non-certified.  Can you also indicate what the firmware version your instrument has?

0 Kudos
Message 4 of 14
(5,274 Views)

jjp377 wrote:

The link to the driver is for the IVI driver, can you please confirm if you are using the IVI driver?

We also have a Plug and Play LabWindows/CVI driver that is non-certified.


Yes, I'm using the IVI driver because this is the only one supporting GPIB, Serial and USB interfaces under CVI 6.0 and LabVIEW 8.2.1. Moreover it supports both 33120A and 33220A waveform generators.

As a matter of facts I developed some different softwares (in CVI and LabVIEW) to control 33120A (GPIB and RS232) and 33220A (GPIB and USB): you can connect a 33120A or a 33220A simply modifying the VISA resource name, because the driver is the same.

 

Controlling the 33120A via GPIB and LabVIEW works well, because the "Configure Standard Waveform.vi" has an iput called "Unit" where you can choose between Vpp and Vrms.

 


Can you also indicate what the firmware version your instrument has?

Firmware Revision 10.0 - 5.0 - 1.0

 

Message Edited by vix on 10-12-2009 09:07 AM
Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 5 of 14
(5,260 Views)

Hi vix,

 

the R&D were not able to reproduce the behavior you described.

 

They followed the steps you outlined, the code They used is below

 

main ()
{
    ViSession   hp33120a;
    ViStatus    error = VI_SUCCESS;
    ViString    popUpMsg = "The function generator is outputting the waveform " 
                           "that you configured.\n\nPress <Enter> to continue";

        /*
            If you want to run this sample program and the instrument is not
            present, set the Simulate flag to 1.  (Example:  "Simulate = 1")
        */
    checkErr( hp33120a_InitWithOptions ("GPIB0::1::INSTR", VI_TRUE, VI_TRUE,
                                        "Simulate=0,RangeCheck=1,QueryInstrStatus=1,Cache=1",
                                        &hp33120a));

    checkErr( hp33120a_ConfigureOutputMode (hp33120a, HP33120A_VAL_OUTPUT_FUNC));
    checkErr( hp33120a_ConfigureOutputImpedance (hp33120a, "1", 50.0));
    checkErr( hp33120a_ConfigureStandardWaveform (hp33120a, "1",
                                                  HP33120A_VAL_WFM_SINE, 0.3, 0.0,
                                                  1000.0, 0.0));
    checkErr( hp33120a_ConfigureOutputEnabled (hp33120a, "1", VI_TRUE));                                              
    MessagePopup ("Message", popUpMsg);
                                       
Error:
    if (error != VI_SUCCESS)
        {
            ViChar    errStr[2048];
            ViStatus tmpError;

            hp33120a_GetError(hp33120a, &tmpError, 2048, errStr);
            MessagePopup ("Error!", errStr);
        }

    if (hp33120a)
        hp33120a_close (hp33120a);
}

 

 

The *IDN? query They sent to the HP33120A returned HEWLETT-PACKARD, 33120A,0,7.0-2.0-1.0 can you check what your instrument returns, hopefully the difference lies with the firmware.

 

Can you post your code?

 

Thanks

D. Beninato
0 Kudos
Message 6 of 14
(5,232 Views)

@DaBenny wrote:
The *IDN? query They sent to the HP33120A returned HEWLETT-PACKARD, 33120A,0,7.0-2.0-1.0 can you check what your instrument returns, hopefully the difference lies with the firmware.

My instrument returns HEWLETT-PACKARD,33120A,0,10.0-5.0-1.0 so the firmware is different (if 10.0 is major number, my firmware is newer than yours, but I'm not sure)

I used the code you posted (that is exactly as mine) and I can reproduce the problem?

 

Could you confirm me that after you set manually mVRMS to the 33120A front panel, when you launch the CVI program the indication on the 33120A is changed to mVPP?

With your code and my firmware you can switch from mVRMS to mVPP only with the instrument buttons. Commands sent from CVI don't change mVRMS to mVPP.

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 7 of 14
(5,229 Views)

I forgot to re-say that I don't think it's a firmware problem, because when I use LabVIEW driver everythin gis OK.

So I did other tests with NI Spy and I find that LabVIEW driver sets the property VOLT:UNIT VRMS.

The CVI driver doesn't set this property, so if LabVIEW (or the user via the instrument front panel) changes PP to RMS, CVI isn't able to set this back to PP

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 8 of 14
(5,210 Views)

Hello vix,

I have not been able to find the right firmware patch for the 33120A, and Agilent Support might take a while to respond to me.

Have you got the firmware upgrade utility?

D. Beninato
0 Kudos
Message 9 of 14
(5,171 Views)

Hello Daniele,

unfortunately I don't have the firmware upgrade utility, so we must wait for Agilent Support.

 

Could you confirm what I asked in one of my previous posts? (i.e.  after you set manually mVRMS to the 33120A front panel, when you launch the CVI program the indication on the 33120A is changed to mVPP with your firmware version)

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 10 of 14
(5,165 Views)