National Instruments GPIB-232, GPIB-485CT-A User Manual

GPIB

GPIB-232/485CT-A User Manual

GPIB-232/485CT-A User Manual
November 1999 Edition
Part Number 370898A-01

Worldwide Technical Support and Product Information

www.ni.com
11500 North Mopac Expressway Austin, Texas 78759-3504 USA Tel: 512 794 0100

Worldwide Offices

Australia 03 9879 5166, Austria 0662 45 79 90 0, Belgium 02 757 00 20, Brazil 011 284 5011, Canada (Calgary) 403 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 413091, 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 587 895 00, Switzerland 056 200 51 51, Taiwan 02 2377 1200, United Kingdom 01635 523545
For further support information, see the Technical Support Resources appendix. To comment on the documentation, send e-mail to techpubs@ni.com
© Copyright 1992, 1999 National Instruments Corporation. All rights reserved.

Important Information

Warranty

The GPIB-232/485CT-A is warranted against defects in m aterials and wo rkma nship fo r a period of t wo years from the d ate o f 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 perio d of 9 0 da ys from d ate o f sh ip ment, as ev idenced b y receipt s o r ot her 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 warranty.
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 without prior notice to holders of this edition. The reader should consult National Instruments if errors are suspected. In no event shall Natio nal Ins trument s be liab le for any dam ages arisin g out of or rel ated 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™, NI-488.2™, ni.com™, TNT4882™C, and Turbo488™ 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.

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 industrial­commercial 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
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 user or installer.

Contents

