for now; press OK and you should be back in
the block diagram window.
Create Some I/O
you through the
set-up process. From
the DAQ Assistant
FIGURE 10 Output>Line Output,
as shown in Figure
5. From the next window, select Port0 /Line0 though
Port0/Line3 by holding down the control key and
left-clicking on each line (see Figure 6), then click on the
In the final window of the DAQ Assistant, you can test
each output at the top of the window and you can also
invert one or more lines if desired (see Figure 7). Since the
USB-6008 digital outputs are open-drain only, they cannot
supply +5V to the terminals but only take them to ground.
Therefore, the LED cathodes should be connected to the
USB terminals as shown in Figure 8. If we do not invert the
lines, the LEDs will be OFF when the toggle switches are
pushed and ON when they are released — which is not
what the user would normally expect.
To invert each of the four lines, check the invert line
box for each one separately or select all four lines by
holding down the control key, then clicking on each line
and then clicking in the invert line box to invert all four at
the same time. We should be done with the DAQ Assistant
The array of four toggle switches now
needs to be wired to the DAQ Assistant,
but you’ll notice that the DAQ Assistant has
several wiring points to connect to. As you
bring the wiring tool near each terminal, you
should see pop-ups showing each terminal’s
name; connect the array output to the data
input of the DAQ Assistant.
You will also notice arrows on the bottom of the DAQ
Assistant icon; you can drag the bottom edge of the DAQ
Assistant down and all of the terminal names will be visible
to you (see Figure 9). Your VI should be ready to run.
As you press each toggle switch, the appropriate LED
connected to the USB-6008 terminals should turn ON and
OFF, and pressing the stop button should put you back into
the editing mode.
Now, let’s add four digital inputs to the VI. We can
connect a four position DIP switch to PORT1 lines P1.0
through P1.3 (see Figure 10). The DIP switches do not
require external pull-ups because 4.7K resistors are built into
the USB-6008( 9)’s circuitry. The switches merely need to
connect the terminals to ground when they are closed.
Open another DAQ Assistant by selecting:
Express>Input>DAQ Assistant from the functions palette of
the block diagram window and place it inside the while
loop. From the DAQ Assistant windows that appear, select:
Acquire Signals>Digital Input>Line Input, then select
Port1/Line0 through Port1/Line3.
You can test these inputs just like the outputs from the
DAQ Assistant window and you can also invert these lines
as well, so that a +5V on a terminal pin coming from an
external switch is seen as a “0” rather than a “1.”
Notice on this DAQ Assistant the data terminal is on
the right side of the icon and is now a terminal that will
40 SERVO 04.2009