10-07-2009 07:52 AM
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):
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?
10-09-2009 03:20 AM
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.
10-09-2009 03:21 AM
10-09-2009 12:03 PM
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?
10-12-2009 02:02 AM - edited 10-12-2009 02:07 AM
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
10-14-2009 02:15 AM
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
10-14-2009 02:54 AM
@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.
10-15-2009 02:41 AM
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
10-20-2009 01:48 AM
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?
10-20-2009 02:41 AM
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)