03-01-2012 03:57 AM
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??
Solved! Go to Solution.
03-01-2012 08:14 AM
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...
03-01-2012 08:16 AM
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?
03-01-2012 09:41 AM
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.
03-01-2012 10:03 AM - edited 03-01-2012 10:04 AM
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.
03-01-2012 10:14 AM
Dear smercurip_fc
Thanking for your useful reply.
Your answer just is I hope to write. But I just use the Labvew in a few days.
That VI is my first Vi and I finished in one day.
03-01-2012 10:39 AM
Dear smercurip_fc
Ask one more question.
How can I add the time controller to control the time of each voltage interval and How can I input array value seperately to the function generater??
03-01-2012 01:12 PM
You can use the Time Delay Express VI to create a delay in your sequence. It has error I/O so you can wire it inline.
As for the second question, I'm not sure I understand, but I think you're asking about for-loop autoindexing. Please read the LabVIEW Help on for-loop autoindexing.
03-01-2012 08:52 PM
Dear smercurio_fc
I describe my purpose more clearly.
I want to send a sequence of voltage amplitude with a interval time. And repeated it a couple times.
For example, the sequence like "1.5V (3 second) => 1.2V(3 second)=>0V(3 second)=>1.5V(3 second)=> VIA(3 second)=>0V(3 second)"
And repeated a couple time
Now, Following your suggestion, I can generate the sequence. But I can't send this sequence into the generator controller Vi.
The data types of the sequence and input of the generator don't match.
03-01-2012 10:20 PM