11-03-2015 10:11 AM
HI there,
I am using an Agilent 33521B waveform generator and I'm contolling it via GPIB.
I would like to run a sequence in LabView that triggers two frequency sweeps one after the other, each with different sweep parameters.
For instance the first sweep would have a start frequency of 100Hz and stop frequency of 1KHz over 500ms seconds and then immediately after i would need to trigger a second sweep with start frequency of 1KHZ to 20KHz over 1 second.
I have attempted to do this using a flat sequence and waiting until the first sweep has finished and then change the sweep parameters before triggering the second. However when i do this, there is a delay between the sweeps that seems to not be consistent between runs which isn't good, plus the waveforms do not look too healthy when viewed on an oscilloscope
I have attached my code below. I am also using the "Agilent 3352X Series" drivers for this, which i have also attached.
Any help on getting the sweeps to commence immediately after one another would be very much apprectiated
Regards
Rhys
11-03-2015 01:05 PM - edited 11-03-2015 01:05 PM
I am not going to bother looking at any attached VI.
Until you can do what you want to do via the buttons on the front panel of the instrument, all else is pointless.
11-05-2015 05:25 AM
Hi rhysj,
I think nyc might be correct here. Unless you can get the sweeps to run one immediately after the other using the function generator's own controls then it would seem unlikely that you could do it via GPIB. The function generator may have a minimum time it takes to configure before it can begin outputting which would prevent it going straight from one sweep to the next without some delay.
Best regards,
Joe
11-05-2015 12:12 PM
Hi both
if you were to do this via the front panel then yes there would be a delay as you would need to update the sweep parameters before manually triggering the second sweep.
I could deal with there being a small delay between the two sweeps if it was of the order of 100ms or so but im unsure if this is the case.
What confuses me is that even if i do set a wait in labview between the the two sweeps is that this gap between the sweeps seems to be inconsistent between runs
Regards
Rhys
11-06-2015 04:02 AM
HI rhysj
How are you connecting your PC to the GPIB bus? Depending on what you are you using might change the delay involved in communicating with the device.
Assuming you are not using a real-time OS on your PC it would be worth bearing in mind that software controlled timing will not be deterministic so the delay is unlikely to be the same each time. What sort of delays are you getting?
Best regards,
Joe