Programming
the Hydra Data Acquisition Unit in LabView
You can program the Hydra in LabView The specific LabView program
here takes a single DC voltage measurement. At the end of the lesson
you can modify the program to measure a single temperature.
Goals
of This Lesson
-
Given a Hydra and a Wintel
computer,
-
Be able to write LabView
programs to measure DC voltages.
What
You Need
Before you can do measurements, you need to take care of the following
points.
If
you have taken care of all of the above, then you need to do the following.
-
Start LabView on your
computer.
-
Write a sequence of commands
to the Hydra. The commands you need to write are:
-
*RST
-
FUNC 0,VDC,AUTO
-
*TRG
-
LAST? 0
-
To write these commands,
you need to use the GPIB Write function. It will look like this when
you place it on the Block Diagram.
-

-
The function is found
on the Functions Palette under Instrument
I/O-GPIB.
-
Place four GPIB Write
functions on the Block Diagram and wire them.
-
The address for the Hydras
in Lab should be 3.
-
Use mode 3 to append a
carriage return and line feed to the end of each command string.
-
Wire the error signal
from the first GPIBWrite function to each succeeding function. That
ensures that the GPIBWrite functions operate in the correct sequence.
-
Then read the data using
a GPIB Read function. It looks like this.
-
Finally, the output of the GPIBRead
(a string) can be presented to the user with a String Indicator on the
front panel.
-
When you're done, the result will
look like the diagram below.
Notes
On Programming In LabView
Note the following about this program.
-
The first operation is
to write a string - *RST
- to the Hydra. The write operation is similar to ibwrt in other
programming languages. Here you use a GPIB Write block.
-
Note that you do not use
the string "Hydra" to identify the Hydra in LabView. Instead, you
use the IEEE-488 address set on the Hydra. That value is 3 and is
set in the pink string constant. Note that the blue numeric constant
sets the mode so that a CR
and LF are appended
to the string when it is sent.
-
This program sends four
strings/commands to the Hydra. Click
here for a quick review of the commands for a single DC voltage measurement.
The strings are:
-
*RST
-
FUNC 0,VDC,AUTO
-
*TRG
-
LAST? 0
-
To get the measurement
into the computer, use the GPIB Read function. Here the program allows
for a 20 character string and when the string is read the string shows
up in an output text box which can be seen on the panel view.
What
if you want to measure a temperature?
-
First, note that temperature
cannot be measured from the front panel - Channel 0 - and you will have
to use one of the other channels.
-
Here's a command string
you can use. This sets the Hydra for a temperature measurement.
Everything else can stay the same in the program.
-
This will measure TEMPerature
using a type K thermocouple
connected to Channel 1 on the connector strip cemented to the top of the
Hydra DAU (See below.). You cannot measure temperature using a thermocouple
and the front panel connectors.