About This Manual
Conventions ...................................................................................................................xv
Related Documentation........................................... .......................................................xvi
Chapter 1 Hardware Overview
What You Need to Get Started......................................................................................1-1
GPIB-232CT-A Hardware Overview............................................................................1-2
GPIB-485CT-A Hardware Overview............................................................................1-2
AC Version Front Panel ..................................................................................1-3
Top Panel.........................................................................................................1-3
Rear Panel........................................................................................................1-4
Side Panels.......................................................................................................1-5
RS-232 Connector.............................................................................1-6
RS-485 Connector.............................................................................1-7
GPIB Connector................................................................................1-8
Chapter 2 Operating in S Mode and G Mode
Choosing Between S Mode and G Mode.......................................................................2-1
Operating in S Mode .......................................................................................2-1
Operating in G Mode.......................................................................................2-2
Data Buffering and Handshaking Schemes...................................................................2-3
Hardware Handshaking...................................................................................2-4
XON/XOFF Software Handshaking..................................... ...........................2-4
Chapter 3 Installing and Configuring Your Controller
Check the Hardware Configuration...............................................................................3-1
Connect the Hardware ...................................................................................................3-2
Step 1. Power Off Your System.....................................................................3-2
Step 2. Verify That You Have a Null-Modem Serial Cable...........................3-2
Step 3. Connect the Cables.............................................................................3-2
Step 4. Power On Your System and the GPIB-232/485CT-A .......................3-3
© National Instruments Corporation vii GPIB-232/485CT-A User Manual
Contents
Configure the Hardware................................................................................................3-3
Changing the S Mode Characteristics.............................................................3-3
Sample Switch Settings for S Mode ...............................................................3-5
IBM PC or Compatibles ...................................................................3-5
Other Systems...................................................................................3-6
Changing the G Mode Characteristics............................................................3-7
Choosing GPIB Addresses for G Mode..........................................................3-7
Chapter 4 Programming in S Mode
Choosing Your S Mode Programming Method.............................................................4-1
Status Information and Error Handling Characteristics ................................................4-1
Programming Considerations........................................................................................4-2
Programming Messages.................................................................................................4-2
Programming Message Format.......................................................................4-2
Programming Message Example 1 .................................................................4-3
Programming Message Example 2 .................................................................4-3
Programming Message Example with Data String.........................................4-3
How Messages are Processed .........................................................................4-4
Function Arguments......................................................................................................4-4
Abbreviations for Arguments..........................................................................4-4
GPIB Address .................................................................................................4-4
Lists of GPIB Addresses.................................................................................4-5
Numeric String Arguments.................................. ...........................................4-5
GPIB Read and Write Termination Methods (END and EOS).....................................4-5
Function Names.............................................................................................................4-6
S Mode Default Settings and Related Functions...........................................................4-6
List of S Mode Functions by Group..............................................................................4-7
GPIB Functions...............................................................................................4-7
Serial Port Functions.......................................................................................4-9
General Use Functions....................................................................................4-9
Alphabetical List of S Mode Functions.........................................................................4-9
Chapter 5 S Mode Functions
cac..................................................................................................................................5-2
caddr..............................................................................................................................5-4
clr...................................................................................................................................5-6
cmd................................................................................................................................5-7
conf................................................................................................................................5-9
echo................................................................................................................................5-11
eos..................................................................................................................................5-12
GPIB-232/485CT-A User Manual viii www.ni.com
Contents
eot...................................................................................................................................5-15
gts...................................................................................................................................5-17
id ....................................................................................................................................5-19
ist....................................................................................................................................5-20
lines................................................................................................................................5-21
ln ....................................................................................................................................5-22
loc...................................................................................................................................5-23
onl ..................................................................................................................................5-25
pct...................................................................................................................................5-26
ppc..................................................................................................................................5-27
ppu .................................................................................................................................5-29
rd....................................................................................................................................5-31
rpp..................................................................................................................................5-33
rsc...................................................................................................................................5-34
rsp...................................................................................................................................5-36
rsv...................................................................................................................................5-38
sic...................................................................................................................................5-39
spign...............................................................................................................................5-41
sre...................................................................................................................................5-43
stat..................................................................................................................................5-44
tmo .................................................................................................................................5-49
trg...................................................................................................................................5-51
wait.................................................................................................................................5-52
wrt..................................................................................................................................5-55
xon .................................................................................................................................5-57
Chapter 6 Programming in G Mode
Status Information and Error Handling Characteristics.................................................6-1
Programming Considerations ........................................................................................6-1
Programming Messages.................................................................................................6-2
Programming Message Format........................................................................6-2
Programming Message Example 1..................................................................6-2
Programming Message Example 2..................................................................6-3
How Messages are Processed..........................................................................6-3
Function Arguments ......................................................................................................6-3
Abbreviations for Arguments..................................................... ... ..................6-4
Addressing the GPIB-232/485CT-A and Serial Device..................................6-4
Address of the GPIB-232/485CT-A................................................................6-4
Address of the Serial Device...........................................................................6-4
Addressing the GPIB-232/485CT-A and Serial Device as Listeners..............6-4
Addressing the GPIB-232/485CT-A and Serial Device as Talkers ................6-5
GPIB Read and Write Termination Methods (END and EOS) .....................................6-6
© National Instruments Corporation ix GPIB-232/485CT-A User Manual
Contents
Serial Port Transmission................................................................................................6-7
Operation of the GPIB-232/485CT-A as a GPIB Device .............................................6-7
Serial Poll Responses......................................................................................6-7
Service Request Conditions ............................................................................ 6-8
Parallel Polls ..................................... ..............................................................6-8
Take Control (TCT)........................................ ................................................6-9
Group Execute Trigger (GET)........................................................................6-9
Go To Local (GTL).........................................................................................6-9
Device Clear....................................................................................................6-9
Function Names.............................................................................................................6-9
G Mode Default Settings and Related Functions..........................................................6-10
List of G Mode Functions by Group .............................................................................6-10
GPIB Functions...............................................................................................6-11
Serial Port Functions.......................................................................................6-11
General Use Functions....................................................................................6-11
Alphabetical List of G Mode Functions........................................................................6-11
Chapter 7 G Mode Functions
echo................................................................................................................................7-2
eos..................................................................................................................................7-4
id....................................................................................................................................7-6
onl..................................................................................................................................7-7
spign ..............................................................................................................................7-8
spset...............................................................................................................................7-9
srqen ..............................................................................................................................7-11
stat..................................................................................................................................7-13
xon.................................................................................................................................7-18
Appendix A Specifications
Appendix B Multiline Interface Messages
Appendix C Status and Error Message Information
Appendix D Interfacing to an RS-232 Device
GPIB-232/485CT-A User Manual x www.ni.com
Appendix E Interfacing to an RS-485 Device
Appendix F GPIB Basics
Appendix G Common Questions
Appendix H Parallel Polling
Appendix I Programming Steps and Examples
Appendix J Technical Support Resources
Contents
Glossary
Index

