Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Time delay between labview and hp 83620A microwave synthesized sweeper

Solved!
Go to solution

Hi everyone,

I'm using microwave synthesized sweeper hp 83620A to sweep microwave from one frequency to another.  I control the instrument through GPIB-USB-HS.  I'm using the device driver provided by Labview. http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=782

My program tells the instrument the start and stop frequency as well as the frequency step size and dwell time.  But at one moment of the time I want to know the instantaneous frequency that the instrument is producing and record it as data so I've built in a virtual frequency counter within the program.  However it appears to me that when I hit the run button, it takes a while before the instrument sweeping.  That makes the frequency counter reading ahead of time and record the wrong values.

So does anyone know exactly how long the delay is. It appear that this time delay is about 1 second but I need more accurate value to have a good data acquisition.  I would really appreciate any input and suggestion improving the program.

 

Thank you.

 

P.S. I have include the VI image below for convenience.

0 Kudos
Message 1 of 5
(3,525 Views)

Tom,

 It appears that you might have a basic dataflow problem. Is you DAQ assistant your frequency counter in the for loop? That bottom for loop will immediately run when you start while your upper chain is probably still setting up your instrument. Try running this in highlight mode.

 What I would do is set up my initalization on the HP and whatever DAQ you have before trying to collect the data. Since I'm not familiar with your instrument I can't tell you exactly how. Whatever function actually triggers the sweep should also trigger the freq counter.

 You should use the lower level DAQmx functions instead of the instrument assistant as it adds too much overhead.

 

Hope this helps

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 2 of 5
(3,513 Views)

Thanks Bob for your feed back.

I just built the frequency counter based on the assumption that the instrument will start sweeping as I press run button so does the for loop. I guess I just have to clean up my upper chain to reduce the response time.  As for the suggestion of triggering the frequency counter using the same source triggering the instrument, I'm still not sure how to do it.

0 Kudos
Message 3 of 5
(3,500 Views)
Solution
Accepted by topic author Tom Gallagher

Tom,

 When working with LabVIEW it is important that you understand its dataflow paradigm. What this means is no function, subvi or loop will run until all the input nodes receive data. And no loop will return results to the output until the loop is finished. So in your case we just need to figure out what function in your upper chain actually starts the sweep. If it is the call after the arm trigger vi just branch the error out wire to the for loop.(you don't even have to wire it to anything else and please note I said branch it) Because of the overhead of the instrument assistant you can't expect perfect results. If you haven't run this with execution highlighting turned on (lightbulb on toolbar on block diagram) please try it.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 4 of 5
(3,494 Views)

Thanks Bob,

It works perfect.

0 Kudos
Message 5 of 5
(3,455 Views)