Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Correct sequence of programming any GPIB InInstrument

Hi,
Now in my current project ,i have to handle one Network Analyzer of IEEE488.2 support. All fuctionalities(around 250) of this instrument has to be controlled and measurements to be displayed  on PC with some added features(I do have the Instrument Driver). So far i were familiar with only Read n Write GPIB
commands(with them i hd finished one complete project). My questions ,
1.what is the right sequence of programming any GPIB instrument?
2.Is there any risk involved in doing GPIB programing tht i; like putting the instrumrument into some unknown state.
3.In what seq clr,reset etc to b used.
4.Serial poll and Paralle poll whats the difference and how & when to use them.
5.How to handle service requests using Interrupts.How to use microprcessor free interrupt lines  and how to write  Interrupt Service routines using LabView.In the  LabView GPIB support i could find only polling of service requests.
 
First 3 questions are of much importance .Last two  only for academic interest
 
Jeyaseelan
jeyaseelan P
AutoTEC Systems Pvt Ltd,
Bangalore-46
0 Kudos
Message 1 of 2
(2,897 Views)

Typically (and especially when using an NI written or approved driver), The sequence is to open a VISA session and initialize the instrument. The initialize will query the instrument and verify that it's the correct type by doing an *IDN? command. Most Initialize functions will also include a reset function that will put the instrument in a known state. From a known state, you can then send commands to configure it the way to want for a measurement. Sometimes, it's a good idea to not rely on starting from the "known" state. The default settings of an instrument could change from one model to the next or from one firmware version to the next. So, for example, if a DMM's reset state might be be Volts DC, it is often a good idea to explicitly set it to Volts DC just in case. In theory, you would only need to do a reset once, at the beginning of your program since from there on, you will have full control and should always know what state it's in.

Depending on the instrument, you may have to send certain commands before others. Other times is doesn't matter at all. You really need to study the instrument manual to determine what is possible and what needs to be done in what order. I usually try to make a manual measurement before trying to do one under programatic control. I write down the sequence of button pushes, knob twists, etc. and then try to do the same thing with my program. It's unusual to put the instrument into some kine of "unknown" state but it's common (especially when just starting to write your program) to put the instrument into an error state that needs to be cleared before it will respond again. Most instruments have a command to read it's error buffer so make heavy use of this at the beginning.

The difference between serial poll and parallel poll is that you would do a serial poll of one specific instrument and a parallel poll will work for a group of instruments. Say that you have two counters connected to two different sources. You could do two separate serial polls of each instrument to see if either has triggered or you could do a parallel poll and as soon as either is triggered, determine which one and then get the reading.

I don't know if it's possible to use system interupts with GPIB. I've never done anything with them. It's the GPIB controller that is monitoring it's bus which is completely separate from the system bus. The controller monitors the GPIB bus for interupts in the form of service requests from instruments.

0 Kudos
Message 2 of 2
(2,884 Views)