Figures

Figure 1-1. The AC Version Front Panel.................................................................1-3
Figure 1-2. The Top Panel .......................................................................................1-3
Figure 1-3. The DC Version Rear Panel..................................................................1-4
Figure 1-4. The AC Version Rear Panel..................................................................1-5
Figure 1-5. Location of the Connectors and the DC Power Jack.............................1-5
Figure 1-6. The RS-232 Connector and Signal Designations..................................1-6
Figure 1-7. The RS-485 Connector and Signal Designations..................................1-7
Figure 1-8. The GPIB Connector and Signal Designations.....................................1-8
Figure 2-1. Example of S Mode System Setup........................................................2-2
Figure 2-2. Example of G Mode System Setup .......................................................2-3
Figure 3-1. Default Setting (S Mode) for DIP Switch.............................................3-4
Figure 3-2. Switch Settings to Match IBM PC Defaults..........................................3-6
Figure 3-3. Sample Switch Settings with an IBM PC or Compatible......................3-6
© National Instruments Corporation xi GPIB-232/485CT-A User Manual
Contents
Figure 3-4. Sample G Mode Switch Setting............................................................3-7
Figure D-1. Straight-Through Cabling in a DTE-to-DCE Interface ........................D-3
Figure D-2. Null-Modem Cabling in a DTE-to-DCE Interface ...............................D-3
Figure D-3. Location of the RS-232 Connector ....................................................... D-4
Figure D-4. Cable Configuration for 9-pin DTE to 9-pin DCE
with Handshaking .................................................................................D-5
Figure D-5. Cable Configuration for 9-pin DTE to 25-pin DCE
with Handshaking .................................................................................D-5
Figure D-6. Minimum Configuration for 9-pin DTE to 9-pin DCE.........................D-6
Figure D-7. Minimum Configuration for 9-pin DTE to 25-pin DCE.......................D-6
Figure D-8. Cable Configuration for 9-pin DTE to 9-pin DTE
with Handshaking .................................................................................D-8
Figure D-9. Cable Configuration for 9-pin DTE to 25-pin DTE
with Handshaking .................................................................................D-8
Figure D-10. Minimum Configuration for 9-pin DTE to 9-pin DTE......................... D-9
Figure D-11. Minimum Configuration for 9-pin DTE to 25-pin DTE....................... D-9
Figure E-1. Male DB-9 Connector Pin Locations....................................................E-2
Figure E-2. Point-to-Point Network Using Terminating Resistors..........................E-5
Figure F-1. GPIB Connector Signals and Lines ......................................................F-4
Figure F-2. Linear Configuration of GPIB Devices ................................................F-6
Figure F-3. Star Configuration of GPIB Devices ....................................................F-7
Figure H-1. Parallel Poll Message (PPE or PPD) Bits.............................................H-2
Figure H-2. Sample PPE Message Bits....................................................................H-3
Figure H-3. Parallel Polling Setup Example 1 .........................................................H-6
Figure H-4. Parallel Polling Setup Example 2 .........................................................H-8
Figure I-1. Sample Switch Settings for a Terminal and HP Plotter........................I-2
Figure I-2. Sample Switch Settings for an IBM PC and HP Plotter.......................I-5
Figure I-3. Sample Switch Settings for an HP Serial Plotter..................................I-7
Figure I-4. Sample Switch Settings for an IBM PC and Serial Printer...................I-10

Tables

