National Instruments AT-232/2 Getting Started
National Instruments AT-232/2 Getting Started

National Instruments AT-232/2 Getting Started

Serial hardware and software for windows nt
Table of Contents

Advertisement

Quick Links

Getting Started with
Your Serial Hardware
and Software for
Windows NT
June 1997 Edition
Part Number 321572A-01
© Copyright 1997 National Instruments Corporation.
All Rights Reserved.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AT-232/2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for National Instruments AT-232/2

  • Page 1 Getting Started with Your Serial Hardware and Software for Windows NT June 1997 Edition Part Number 321572A-01 © Copyright 1997 National Instruments Corporation. All Rights Reserved.
  • Page 2 Norway 32 84 84 00, Singapore 2265886, Spain 91 640 0085, Sweden 08 730 49 70, Switzerland 056 200 51 51, Taiwan 02 377 1200, U.K. 01635 523545 National Instruments Corporate Headquarters 6504 Bridge Point Parkway Austin, TX 78730-5039 Tel: (512) 794-0100...
  • Page 3 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.
  • Page 4 FCC/DOC Radio Frequency Interference Compliance This equipment generates and uses radio frequency energy and, if not installed and used in strict accordance with the instructions in this manual, 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).
  • Page 5 This device complies with the FCC rules only if used with shielded interface cables of suitable quality and construction. National Instruments used such cables to test this device and provides them for sale to the user. The use of inferior or nonshielded interface cables could void the user's authority to operate the equipment under the FCC rules.
  • Page 6 Optional Equipment.......................1-2 Serial Hardware Overview ....................1-2 NI Serial Software Overview..................1-4 Optional Programming Tools ..................1-4 Using the Serial Hardware with Other National Instruments Products ......1-5 Chapter 2 Installation and Verification Installing the Microsoft PnP ISA Enabler Driver ............2-1 Install the NI Serial Software ..................2-1 Install the Serial Hardware ....................2-3...
  • Page 7: Table Of Contents

    Setting the Transceiver Mode with DeviceIoControl ........4-3 General Programming Requirements................4-4 Setting the Maximum Baud Rate for a 16-Bit Application ......4-4 Other Programming Points ................4-5 Appendix A Specifications Hardware Specifications ....................A-1 Software Specifications....................A-4 Serial for Windows NT viii © National Instruments Corporation...
  • Page 8 Figure 2-1. Add/Remove Programs Properties Dialog Box........2-2 Figure 2-2. NI Serial Setup Screen ................2-3 Figure 2-3. Inserting a PCMCIA Serial Card..............2-4 Figure 2-4. AT Serial Board Installation ..............2-6 Figure 2-5. DB-9 Connector Pin Locations ..............2-8 © National Instruments Corporation Serial for Windows NT...
  • Page 9 Physical Characteristics of the PCMCIA Serial Cards ......A-3 Table A-6. Environmental Characteristics of the Serial Hardware......A-4 Table A-7. Software Characteristics ................A-4 Table B-1. RS-232, RS-422, and RS-485 Features ........... B-2 Serial for Windows NT © National Instruments Corporation...
  • Page 10 This Manual This manual contains instructions to help you install and configure the National Instruments serial hardware and the NI Serial software for Windows NT. The serial hardware covered by this manual includes the AT-232/2, AT-232/4, AT-485/2, AT-485/4, PCMCIA-232, PCMCIA-232/2, PCMCIA-485, and PCMCIA-485/2. This manual assumes that you are already familiar with Windows NT.
  • Page 11 • Appendix E, Customer Communication, contains forms you can use to request help from National Instruments or to comment on our products and manuals. • The Glossary contains an alphabetical list and description of terms used in this manual, including abbreviations, acronyms, metric prefixes, mnemonics, and symbols.
  • Page 12 FIFOs, National Semiconductor Customer Communication National Instruments wants to receive your comments on our products and manuals. We are interested in the applications you develop with our products, and we want to help if you have problems with them. To make it easy for you to contact us, this manual contains comment and configuration forms for you to complete.
  • Page 13 Install the Serial Hardware Verify the Installation Chapter 2 Passes? Troubleshooting Connect the Cables Chapter 3 Configure the Serial Port Learn About Transceiver Control Modes Chapter 4 Review Programming Requirements Write Application Program © National Instruments Corporation Serial for Windows NT...
  • Page 14 If you have a four-port isolated interface, you also need a 10-position modular jack to DB-9 cable, which is included in your kit. Optional Equipment Call National Instruments for more information about the following optional equipment. • DB-9 RS-485 termination connector (AT-485 and PCMCIA-485 interfaces only) •...
  • Page 15 All ports on the board are isolated and share the same IRQ. Additionally, the AT-232 and AT-485 boards are available in a two-port version (AT-232/2 and AT-485/2) or a four-port version (AT-232/4 and AT-485/4). The two-port versions use DB-9 connectors. The four-port versions use 10-position modular jacks to provide all four connections on a single back panel.
  • Page 16 ® Windows NT. In addition, you can order the LabWindows /CVI or LabVIEW software from National Instruments. LabWindows/CVI and LabVIEW include instrument driver libraries that make it easier to communicate with your serial instruments. LabWindows/CVI is an interactive ANSI C development environment for building test and measurement and instrument control systems.
  • Page 17 Instruments Products You can use standard serial I/O functions in LabVIEW and LabWindows/CVI with any National Instruments serial interface, once you have installed the hardware and software. If you already have LabVIEW or LabWindows and want to use it with your serial hardware, refer to your LabVIEW or LabWindows documentation for information about serial I/O functions.
  • Page 18 PnP ISA Enabler driver as described in the previous section. Log on as or as a user who has Administrator Administrator privileges. Select Start»Settings»Control Panel. © National Instruments Corporation Serial for Windows NT...
  • Page 19: Figure 2-1. Add/Remove Programs Properties Dialog Box

    Insert the NI Serial Software for Windows 95 and Windows NT (Setup Disk), and click on the Next button to proceed. The software installation wizard begins with the screen shown in Figure 2-2. Serial for Windows NT © National Instruments Corporation...
  • Page 20: Figure 2-2. Ni Serial Setup Screen

    The software is installed. Proceed to the next section, Install the Serial Hardware. Install the Serial Hardware Install the PCMCIA Card To install the PCMCIA-232 or PCMCIA-485 in your computer, complete the following steps. Shut down the computer. © National Instruments Corporation Serial for Windows NT...
  • Page 21: Figure 2-3. Inserting A Pcmcia Serial Card

    Complete the following steps to select resources for your PCMCIA card. Select Start»Settings»Control Panel. Double-click on the niports icon. Select the PCMCIA card you just installed from the Add a New PCMCIA Card list, and click on the Add button. Serial for Windows NT © National Instruments Corporation...
  • Page 22 The board may seem to click firmly into place, even though it is only part of the way in. Figure 2-4 shows the installation of an AT serial board. © National Instruments Corporation Serial for Windows NT...
  • Page 23: Figure 2-4. At Serial Board Installation

    Resource Settings section of Chapter 3, Configuration. After you have selected the resources for all ports, choose to restart the computer when the system prompts you. Your serial hardware is now installed. Serial for Windows NT © National Instruments Corporation...
  • Page 24 Determine Which Physical Port Is Associated with COMx Select Start»Settings»Control Panel, and double-click on niports. A list of National Instruments ports installed, along with their logical COMx names, appears. If your interface is not on the list, refer to Appendix D, Troubleshooting and Common Questions.
  • Page 25: Connect The Cables

    DB-9 connector, which is found on the two-port AT serial board, the 10-position modular jack to DB-9 cable, and the PCMCIA serial cable. PIN 5 PIN 9 PIN 6 PIN 1 Figure 2-5. DB-9 Connector Pin Locations Serial for Windows NT © National Instruments Corporation...
  • Page 26: Table 2-1. Db-9 Pin Descriptions

    Figure 2-6 and Table 2-2 give the pin locations and descriptions of the 10-position modular jack, which is found on the four-port AT serial board. Pin 1 Pin 10 Figure 2-6. 10-Position Modular Jack Pin Locations © National Instruments Corporation Serial for Windows NT...
  • Page 27: Table 2-2. 10-Position Modular Jack Pin Descriptions

    Figure 2-7 and Table 2-3 give the pin locations and descriptions of the DB-25 connector, which is on the optional 10-position modular jack to DB-25 cable. PIN 13 PIN 25 PIN 14 PIN 1 Figure 2-7. DB-25 Connector Pin Locations Serial for Windows NT 2-10 © National Instruments Corporation...
  • Page 28: Table 2-3. Db-25 Pin Descriptions

    Additional (AT-485 only) to DB-9 cable Serial Cable AT Serial Board 10-position modular jack Additional to DB-25 cable Serial Cable Figure 2-8. Connecting the Cables to Your Four-Port AT Serial Board © National Instruments Corporation 2-11 Serial for Windows NT...
  • Page 29: Connecting Two-Wire Devices

    Refer to Chapter 4, Using Your Serial Hardware, for information on setting the transceiver mode for two-wire communication. Refer to Appendix B, Serial Port Information, for more information on duplex architectures. Serial for Windows NT 2-12 © National Instruments Corporation...
  • Page 30: Change/View Communication Port Settings

    Follow these steps to configure the serial port. Select Start»Settings»Control Panel and double-click on the niports icon. A list of National Instruments ports appears, as shown in Figure 3-1. Figure 3-1. niports Configuration Utility © National Instruments Corporation...
  • Page 31: General Port Settings

    Settings dialog box, shown in Figure 3-2. Figure 3-2. General Port Settings Dialog Box COM Port Number You can use the COM Port Number control to change the COMx name of the port selected. Serial for Windows NT © National Instruments Corporation...
  • Page 32: Transceiver Mode

    Resource Settings The following sections explain the resource configuration options for each serial interface. PCMCIA-232, PCMCIA-485 Figure 3-3 shows the resource configuration dialog box for a PCMCIA-485. The PCMCIA-232 dialog box is similar. © National Instruments Corporation Serial for Windows NT...
  • Page 33: Pcmcia-232/2, Pcmcia-485/2

    These cards require two base I/O settings, one for each port, and they share an IRQ. Figure 3-4 shows the resource configuration dialog box for a PCMCIA-485/2. The PCMCIA-232/2 dialog box is similar. Serial for Windows NT © National Instruments Corporation...
  • Page 34: At Boards (Shared Irq)

    IRQ levels that are currently being used in your system. AT Boards (Shared IRQ) Figure 3-5 shows the PnP Port Configuration dialog box for an AT-232/4 with shared IRQ. The dialog boxes for other shared IRQ AT boards are similar. © National Instruments Corporation Serial for Windows NT...
  • Page 35 It does not check for conflicts with ports on the same board. Make sure to assign resources that do not conflict with those assigned to another port on the same board. Serial for Windows NT © National Instruments Corporation...
  • Page 36: At Boards (Non-Shared Irq)

    If you are unable to change the base I/O address by double-clicking on Note: the Input/Output Range control, select a different Basic Configuration from the Setting based on: control. © National Instruments Corporation Serial for Windows NT...
  • Page 37: Using Your Serial Hardware

    Two-wire mode: Enabled with Enabled with auto control asserted unasserted TXR DY TXR DY TXR DY Note: Signal names with an overscore, such as , indicate that the signal is active low. © National Instruments Corporation Serial for Windows NT...
  • Page 38: Four-Wire Mode

    Because this mode handles the transmitter/receiver enabling for a two-wire connection in your hardware, it reduces the software overhead required to perform this operation in your application program. Serial for Windows NT © National Instruments Corporation...
  • Page 39: Setting The Transceiver Control Mode

    Add the following lines to your source code. #include <winioctl.h> #define IOCTL_SERIAL_SET_TRANSCEIVER_MODE CTL_CODE(FILE_DEVICE_SERIAL_PORT,37,METHOD_BUFFERED, FILE_ANY_ACCESS) Use the Win32 function . Use the defined control DeviceIoControl code value listed in Step 1 to set the transceiver mode, and the input © National Instruments Corporation Serial for Windows NT...
  • Page 40: General Programming Requirements

    DCB structure and pass it to . For a Win32 application, SetCommState do not use the constant shown here for 115,200 baud. Use the constant defined in the Win32 communications header file provided with your compiler. Serial for Windows NT © National Instruments Corporation...
  • Page 41: Other Programming Points

    Overviews and Win32 Reference. If you have LabVIEW or LabWindows and want to use it with your serial hardware, refer to your LabVIEW or LabWindows documentation for information about serial I/O functions. © National Instruments Corporation Serial for Windows NT...
  • Page 42: Appendix A Specifications

    510 mA Maximum AT-232/2 +5 VDC 260 mA Typical 340 mA Maximum AT-485/2 (Shared IRQ) +5 VDC 140 mA Typical 180 mA Maximum AT-232/2 (Shared IRQ) +5 VDC 70 mA Typical 100 mA Maximum © National Instruments Corporation Serial for Windows NT...
  • Page 43: Table A-2. Physical Characteristics Of The Two-Port Isolated At Serial Boards

    AT-232/4 Shared IRQ +5 VDC 110 mA Typical 150 mA Maximum * The four-port AT serial board requires a cable to convert the 10-position modular jack to either DB-9 or DB-25 connectors. Serial for Windows NT © National Instruments Corporation...
  • Page 44: Table A-5. Physical Characteristics Of The Pcmcia Serial Cards

    Connector and 15-Pin Converter for PC Card Power Requirement (from PCMCIA expansion slot) PCMCIA-232 +5 VDC 40 mA Typical PCMCIA-485 +5 VDC 100 mA Typical PCMCIA-232/2 +5 VDC 60 mA Typical PCMCIA-485/2 +5 VDC 100 mA Typical © National Instruments Corporation Serial for Windows NT...
  • Page 45: Software Specifications

    Table A-7. Software Characteristics Characteristic Specification Maximum Serial Transfer 115,200 bps* Rate Space Required for NI Serial Software 1 MB * Actual speed may vary considerably from speed shown due to system and instrumentation capabilities. Serial for Windows NT © National Instruments Corporation...
  • Page 46 TX signal is carried on two wires, wire A and wire B. A logical 1 is represented by the voltage on line A being greater than the voltage on line B. A logical 0 is represented by the voltage on line A being less than © National Instruments Corporation Serial for Windows NT...
  • Page 47: Table B-1. Rs-232, Rs-422, And Rs-485 Features

    ± 25 V +6 to -.25 V +12 to -7 V Driver output 5 to 25 V 2 to 6 V 1.5 to 6 V 100 Ω 60 Ω Driver load >3 kΩ Serial for Windows NT © National Instruments Corporation...
  • Page 48: Serial Communication Issues

    Because in a differential system each transmission line is composed of two separate wires, a full-duplex system is often referred to as a four-wire system. Figure B-1 shows a typical full-duplex system. © National Instruments Corporation Serial for Windows NT...
  • Page 49: Half Duplex

    A half-duplex system is often referred to as a two-wire system. Figure B-2 shows a typical half-duplex system. Slave 1 Slave 2 Slave n Figure B-2. Typical Half-Duplex System Serial for Windows NT © National Instruments Corporation...
  • Page 50: Termination

    The terminating resistor should match the characteristic impedance of the transmission line (typically 100−120 Ω). National Instruments offers an optional DB-9 RS-485 termination connector that contains embedded terminating resistors for easy termination.
  • Page 51: Dte Vs. Dce

    That is, a cable connected a computer to a modem by wiring pin 1 to pin 1, pin 2 to pin 2, and so on. This method is commonly known as straight-through cabling. Serial for Windows NT © National Instruments Corporation...
  • Page 52 Figure B-6 shows null-modem cabling in a DTE-to-DCE interface. Rx D Rx D Pin 2 Pin 2 Tx D Tx D Pin 3 Pin 3 Figure B-6. Null-Modem Cabling in a DTE-to-DCE Interface © National Instruments Corporation Serial for Windows NT...
  • Page 53: Uninstalling The Serial Hardware And Software

    Windows NT Control Panel. Follow these steps to uninstall the hardware. Double-click on the niports icon under Start»Settings»Control Panel. Select the port to remove from the list of ports as shown in Figure C-1. © National Instruments Corporation Serial for Windows NT...
  • Page 54: Uninstalling The Ni Serial Software

    Double-click on the Add/Remove Programs icon in the Control Panel to launch the Add/Remove Programs applet. A dialog box similar to the one in Figure C-2 appears. This dialog box lists the software available for removal. Serial for Windows NT © National Instruments Corporation...
  • Page 55 Select the serial software you want to remove, and click the Add/Remove... button. The uninstall program runs and removes all folders, utilities, and registry entries associated with the NI Serial software. Figure C-3 shows the results of a successful uninstallation. © National Instruments Corporation Serial for Windows NT...
  • Page 56 Figure C-3. Uninstallation Results Shut down Windows NT, power off your computer, and remove your serial interfaces now. If you want to reinstall the hardware and software, refer to Chapter 2, Installation and Verification. Serial for Windows NT © National Instruments Corporation...
  • Page 57: Troubleshooting And Common Questions

    To run the Event Viewer, select Start»Programs»Administrative Tools»Event Viewer. After you have identified the resource that caused the conflict, use the serial configuration utility, niports, to reconfigure your serial interface so © National Instruments Corporation Serial for Windows NT...
  • Page 58: Troubleshooting Diagnostic Messages

    If this error message appears, refer to Chapter 2, Installation and Verification, to follow these troubleshooting steps: Verify the hardware resources. Verify that the National Instruments serial driver is installed. If either the serial hardware or file is missing, reinstall serial.sys...
  • Page 59: Common Questions

    Refer to the General Port Settings section in Chapter 3, Configuration. What information should I have before I call National Instruments? When you call National Instruments, you should have the results of the Diagnostic test. Also, make sure you have filled out the hardware and software configuration form in Appendix E, Customer Communication.
  • Page 60: Appendix E Customer Communication

    Electronic Services Bulletin Board Support National Instruments has BBS and FTP sites dedicated for 24-hour support with a collection of files and documents to answer most common customer questions. From these sites, you can also download the latest instrument drivers, updates, and example programs. For recorded instructions on how to use the bulletin board and FTP services and for BBS automated information, call (512) 795-6990.
  • Page 61 Telephone and Fax Support National Instruments has branch offices all over the world. Use the list below to find the technical support number for your country. If there is no National Instruments office in your country, contact the source from which you purchased your software to obtain support.
  • Page 62 National Instruments for technical support helps our applications engineers answer your questions more efficiently. If you are using any National Instruments hardware or software products related to this problem, include the configuration forms from their user manuals. Include additional pages if necessary.
  • Page 63 Complete a new copy of this form each time you revise your software or hardware configuration, and use this form as a reference for your current configuration. Completing this form accurately before contacting National Instruments for technical support helps our applications engineers answer your questions more efficiently.
  • Page 64 Other Products • Computer Make and Model • Microprocessor • Clock Frequency • Type of Monitor Card Installed • Windows Version • Application Programming Language (Microsoft C, Visual Basic for Windows) • Number of Serial Ports in System Built In Adapter Cards •...
  • Page 65 Documentation Comment Form National Instruments encourages you to comment on the documentation supplied with our products. This information helps us provide quality products to meet your needs. Title: Getting Started with Your Serial Hardware and Software for Windows NT Edition Date:...
  • Page 66: Glossary

    Data Communications Equipment or Data Circuit-Terminating Equipment direct memory access Data Terminal Equipment Data Terminal Ready (where the overscore denotes that the signal is active low) Electronic Industries Association electromagnetic interference Federal Communications Commission FIFO first-in-first-out © National Instruments Corporation Serial for Windows NT...
  • Page 67 Receive seconds Transmit Transmit Ready (where the overscore denotes that the signal is TXR DY active low) UART universal asynchronous receiver/transmitter volts volts direct current Serial for Windows NT © National Instruments Corporation...

Table of Contents