03-02-2012 08:54 AM
I finished the Vi, and it can work.
In my vi, the function generation is put in the for loop, seeing the attached picture.
But it still have a small problem. Please see below figure.
The upper sub-figure is the real out put. The output will be disable at the beginning of each iteration.
I think the cause is the function generator reset to receive the new value at the beginning of each iteration.
How can I avoid this problem?
03-02-2012 09:15 AM
You are not listening to what you are being told. You were told that you should not have the Initialize and Close inside the loop. You come back with a VI that has the Initialize and Close inside the loop. You were told to look at autoindexing of for-loops by me and by Dennis. You come back with your VI still consisting of two loops.
Have you read the manual of the instrument? From the manual (page 183):
While changing amplitude, you may notice a momentary disruption in the output waveform at certain voltages due to switching of the output attenuators. The amplitude is controlled, however, so the output voltage will never exceed the current setting while switching ranges. To prevent this disruption in the output, youcan disable the voltage autoranging feature using the VOLT:RANG:AUTO command (see page 186 for more information).
I do not know if the driver set has a VI to turn off the autorange operation. If it does not, you will need to send the command yourself using VISA Write. Look inside the driver VIs to see how this is done. Make sure you perform the setup OUTSIDE THE LOOP. The only thing that should be inside the loop is setting the voltage. No Initialize, no configuration, no close. All you need inside the loop is just the small part that sets the voltage.
03-02-2012 09:48 AM
Yes, I am trying to do as your suggestions in all day.Trying not to put the Vi of function generator in the for loops.
But I can not solve a problem : connectrd two terminals of different types.
The type of the source is 1-D array of double (output from autoindexing of for-loops).
The type of the sink is double (amplitude control of function generator).
03-03-2012 11:22 AM
@Gary_taiwan wrote:
Yes, I am trying to do as your suggestions in all day.Trying not to put the Vi of function generator in the for loops.
But I can not solve a problem : connectrd two terminals of different types.
The type of the source is 1-D array of double (output from autoindexing of for-loops).
The type of the sink is double (amplitude control of function generator).
This means the tunnel is not auto-indexing. If the tunnel is filled in, then the array is being passed through. If the tunnel is hollow, then it is being auto-indexed. Right-click on the tunnler to indicate that you want it to be auto-indexed. LabVIEW autoindexes arrays by default, so you must have changed it. I'm guessin it's because you still have an Index Array in the loop. Again, read the LabVIEW Help on autoindexing of for-loops.
03-03-2012 07:44 PM
Dear smercurio_fc
Thanking for your greatful suggestion again. It helpful a lot for me to know where I should studying.
A workable Vi was finsihed by puting a limit sub-Vi in the loop.
It will not to restet because the initialize and close sub-vis are out of the loop.
Please see the attached file of working vi.
In auto-indexing of Labview help, if indexing is disable, the output of the loop will sent out the value of the last iteration. if the indexing is enable, the output of the loop will be 1D array, each value of each iteration. Then the data type will not match between the output of loop and input of generator.
Please see the attached file of connection error.
03-03-2012 10:29 PM
I give up.
03-15-2013 05:16 PM
Hello smercurio_fc,
I read this post looking for an increasing signal, like the one you posted. But what I need is the signal to be an increasing step, not an increasing sawtooth like yours. Do you have any idea of how to change the shape of the signal?
Thank you