Table 1-1. LED Descriptions..................................................................................1-4
Table 3-1. National Instruments Null-Modem Serial Cables................................. 3-2
Table 3-2. S Mode Switch Settings for Serial Port Baud Rate...............................3-4
Table 3-3. S Mode Switch Settings for Data Formatting Characteristics..............3-5
Table 3-4. GPIB Address Switch Settings for G Mode .........................................3-8
GPIB-232/485CT-A User Manual xii www.ni.com
Contents
Table 4-1. S Mode Serial Port Characteristics........................................................4-6
Table 4-2. GPIB Characteristics in S Mode ...........................................................4-7
Table 4-3. Alphabetical List of S Mode Functions.................................................4-9
Table 5-1. Data Transfer Termination Methods in S Mode ...................................5-12
Table 5-2. S Mode GPIB Status Conditions Returned by stat................................5-45
Table 5-3. S Mode GPIB Error Conditions Returned by stat.................................5-46
Table 5-4. S Mode Serial Port Error Conditions Returned by stat.........................5-46
Table 5-5. Wait Mask Values.................................................................................5-53
Table 6-1. Serial Poll Response Byte .....................................................................6-7
Table 6-2. G Mode Serial Port Characteristics.......................................................6-10
Table 6-3. G Mode GPIB Characteristics...............................................................6-10
Table 6-4. Alphabetical List of G Mode Functions................................................6-11
Table 7-1. Data Transfer Termination Methods in G Mode...................................7-4
Table 7-2. SRQ Mask Bits in G Mode....................................................................7-11
Table 7-3. G Mode GPIB-232/485CT-A Conditions Returned by stat..................7-14
Table 7-4. G Mode GPIB Error Conditions Returned by stat ................................7-15
Table 7-5. Serial Port Error Conditions Returned by stat.......................................7-15
Table A-1. IEEE 488 Capability Codes for the GPIB-232/485CT-A.....................A-3
Table B-1. Multiline Interface Messages ................................................................B-2
Table D-1. RS-232 Serial Port Signal Configuration..............................................D-2
Table D-2. Cable Wiring Scheme for GPIB-232CT-A DTE to Serial
Device DCE...........................................................................................D-4
Table D-3. Cable Wiring Scheme for GPIB-232CT-A DTE to Serial
Device DTE...........................................................................................D-7
Table E-1. RS-485 Serial Port Signal Configuration..............................................E-3
Table E-2. Cable Wiring Scheme for GPIB-485CT-A to
AT-485 Serial Interface.........................................................................E-4
Table H-1. Parallel Poll Message Bit Descriptions.................................................H-3
© National Instruments Corporation xiii GPIB-232/485CT-A User Manual

About This Manual

The GPIB-232/485CT-A User Manual describes the features, functions, and operation of the GPIB-232CT-A and GPIB-485CT-A. This manual assumes that you have a general knowledge of RS-232 or RS-485 serial communications and the GPIB.

Conventions

The following conventions appear in this manual: This icon denotes a note, which alerts you to important information. This icon denotes a caution, which advises you of precautions to take to
avoid injury, data loss, or a system crash.
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.
GPIB-232/485CT-A GPIB-232/485CT-A refers to either the GPIB-232CT -A or GPIB-485CT -A
box.
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.
monospace bold Bold text in this font denotes the messages and responses that the computer
automatically prints to the screen. This font also emphasizes lines of code that are different from the other examples.
© National Instruments Corporation xv GPIB-232/485CT-A User Manual
About This Manual
RS-232 RS-232 refers to the ANSI/EIA-232-C standard. RS-422 RS-422 refers to the EIA-422-A standard. RS-485 RS-485 refers to the EIA-485 standard.

Related Documentation

The following documents contain information that you might find helpful as you read this manual:
ANSI/EIA-232-D, Interface Between Data Terminal Equipment and
Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange
EIA-485, Standard for Electrical Characteristics of Generators and Receivers for Use in Balanced Digital Multipoint Systems
EIA/RS-422-A, Electrical Characteristics of Balanced Voltage Digital Interface Circuits
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-232/485CT-A User Manual xvi www.ni.com
Hardware Overview
This chapter lists what you need to get started and optional equipment you can order, and briefly describes the GPIB-232/485CT-A.

What You Need to Get Started

Before you install your GPIB hardware, make sure you have all of the following items:
One of the following controllers, which is included in your kit:
GPIB-232CT-A, 100–120 VAC – GPIB-232CT-A, 220–240 VAC – GPIB-232CT-A, DC – GPIB-485CT-A, 100–120 VAC – GPIB-485CT-A, 220–240 VAC – GPIB-485CT-A, DC
1
If you have an A C v ersion, one of the follo wing power cords, which is
included in your kit: – 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 a DC version, one of the following DC power supplies,
which is included in your kit: – Wall-mount power supply (100–120 VAC, 9 V, 1 A) – Desktop power supply (220–240 VAC, 9 V, 1 A)
© National Instruments Corporation 1-1 GPIB-232/485CT-A User Manual
Chapter 1 Hardware Overview
One of the following shielded cables, compatible with IBM PC, which
you can purchase from National Instruments: – RS-232 DTE-to-DTE cable (1, 2, or 4 m) for the GPIB-232CT-A – RS-485 null-modem cable (1, 2, or 4 m) for the GPIB-485CT-A
Type X2 double-shielded GPIB cable (1, 2, or 4 m), which you can
purchase from National Instruments
Caution To meet FCC emission limits for this device, you must use a Type X2
double-shielded GPIB cable. If you operate this equipment with a non-shielded cable, it may interfere with radio and television reception.

