09-01-2008 10:25 PM
Hello.
I am using Labview 7.0 to control a function generator. First, I need to get a frequency sweep linearly from 10000Hz to 1000Hz in 5 sec and the sweep should be triggered by an external signal. Then I use "GPIB write.vi" and write down the following codes:
APPL:SIN 10000,3;
TRIG:SOUR EXT;
TRIG:SLOP POS;
FREQ:STAR 10000;
FREQ:STOP 1000;
SWE:SPAC LIN;
SWE:TIME 5;
SWE:STAT ON;
Then I run the VI and send the trigger signal. The result is exactly what I want. So I want to do a little more complicated operation: sweeps back to 1000Hz at the end of the first sweep.Now I find it is hard to be done. If I just write the second sweep code after the first one, the function generator will only follow the second sweep order.
I tried to use the Flat Sequence Structure to give the first sweep order and wait 5 sec to give the second one. It indeed worked.But I have to change the trigger source from external to internal. Then I can not control the time to start the first sweep precisely.
So can anyone help me to write the code to realize 2 different frequency sweeps after I send an external trigger signal?
Thank you so much.
09-01-2008 11:24 PM
09-02-2008 12:45 AM
Thanks for your reply.
I'm sorry that I forget to mention that my function generator is Agilent 33250a. Its user's guide said that the trigger code is only available for sweep and burst. So arbitrary waveform may not be a possible way to resolve the problem.
09-02-2008 08:43 AM
Hello,
Here is the link to the LabVIEW Plug and Play Instrument Driver for your instrument:
Cheers,
NathanT
09-02-2008 08:09 PM
I have downloaded and use the driver in your reply. But it doesn't solve the problem.
Thank you as well.
09-03-2008 07:47 AM
I am sorry to hear that the LabVIEW Plug and Play Instrument Driver does not meet your needs. However, the great thing about Plug and Play Instrument Drivers is that you can modify the driver to have it do what you need, which in most cases is easier than starting from scratch. If you do end up modifying the driver, please explain your changes/additions and we can look into adding them into the Instrument Driver.
Cheers,
NathanT