Section Four A
BASICA/QuickBASIC GPIB-PC Function Calls
©National Instruments Corp.
4A-21
GPIB-PC User Manual
In the examples that follow, GPIB commands and
addresses are coded as printable ASCII characters. When
the values to be sent over the GPIB correspond to printable
ASCII characters, this is the simplest means of specifying
the values. Refer to Appendix A for conversions of numeric
values to ASCII characters.
Board Examples:
1.
Unaddress all Listeners with the Unlisten (UNL or ASCII ?)
command and address a Talker at &H46 (ASCII F) and a
Listener at &H31 (ASCII 1).
100 CMD$ = "?F1"
' UNL TAD1 LAD2
110 CALL IBCMD (BRD0%,CMD$)
2.
Same as Example 1, except the Listener has a secondary
address of &H6E (ASCII n).
100 CMD$ = "?F1n"
' UNL TAD1 LAD2 SAD2
110 CALL IBCMD (BRD0%,CMD$)
3.
Clear all GPIB devices (i.e., reset internal functions) with the
Device Clear (DCL or &H14) command.
100 CMD$ = CHR$ (&H14) ' DCL
110 CALL IBCMD (BRD0%,CMD$)
4.
Clear two devices with listen addresses of &H21 (ASCII !) and
&H28 (ASCII ( (left parenthesis)) with the Selected Device
Clear (SDC or &H04) command.
100 CMD$ = "!(" + CHR$(&H04) ' LAD1 LAD2 SDC
110 CALL IBCMD (BRD0%,CMD$)
5.
Trigger any devices previously addressed to listen with the
Group Execute Trigger (GET or &H08) command.
100 CMD$ = CHR$(&H08)
' GET
110 CALL IBCMD (BRD0%,CMD$)