LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I have created a visa session for an instrument, and i would like it to wait until the instrument has finished sweeping. Which visa vi should i use?

Hello,

I want the instrument to finish sweeping and get the data from its memory and only then i want to process the data, otherwise the the subvi that processes the data will not receive the data on time. I believe i should use some visa wait on event or visa disable event, but which one and how?
0 Kudos
Message 1 of 7
(3,325 Views)
most modern instruments have a status register which you might poll to detect a finished measurement task.

if your instrument sends continiusly data while doing the job, wait until the first amount of data in the buffer (number of bytes at port) and start reading data with a good matching timout value.
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 7
(3,325 Views)
Yes the instrument does have a status register, but could you be more specific on which commands i should send? For instance, to query the event register, we use the command *ESR?, but there are other commands i should be using i believe, like *OPC and *ESR ...? Do you know anything about those? Thanks.
0 Kudos
Message 3 of 7
(3,325 Views)

Below are links to various tutorials, examples, and app notes to help you with VISA events and instrument status registers.

Interative tutorial on VISA and instrument status registers 

LV Examples using VISA and instrument status registers 

App note on using instrument status registers and service requests in LabVIEW

0 Kudos
Message 4 of 7
(3,325 Views)

And just to state the obvious, you might want to check ni.com/idnet to see if we've already written some VIs for your instrument that do this for you.

If you don't find a driver there, you can use a similar driver as an example, along with the helpful information that "Noel" posted.

You can also post a message asking if anybody else might have already written VIs for your instrument. What instrument are you using?

Brian

0 Kudos
Message 5 of 7
(3,324 Views)
Hi brian,

I'm using the HP 70004A RIN analyzer. Thanks for the tips.
0 Kudos
Message 6 of 7
(3,324 Views)

If I'm not mistaken, the 70004A is a display part of a "modular measurement system", and that you have other components that plug into it, such as a 71400C.

My point is that you might search for drivers for the other part numbers in the system, too.

I hope this helps, but I wouldn't be surprised if you will be developing your own VIs to do the communications. When you are done, I encourage you to share your VIs by submitting them back to the Instrument Driver Network, so that others can share your work.

Brian

0 Kudos
Message 7 of 7
(3,325 Views)