An Introduction to Instrument Programming in LabVIEW Using GPIB/IEEE-488

        We assume that you have some background - however sparse - in programming.  In this lesson, we will examine how to communicate with an instrument using LabVIEW and a GPIB (IEEE-488) connection.  We will focus on the Fluke Hydra Data Acquisition Unit (DAU), but what is covered here is applicable to many other instruments.  Note that LabVIEW is a copyrighted name owned by the National Instruments Corporation, and that is the corporation that sells LabVIEW.  It is the most widely used programming environment for instrument control although there is considerable instrument programming done in C/C++ and Visual Basic.  LabVIEW is a visual programming environment (which means that you do not write sequential lines of code) and seems to be uniquely matched to the ways of thinking and solving problems that engineers and scientists commonly employ.

        The first step in instrument programming is to reset the instrument under program control in LabVIEW.  What you need for that process is the following.



The Hydra

        In the lab, you will find that the numbered terminals for the Hydra have been brought out to a connector block attached to the top of the Hydra.  Those terminals are shown below in the photo of the Hydra and we are referring to the orange terminal blocks there.

        In the example in this note, we will be taking a temperature measurement from Channel 1 of the Hydra.  That means that you should connect the thermocouple leads to the Hydra.

WARNING:  You cannot take a temperature measurement from the front panel terminals (Channel 0).  You might try, and you might even force the thermocouple wires into those terminals, but it will not work!


Taking a Temperature Measurement

        Taking a temperature measurement is more complex than just resetting the instrument.  The steps you need to take are as follows (assuming that the instrument has been reset).  Here's the diagram for the vi.

Here's what you do in this vi.

        The vi above will take a single temperature measurement once the instrument has been reset.  That allows you to put the temperature mesurement inside a loop and put the reset outside the loop.  If you use this in an application where speed is critical, you might also want to consider putting the GPIB Write block that sets the channel and the measurement type outside the loop, separating it from the rest of the operations above.