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.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

driving Agilent 33250A, how to avoid frequency rounding up/down

Solved!
Go to solution

Hello,

 

I want to control an Agilent 33250A generator by using LabVIEW to obtain different waveforms with specific frequency, amplitude values. I use Agilent 33XXX Series.lvlib:Configure Standard Waveform.vi

My problem is that when I give a frequency value of 79 999 996 Hz  ( 79. 999 996 MHz) for example, the program rounds up the value to 80 MHz. How can I give a frequency value like above, without rouding up or down ?

 

Many thanks in advance.

0 Kudos
Message 1 of 9
(4,193 Views)

Hello Nwg,

         The rounding is occuring on the instrument.  I recommend that you consult the user manual and see what frequency values are possible.  Is it possible to set the frequency that you would like by using the instrument's front panel?  If so, it would be good to confirm that the instrument is actually set to that frequency and not just rounding internally.  Please let us know what you find out.

 

Cheers,

 

NathanT

0 Kudos
Message 2 of 9
(4,175 Views)
I can manually enter 79 999 996 Hz using the front panel and the generator doesn't round it upto 80 MHz. It only happens when I use the program. The manual doesn't say anything about possible values except that the frequency range is from 1 micro Hz to 80 MHz. I read the manual several times, there's no mention of rouding off errors.
0 Kudos
Message 3 of 9
(4,173 Views)
Solution
Accepted by topic author nwg
Look at the VI and see how the format to string is being done. Probe the result of the conversion to a string and see what is being passed to the instrument.
Message 4 of 9
(4,169 Views)

Thank you. I changed the string format, and now it works Smiley Very Happy

 

0 Kudos
Message 5 of 9
(4,139 Views)

Hello nwg,

       I am glad that you got it to work.  Can you please explain what exact value you were passing and how you changed the formatting?  When I looked at that VI and probed the output of the format string, it did not seem to have any problems.

 

Thanks,

 

NathanT

0 Kudos
Message 6 of 9
(4,127 Views)

Hello NathanT,

 

In 'Configure Standard Waveform.vi' I changed format string from %.;:FREQ%g  to %.;:FREQ%f 

 

Then when I enter 79 999 996 Hz for the frequency, generator front panel shows the values without rounding upto 80 MHz.

 

0 Kudos
Message 7 of 9
(4,119 Views)

Thanks for the feedback

 

Nathan, please change this in the driver and test future drivers against this kind of rounding.

 

greetings, hope you have had a warmer winter, we had -17 degrees Celsius last week.

greetings from the Netherlands
0 Kudos
Message 8 of 9
(4,107 Views)

Hello Albert,

       We will document the issue and investigate it in the other instrument drivers that support the 33250A and possibly a sample of our other instrument drivers.  The winter here in Texas has been more mild, and will swing from below freezing to sunny and warm.

 

Cheers,

 

NathanT

0 Kudos
Message 9 of 9
(4,076 Views)