GPIB-232CT-A Hardware Overview

The GPIB-232CT-A is a high-performance serial-to-GPIB interface. It enables a computer with an RS-232 serial port to be a Talker, Listener, or Controller on the GPIB. The GPIB-232CT-A is also capable of interfacing RS-232 instruments and peripherals to the GPIB.
The GPIB-232CT-A has all the software and logic required to implement the physical and electrical specifications of the IEEE 488 and RS-232 standards. It can interpret and execute high-level commands that you send to it over the serial port, performing GPIB-to-RS-232 protocol conversions. The GPIB-232CT-A also conforms to all versions of the IEEE 488 standard, including IEEE 488.2. The NAT4882 Controller chip implements all IEEE 488 Talker/Listener/Controller functionality.

GPIB-485CT-A Hardware Overview

The GPIB-485CT-A is a high-performance serial-to-GPIB interface. It enables a computer with an RS-485 or RS-422 serial port to be a Talker, Listener, or Controller on the GPIB. The GPIB-485CT-A is also capable of interfacing RS-485 or RS-422 instruments and peripherals to the GPIB. The GPIB-485CT-A does not support any multidrop protocols.
The GPIB-485CT-A has all the software and logic required to implement the physical and electrical specifications of the IEEE 488, RS-485, and RS-422 standards. It can interpret and execute high-level commands that you send to it over the serial port, performing all GPIB-to-RS-485 and GPIB-to-RS-422 protocol conversions. The GPIB-485CT-A also conforms to all versions of the IEEE 488 standard, including IEEE 488.2. The
GPIB-232/485CT-A User Manual 1-2 www.ni.com
NAT4882 Controller chip implements all IEEE 488 Talker/Listener/Controller functionality.

AC Version Front Panel

The power switch, fuse holder, and power cord receptacle are located on the GPIB-232/485CT-A front panel, on the AC version only. Figure 1-1 shows the front panel of the AC version.
Chapter 1 Hardware Overview
FUSE

Top Panel

Note
similar.
Figure 1-1.
The AC Version Front Panel
The six light-emitting diodes (LEDs) are located on the GPIB-232/485CT-A top panel. Figure 1-2 shows the top panel.
The following figures show only the GPIB-232CT-A, but the GPIB-485CT-A is
GPIB-232CT-A
RS-232 IEEE 488 Controller
POWER
Figure 1-2.
TALK
READY
The Top Panel
LISTEN
SRQ
ATN
© National Instruments Corporation 1-3 GPIB-232/485CT-A User Manual
Chapter 1 Hardware Overview
The LEDs show the current status of the GPIB-232/485CT-A at all times. Table 1-1 describes each LED.

Rear Panel

Table 1-1.
LED Descriptions
LED Indication
POWER In dicates that power to the unit has been applied and
the ON/OFF switch is in the ON position.
READY Indicates that the power-on self-test has passed
successfully and the unit is ready to operate.
TALK Indicates that the GPIB-232/485CT-A is addressed as
a GPIB Talker.
LISTEN Indicates that the GPIB-232/485CT-A is addressed as
a GPIB Listener.
SRQ Indicates that the GPIB signal line SRQ* is asserted. ATN Indicates that the GPIB signal line ATN* is asserted.
* indicates that the signal is active low (negative logic or low when asserted).
The configuration switches are located on the rear panel of the GPIB-232/485CT-A. Figure 1-3 shows the rear panel of the AC version. Figure 1-4 shows the rear panel of the DC version. The unmarked DIP switches are reserved for future development and should remain in the OFF position.
S MODE
DATA FORMAT
BAUD RATE
GPIB ADDRESS
G MODE
Figure 1-3.
GPIB-232/485CT-A User Manual 1-4 www.ni.com
OFF
ON
The DC Version Rear Panel
ON OFF

