The GPIB-232CV-A is warranted against defects in materials and wo rkm ans hip fo r a period of two y ears from t he date of
shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace equipment
that proves to be defective during the warranty period. Th is warrant y in cludes parts and labor.
The media on which you receive National Instruments software are warranted not to fail to execute programming instructions,
due to defects in materials and workmanship, for a period of 90 days from date of sh ipmen t, as evid enced b y receipt s o r other
documentation. National Instruments will, at its op ti on , repair or repl ace soft ware me dia th at do not ex ecu te pr ogram mi ng
instructions if National Instruments receives notice of such defects during the warranty period. National Instruments does not
warrant that the operation of the software shall be uni nterrup ted or error free.
A Return Material Authorization (RMA) number must be obtained from the factory and clearly marked on the outside of
the package before any equipment will be accepted for warranty work. National Instruments will pay the shipping costs of
returning to the owner parts which are covered by warrant y.
National Instruments believes that the information in this document is accurate. The document has been carefully reviewed
for technical accuracy. In the event that technical or typographical errors exist, National Instruments reserves the right to
make changes to subsequent editions of this document withou t p rio r no ti ce to hold ers o f thi s ed itio n. The read er sh ou ld consul t
National Instruments if errors are suspected. In no even t shall Nati on al Inst rum ents be l iable fo r any dama ges aris in g o ut of
or related to this document or the information contained in it.
XCEPT AS SPECIFIED HEREIN
E
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOMER
NSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS, OR INCIDENTAL OR
I
CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF
apply regardless of the form of action, whether in contract or tort, including negligence. Any action against National Instruments
must be brought within one year after the cause of action accrues. National Instruments shall not be liable for any delay in
performance due to causes beyond its reasonable control. The warranty provided herein does not co ver d amag es, defects,
malfunctions, or service failures caused by ow ner’s fai lu re t o foll ow th e Nation al Inst rum ent s in stal l ation, op erat i on, or
maintenance instructions; owner’s modification of the pro du ct; ow ner’s abus e, m isus e, or negligent acts; and po wer failure or
surges, fire, flood, accident, actions of third parties, or other events outside reasonable control.
ATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AND SPECIFICALLY DISCLAIMS ANY
, N
Copyright
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including
photocopying, recording, storing in an informatio n retriev al s ystem, o r t ran sl ating , in who le or i n p art, wit ho ut t he prior written
consent of National Instruments Corporation.
USTOMER’S RIGHT TO RECOVER DAMAGES CAUSED BY FAULT OR
. C
. This limitation of the liability of National Instruments will
. N
ATIONAL
Trademarks
NAT4882™, National Instruments™, NI-488.2™, and ni.com™ are trademarks of National Instruments Corporation.
Product and company names mentioned herein are trad emarks o r trad e name s of thei r respect ive compan ies .
WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS
(1) NATIONAL INSTRUMENTS PRODUCTS ARE NOT DESIGNED WITH COMPONENTS AND TESTING FOR A LEVEL
OF RELIABILITY SUITABLE FOR USE IN OR IN CONNECTION WITH SURGICAL IMPLANTS OR AS CRITICAL
COMPONENTS IN ANY LIFE SUPPORT SYSTEMS WHOSE FAILURE TO PERFORM CAN REASONABLY BE
EXPECTED TO CAUSE SIGNIFICANT INJURY TO A HUMAN.
(2) IN ANY APPLICATION, I NCLUDING THE ABOVE , RELIABILITY OF OP ERATION OF THE SOFT WARE PRODUCTS
CAN BE IMPAIRED BY ADVERSE FACTORS, INCLUDING BUT NOT LIMITED TO FLUCTUATIONS IN ELECTRICAL
POWER SUPPLY, COMPUTER HARDWARE MALFUNCTIONS, COMPUTER OPERATING SYSTEM SOFTWARE
FITNESS, FITNESS OF COMPILERS AND DEVELOPMENT SOFTWARE USED TO DE VEL OP AN APPLICAT ION,
INSTALLATION ERRORS, SOFTWARE AND HARDWARE COMPATIBILITY PROBLEMS, MALFUNCTIONS OR
FAILURES OF ELECTRONIC MONITORING OR CONTROL DEVICES, TRANSIENT FAILURES OF ELECTRONIC
SYSTEMS (HARDWARE AND/OR SOFTWARE), UNANTICIPATED USES OR MISUSES, OR ERRORS ON THE PART OF
THE USER OR APPLICATIONS DESIGNER (ADVERSE FACTORS SUCH AS THESE ARE HEREAFTER
COLLECTIVELY TERMED “SYSTEM FAILURES”). ANY APPLICATION WHERE A SYSTEM FAILURE WOULD
CREATE A RISK OF HARM TO PROPERTY OR PERSONS (INCLUDING THE RISK OF BODILY INJURY AND DEATH)
SHOULD NOT BE RELIANT SOLELY UPON ONE FORM OF ELECTRON IC SYSTE M DUE TO THE RISK OF SYSTEM
FAILURE. TO AVOID DAMAGE, INJURY, OR DEATH, THE USER OR APPLICATION DESIGNE R MU ST T AKE
REASONABLY PRUDENT STEPS TO PROTECT AGAINST SYSTEM FAILURES, INCLUDING BUT NOT LIMITED TO
BACK-UP OR SHUT DOWN MECHANISMS. BECAUSE EACH END-USER SYSTEM IS CUSTOMIZED AND DIFFERS
FROM NATIONAL INSTRUMENTS' TESTING PLATFORMS AND BECAUSE A USER OR APPLICATION DESIGNER
MAY USE NATIONAL INSTRUMENTS PRODUCTS IN COMBINATION WITH OTHER PRODUCTS IN A MANNER NOT
EVALUATED OR CONTEMPLATED BY NATIONAL INSTRUMENTS, THE USER OR A PPLICATION DE SIGNER IS
ULTIMATELY RESPONSIBLE FOR VERIFYING AND VALIDATING THE SUITAB ILITY OF NA TIONAL
INSTRUMENTS PRODUCTS WHENEVER NATIONAL INSTRUMENTS PRODUCTS ARE INCORPORATED IN A
SYSTEM OR APPLICATION, INCLUDING, WITHOUT LIMITATION, THE APPROPRIATE DESIGN, PROCESS AND
SAFETY LEVEL OF SUCH SYSTEM OR APPLICATION.
Page 4
Compliance
FCC/Canada Radio Frequency Interference Compliance*
Determining FCC Class
The Federal Communications Commission (FCC) has rules to protect wireless communications from interference.
The FCC places digital electronics into two classes. These classes are known as Class A (for use in industrialcommercial locations only) or Class B (for use in residential or commercial locations). Depending on where it is
operated, this product could be subject to restrictions in the FCC rules. (In Canada, the Department of
Communications (DOC), of Industry Canada, regulates wireless interference in much the same way.)
Digital electronics emit weak signals during normal operation that can affect radio, television, or other wireless
products. By examining the product you purchased, you can determine the FCC Class and therefore which of the two
FCC/DOC Warnings apply in the following sections. (Some products may not be labelled at all for FCC, if so the
reader should then assume these are Class A devices.)
FCC Class A products only display a simple warning statement of one paragraph in length regarding interference and
undesired operation. Most of our products are FCC Class A. The FCC rules have restrictions regarding the locations
where FCC Class A products can be operated.
FCC Class B products display either a FCC ID code, starting with the letters EXN,
or the FCC Class B compliance mark that appears as shown here on the right.
The curious reader can consult the FCC web site
information.
FCC/DOC Warnings
This equipment generates and uses radio frequency energy and, if not installed and used in strict accordance with the
instructions in this manual and the CE Mark Declaration of Conformity**, may cause interference to radio and
television reception. Classification requirements are the same for the Federal Communications Commission (FCC)
and the Canadian Department of Communications (DOC).
Changes or modifications not expressly approved by National Instruments could void the user’s authority to operate
the equipment under the FCC Rules.
Class A
Federal Communications Commission
This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15
of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the
equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio frequency
energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to
radio communications. Operation of this equipment in a residential area is likely to cause harmful interference in
which case the user will be required to correct the interference at his own expense.
http://www.fcc.gov for more
Canadian Department of Communications
This Class A digital apparatus meets all requirements of the Canadian Interference-Causing Equipment Regulations.
Cet appareil numérique de la classe A respecte toutes les exigences du Règlement sur le matériel brouilleur du
Canada.
Class B
Federal Communications Commission
This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15
of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a
residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed
and used in accordance with the instructions, may cause harmful interference to radio communications. However,
there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful
Page 5
interference to radio or television reception, which can be determined by turning the equipment off and on, the user
is encouraged to try to correct the interference by one or more of the following measures:
• Reorient or relocate the receiving antenna.
• Increase the separation between the equipment and receiver.
• Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.
• Consult the dealer or an experienced radio/TV technician for help.
Canadian Department of Communications
This Class B digital apparatus meets all requirements of the Canadian Interference-Causing Equipment Regulations.
Cet appareil numérique de la classe B respecte toutes les exigences du Règlement sur le matériel brouilleur du
Canada.
European Union - Compliance to EEC Directives
Readers in the EU/EEC/EEA must refer to the Manufacturer's Declaration of Conformity (DoC) for information**
pertaining to the CE Mark compliance scheme. The Manufacturer includes a DoC for most every hardware product
except for those bought for OEMs, if also available from an original manufacturer that also markets in the EU, or
where compliance is not required as for electrically benign apparatus or cables.
* Certain exemptions may apply in the USA, see FCC Rules §15.103 Exempted devices, and §15.105(c). Also
available in sections of CFR 47.
** The CE Mark Declaration of Conformity will contain important supplementary information and instructions for
The GPIB-232CV-A User Manual describes the features, functions, and
operation of the GPIB-232CV-A. This manual assumes that you have a
general knowledge of RS-232 serial communications and the General
Purpose Interface Bus (GPIB).
Conventions
The following conventions appear in this manual:
This icon denotes a caution, which advises you of precautions to take to
avoid injury, data loss, or a systemcrash.
bold Bold text denotes items that you must select or click on in the software,
such as menu items and dialog box options. Bold text also denotes
parameter names.
IEEE 488 and IEEE 488 and IEEE 488.2 refer to the ANSI/IEEE Standard 488.1-1987
IEEE 488.2 and the ANSI/IEEE Standard 488.2-1992, respectively, which define the
GPIB.
italic Italic text denotes variables, emphasis, a cross reference, or an introduction
to a key concept. This font also denotes text that is a placeholder for a word
or value that you must supply.
monospace Text in this font denotes text or characters that you should enter from the
keyboard, sections of code, programming examples, and syntax examples.
This font is also used for the proper names of disk drives, paths, directories,
programs, subprograms, subroutines, device names, functions, operations,
variables, filenames and extensions, and code excerpts.
RS-232 RS-232 refers to the ANSI/EIA-232-C standard.
The following documents contain information that you might find helpful
as you read this manual:
•ANSI/EIA-232-C, Interface Between Data Terminal Equipment and
Data Circuit-Terminating Equipment Employing Serial Binary Data
Interchange
•ANSI/IEEE Standard 488.1-1987, IEEE Standard Digital Interface
for Programmable Instrumentation
•ANSI/IEEE Standard 488.2-1992, IEEE Standard Codes, Formats,
Protocols, and Common Commands
GPIB-232CV-A User Manualxiiwww.ni.com
Page 11
Introduction
This chapter describes the GPIB-232CV-A, lists what you need to get
started and optional equipment you can order, and describes the panels on
the GPIB-232CV-A.
GPIB-232CV-A Overview
The GPIB-232CV-A has a powerful 8-bit microcomputer tailored for use
as an IEEE 488-to-RS-232 protocol converter. Both the RS-232 serial port
and the GPIB (IEEE 488) port are interrupt-driven and feature extremely
fast response times to external data transfers. The GPIB-232CV-A can
transparently convert data between the two ports so that control codes or
special commands are not required. Data transfers in either direction are
possible at all times.
The GPIB-232CV-A microprocessor contains an integrated direct memory
access (DMA) controller for high-speed data transfers from the GPIB
circuitry . The GPIB-232CV-A also increases the effic iency of the interface
system by using a 256 KB RAM buf fer to isolate the slower de vice from the
faster port. You can use the GPIB-232CV-A to interface either a GPIB
Controller or a GPIB device to a computer or instrument with a RS-232
port. The RS-232 serial port is fully compatible with all electrical
specifications in the RS-232 standard.
1
The operating system of the GPIB-232CV-A is contained in read-only
memory (ROM) and can address up to 256 KB of dynamic random-access
memory (RAM). The operating system programs and maintains the
LSI GPIB Controller chip, the NAT4882, which implements all IEEE 488
interface functions. The GPIB-232CV-A microprocessor contains an
integrated memory management unit, a dynamic RAM controller, a clock
generator, a programmable timer unit, a full duplex UART (Universal
Asynchronous Receiver Transmitter), and an interrupt controller.
❑ If you have the GPIB-232CV-A AC version, one of the following
power cords:
–U.S. standard power cord
–Swiss power cord
–Australian power cord
–Universal European power cord
–North American power cord
–U.K. power cord
❑ If you have the GPIB-232CV-A DC version, one of the following:
–9 V wall-mount power supply (100–120 VAC)
–9 V wall-mount power supply (220–240 VAC)
❑ T ype XI or X2 single-shielded or double-shielded GPIB cable (1, 2, or
4 m), which you can purchase from National Instruments
Caution
double-shielded GPIB cable. If you operate this equipment with a non-shielded cable,
it may interfere with radio and television reception.
To meet FCC emission limits for this device, you must use a Type X2
Optional Equipment
You can order a 9-pin, 2 m RS-232 shielded cable (GPIB-232CV-A to
IBM PC) from National Inst ruments.
GPIB-232CV-A User Manual1-2www.ni.com
Page 13
Inspection
Before you operate the GPIB-232CV-A, inspect the shipping container and
its contents for damage. Keep the packing material for possible inspection
and/or reshipment.
If the equipment appears to be damaged, do not attempt to operate it.
Contact National Instruments for instructions. If the damage appears to
have been caused in shipment, file a claim with the carrier.
GPIB-232CV-A Panels
The following sections describe the panels of the GPIB-232CV-A.
AC Front Panel
The power switch, fuse holder, and power cord receptacle are located on
the GPIB-232CV-A front panel, on the AC version only. Figure 1-1 shows
the front panel of the AC version.
The GPIB connector and the RS-232 connector are mounted on opposite
side panels. On the DC version, the DC power jack is on the same end as
the serial connector.
Figure 1-4 shows the location of the RS-232 and GPIB connectors and the
DC power jack.
DC Power Jack
(DC version only)
GPIB-232CV-A
IEEE 488 ControllerRS-232
POWER
RS-232 Connector
Figure 1-4.
Location of the Connectors and the DC Power Jack
READY
TALK
BUSY
LISTEN
GPIB Connector
FULL
GPIB-232CV-A User Manual1-6www.ni.com
Page 17
Chapter 1Introduction
RS-232 Connector
The RS-232 port on the GPIB-232CV-A is configured as a DTE (Data
Terminal Equipment) and uses a standard 9-pin shielded D-Subminiature
male connector with screwlock assemblies. The RS-232 connector accepts
standard 9-pin D-Subminiature female connectors. Figure 1-5 shows a
diagram of the serial connector and the signals supported. For more
information on the RS-232 signals refer to Appendix B, Interfacing to a
The GPIB connector is a standard 24-pin shielded Champ female connector
with metric screwlock hardware. Figure 1-6 shows a diagram of the GPIB
connector and the signals supported. A * suffix indicates that the signal is
active low.
DIO1*
DIO2*
DIO3*
DIO4*
EOI*
DAV*
NRFD*
NDAC*
IFC*
SRQ*
ATN*
SHIELD
Figure 1-6.
1
2
3
4
5
6
7
8
9
10
11
12
DIO5*
13
DIO6*
14
DIO7*
15
DIO8*
16
REN*
17
GND (Twisted Pair with DAV*)
18
GND (Twisted Pair with NRFD*)
19
GND (Twisted Pair with NDAC*)
20
GND (Twisted Pair with IFC*)
21
GND (Twisted Pair with SRQ*)
22
GND (Twisted Pair with ATN*)
23
SIGNAL GROUND
24
GPIB Connector and Signal Designations
GPIB-232CV-A User Manual1-8www.ni.com
Page 19
Configure and Install
Your Hardware
This chapter describes how to configure and install your GPIB-232CV-A.
Configure Your Hardware
Before you configure your GPIB-232CV-A, verify that the voltage marked
on the GPIB-232CV-A or on the power supply matches the voltage that is
supplied in your area.
2
Caution
on your GPIB-232CV-A. Doing so could damage the unit. Replacement fuses for the
AC version must be the proper type and size. For fuse specifications, refer to Appendix A,
Specifications.
Do not operate your GPIB-232CV-A at any voltage other than the one marked
Your GPIB-232CV-A is configured at the factory, as follows:
•D mode
•GPIB primary address 5
•SRQ feature disabled
•Serial port is configured to:
–9600 baud
–1 stop bit per character
–Parity generation/checking disabled
–7 data bits per character
–XON/XOFF protocol disabled
If you want to change any of the GPIB-232CV-A characteristics, you must
change the configuration switches. For information on choosing the mode
of operation, refer to Choosing Between D Mode and C Mode
Configuration in Chapter 3, Operation of the GPIB-232CV-A. Chapter 3
also contains information about choosing whether or not to use other
available features.
If you are already using the GPIB-232CV-A and decid e to change its
operating characteristics, you must first shut down your system and then
continue with the following steps.
Configure the GPIB-232CV-A Parameters
You can use the DIP switches on the rear panel (see Figure 1-1,
GPIB-232CV-A AC Front Panel, and Figure 1-4, Location of the
Connectors and the DC Power Jack) to configure the GPIB-232CV-A.
Figure 2-1 shows the factory default setting for SW1.
MODE
CONFIG
GPIB ADDRESS
O
N
12345678
SW1
Figure 2-1.
Factory Default Switch Settings for SW1
In Figure 2-1, switches 1 through 5 are ON, OFF, ON, OFF, and OFF,
respectively, indicating a GPIB primary address of 5. Switches 6 and 7 are
in the OFF position, indicating that SRQ is disabled and the small serial
buffer is used. Switch 8 is in the OFF position, indicating that the unit is
configured to operate in D mode.
T ables 2-1, 2-2, and 2-3 show the possible configurations of SW1 and what
the configurations indicate. Default settings appear in bold italics.
Table 2-1.
Configuration Parameters for SW1 Switches 1 through 5
Table 2-2. Configuration Parameters for SW1 Switches 6 and 7
SwitchesIndication
67D ModeC Mode
Switches
Indication12345
(D Mode) or
No Addressing Performed
(C Mode)
OFFOFFSRQ Disabled and
Timeout Termination
Small Serial Buffer
ONOFFSRQ Enabled and
CR Termination
Small Serial Buffer
OFFONSRQ Disabled and
LF Termination
Large Serial Buffer
ONONSRQ Enabled and
No Swapping
Large Serial Buffer
Table 2-3. Configuration Parameters for SW1 Switch 8
Switch 8 PositionIndication
OFFGPIB-232CV-A Operates in D Mode
ONGPIB-232CV-A Operates in C Mode
GPIB-232CV-A User Manual2-4www.ni.com
Page 23
Configure the Serial Port Parameters
You can use the DIP switch SW2 on the rear panel (see Figure 1-3,
GPIB-232CV-A Rear Panel, and Figure 1-4, Location of the Connectors
and the DC Power Jack) to configure the serial port parameters of the
GPIB-232CV-A. Figure 2-2 shows the factory default setting.
O
N
Chapter 2Configure and Install Your Hardware
BAUD RATE
DATA FORMAT
HANDSHAKE
12345678
SW2
Figure 2-2.
Factory Default Switch Settings for SW2
In Figure 2-2, switches 1 through 3 are ON, OFF, and ON, respectively,
indicating that the serial port is operating at 9600 baud. Switches 4 and 5
are both OFF, which indicates that parity is disabled. Switch 6 is OFF,
which indicates 1 stop bit per character. Switch 7 is OFF, indicating that the
GPIB-232CV-A is using 7 bits/character for its serial data transfers.
Switch 8 is OFF, indicating that XON/XOFF software handshaking is
disabled.
Tables 2-4 and 2-5 show the possible configurations of SW2 and what the
configurations indicate. Default settings appear in bold italics.
Table 2-4.
Configuration Parameters for SW2 Switches 1 through 3
Configuration Parameters for SW2 Switches 1 through 3 (Continued)
Switches
Indication123
Table 2-5.
4OFFOdd parity
5OFFParity generation/checking disabled
6OFF1 stop bit per character
7OFF7 bits per character
Configuration Parameters for SW2 Switches 4 through 8
ONEven parity
ONParity generation/checking enabled
ON2 stop bits per character
ON8 bits per character
8OFFXON/XOFF protocol disabled
ONXON/XOFF protocol enabled
Install Your Hardware
After configuring the switch settings on your GPIB-232CV-A, complete
the following steps to install the GPIB-232CV-A.
Step 1. Shut Down Your System
Before you connect the cables, complete the following steps:
1.Shut down your system.
2.Turn off your computer and unplug the power cord.
GPIB-232CV-A User Manual2-6www.ni.com
Page 25
Chapter 2Configure and Install Your Hardware
Step 2. Verify That You Have a Null-Modem Serial Cable
You must use a null-modem serial cable (also known as a file transfer cable
or a DTE-to-DTE cable) to connect your computer to the GPIB-232CV-A.
The following National Instruments cables are null-modem serial cables.
National Instruments
See Appendix B, Interfacing to a Serial Device, for more information
regarding cable pinouts.
Step 3. Connect the Cables
To connect the cables, complete the following steps:
1.Connect the serial cable to the GPIB-232CV -A 9-pin D-Sub connector
and securely fasten the holding screws. Connect the other end of the
cable to your serial device. Be sure to use only shielded serial cables,
and follow all RS-232 cabling restrictions.
2.Connect the GPIB cable to the GPIB-232CV-A 24-pin Champ
connector and tighten the thumb screws on the connector . Connect the
other end to your GPIB system. Be sure to use only shielded GPIB
cables, and follow all IEEE 488 cabling restrictions.
3.If you have an AC version, connect the power cord to the power
receptacle on the front panel of the GPIB-232CV-A, then plug the
supply into an AC outlet of the correct voltage.
If you have a DC version, connect the DC power plug of the DC power
supply to the power jack on the serial end of the GPIB-232CV-A, then
plug the supply into an AC outlet of the correct voltage.
Table 2-6.
Part Number
182238-019-pin to 9-pin, 1 m
182238-029-pin to 9-pin, 2 m
182238-049-pin to 9-pin, 4 m
181074-109-pin to 25-pin, 1 m
Step 4. Power on Your System and Switch on Your GPIB-232CV-A
1.Plug the power cords for your computer system into a power outlet and
power on all devices.
2.If you have an A C v ersion, use the front panel rocker switch to power
on your GPIB-232CV-A. If you have a DC version, use the power
switch on the rear panel to power on your GPIB-232CV-A.
The POWER LED indicator should come on immediately. The
READY LED indicator should come on after the GPIB-232CV-A has
passed its power-on self test, indicating the unit is ready for operation.
If the READY LED does not come on within seven seconds after the
unit is powered on, recheck all connections and switch settings and
retry the power-on sequence. If the READY LED still does not come
on, contact National Instruments for technical support.
GPIB-232CV-A User Manual2-8www.ni.com
Page 27
3
Operation of the GPIB-232CV-A
This chapter describes how to choose between D mode configuration and
C mode configuration and contains information about operating the
GPIB-232CV-A in D mode or C mode, data buffering, and handshaking
schemes.
The following terms are specific to the sections in this chapter:
•A * suffix after a mnemonic indicates active low.
•A bold mnemonic indicates that it is a signal name, or a top panel
LED indicator.
•<CR> is the symbol for the Carriage Return character (hex 0D).
•<LF> is the symbol for the Linefeed character (hex 0A).
Choosing Between D Mode and C Mode Configuration
The GPIB-232CV-A can be configured either as a GPIB device that is
addressed to talk or listen by a GPIB Controller on the bus (D mode), or as
a GPIB Controller that addresses a single GPIB device to talk or listen
(C mode).
When to Use D Mode
The GPIB-232CV-A should be set to operate in D mode if you want to
connect a serial device to a GPIB system that has a GPIB Controller
responsible for addressing the GPIB-232CV-A to talk or listen. An
example of a system requiring D mode includes a serial device, such as
a printer, connected to a GPIB system with an existing GPIB Controller,
such as an IBM PC AT computer with a National Instruments AT-GPIB
IEEE 488.2 board installed, as shown in Figure 3-1.
GPIB Device
Printer
(Serial Device)
When to Use C Mode
The GPIB-232CV-A should be set to operate in C mode when transferring
data between a GPIB device that has no Controller capabilities and a serial
device. An example of a system requiring C mode includes a GPIB device,
such as a digital multimeter, connected to an IBM PC serial port through a
GPIB-232CV-A as shown in Figure 3-2.
Serial Cable
Serial Cable
GPIB Cables
GPIB-232CV-A
POWER
READY
TALK
LISTEN
BUSY
FULL
FUSE
GPIB-232CV-A
IBM PC AT
(GPIB Controller)
Figure 3-1. Example of D Mode System Setup
POWER
READY
TALK
LISTEN
FUSE
GPIB Cable
BUSY
FULL
GPIB-232CV-A
GPIB-232CV-A
IBM PC
(Serial Device)
Digital Multimeter
(GPIB Device)
Figure 3-2. Example of C Mode System Setup
GPIB-232CV-A User Manual3-2www.ni.com
Page 29
D Mode Overview
In D mode, the GPIB-232CV-A acts as another device on the bus.
Figure 3-3 shows the D mode system layout.
GPIB-232CV-A
POWER
BUSY
READY
TALK
LISTEN
FULL
FUSE
GPIB-232CV-A
Serial Device
Chapter 3Operation of the GPIB-232CV-A
Controller
GPIB
Device
GPIB
Device
GPIB
Device
In D mode, the GPIB-232CV-A can act only as a GPIB Talker or Listener.
Do not pass control to the GPIB-232CV-A when using D mode. If you do,
the GPIB circuitry in the GPIB-232CV-A accepts control and immediately
asserts the ATN* signal, a system error condition that you should avoid.
Because the GPIB-232CV -A is not System Controller in D mode, it expects
to receive GPIB commands from the Controller-In-Charge (CIC). If the
GPIB-232CV-A receives the universal De vice Clear (DCL) command or is
addressed to listen and receives the Selected Device Clear (SDC)
command, it clears its internal data buf fers and resets to its po wer -up state.
Neither Trigger (GET) nor Go To Local (GTL) have any effect on the
GPIB-232CV-A.
Data Transfers in D Mode
When you are ready to send data to the GPIB-232CV-A in D mode, address
the GPIB-232CV-A to listen, if not already in listen-only mode. All GPIB
data received by the GPIB-232CV-A is buffered and passed along to the
serial device. When you are expecting to receive data from the serial
device, address the GPIB-232CV-A to talk, and all data received over the
serial port is passed along to the GPIB port.
All data that is sent to the GPIB-232CV-A is buffered and then passed
along to the destination port. Thus, any serial data received is buffered and
then passed along to the GPIB port whenever the GPIB-232CV-A is
addressed to talk. The GPIB-232CV-A has 256 KB of RAM for buffering.
In D mode, this memory can be allocated between the serial and GPIB
buffers in two possible configurations.
The size of the serial input buffer can be set to either 256 bytes
(SW1 switch 7 set to OFF), or 32 KB (SW1 switch 7 set to ON) with the
remainder of the 256 KB of RAM allocated to the GPIB buffer.
•S et the serial input buffer size to 256 bytes if only small amounts of
data, such as status information from a plotter, are expected to be sent
from the serial device to the GPIB-232CV-A.
•S et the serial input b uffer size to 32 KB if you expect the serial device
to send large amounts of data to the GPIB-232CV-A, such as an
RS-232 instrument sending thousands of bytes of measurements.
In either case, the remainder of RAM space is used as the GPIB input
buffer. Thus, if a large amount of GPIB data is expected to be sent to the
GPIB-232CV-A, it would be advantageous to use the small 256 byte serial
port buffer size if possible. Then the majority of RAM is used as the GPIB
buffer. The larger serial buffer size is a means of capturing a larger
percentage of the total RAM space for serial input use.
Regardless of the buf fer size you choose, serial data is not lost because the
GPIB-232CV-A implements a hardware handshake scheme, and if
selected, the XON/XOFF software handshake scheme. The variable b uffer
size is a means of optimizing the GPIB-232CV-A for your application.
Using the SRQ Feature
The GPIB bus performance might slow down if the Controller is constantly
waiting for the GPIB-232CV-A to send or receive data. With SRQ enabled,
the bus can be used by other devices until the GPIB-232CV-A requests
service (asserts SRQ*). When the GPIB-232CV-A asserts SRQ*, the
Controller serial polls the GPIB-232CV-A to determine what type of
service it needs. After it is serial polled, the GPIB-232CV-A unasserts
SRQ*. You can enable the SRQ feature by setting switch 6 of SW1 to the
ON position.
GPIB-232CV-A User Manual3-4www.ni.com
Page 31
Chapter 3Operation of the GPIB-232CV-A
Conditions That Cause SRQ to be Asserted
If SRQ is enabled, the GPIB-232CV-A asserts the SRQ* signal on two
conditions:
•When the GPIB-232CV-A receives serial data that it needs to pass on
to the GPIB port
•When the GPIB input buffer becomes empty
When the GPIB-232CV-A serial input buffer is empty and the
GPIB-232CV -A recei ves a serial character to be sent along to the GPIB, the
SRQ* signal is asserted. This alerts the GPIB Controller that the
GPIB-232CV-A has data to send to a GPIB Listener. The Controller can
then address the GPIB-232CV-A to talk so that the data can be read out of
the GPIB-232CV-A serial buffer. When the serial buffer is empty, the
Controller can unaddress the GPIB-232CV-A to talk and address other
devices to transfer data on the bus.
SRQ* is also asserted when the GPIB input buffer becomes empty. When
the GPIB-232CV-A has emptied out the buffer, it requests service,
indicating it is ready for more data. The Controller can then readdress the
GPIB-232CV -A to listen and continue sending data until all the data is sent.
Maximizing Performance with SRQ
If large amounts of data (greater than the GPIB buffer size) are sent over
the GPIB to the GPIB-232CV-A and the serial device is a very slow data
acceptor, the GPIB-232CV-A internal GPIB data buffer might become full.
If this occurs, the FULL indicator on the front panel illuminates and the
GPIB transfer rate slows to approximately the same rate as the serial device
that is accepting the data. Because the maximum data transfer rate on the
GPIB is only as fast as the slowest Listener, the GPIB system performance
may become unacceptable if other GPIB devices are required to transfer
data on the bus.
To get maximum GPIB performance when large amounts of data are sent
to the GPIB-232CV -A, enable the SRQ feature and send only data amounts
up to but not exceeding the GPIB input b uffer size. The Controller can then
unaddress the GPIB-232CV-A to listen so that other devices can use the
bus. When the GPIB-232CV-A is ready to receive more data, it asserts the
SRQ* signal.
If the GPIB-232CV-A is serial polled, its response byte depends on the
status of the internal data buffers, as follows:
•If the serial input buffer is empty, bit 1 of the status byte is set to 1.
•If the serial input buffer is not empty, bit 1 is set to 0.
•If the GPIB input buffer is empty, bit 0 of the status byte is set to 1.
•If the GPIB input buffer is not empty, bit 0 is set to 0.
In all cases, bit 6 is set to 1 if the GPIB-232CV-A is requesting service;
otherwise it is set to 0.
GPIB-232CV-A Operation in Listen-Only Mode
In listen-only mode, no addressing is required to make the GPIB-232CV-A
a GPIB Listener and it cannot be unaddressed to listen. All data transferred
on the GPIB is accepted by the GPIB-232CV-A and output to the serial port
even if the data was intended for another device. This configuration can be
used to monitor all GPIB data bus activity. Notice that when the
GPIB-232CV-A is configured as a listen-only device, it cannot be serial
polled.
The GPIB primary address for the GPIB-232CV -A is specified b y switches
1 through 5 of the DIP switch SW1. If GPIB address switches 1 through 5
are all set to ON, the GPIB-232CV-A is configured as a listen-only device.
Figure 3-4 shows the switch settings for listen-only mode.
MODE
CONFIG
GPIB ADDRESS
O
N
12345678
SW1
Figure 3-4.
GPIB-232CV-A User Manual3-6www.ni.com
Switch Settings for Listen-Only Mode
Page 33
C Mode Overview
In C mode, the GPIB-232CV-A and a serial device together act as the GPIB
System Controller. Figure 3-5 shows the C mode system layout.
Serial
Device
GPIB Controller
GPIB-232CV-A
GPIB-232CV-A
Chapter 3Operation of the GPIB-232CV-A
POWER
READY
TALK
LISTEN
BUSY
FULL
FUSE
GPIB
Device
When you turn the power on with the GPIB-232CV-A in C mode, the
GPIB-232CV-A asserts IFC* for 500 µs and addresses the instruments to
listen. On a GPIB system, asserting IFC* for at least 100 µs initializes the
GPIB and causes the System Controller to become Controller-In-Charge
(CIC).
After the GPIB-232CV-A beco mes CIC, it sends out the GPIB listen
address indicated by SW1 switches 1 through 5. If switches 1 through 5 are
all ON, no addressing is performed. This configuration is useful if you are
talking to a listen-only device that does not require addressing. The
GPIB-232CV-A always asserts REN* when addressing other devices.
Data Transfers in C Mode
All incoming serial data to the GPIB-232CV-A is stored in an internal data
buffer until it is accepted by the GPIB device. All GPIB data sent to the
GPIB-232CV-A is passed immediately to the serial port without being
buffered. You can send data to your serial port as if you had a serial device
connected to it. The data is converted and sent to the GPIB instrument.
When the instrument has data to send back, the GPIB-232CV-A addresses
the instrument to talk and passes all received data to the RS-232 port.
Four different modes of operation are available within C mode to define
when the GPIB device is addressed to talk or listen. These modes are as
follows:
•Timeout termination
•<CR> termination
•<LF> termination
•No-swap
In every mode, the device is addressed to listen after the GPIB-232CV-A
becomes CIC, and all data received via the serial port is b uffered and passed
along to the device. The four modes of operation define the point at which
the GPIB device is unaddressed to listen and addressed to talk so that data
can be sent from the device to the GPIB-232CV-A. You can select these
modes using SW1 switches 6 and 7.
Timeout Termination Mode
Timeout termination mode should be used for applications in which
bidirectional communication is required and neither a <CR> nor <LF>
character is used to signal the end of a command string to the GPIB device.
To select timeout termination mode, set SW1 switches 6 and 7 to OFF.
Figure 3-6 shows the cycle of events in timeout termination mode.
Serial
Device
Receive Serial
Data
Serial
Device
GPIB-232CV-A
POWER
READY
TALK
LISTEN
BUSY
DATADATA
DATADATA
Figure 3-6.
GPIB-232CV-A
Timeout Termination Mode Cycle
FULL
FUSE
POWER
READY
TALK
LISTEN
BUSY
FULL
FUSE
GPIB Device
Addressed
to Talk
Serial Buffer Empty
and No Serial Data
Received for 300 msec
GPIB Device
Addressed
to Listen
GPIB-232CV-A User Manual3-8www.ni.com
Page 35
Chapter 3Operation of the GPIB-232CV-A
In timeout termination mode, the GPIB-232CV-A addresses the GPIB
device to talk, and any characters read from the GPIB port are passed along
immediately to the serial port. When a serial character is received by the
GPIB-232CV-A, it immediately readdresses the GPIB device to listen and
passes the character to it. It remains in this mode until its serial input buffer
becomes empty and no serial characters are received for 300 ms. After this
period of inactivity, the GPIB-232CV-A assumes that since no more serial
data is being sent, the device might have data that it needs to send back to
the GPIB-232CV-A. It then readdresses the device to talk and passes any
characters read from the GPIB port along to the serial port.
<CR> or <LF> Termination Mode
If a command string to the GPIB instrument can be terminated with either
a <CR> (carriage return) or <LF> (linefeed) character, you can use either
termination with <CR> or <LF> to readdress the GPIB device to send data.
To select <CR> mode, set SW1 switch 6 to ON and 7 to OFF. To select
<LF> mode, set SW1 switch 6 to OFF and 7 to ON.
In these modes, when the GPIB-232CV-A receives the terminating
character from the serial port, it addresses the device to talk so that any
GPIB data can be input by the GPIB-232CV-A. Then any serial character
received by the GPIB-232CV-A signals the GPIB-232CV-A to readdress
the GPIB device as a Listener . F or e xample, you might want to connect an
HP7475 GPIB plotter to an IBM PC serial port using the GPIB-232CV-A.
To then draw a line, get plotter status, and draw a circle you could use the
following BASIC commands:
Line 20 of the program outputs plotter commands to the serial port to both
draw a line and obtain status. Because neither a <CR> nor <LF> is sent
between these commands, the GPIB-232CV-A keeps the GPIB plotter
addressed to listen and sends all serial data received to the plotter . Because
the
PRINT statement is not ended with a semicolon after the double
quotation mark, BASIC automatically sends a <CR> after the last character
in the ASCII string is sent. If the GPIB-232CV-A is set up for <CR>
termination, the GPIB-232CV-A then readdresses the plotter to talk so that
its status can be output.
Line 30 inputs the status response from the plotter into the string variable
RESPONSE$.
Line 40 outputs the plotter command to the GPIB-232CV-A to draw a
circle. As soon as the GPIB-232CV-A receives the first character in this
string, it readdresses the plotter to listen and then sends these characters to
it. Notice that for this
double quotation mark. This means a <CR> is not sent. Because no
information is requested from the plotter, there is no need to send a <CR>
at the end of the string to address the plotter to talk.
No-Swap Mode
In no-swap mode, the GPIB-232CV-A never readdresses a GPIB device
after it has initially been addressed as a Listener. To select no-swap mode,
set SW1 switches 6 and 7 to ON.
PRINT statement a semicolon is included after the last
This mode is useful if your device is intended only to receive data. In the
example given in the <CR> or <LF> Termination Mode section of this
chapter, you could use the no-swap mode to talk to the plotter if you never
needed to obtain status information from it. By adding a semicolon after the
double quotation mark at the end of line 20 as shown below, you suppress
the <CR>. Since you cannot readdress in no-swap mode, the <CR> is not
needed to obtain status as it was in the previous example.
Two protection mechanisms are used to ensure that the GPIB-232CV-A
does not lose incoming serial data: data buffering and handshaking.
The GPIB-232CV -A has an internal RAM buf fer that stores incoming serial
data until it can output the data to the GPIB port. The size of this RAM
buffer determines how much serial data the GPIB-232CV-A can accept
before the buffer is completely full.
When its RAM buffer is nearly full, the GPIB-232CV-A can handshake
with the serial host to stop data transmission. When the buffer is almost
empty , the GPIB-232CV-A can again handshake with the serial host to start
data transmission. The GPIB-232CV-A is capable of using both the
XON/XOFF software handshaking and the hardware handshaking
protocols.
Hardware Handshaking
The hardware handshake function is always active during RS-232 transfers
and uses the Request to Send (RTS) and Clear to Send (CTS) signal lines.
When the GPIB-232CV-A is ready to accept serial data, it asserts the RTS
line. This signal remains asserted until the data buffer of the
GPIB-232CV-A is almost full. At this point, the GPIB-232CV-A unasserts
the RTS line, signaling to the serial host that the GPIB-232CV-A is no
longer ready to accept data. The serial host should monitor the RTS line and
suspend data transmission whenever the RTS line becomes unasserted. The
GPIB-232CV-A asserts RTS when it is again ready to receive serial data.
The GPIB-232CV-A is also able to suspend transmission when the serial
device is no longer ready to accept data. The GPIB-232CV-A is configured
to immediately stop transmission of serial data when CTS becomes
unasserted. The GPIB-232CV-A resumes transmission as soon as CTS is
reasserted.
Because most serial devices use the same form of hardware handshaking
as the GPIB-232CV -A, you can achiev e bidirectional flow control by using
a serial cable that connects the RTS signal of the GPIB-232CV-A to the
CTS signal of the serial device. In addition, the RTS signal of the serial
device should be connected to the CTS signal of the GPIB-232CV-A. This
setup allows each device to monitor the RTS signal of the other device and
to suspend transmission when necessary to prevent data loss. Refer to
Appendix B, Interfacing to a Serial Device, for more information on wiring
schemes.
XON/XOFF Software Handshaking
If your serial device does not implement or recognize the hardware
handshake scheme, your cable does not support the necessary handshake
lines, or your application software requires XON/XOFF handshaking, you
might need to enable the XON/XOFF handshaking protocol by setting
switch 8 of SW2 to ON. This handshaking protocol performs the same
function as the hardware handshake but does so by sending special control
codes over the data lines instead of changing logic levels on dedicated
control lines.
When you enable the XON/XOFF protocol, the GPIB-232CV-A sends the
XOFF character (decimal 19 or <Ctrl-S>) before the internal buffer
overflows. When the GPIB-232CV-A is able to start receiving characters
again, it sends the XON character (decimal 17 or <Ctrl-Q>). Similarly, if
the GPIB-232CV-A is transmitting data and receives the XOFF character,
it suspends transmission of any further data until it receives the XON
character.
If you are transmitting binary data, do not configure the GPIB-232CV-A
to use XON/XOFF software handshaking. Because the binary data could
contain any binary sequence, including decimal 19 (<Ctrl-S>) or
decimal 17 (<Ctrl-Q>), the GPIB-232CV - A would not be able to
distinguish between data values or handshake control codes. If
handshaking were enabled, the GPIB-232CV-A would handshake
erratically.
GPIB-232CV-A User Manual3-12www.ni.com
Page 39
Specifications
This appendix lists the electrical, environmental, and physical
characteristics of the GPIB-232CV-A .
Relative humidity ...................................10% to 95%, noncondensing
EMI.........................................................FCC Class A Verified
DC Version
Operating temperature............................10 to 40 °C
Storage temperature................................0 to 70 °C
Relative humidity ...................................10% to 95%, noncondensing
EMI.........................................................FCC Class B Certified
Physical Characteristics
AC Version
Case size .................................................118.1 by 76.2 by 44.2 mm
Case material ..........................................All metal enclosure
Weight ....................................................340 g (12 oz)
(4.65 by 3.0 by 1.74 in.)
DC Version
Case size .................................................118.1 by 76.2 by 28.2 mm
(4.65 by 3.0 by 1.11 in.)
Case material ..........................................All metal enclosure
Weight ....................................................198 g (7 oz)
GPIB-232CV-A User ManualA-2www.ni.com
Page 41
Interfacing to a Serial Device
This appendix describes the RS-232 serial port on the GPIB-232CV -A and
explains how to interface a DCE or DTE serial device to the RS-232 serial
port.
The GPIB-232CV-A transfers serial data using the electrical signals,
mechanical connections, data format, and control protocols defined in
the RS-232C standard. The RS-232 port on the GPIB-232CV-A is an
asynchronous serial communication link to a serial peripheral device.
RS-232C Standard
The RS-232C standard (international standard CCITT V.24) was
formulated in 1969 largely from the efforts of the Electronic Industries
Association (EIA) and Bell Laboratories. The standard describes the
electrical specifications and arrangement of control and data signals on
both sides of a serial communications interface. Its original intent was to
interface terminals to modems. Many manufacturers of computers and
instruments have adopted the standard for their serial communications
needs. For more information on the RS-232C standard, contact
Global Engineering Documents
7730 Carondelet Avenue, Suite 4007
St. Louis, MO 63105
(800) 854-7179
The RS-232 serial port on the GPIB-232CV-A uses a male 9-pin
D-Subminiature connector with a DTE interface configuration. Table B-1
shows the signal lines supported on the GPIB-232CV-A.
Pin
Number
2RXD
3TXD
4DTR
5GND
7RTS
8CTS
Table B-1.
Signal Description
(Receive Data)
(Transmit Data)
(Data Terminal Ready)
(Ground)
(Request to Send)
(Clear to Send)
RS-232 Serial Port Signal Configuration
RS-232
Code
BBThis signal carries serial data from the serial
device to the GPIB-232CV-A.
BAThis signal carries serial data from the
GPIB-232CV-A to the serial device.
CDThis signal is asserted by the GPIB-232CV-A to
signal that it has been powered on and is ready
to operate.
ABThis signal establishes a reference point for all
interface voltages.
CAThis signal is driven by the GPIB-232CV-A.
When asserted, it indicates that the
GPIB-232CV-A is ready to accept serial data.
When unasserted, it indicates that the
GPIB-232CV-A is no longer ready to accept
serial data because the buffer is full.
CBThis signal is sensed by the GPIB-232CV-A.
When asserted, it indicates that the serial device
is ready to accept serial data. When unasserted,
it indicates that data transmission should be
disabled.
Function
Interfacing Serial Devices to the RS-232 Serial Port
To interface other serial devices to the RS-232 serial port on the
GPIB-232CV-A, first refer to the manual that came with your serial device
to determine if the device is configured as a DTE or DCE. Also, determine
from the manual how the control lines are used and whether they must be
driven for the serial port to operate.
GPIB-232CV-A User ManualB-2www.ni.com
Page 43
Appendix BInterfacing to a Serial Device
Figure B-1 shows the location of the RS-232 connector.
DC Power Jack
(DC version only)
GPIB-232CV-A
IEEE 488 ControllerRS-232
TALK
READY
POWER
RS-232 Connector
Figure B-1. Location of the RS-232 Connector
Interfacing the GPIB-232CV-A to a DCE with Handshaking
A correctly configured DTE-to-DCE interface is wired straight across:
GPIB-232CV-A TXD to DCE TXD, GPIB-232CV-A RXD to DCE RXD,
and so on as shown in Table B-2.
Table B-2. Cable Wiring Scheme for GPIB-232CV-A DTE to Serial Device DCE
Figure B-2 shows a properly configured 9-pin DTE to 9-pin DCE cable
including the hardware handshake lines RTS, CTS, and DTR. With this
configuration, the GPIB-232CV-A can function properly (handshake) on
buffer full conditions. Figure B-3 shows an equiv alent 9-pin DTE to 25-pin
DCE cable configuration.
1
6
7
8
9
5
GPIB-232CV-A
9-pin DTE
5
9
8
7
6
1
Serial Device
9-pin DCE
Figure B-2. Cable Configuration for 9-pin DTE to 9-pin DCE with Handshaking
1
6
7
8
9
5
GPIB-232CV-A
9-pin DTE
1
14
15
16
17
18
19
20
8
21
9
10
11
12
13
22
23
24
25
Serial Device
25-pin DCE
Figure B-3. Cable Configuration for 9-pin DTE to 25-pin DCE with Handshaking
Interfacing the GPIB-232CV-A to a DCE without Handshaking
If your serial device does not require or use the hardware handshaking
protocol used by the GPIB-232CV-A, you have two options:
•Use a minimum configuration cable which does not support
hardware handshaking and use XON/XOFF software handshaking
(if necessary). To create a minimum configuration cable, connect the
signals shown in bold italics in Table B-2.
GPIB-232CV-A User ManualB-4www.ni.com
Page 45
Appendix BInterfacing to a Serial Device
•Wire a custom cable that properly interfaces the GPIB-232CV-A
hardware handshaking protocol to the handshaking protocol of your
serial device.
Minimum Configuration Cable
The minimum configuration cable assumes that the DCE does not require
external hardware handshaking. The minimum configuration for a DTE
9-pin to DCE 9-pin cable is shown in Figure B-4. Figure B-5 shows an
equivalent 9-pin to 25-pin cable.
If your application requires a custom cable, you can construct one if you
have a thorough knowledge of the handshaking protocols in volv ed. Revie w
the RS-232 characteristics of your serial device and build the cable to
properly connect the handshake lines of the two devices. Because the
DTE-to-DCE connection is a straight across connection, it often involves
only connecting RTS to RTS, CTS to CTS, DTR to DTR, and so on. If
the documentation for your serial device does not provide a thorough
explanation of its handshaking protocol, the ANSI/EIA-232-C standard is
a good reference, provided your device conforms to the RS-232 protocol.
Caution
Although handshaking might not be required, it is best to use some form of
handshaking to prevent loss of data.
Interfacing the GPIB-232CV-A to a DTE with Handshaking
For serial devices set up as DTEs, you must wire a DTE-to-DTE interface
cable, commonly known as a null modem cable. The cable allows the
GPIB-232CV-A to act as though it is communicating with a DCE, but it
swaps the appropriate pins to achieve a DTE pinout. This wiring
configuration is shown in Table B-3.
Table B-3.
GPIB-232CV-A Signal to
DTE Serial Device Signal
RXDtoTXD
TXDtoRXD
DTRtoDSR4 to 64 to 6
GNDtoGND
RTStoCTS7 to 87 to 5
CTStoRTS8 to 78 to 4
1
The connections must be implemented.
Cable Wiring Scheme for GPIB-232CV-A DTE to Serial Device DTE
Standard
DTE to DTE
9-pin9-pin
1
1
1
2 to 32 to 2
3 to 23 to 3
5 to 55 to 7
Standard
DTE to DTE
9-pin25-pin
Figure B-6 shows a typical 9-pin to 9-pin null modem cable with the RTS,
CTS, and DTR handshake lines implemented. Figure B-7 shows an
equivalent 9-pin DTE to 25-pin DTE cable configuration.
GPIB-232CV-A User ManualB-6www.ni.com
Page 47
Appendix BInterfacing to a Serial Device
The cable configuration in Figure B-6 allows you to connect to the 9-pin
serial port of a personal computer. The cable in Figure B-7 shows how to
connect to the 25-pin serial port of a personal computer.
1
6
7
8
9
5
GPIB-232CV-A
9-pin DTE
5
9
8
7
6
1
Serial Device
9-pin DTE
Figure B-6. Cable Configuration for 9-pin DTE to 9-pin DTE with Handshaking
10
11
12
13
1
8
9
14
15
16
17
18
19
20
21
22
23
24
25
Serial Device
25-pin DTE
1
6
7
8
9
5
GPIB-232CV-A
9-pin DTE
Figure B-7. Cable Configuration for 9-pin DTE to 25-pin DTE with Handshaking
Interfacing the GPIB-232CV-A to a DTE without Handshaking
If your serial device does not require or use the same hardware handshaking
protocol used by the GPIB-232CV-A, you have two options:
•Use a minimum configuration null modem cable which does not
support the hardware handshake lines and use XON/XOFF software
handshaking (if necessary). To create a minimum configuration cable,
connect the signals shown in bold italics in Table B-3.
•Wire a custom cable that properly interfaces the GPIB-232CV-A
hardware handshaking protocol to the handshaking protocol of your
serial device.
Minimum Configuration Cable
The minimum cable configuration assumes that the serial device does not
require external hardware handshaking. The minimum configuration for a
9-pin to 9-pin null modem cable is shown in Figure B-8. Figure B-9 shows
an equivalent 9-pin to 25-pin cable.
6
7
8
9
GPIB-232CV-A
9-pin DTE
Figure B-8.
6
7
8
9
GPIB-232CV-A
9-pin DTE
1
5
5
9
8
7
6
1
Serial Device
9-pin DTE
Minimum Configuration for 9-pin DTE to 9-pin DTE
11
5
6
8
9
10
11
12
13
Serial Device
14
15
16
17
18
19
20
21
22
23
24
25
25-pin DTE
Figure B-9.
GPIB-232CV-A User ManualB-8www.ni.com
Minimum Configuration for 9-pin DTE to 25-pin DTE
Page 49
Appendix BInterfacing to a Serial Device
Custom Cables
If your application requires a custom cable, you can construct one if you
have a thorough knowledge of the handshaking protocols inv olved. Revie w
the RS-232 characteristics of your serial device and build the cable to
properly connect the handshake lines of the two devices. If the
documentation for your serial device does not provide a thorough
explanation of its handshaking protocol, the ANSI/EIA-232-C standard is
a good reference, provided your device conforms to the RS-232 protocol.
Caution
Although handshaking might not be required, it is best to use some form of
This appendix contains two GPIB-232CV-A application examples. The
first example shows how to use the GPIB-232CV-A as a high-speed print
spooler, and the second example shows how to connect a HP7475 GPIB
plotter to an IBM PC running AUTOCAD.
Using the GPIB-232CV-A as a High-Speed Print Spooler
Because mechanical printers and plotters are slow relati ve to the processing
speed of a computer, computers must output data at a slo w rate. This forces
you to wait for the data to be output or tolerate decreased performance if
the data transfer occurs in the background. One common solution to this
problem is to use a print spooler to relieve the computer of this task.
With a GPIB-232CV-A, you can transfer data at GPIB rates instead of
RS-232 rates. The GPIB-232CV-A uses a DMA Controller to input data
from the GPIB port to the RAM buffer and can input GPIB data at rates up
to 625 kbytes/s. Therefore, the transfer rate is limited only by the rate at
which the GPIB Talker can write data.
This example shows you how to connect and use your GPIB-232CV-A as a
high-speed print spooler which returns control to you quickly, so that you
do not have to wait for the PC to finish printing or plotting a file.
The following example is based on the assumption that a National
Instruments GPIB interface board (such as the AT-GPIB) is installed in
your computer and that you are familiar with the software configuration
utility
ibconf. Use the following procedure to set up the system the first
time:
1.Use
2.Configure the GPIB-232CV-A to operate in D mode with the small
ibconf to configure the system so that a device named either
printer or plotter is connected to the GPIB interface board. Be sure to
enable DMA transfers and to use high-speed timing.
(256 bytes) serial port buffer and SRQ disabled. The serial buf fer is set
to the smallest size to allow the GPIB port, which is the data source,
to use the majority of RAM. Set the GPIB address to the same address
Page 51
Appendix CApplication Examples
3.Connect the GPIB cable from the PC to the GPIB-232CV-A, and
assigned to the device plotter or printer in ibconf. Configure the serial
port parameters to match those of the printer or plotter.
connect the serial cable from the GPIB-232CV-A to the printer or
plotter. The system should resemble the diagram in Figure C-1.
Serial Cable
GPIB-232CV-A
GPIB-232CV-APrinter
POWER
TALK
LISTEN
READY
FUSE
GPIB Cable
BUSY
FULL
PC
Figure C-1. Example of Print Spooler Setup
4.Provide a means to transfer data to the printer or plotter easily via the
GPIB port on your PC. You can simply redirect the serial output to the
GPIB device as explained in the NI-488.2 Software Reference Manual for MS-DOS, but the overhead associated with the DOS calls makes
this method inherently slow. The fastest way to transfer data to the
GPIB port is to write a small program that executes a GPIB file write.
The following program is an example of how to do a GPIB file write
in the C programming language. You can use other languages in the
same way.
/* FASTPRINT - dumps specified data file out GPIB
to device named printer */
#include "decl.h"
#include <stdio.h>
main (argc, argv)
char **argv;
{
char fname [16],*filename;
int f;
/* prompt for file name if not provided */
if (argc <=1) {
printf ("Enter filename: ");
gets (fname);
GPIB-232CV-A User ManualC-2www.ni.com
Page 52
Appendix CApplication Examples
filename = fname;
}
else
filename = argv[1]
/* find device printer */
if ((f = ibfind ("printer"))<0) {
fprintf(stderr, "Can't find printer\n");
exit(1);
}
/* write file */
if (ibwrtf(f, filename) & ERR) {
fprintf(stderr, "Can't open %s\n", argv[1]);
exit(1);
}
}
After the program is compiled and linked, you can run it just like the DOS
print routine. Then, as long as you are not sending an amount of data greater
than the buffer size of the GPIB-232CV-A, the data transfer should
complete in a few seconds.
Connecting a HP7475 GPIB Plotter to a PC Serial Port
Many software packages provide printing and plotting utilities which use
your computer’s serial port. If GPIB support is not specifically provided in
the package, you cannot communicate with a GPIB device. By using the
GPIB-232CV-A, you can avoid this situation because the GPIB-232CV-A
allows communication between the serial port and GPIB devices.
For example, an IBM PC running AUTOCAD sends data to the plotter by
transferring data through the computer's serial port. It cannot send data to a
GPIB plotter such as the HP7475 GPIB plotter. Because AUTOCAD
supports the HP7475 serial plotter, you can use the GPIB-232CV-A to
convert the serial data from A UT OCAD into GPIB data for the plotter. The
GPIB-232CV-A automatically takes care of the GPIB addressing and
transparently converts the data from one format to the other. To use the
GPIB-232CV-A in this way, follow these steps:
1.Start AUTOCAD and select Configure AUTOCAD from the Main
Menu. Select the HP7475 plotter and configure the rest of the
operating parameters that you need.
2.Configure your GPIB-232CV-A. Set it to operate in C mode with
timeout termination. Set the GPIB address of the plotter using the
3.Power on the plotter, then power on the GPIB-232CV-A.
When the GPIB-232CV-A is powered on, it addresses the GPIB plotter.
Any data sent to the serial port by AUTOCAD is received by the
GPIB-232CV-A and stored in its internal buffer. The GPIB-232CV-A
transfers the data to the plotter over the GPIB connection as fast as the
plotter can receive it. Because the GPIB-232CV-A provides a data buffer
that spools the data as it is sent, the PC will be able to send data at serial
rates instead of plotter rates. Therefore, your data is output to the GPIB
plotter by AUTOCAD in less time than it would have taken to use the
HP7475 serial plotter.
GPIB-232CV-A configuration switches. Set the serial port parameters
to XON/XOFF disabled, 9600 baud, 7 data bits, 1 stop bit, and even
parity.
GPIB-232CV-A User ManualC-4www.ni.com
Page 54
Technical Support Resources
This appendix describes the comprehensive resources available to you in
the Technical Support section of the National Instruments Web site and
provides technical support telephone numbers for you to use if you have
trouble connecting to our We b site or if you do not have internet access.
NI Web Support
To provide you with immediate answers and solutions 24 hours a day,
365 days a year, National Instruments maintains extensi ve online technical
support resources. They are available to you at no cost, are updated daily,
and can be found in the Technical Support section of our Web site at
www.ni.com/support
Online Problem-Solving and Diagnostic Resources
•KnowledgeBase—A searchable database containing thousands of
frequently asked questions (F A Qs) and their corresponding answers or
solutions, including special sections devoted to our newest products.
The database is updated daily in response to new customer experiences
and feedback.
•Troubleshooting Wizards—Step-by-step guides lead you through
common problems and answer questions about our entire product line.
Wizards include screen shots that illustrate the steps being described
and provide detailed information ranging from simple getting started
instructions to advanced topics.
•Product Manu als—A comprehensive, searchable library of the latest
editions of National Instruments hardware and software product
manuals.
•Hardware Reference Database—A searchable database containing
brief hardware descriptions, mechanical drawings, and helpful images
of jumper settings and connector pinouts.
•Application Notes—A library with more than 100 short papers
addressing specific topics such as creating and calling DLLs,
developing your own instrument driver software, and porting
applications between platforms and operating systems.
•Instrument Driver Network—A library with hundreds of instrument
drivers for control of standalone instruments via GPIB, VXI, or serial
interfaces. You also can submit a request for a particular instrument
driver if it does not already appear in the library.
•Example Programs Database—A database with numerous,
non-shipping example programs for National Instruments
programming environments. You can use them to complement the
example programs that are already included with National Instruments
products.
•Software Library—A library with updates and patches to application
software, links to the latest versions of driver software for National
Instruments hardware products, and utility routines.
Worldwide Support
National Instruments has offices located around the globe. Many branch
offices maintain a Web site to provide information on local services. You
can access these Web sites from
www.ni.com/worldwide
If you have trouble connecting to our Web site, please contact your local
National Instruments office or the source from which you purchased your
National Instruments product(s) to obtain support.
For telephone support in the United States, dial 512 795 8248. For
telephone support outside the United States, contact your local branch
office:
Australia 03 9879 5166, Austria 0662 45 79 90 0, Belgium 02 757 00 20,
Brazil 011 284 5011, Canada (Calgary) 4 03 274 9391,
Canada (Ontario) 905 785 0085, Canada (Québec) 514 694 8521,
China 0755 3904939, Denmark 45 76 26 00, Finland 09 725 725 11,
France 01 48 14 24 24, Germany 089 741 31 30, Greece 30 1 42 96 427,
Hong Kong 2645 3186, India 91805275406, Israel 03 6120092,
Italy 02 41309 1, Japan 03 5472 2970, Korea 02 596 7456,
Mexico (D.F.) 5 280 7625, Mexico (Monterrey) 8 357 7695,
Netherlands 0348 433466, Norway 32 27 73 00, Poland 48 22 528 94 06,
Portugal 351 1 726 9011, Singapore 2265886, Spain 91 640 0085,
Sweden 08 58 7 895 00, Switzerland 056 200 51 51,
Taiwan 02 2377 1200, United Kingdom 01635 523545
GPIB-232CV-A User ManualD-2www.ni.com
Page 56
Glossary
PrefixMeaningValue
µ-micro-10
m-milli-10
k-kilo-10
°degrees
%percent
Aamperes
ACalternating current
ANSIAmerican National Standards Institute
ASCIIAmerican Standards Code for Information Interchange
ATNAttention
CCelsius
–6
–3
3
CICController-In-Charge
CRcarriage return
CSACanadian Standards Association
CTSClear to Send
DAVData Valid
DCdirect current
DCEData Circuit-terminating Equipment
DIOdigital input/output
DIPdual inline package
DMAdirect memory access
DTEData Terminal Equipment
DTRData Terminal Ready
EIAElectronic Industries Association
EMIelectromagnetic interference
EOIend or identify
FCCFederal Communications Commission
ggrams
GNDground
GPIBGeneral Purpose Interface Bus
hexhexadecimal
Hzhertz
IECInternational Electrotechnical Commission
IEEEInstitute of Electrical and Electronic Engineers
IFCInterface Clear
in.inches
KBkilobytes of memory
LEDlight-emitting diode
LFlinefeed
LSIlarge scale integration
mmeters
ozounces
PCpersonal computer
RAMrandom-access memory
RENRemote Enable
ROMread-only memory
R TSRequest to Send
RXDReceive Data
sseconds
SRQService Request
GPIB-232CV-A User ManualG-2www.ni.com
Page 58
TXDTransmit Data
UARTUniversal Asynchronous Receiver Transmitter
ULUnderwriters Laboratories
Vvolts
VACvolts alternating current
VDCvolts direct current
AC front panel, 1-3
application examples, C-1 to C-4
connecting HP7475 GPIB plotter to PC
serial port, C-3 to C-4
using GPIB-232CV-A as high-speed print
spooler, C-1 to C-3
ATN* signal, assertion in D mode, 3-3
B
buffer size for serial port, choosing, 3-4
BUSY LED (table), 1-5
C
C mode configuration, 3-7 to 3-11
choosing between D mode and
C mode, 3-1 to 3-2
Controller-in-Charge, 3-7
<CR> or <LF> termination
mode, 3-9 to 3-10
data transfers, 3-7
example of system setup (figure), 3-2
IFC* assertion, 3-7
modes of operation, 3-8 to 3-11
no-swap mode, 3-10 to 3-11
REN* assertion, 3-7
system layout (figure), 3-7
timeout termination mode, 3-8 to 3-9
when to use, 3-2
cables, connecting, 2-7
configuration, 2-1 to 2-6
factory configuration settings, 2-1
location of switches on rear panel
(figure), 1-5
operating at incorrect voltage (caution), 2-1
parameters for SW1 switches
<CR> or <LF> termination
mode, 3-9 to 3-10
default settings for SW1 (figure), 2-2
Listen-only mode setting (figure), 3-6
parameters for SW1 switch 8
(table), 2-4
parameters for SW1 switches
1 through 5 (tab le), 2-2 to 2-4
parameters for SW1 switches 6 and 7
(table), 2-4
serial port parameters
factory default switch settings
(figure), 2-5
SW2 switches 1 through 3
(table),2-5to2-6
SW2 switches 4 through 8 (table), 2-6
conventions used in manual, xi
<CR> or <LF> termination mode, C mode
configuration, 3-9 to 3-10
CTS signal, RS-232 port (table), B-2
D
D mode configuration, 3-3 to 3-6
ATN* signal asserted, 3-3
choosing between D mode and
Cmode,3-1to3-2
choosing serial port buffer size, 3-4
conditions causing SRQ assertion, 3-5
data transfers, 3-3
example of system setup (figure), 3-2
listen-only mode operation, 3-6
maximizing performance with SRQ, 3-5
serial poll responses, 3-6
system layout (figure), 3-3
Talker or Listener mode, 3-3
FULL LED (table), 1-5
fuse holder, on AC front panel, 1-3
fuse rating and type, A-1
G
GET (Trigger) command, 3-3
GND signal, RS-232 port (table), B-2
Go To Local (GTL) command, 3-3
GPIB connector
overview, 1-8
signals supported (figure), 1-8
GPIB-232CV-A User ManualI-2www.ni.com
Page 61
Index
GPIB-232CV-A. See also operation of
GPIB-232CV-A.
AC front panel, 1-3
GPIB connector, 1-8
inspecting for damage, 1-3
optional equipment, 1-2
overview, 1-1
rear panel, 1-5
requirements for getting started, 1-2
RS-232 connector, 1-7
side panels, 1-6 to 1-8
top panel, 1-4 to 1-5
(example), C-3 to C-4
POWER LED (table), 1-4
print spooler, high speed, using
GPIB-232CV-A as (example), C-1 to C-3
problem-solving and diagnostic resources,
online, D-1
R
READY LED
checking during first power-on, 2-8
description (table), 1-4
rear panel, 1-5
REN* signal, asserted in C mode, 3-7
requirements for getting started, 1-2
RS-232 serial port
buffer size selection in D mode, 3-4
configuration parameters
factory default settings (figure), 2-5
SW2 switches 1 through 3
(table),2-5to2-6
SW2 switches 4 through 8
(table), 2-6
interfacing serial devices, B-2 to B-9
location of RS-232 connector
(figure), B-3
to DCE with handshaking,
B-3toB-4
to DCE without handshaking,
B-4toB-6
to DTE with handshaking, B-6 to B-7
to DTE without handshaking,
B-7toB-9
overview, 1-7
RS-232C standard for, B-1
signal configuration (table), B-2
signals supported (figure), 1-7
RTS signal, RS-232 port (table), B-2
RXD signal, RS-232 port (table), B-2
S
SDC (Selected Device Clear) command, 3-3
serial cable, null-modem, 2-7
serial poll response of GPIB-232CV-A, 3-6
serial port. See RS-232 serial port.
side panels, 1-6 to 1-8