From Friday, January 17th 11 PM CDT (January 18th 5 AM UTC) through Saturday, January 18th 11:30 AM CDT (January 18th 5:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can agilent function generator change the voltage amplitude while the signal is output

Solved!
Go to solution

Hi

 

I'm a new to the Labview.

I need to supply a series of voltages with step increases to my device and repeated it again and again.

   For example, (5V 0V 10V 0V 15V 0V)*5 times

In the past, I turned the bottom on the panel of Agilent 33220A function generator by myself.

It is stupid,so I am trying to use the Labview to do the same thing.

I download the Vi of Agilent 33220A function generator and write a for loop to do that. It can work.

 But I found a problem. At each voltage amplitude change, Agilent 33220A function generator will stop output and then output the new value.

 Because this short time of no voltage output, the dynamic behavior of my device will be destroyed.

 How can I do??

0 Kudos
Message 1 of 17
(6,063 Views)

So when you change the level setting through the GPIB interface, the output goes to zero for some time before resuming at the new level? Have you verified this with a scope? Also, how do you have the function generator set?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 17
(6,051 Views)

What VI did you download, and from where, and what does your code look like? Maybe the VI is turning off the output before it sets the voltage. Did you look in the VI?

0 Kudos
Message 3 of 17
(6,049 Views)

The file I downloaded is "Agilent 33XXX Series Generates Standard Waveform ". please see the attached file.

 I am sure that the outputturn off before resuming at the new level because the dynamic behavior of my device and the light light on the panel of function generator trun off.

 

  I can't find where I can to adjust the seting of the function generator in the VI to avoid turn off the output before it sets the new voltage value.

 

 

0 Kudos
Message 4 of 17
(6,037 Views)
Solution
Accepted by topic author Gary_taiwan

You have made a classic mistake. You've placed the Initialize and Close inside the loop. The Initialize will, by default, perform a device reset, which turns off the output. Initialize outside a loop, do your stuff inside, and then close outside the loop.

 

In terms of your code: I would strongly recommend looking at the Ramp Pattern function. It appears that you want to increase voltage settings, resetting to zero in between. This can be easily done by creating your ramp of the increasing voltages, and then creating another array of zeros of the same size, and then interleaving the two arrays. This will give you a full array of voltage values, without needing two loops, and determining which step you're on, etc., etc. For example, the following code will give you the 5, 0, 10, 0, 15, 0 sequence quite cleanly:

 

 

 

Also, never perform an equality comparison on floats. Otherwise, you owe me another nickel in my retirement fund.

0 Kudos
Message 5 of 17
(6,032 Views)