Side Panels

Chapter 1 Hardware Overview
S MODE
DATA FORMAT
BAUD RATE
GPIB ADDRESS
G MODE
OFF
ON

Figure 1-4. The AC Version Rear Panel

The GPIB connector and the serial connector are mounted on opposite side panels. On the DC version, the DC power jack is located next to the serial connector.
Figure 1-5 shows the location of the serial and GPIB connectors and the DC power jack.
DC Power Jack
(DC version only)
Serial Connector
GPIB-232CT-A
IEEE 488 ControllerRS-232
READY
TALK
POWER

Figure 1-5. Location of the Connectors and the DC Power Jack

LISTEN
SRQ
GPIB Connector
ATN
© National Instruments Corporation 1-5 GPIB-232/485CT-A User Manual
Chapter 1 Hardware Overview
RS-232 Connector
The RS-232 port on the GPIB-232CT-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-6 shows a diagram of the RS-232 connector and the signals supported. For more information on the RS-232 signals refer to Appendix D, Interfacing to an
RS-232 Device.
No Connection
No Connection
Figure 1-6.
6789
RTS CTS
No Connection
23451
RXD TXD DTR GND
The RS-232 Connector and Signal Designations
GPIB-232/485CT-A User Manual 1-6 www.ni.com
Chapter 1 Hardware Overview
RS-485 Connector
The RS-485 port on the GPIB-485CT-A uses a standard 9-pin shielded D-Subminiature male connector with screwlock assemblies. The RS-485 connector accepts standard 9-pin D-Subminiature female connectors. Figure 1-7 shows a diagram of the serial connector and the signals supported. For more information on the RS-485 signals refer to Appendix E, Interfacing to an RS-485 Device.
CTS - (HSI –)
RTS - (HSO –)
Figure 1-7.
6789
TXD + TXD –
GND
23451
CTS+(HSI+) RTS+(HSO+) RXD+ RXD–
The RS-485 Connector and Signal Designations
© National Instruments Corporation 1-7 GPIB-232/485CT-A User Manual
Chapter 1 Hardware Overview
GPIB Connector
The GPIB connector is a standard 24-pin shielded Champ female connector with metric screwlock hardware. Figure 1-8 shows a diagram of the GPIB connector and the signals supported. A * suffix indicates that the signal is active low. Refer to Appendix F, GPIB Basics, for more information about the GPIB signal lines.
13
DIO1* DIO2* DIO3* DIO4*
EOI*
DAV* NRFD* NDAC*
IFC*
SRQ*
ATN*
SHIELD
1 2 3 4 5 6 7 8
9 10 11 12
DIO5*
14
DIO6*
15
DIO7*
16
DIO8*
17
REN*
18
GND (Twisted Pair with DAV*)
19
GND (Twisted Pair with NRFD*)
20
GND (Twisted Pair with NDAC*) GND (Twisted Pair with IFC*)
21
GND (Twisted Pair with SRQ*)
22
GND (Twisted Pair with ATN*)
23
SIGNAL GROUND
24
Figure 1-8.
GPIB-232/485CT-A User Manual 1-8 www.ni.com
The GPIB Connector and Signal Designations
Operating in S Mode and G Mode
This chapter helps you determine which mode of operation, S mode or G mode, you should use. It also describes data buffering and handshaking schemes.

Choosing Between S Mode and G Mode

The GPIB-232/485CT-A can be connected to a serial device and one or more GPIB devices. The way you use the serial device in your system setup determines which mode of operation you should use. If the serial device is the Controller, you should use S mode. If the serial device is a Talker/Listener only, and a GPIB device is the Controller, you should use G mode.

Operating in S Mode

The GPIB-232/485CT-A should be configured to operate in S mode if your serial device acts as a Controller in the GPIB system, addressing devices, and performing other GPIB Controller functions. In S mode operation, you can use the NI-488.2 software.
2
© National Instruments Corporation 2-1 GPIB-232/485CT-A User Manual
Chapter 2 Operating in S Mode and G Mode
Figure 2-1 shows an example of a setup using S mode. The GPIB-232/485CT-A is connected to a PC, which is controlling a GPIB plotter.
IBM PC
(Controller)
Refer to Chapter 3, Installing and Configuring Your Controller, for detailed information on setting up your GPIB-232/485CT-A to operate in S mode. Refer to Chapter 4, Programming in S Mode, and Chapter 5,
S Mode Functions, for information on programming the
GPIB-232/485CT-A in S mode.

