Chapter 5 wibic–Windows Interface Bus Interactive Control Utility
© National Instruments Corp. 5-13 NI-488.2 User Manual for Windows
Common NI-488.2 Routines in wibic
Set
You must use the set command before you can use NI-488.2 routines in wibic. The
syntax for this form of the set command is as follows:
set 488.2 n
where n represents a board number (for example, n=0 for gpib0).
The 488.2 prompt indicates that you are in NI-488.2 mode on board n. The following
example shows how to enter into 488.2 mode on board gpib0 .
set 488.2 0
488.2 (0):
Send and SendList
The Send routine sends data to a single GPIB device. You can use the SendList
command to send data to multiple GPIB devices. For example, suppose you want to send
the five character string *IDN? followed by the new line character with EOI. You want
to send the message from the computer to the devices at primary address 2 and 17. To do
this, enter the SendList command at the 488.2 (0) prompt as shown in the
following example:
488.2 (0): SendList 2, 17 “*IDN?” NLend
[0128] (cmpl cic tacs)
count: 6
The returned status word contains the cmpl bit, which indicates a successful I/O
completion. The byte count 6 indicates that six characters, including the added new line,
were sent from the computer and received by both devices.
Receive
The Receive routine causes the GPIB board to receive data from another GPIB device.
The following example acquires 10 data bytes from the device at primary address 5. It
stops receiving data when 10 characters have been received or when the END message is
received. The acquired data is then displayed in hex format along with its ASCII
equivalent. The wibic program also displays the status word and the count of
transferred bytes.