Operating in G Mode

The GPIB-232/485CT-A should be configured to operate in G mode if your serial device acts only as a Talker and/or Listener while a GPIB device manages the system, sending and receiving data to and from the serial device.
Serial Cable
GPIB-232CT-A
GPIB Cable
READY
TALK
POWER
LISTEN
BUSY
FULL
GPIB-232/485CT-A

Figure 2-1. Example of S Mode System Setup

Plotter
(GPIB Device)
GPIB-232/485CT-A User Manual 2-2 www.ni.com
Chapter 2 Operating in S Mode and G Mode
Figure 2-2 shows an example of a setup using G mode. The GPIB-232/485CT-A is connected to a serial printer, which is programmed by the GPIB Controller.
GPIB Device
Serial Cable GPIB Cables
GPIB-232CT-A
POWER
READY
TALK
LISTEN
FULL
BUSY
Serial Device
(Talker/Listener)
GPIB-232/485CT-A
IBM PC with GPIB Board
(Controller)

Figure 2-2. Example of G Mode System Setup

Refer to Chapter 3, Installing and Configuring Your Controller, for detailed information on setting up your GPIB-232/485CT-A to operate in G mode. Refer to Chapter 6, Programming in G Mode, and Chapter 7,
G Mode Functions, for information on programming in G mode.

Data Buffering and Handshaking Schemes

Two protection mechanisms are used to ensure that the GPIB-232/485CT-A does not lose incoming serial data: data buffering and handshaking.
The GPIB-232/485CT-A has an internal RAM buffer that stores incoming serial data until it can output the data to the GPIB port. The size of this RAM buffer determines ho w much serial data the GPIB-232/485CT-A can accept before the buffer is completely full.
When its RAM buffer is nearly full, the GPIB-232/485CT -A can handshake with the serial host to stop data transmission. When the buffer is almost empty , the GPIB-232/485CT-A can again handshake with the serial host to start data transmission. The GPIB-232/485CT-A is capable of using both the XON/XOFF software handshaking and the hardware handshaking protocols.
© National Instruments Corporation 2-3 GPIB-232/485CT-A User Manual
Chapter 2 Operating in S Mode and G Mode

Hardware Handshaking

The hardware handshake function is always active during serial data transfers and uses the Request to Send (RTS on the GPIB-232CT-A, RTS+ and RTS– on the GPIB-485CT-A) and Clear to Send (CTS on the GPIB-232CT-A, CTS+ and CTS– on the GPIB-485CT-A) signal lines. When the GPIB-232/485CT-A is ready to accept serial data, it asserts the RTS line(s). RTS remains asserted until the GPIB-232/485CT-A data buffer is almost full. At this point, the GPIB-232/485CT-A unasserts the RTS line(s), signaling to the serial host that it is no longer ready to accept data. The serial host should monitor the RTS line(s) and suspend data transmission whenever RTS becomes unasserted. The GPIB-232/485CT-A asserts RTS when it is again ready to receive serial data.
The GPIB-232/485CT-A is also able to suspend transmission when the serial device is no longer ready to accept data. The GPIB-232/485CT-A is configured to immediately stop transmission of serial data when CTS becomes unasserted. It resumes transmission when CTS is reasserted.
Because most serial devices use the same form of hardware handshaking as the GPIB-232/485CT-A, you can achieve bidirectional flow control by using a serial cable that connects the GPIB-232/485CT -A RTS signal(s) to the serial device CTS signal(s). In addition, the serial device RTS signal(s) should be connected to the GPIB-232/485CT-A CTS signal(s). This setup allows each device to monitor the RTS signal(s) of the other device and to suspend transmission when necessary to prevent data loss. Refer to or Appendix D, Interfacing to an RS-232 Device, or Appendix E, Interfacing
to an RS-485 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 using the
xon command. 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-232/485CT -A sends the XOFF character (decimal 19 or <CTRL-S>) before the internal buffer overflows. When the GPIB-232/485CT-A is able to start receiving characters again, it sends the XON character (decimal 17 or <CTRL-Q>). Similarly, if the GPIB-232/485CT-A is transmitting data and receives the
GPIB-232/485CT-A User Manual 2-4 www.ni.com
Chapter 2 Operating in S Mode and G Mode
XOFF character, it suspends transmission of any further data until it receives the XON character.
If you are transmitting binary data (as opposed to 7-bit ASCII), do not configure the GPIB-232/485CT-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-232/485CT-A would not be able to distinguish between data values or handshake control codes. If XON/XOFF software handshaking were enabled in this case, the GPIB-232/485CT-A would handshake erratically.
© National Instruments Corporation 2-5 GPIB-232/485CT-A User Manual
Installing and Configuring Your Controller
This chapter contains detailed instructions for connecting and configuring your GPIB-232/485CT-A.

Check the Hardware Configuration

The AC versions of the GPIB-232/485CT-A are shipped with a 100–120 V or 220–240 V internal power supply. The DC versions of the GPIB-232/485CT-A are shipped with a 100–120 V or 220–240 V, wall-mount or desktop power supply. Before configuring your GPIB-232/485CT-A, verify that the voltage marked on the GPIB-232/485CT-A or on the power supply matches the voltage that is supplied in your area.
3
Caution
marked on your GPIB-232/485CT-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.
© National Instruments Corporation 3-1 GPIB-232/485CT-A User Manual
Do not operate your GPIB-232/485CT-A at any voltage other than the one
The GPIB-232/485CT-A is shipped with the following default settings:
S mode
7 data bits/character
1 stop bit/character
Parity disabled
Serial port configured to 9600 baud If you want to change any of the default settings, you must change the DIP
switch settings. To change the settings, shut down your system and then refer to the section Configure the Hardware later in this chapter. If you plan to use the default settings, continue with the next section.
Chapter 3 Installing and Configuring Your Controller

Connect the Hardware

Complete the following steps to connect the GPIB-232/485CT-A to your system.
Step 1. Power Off Your System
Power off your system, turn off your computer, and unplug the power cord.
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-232CT-A. The following National Instruments cables are null-modem serial cables.
National Instruments
See Appendix D, Interfacing to an RS-232 Device, and Appendix E,
Interfacing to an RS-485 Device, for more information on cable pinouts.
Step 3. Connect the Cables
1. Connect the serial cable to the GPIB-232/485CT-A serial 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 the appropriate serial cabling restrictions.
2. Connect the GPIB cable to the GPIB connector on the GPIB-232/485CT-A, and tighten the thumb screws on the connector. Connect the other end to your GPIB device(s). 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-232/485CT-A, then plug the supply into an AC outlet of the correct voltage.
Table 3-1.
Part Number
182238-01 9-pin to 9-pin, 1 m 182238-02 9-pin to 9-pin, 2 m 182238-04 9-pin to 9-pin, 4 m 181074-10 9-pin to 25-pin, 1 m
National Instruments Null-Modem Serial Cables
Cable Type
GPIB-232/485CT-A User Manual 3-2 www.ni.com
Chapter 3 Installing and Configuring Your Controller
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-232/485CT-A, then plug the supply into an AC outlet of the correct voltage.
Step 4. Power On Your System and the GPIB-232/485CT-A
1. Plug in the power cords for your computer system and power on all devices.
2. If you have an AC v ersion, use the front panel rocker switch to power on your GPIB-232/485CT -A. If you ha v e a DC version, use the po wer switch on the rear panel to power on your GPIB-232/485CT-A.
The POWER LED indicator should come on immediately. The READY LED indicator should come on after the GPIB-232/485CT- 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.

Configure the Hardware

If you want to change the settings of the GPIB-232/485CT-A, power off your system and follow the instructions in the next sections.

Changing the S Mode Characteristics

You can use the DIP switch on the rear panel to configure the serial port characteristics of the GPIB-232/485CT-A in S mode. When switch 8 is set to S mode, switches 1 through 3 set the baud rate, and switches 4 through 7 set the data formatting characteristics. Figure 3-1 shows the DIP switch. The unmarked DIP switches on the rear panel are reserved for future development and should remain in the OFF position.
© National Instruments Corporation 3-3 GPIB-232/485CT-A User Manual
Loading...
+ 184 hidden pages