OPTO 22 PCI-AC48 User Manual

PCI-AC48 USER’S GUIDE
Form 1520-180601—June 2018
43044 Business Park Drive Temecula CA 92590-3614
Phone: 800-321-OPTO (6786) or 951-695-3000
800-TEK-OPTO (835-6786) or 951-695-3080
Fax: 800-832-OPTO (6786) or 951-695-2712
www.opto22.com
Fax: 951-695-3017
Email: support@opto22.com
Web: support.opto22.com
PCI-AC48 User’s Guide i
i
PCI-AC48 User’s Guide Form 1520-180601—June 2018
Copyright © 1997–2018 Opto 22. All rights reserved. Printed in the United States of America.
The information in this manual has been checked carefully and is believed to be accurate; however, Opto 22 assumes no responsibility for possible inaccuracies or omissions. Specifications are subject to change without notice.
Opto 22 warrants all of its products to be free from defects in material or workmanship for 30 months from the manufacturing date code. This warranty is limited to the original cost of the unit only and does not cover installation, labor, or any other contingent costs. Opto 22 I/O modules and solid-state relays with date codes of 1/96 or newer are guaranteed for life. This lifetime warranty excludes reed relay, SNAP serial communication modules, SNAP PID modules, and modules that contain mechanical contacts or switches. Opto 22 does not warrant any product, components, or parts not manufactured by Opto 22; for these items, the warranty from the original manufacturer applies. Refer to Opto 22 form 1042 for complete warranty information.
Wired+Wireless controllers and brains are licensed under one or more of the following patents: U.S. Patent No(s). 5282222, RE37802, 6963617; Canadian Patent No. 2064975; European Patent No. 1142245; French Patent No. 1142245; British Patent No. 1142245; Japanese Patent No. 2002535925A; German Patent No. 60011224.
Opto 22 FactoryFloor, groov, groov EPIC, Optomux, and Pamux are registered trademarks of Opto 22. Generation 4, groov Server, ioControl, ioDisplay, ioManager, ioProject, ioUtilities, mistic, Nvio, Nvio.net Web Portal, OptoConnect, OptoControl, OptoDataLink, OptoDisplay, OptoEMU, OptoEMU Sensor, OptoEMU Server, OptoOPCServer, OptoScript, OptoServer, OptoTerminal, OptoUtilities, PAC Control, PAC Display, PAC Manager, PAC Project, PAC Project Basic, PAC Project Professional, SNAP Ethernet I/O, SNAP I/O, SNAP OEM I/O, SNAP PAC System, SNAP Simple I/O, SNAP Ultimate I/O, and Wired+Wireless are trademarks of Opto 22.
ActiveX, JScript, Microsoft, MS-DOS, VBScript, Visual Basic, Visual C++, Windows, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries. Linux is a registered trademark of Linus Torvalds. ARCNET is a registered trademark of Datapoint Corporation. Modbus is a registered trademark of Schneider Electric, licensed to the Modbus Organization, Inc. Wiegand is a registered trademark of Sensor Engineering Corporation. Allen-Bradley, CompactLogix, ControlLogix, MicroLogix, SLC, and RSLogix are either registered trademarks or trademarks of Rockwell Automation. CIP and EtherNet/IP are trademarks of ODVA. Raspberry Pi is a trademark of the Raspberry Pi Foundation. The registered trademark Ignition by Inductive Automation® is owned by Inductive Automation and is registered in the United States and may be pending or registered in other countries.
groov includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org)
All other brand or product names are trademarks or registered trademarks of their respective companies or organizations.
Opto 22 Automation Made Simple.
PCI-AC48 User’s Guide
ii
Table of Contents
Chapter 1: Installing the PCI-AC48 Adapter Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Support for Opto 22 RS-422/485-based I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Software Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Software Installation Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
What’s in this Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
For Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Setting Adapter Card Bias and Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
DIP Switch Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
DIP Switch Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
DIP Switch Settings for Common Network Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Installing Software Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Installing the Adapter Card in the Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Completing Adapter Card Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Locating and Configuring New Hardware in Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Identifying New Adapter Card COM Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Connecting a Serial Cable to the Adapter Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Wiring the Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Wiring for RS-485 2-Wire (Two Serial Ports) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Wiring for RS-485 4-Wire (One Serial Port) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Recommended Serial Cable Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
If You Are Migrating from AC24AT, AC422AT, or AC37 Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Chapter 2: Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Checking Communications Cabling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Troubleshooting the Adapter Card with a Loopback Connection . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Troubleshooting I/O Communications Using LED Indicators. . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Appendix A: Advanced Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
Using External Interrupts for mistic Remote I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
mistic Interrupt DIP Switch Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
mistic Interrupt Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
PCI-AC48 User’s Guide iii
iii
Wiring for RS-485 2-Wire (Two Ports with Interrupts) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Wiring for RS-485 4-Wire (One Port with Interrupts) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
mistic Commands Required for Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
How mistic Interrupts Work on the PCI-AC48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Building Custom Software Using UART Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Register Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Appendix B: Technical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
PCI-AC48 Adapter Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
LED Indicators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
iv
PCI-AC48 User’s Guide
1: 1: Installing the PCI-AC48 Adapter Card Chapter 1
1: Installing the PCI-AC48 Adapter Card
Introduction
The PCI-AC48 is an isolated, high-speed adapter card designed to link RS-485 or RS-422 serial devices, such as Opto 22’s B3000 brains, with computers using the Peripheral Component Interconnect (PCI) bus. The PCI-AC48 is compatible with computers that feature a standard 33 MHz PCI bus. This adapter card is ideal if you have been using Opto 22’s AC37 adapter card in an application, but must upgrade to a newer computer that uses the PCI bus rather than the ISA bus.
Two serial ports on the adapter card provide reliable communication. These ports can be used as two 2-wire ports or as one 4-wire port (2- and 4-wire modes cannot be used at the same time). Buffering on the card prevents loss of data, and the serial communication lines and the adapter card itself are isolated from transient voltages. The adapter card also provides tri-state control in hardware, 64-byte FIFO, and 16550 UART-compatible registers. The PCI-AC48 adapter card requires 5 VDC @ 600 mA and operates at temperatures of 0 °C to 70 °C. The card is configured using DIP switches. Six LEDs on the card indicate bus operation or user application status.
PCI-AC48 Adapter Card
Support for Opto 22 RS-422/485-based I/O
The PCI-AC48 supports communication with several popular Opto 22 RS-422/485-based I/O systems, including SNAP serial brains (the B3000), mistic PCI-AC48 can also communicate with mistic controllers.)
A mistic Remote I/O bus uses one twisted-pair cable for communication; however, a second pair can optionally be used for I/O systems needing mistic interrupt capability.
Remote I/O, and Optomux® I/O. (The
PCI-AC48 User’s Guide 1
1
INTRODUCTION
Software Drivers
Included software drivers for Microsoft® Windows® 2000 or Windows XP let applications access the adapter card ports as standard COM ports. Drivers are shipped with the adapter card and can also be downloaded from the Opto 22 Web site.
Software Installation Requirements
Here’s what you need to install and use the adapter card drivers:
A computer with an available PCI slot. CPU and RAM requirements depend upon your application.
Microsoft Windows XP or Windows 2000 workstation operating system
What’s in this Guide
This guide assumes that you are familiar with serial networking. If you are using the PCI-AC48 adapter card to connect to mistic Remote I/O or Optomux systems, it is also expected that you are familiar with the controllers, brains, racks, and input/output modules used with these systems.
This guide includes four sections:
Chapter 1: Installing the PCI-AC48 Adapter Card provides instructions to configure, install, and
connect the adapter card. Information on installing Windows software drivers and how to contact Opto 22 Product Support also appears here.
Chapter 2: Troubleshooting helps you find solutions to problems that may occur.
Appendix A: Advanced Configuration describes how to configure the PCI-AC48 for use with
Opto 22 mistic Remote I/O systems and includes helpful information for those writing their own drivers for the card.
Appendix B: Technical Specifications lists adapter card hardware specifications.
2
PCI-AC48 User’s Guide
CHAPTER 1: INSTALLING THE PCI-AC48 ADAPTER CARD
For Help
If you have problems installing or using the PCI-AC48 adapter card and cannot find the help you need in this guide, contact Opto 22 Product Support.
Phone: 800-TEK-OPTO (800-835-6786 toll-free
in the U.S. and Canada) 951-695-3080 Monday through Friday, 7 a.m. to 5 p.m. Pacific Time
Fax: 951-695-3017
Email: support@opto22.com
Opto 22 website: www.opto22.com
When calling for technical support, be prepared to provide the following information about your system to the Product Support engineer:
PC configuration (type of processor, speed, memory, operating system, and service packs)
Architecture of the serial network the adapter card is connected to.
A complete description of your hardware and operating systems, including:
additional accessories installed (such as sound cards, NICs, etc.)
type of power supply
types of I/O units installed
third-party devices installed (for example, barcode readers)
Software and version being used
NOTE: Email messages and phone calls to Opto 22 Product Support are grouped together and answered in the order received.
Specific error messages seen.
Setting Adapter Card Bias and Termination
Before installing the PCI-AC48 adapter card in your computer, follow the instructions in this section to configure bias and termination settings for using the PCI-AC48 adapter card on a serial network.
If you will use the adapter card to connect to a mistic Remote I/O or Optomux system, also see Chapter 2, “Advanced Configuration,” for information on connecting and configuring interrupt lines.
DIP Switch Locations
The PCI-AC48 adapter card uses three DIP switches for configuration: S1, S2, and S3. These switches are shown in the following illustration.
PCI-AC48 User’s Guide
3
3
SETTING ADAPTER CARD BIAS AND TERMINATION
OFF
123456
OFF
S2
OFF
123456
S1
PORT A PORT B
S3
1. If you are using the adapter card as an active host, set the card’s termination and bias for your
network using the tables “DIP Switch Descriptions” on page 5 and “DIP Switch Settings for
Common Network Configurations” on page 5.
2. If you are using the adapter card as a passive or redundant host, turn off bias settings on DIP
switches S1 and S2. See “DIP Switch Descriptions” on page 5.
123456
4
PCI-AC48 User’s Guide
DIP Switch Descriptions
Switch Description
1 Bias: RS-485 – (pull down)
OFF
123456
2 Bias: RS-485 + (pull up)
3 Interrupt: IRQ –
4 Interrupt: IRQ +
CHAPTER 1: INSTALLING THE PCI-AC48 ADAPTER CARD
S1 (port A)
or
S2 (port B)
OFF
123456
S3
1) This DIP switch overrides the functionality of the LEDs and is useful for verifying LED indicator operation. LEDs are shown in the diagram below:
5
6
6
5
4
3
2 Enable or disable 4-wire mode. When 4-wire mode is enabled, port A is TX
1
Termination: IRQ, 200
Termination: RS-485, 200
and port B is RX.
Turn ON or OFF all LEDs on adapter card.
Serial Port A
Serial Port B
1234567891012345678910
Not used
1
DIP Switch Settings for Common Network Configurations
Settings suitable for common applications of the PCI-AC48 adapter card are shown in the table below. You need to know where the adapter card will be installed on the network—at one end or in the middle—and whether 2-wire or 4-wire connections are used.
Port A TX (Green)
Port A IRQ (Red)
Port A RX (Green)
Port B TX (Green)
Port B IRQ (Red)
Port B RX (Green)
PCI-AC48 User’s Guide
5
5
INSTALLING SOFTWARE DRIVERS
For convenience, bias is often set at the adapter card (whether or not it is terminated and at the end of the network). The DIP switch settings in this table are set with bias ON.
PCI-AC48 location
on RS-485 network
At the End
or
the Only Card
In the Middle
RS-485
wiring mode
2-wire
2
4-wire
2-wire
2
4-wire
OFF OFF OFF
OFF OFF OFF OFF
Set DIP switches as shown below.
1
S1
OFF
123456
OFF
123456
OFF OFF OFF
OFF OFF OFF OFF
123456
ON ON
ON
123456
ON ON
OFF
OFF
S2 S3
ON ON
ON
OFF
123456
OFF OFF OFF
ON ON
OFF
123456
OFF OFF OFF OFF
ON ON
ON
ON ON
ON
ON
OFF
OFF
OFF
OFF
OFF OFF OFF OFF OFF
123456
OFF
OFF OFF OFF OFF
123456
OFF
OFF OFF OFF OFF OFF
123456
OFF
OFF OFF OFF OFF
123456
OFF
1) DIP switch S1 configures port A; DIP switch S2 configures port B.
2) Ports A and B must both be used for a single 4-wire connection. In 4-wire mode, port A is TX and port
B is RX.
Installing Software Drivers
Software drivers for the PCI-AC48 adapter card are included on the Opto 22 PCI-AC48 Adapter Card Toolkit CD that came with the card. If you do not have the CD, you can download the software from our Web site at www.opto22.com. The easiest way to find the software is to enter “PCI-AC48” in the Web site search engine, and then look for software related to that product.
1. Insert the CD in your CD-ROM drive. It should start automatically; if it does not, open the file
setup.exe.
2. Choose the PCI-AC48 option for installation.
3. Run the installation, which automatically places the necessary PCI-AC48 files in the correct
locations for the operating system you are using.
6
PCI-AC48 User’s Guide
CHAPTER 1: INSTALLING THE PCI-AC48 ADAPTER CARD
Installing the Adapter Card in the Computer
The PCI-AC48 adapter card installs into any PCI expansion slot of a PCI-capable computer. You may add multiple PCI-AC48 adapter cards, and the Windows operating system will create additional COM ports for each card. The maximum number of cards you can add to the computer depends on the number of available PCI slots.
Follow these steps to install the card:
1. Turn off the computer. Disconnect the power cord and remove the computer’s cover.
The power cord must be disconnected, or any sudden electrical spike may cause the computer to automatically boot.
2. With the power cord disconnected, press the power button.
This is an additional precaution to help discharge electricity that may be present in computer components.
3. Before handling the PCI-AC48, discharge excess static electricity from your body by touching
the computer’s metal chassis.
4. Install the card in one of the PCI expansion slots.
CAUTION: Do not scratch this card or other cards in the computer, as scratching may irreversibly
damage the card or other devices.
5. Verify that the PCI-AC48 card is properly seated in the motherboard PCI socket. Secure the
bracket to the computer case with the screw, and then confirm that the card is still seated correctly in the PCI socket.
6. Reconnect the computer’s power cord.
Do not start the computer. You will do this next in the section, “Completing Adapter Card
Installation.”
Completing Adapter Card Installation
To use the PCI-AC48 adapter card in Microsoft Windows, the new hardware must be located and configured. Finally, you should identify the new COM ports that have been added to the system.
Locating and Configuring New Hardware in Windows
When the computer is turned on, Microsoft Windows automatically recognizes that new hardware has been added to the system. The PCI-AC48 adapter is “seen” as two new hardware devices, the PCI adapter card itself and the two serial ports the adapter card provides. You need to separately configure software drivers for each device following the steps below:
1. Turn on the computer and log in.
The alert “Found New Hardware” appears briefly while the computer is starting up.
2. When the New Hardware Wizard window opens, click Next to move to the next screen.
3. To locate the driver, do one of the following:
PCI-AC48 User’s Guide
7
7
COMPLETING ADAPTER CARD INSTALLATION
a. For Windows 2000, select “Search for a suitable driver for my device (recommended).” Click
Next. Select the option “Specify a location.” Make sure that the other options are not selected and then click Next.
b. For Windows XP, click “Install from a list or specific location (Advanced).” Click Next.
4. When prompted to insert the manufacturer’s installation disk, in the Install from Disk window
click Browse and then navigate to C:\Program Files\Opto22\PCI_AC48.
5. Select the file Opto22Ac48Board.inf, click Open, and then click OK.
If you are using Windows XP and a dialog box says that the card has not passed Windows Logo testing, click Continue Anyway.
6. When the New Hardware Wizard indicates that the driver has been successfully installed, click
Next to move to the next screen, and then click Finish.
After a moment the alert “Found New Hardware—PCI Serial Port” will appear briefly, followed by the New Hardware Wizard.
7. Repeat step 2 through step 4 above.
8. After step 4, select the file Opto22 Ac48Port.inf, click Open, and then click OK.
9. When the New Hardware Wizard indicates that the driver has been successfully installed, click
Next to move to the next screen, and then click Finish.
Locating and configuring the PCI-AC48 adapter card is complete. Continue with the next section to verify the Windows COM ports assigned to the adapter card’s serial ports.
Identifying New Adapter Card COM Ports
To identify the new COM ports for the adapter card that are now available for Windows applications, do the following:
1. From the Start menu, select SettingsControl PanelSystem.
2. In the System window, click the Hardware tab.
3. Click Device Manager.
The Device Manager window appears.
8
PCI-AC48 User’s Guide
CHAPTER 1: INSTALLING THE PCI-AC48 ADAPTER CARD
4. Click the plus sign (+) next to “Ports (COM & LPT)” and look for the new COM ports that are now
available.
Installing the PCI-AC48 adapter card adds two new COM ports to the operating system. These COM ports are listed with other COM ports in the Device Manager.
NOTE: The port numbers assigned to the adapter card’s serial ports will vary depending on the number of COM ports that the computer system has.
IMPORTANT: Port A on the board becomes the lower-numbered port on the computer. In the example above, COM4 is Port A and COM5 is Port B. To test which port is which, use HyperTerminal to send characters through a port and look for the blinking TX LED. It’s easier to see the LED blink if the baud rate is set low (for example, 300). See the Troubleshooting Appendix for more information.
5. Note the COM port numbers for future use.
Connecting a Serial Cable to the Adapter Card
The PCI-AC48 adapter card has two serial ports, Port A and Port B. Two removable 10-pin cable plug connectors are provided with the adapter card. The connectors are similar to some screwless speaker connectors. Note that it is easier to wire a connector if it is attached to a stationary object, like a vise or the board after it is installed in the computer.
PCI-AC48 User’s Guide
9
9
CONNECTING A SERIAL CABLE TO THE ADAPTER CARD
Signal assignments for each port’s 10-pin connector are shown below. For each connector, signals on pins 1–5 are duplicated on pins 6–10. Normally you use one set only; however, the second set can be used for adding the adapter card to a daisy chain network.
Hole
Orange tab
12345678910
Each serial port on the PCI-AC48 adapter card uses a removable 10-pin plug connector from Phoenix Contact, part number FK-MC 0.5 - 2.5.
Pin
Signal
12345678910
RS-485 –
RS-485 +
IRQ +
Common
IRQ –
RS-485 –
RS-485 +
Common
IRQ +
IRQ –
IRQ + and IRQ – are optional inputs that can be used with mistic I/O systems to trigger an interrupt. For more information, see “Using External Interrupts for mistic Remote I/O” on page 19.
Wiring the Connectors
1. Choose the wiring diagram from the following pages based on how you will use the card:
RS-485 2-wire, two ports—page 11
RS-485 4-wire, one port—page 11
2. To wire the connector, use a small screwdriver to hold down the small orange tab while you
insert the wire into the large hole next to the tab. See the illustration below.
10
Hole
Orange tab
PCI-AC48 User’s Guide
CHAPTER 1: INSTALLING THE PCI-AC48 ADAPTER CARD
Wiring for RS-485 2-Wire (Two Serial Ports)
The following wiring diagram assumes that you are using the PCI-AC48 for two 2-wire ports with no interrupts. (If you are using interrupts, see page 20.)
Please note the following equivalents for wiring.
TX/RX +
TX/RX –
Comm
1234 567 891012345678910
TX/RX +
TX/RX –
Opto 22 Other
Vendors
TX/RX + TX/RX(B) TO/FO +
TX/RX – TX/RX(A) TO/FO –
Comm
Optomux
Serial Port A
Serial Port B
Wiring for RS-485 4-Wire (One Serial Port)
The following diagram assumes that you are using the PCI-AC48 for one 4-wire port with no interrupts. (If you are using interrupts, see page 20.)
In 4-wire mode, Port A is TX and Port B is RX. It is easiest to jumper the commons and wire them both at the same time
Please note the following equivalents for wiring.
TX –
TX +
Port A
Comm
RX +
1234 567 891012345678910
RX –
Comm
Port B
Opto 22 Other
Vendors
TX + TX(B) TO +
TX – TX(A) TO –
RX + RX(B) FO +
RX – RX(A) FO –
Optomux
Recommended Serial Cable Specifications
RS-485 serial lines require twisted pair cable with a maximum cable length of 3,000 feet (915 m). The recommended cable type is two twisted pairs of 24 gauge conductors with a shield. Nominal impedance is 100 ohms and capacitance is 12.5 picofarads per foot.
Typical manufacturer part numbers are:
Manhattan Electric Cable: M3475
PCI-AC48 User’s Guide
11
11
IF YOU ARE MIGRATING FROM AC24AT, AC422AT, OR AC37 CARDS
Belden Wire and Cable: 9,729
You may also be able to use Category 5 solid cable (any manufacturer). Shielded Category 5 cable offers better noise immunity. Maximum distance has not been tested.
If You Are Migrating from AC24AT, AC422AT, or AC37 Cards
If you are replacing existing Opto 22 AC24 or AC37 adapter cards with new PCI-AC48 cards, note that the PCI-AC48 does not have RTS and CTS capability. Also, you should be aware of a potential compatibility problem.
Because the AC48 is a PCI card, its UART registers are not located at the traditional locations typically used for COM1 through COM4. PCI and ISA buses operate differently: the ISA bus can specify an I/O port address so the adapter card can communicate directly with the port, but the PCI bus works from a card ID that is assigned when the card is installed in a PCI slot.
The way in which existing drivers and software address the adapter card determines their compatibility with the PCI-AC48.
Software that uses Windows’ drivers by referencing logical device names will be compatible with the PCI-AC48, since the card’s Windows-compatible drivers allow it to be mapped to a logical COMx device name.
Some Opto 22 drivers and software offer the option of using logical device names for COM ports. This option is sometimes misleadingly designated as RS232 Port instead of WindowsCOMx drivers. For example, in the utility program shown below, you would set the logical port by choosing the Port Type RS232 Port and then choosing the correct Port Number.
Choose RS232 Port
12
PCI-AC48 User’s Guide
Choose correct COM port
CHAPTER 1: INSTALLING THE PCI-AC48 ADAPTER CARD
If the software application accesses COM ports on the computer, simply change the program configuration to use the new COM ports. If a configuration change doesn’t work, modify the source code to use the new COM ports.
If the software directly accesses the I/O location on the previous ISA card, you’ll need to modify the source code to use the new I/O location on the PCI-AC48. (For detailed information on the PCI register, see “Register Table” on page 22.)
PCI-AC48 User’s Guide
13
13
IF YOU ARE MIGRATING FROM AC24AT, AC422AT, OR AC37 CARDS
14
PCI-AC48 User’s Guide
2: 2: Troubleshooting Chapter 2
2: Troubleshooting
Introduction
This chapter includes suggestions for troubleshooting problems that may occur when using the PCI-AC48 adapter card.
The Windows application HyperTerminal can be used for several diagnostic tests. This program is installed by default in Windows 2000 and Windows XP.
Checking Communications Cabling
Each communications link requires an additional single wire to be used as the signal common. Many people assume that since RS-422 and RS-485 are based on the differential voltage between the two wires that make up the twisted pair in the data link, then the signal common should be optional. However, it is not. Also, never tie the signal common to earth ground.
Troubleshooting the Adapter Card with a Loopback Connection
Because a loopback connection essentially lets the PCI-AC48 adapter card talk to itself, it can help you determine whether a communication problem is caused by other RS-422/485 devices external to the computer or is limited to the adapter card, operating system, and software being used.
PCI-AC48 User’s Guide 15
15
TROUBLESHOOTING THE ADAPTER CARD WITH A LOOPBACK CONNECTION
1. To create the loopback connection, remove the communication cable from the adapter card.
Tie the TX pins on Port A to the RX pins on Port B (a four-wire configuration is required for a loopback connection).
TX –
TX +
Port A
RX +
1234567891012345678910
RX –
Port B
2. Use a software program such as HyperTerminal to send data to the adapter card. Be sure to set
flow control for “None.”
Because of the loopback connection, any data sent to the adapter card will be transmitted out the transmit (TX±) terminals, looped back into the receive (RX ±) terminals, and finally sent back to the computer through the adapter card.
3. Type characters on the computer’s keyboard and watch to see if they appear on the computer
screen.
If the data typed on the computer’s keyboard appears on the computer’s monitor, then the adapter card is functioning correctly.
4. Watch the TX and RX LEDs.
If the TX LED blinks, the adapter card received the data from the computer and transmitted it out the transmit (TX±) terminals. If the RX LED blinks, the adapter card received the data.
16
If the TX LED does not blink, check the COM port number you are using in HyperTerminal to make sure it matches the COM port number assigned to Port A.
Troubleshooting I/O Communications Using LED Indicators
If you are having difficulty communicating, you can watch the adapter card’s and Opto 22 brain’s LEDs to help find the problem. It may be necessary to use a slow baud rate so the LED activity is easier to see.
1. When transmitting, did the TX LED on the adapter card blink? If it did, then the adapter card
transmitted a message; go to the next step.
If the LED did not blink, check the COM port number you are using to make sure it matches the COM port number assigned to Port A.
2. Did the Receive LED (RX, REC, RCV) on the Opto 22 brain or controller blink? If it did, then the
Opto 22 device received a message; go to the next step.
If the LED did not blink, then there is either a power problem at the device or a communications wiring problem. Ensure that the voltage at the device is 5.0 VDC (±0.1 VDC). Double-check the communications wiring.
PCI-AC48 User’s Guide
CHAPTER 2: TROUBLESHOOTING
3. Did the Transmit (TX, XMT) LED on the Opto 22 brain or controller blink? If it did, the Opto 22
device understood the message, confirmed that the message address matched its address, and transmitted a response. Go to the next step.
If the LED did not blink, then the device did not understand the message or the message address did not match the device’s address. Make sure the operating system COM port settings and software settings match the device’s settings for address, baud rate, parity, data bits, stop bits, communication mode (ASCII vs. Binary, if applicable), and protocol (Optomux I/O protocol vs. mistic I/O protocol, etc.).
4. Did the RX LED on the adapter card blink? If it did, then the adapter card received the response
from the Opto 22 device; go to the next step.
If the LED did not blink, then it is probably a communication wiring problem. Double-check the communication wiring.
5. If the software did not receive the response from the adapter card, try using a longer timeout
value.
6. If the software did receive the response but it was garbled or contained a checksum or CRC
error, then the problem may be the communications wiring or termination and biasing of the RS-422/485 communications link.
PCI-AC48 User’s Guide
17
17
TROUBLESHOOTING THE ADAPTER CARD WITH A LOOPBACK CONNECTION
18
PCI-AC48 User’s Guide
A: A: Advanced Configuration Chapter A
A: Advanced Configuration
Appendix A
Introduction
The topics in this appendix are intended for advanced users who are using the PCI-AC48 adapter card on a serial network with Opto 22 mistic Remote I/O. This appendix also includes information for those who are using the adapter card with a custom software application and need to use UART registers.
Using External Interrupts for mistic Remote I/O
If you are using the PCI-AC48 adapter card with mistic I/O and want to use mistic interrupts, follow instructions in the next two sections to set DIP switches and wire the card’s ports for interrupts. (For technical details, see “How mistic Interrupts Work on the PCI-AC48” on page 21.
mistic Interrupt DIP Switch Settings
Configure mistic interrupt line support using switches 3, 4, and 5 on DIP switch S1 (port A) or S2 (port B) according to the table on the following page. All the interrupts found in the Interrupt Identification Register can be routed to this one interrupt request line.
Remember that in addition to interrupts, network termination and bias must also be set as shown in
“Setting Adapter Card Bias and Termination” on page 3.
DIP switch locations on the card are illustrated on page 3.
Switch Description
1 Bias: RS-485 – (pull down)
OFF
123456
S1 (port A)
or
S2 (port B)
2 Bias: RS-485 + (pull up)
3 Interrupt: IRQ –
4 Interrupt: IRQ +
5
6
Termination: IRQ, 200
Termination: RS-485, 200
PCI-AC48 User’s Guide 19
19
USING EXTERNAL INTERRUPTS FOR MISTIC REMOTE I/O
mistic Interrupt Wiring
If you are using mistic interrupts, connect serial cables to the PCI-AC48’s port connectors using the following diagrams.
Wiring for RS-485 2-Wire (Two Ports with Interrupts)
The following diagram assumes you are using the PCI-AC48 for two 2-wire ports with interrupts.
Please note the following equivalents for wiring.
TX/RX +
TX/RX –
Port A
IRQ +
Comm
IRQ –
TX/RX +
1234 567 891012345678910
Comm
TX/RX –
Port B
IRQ +
IRQ –
Opto 22 Other
Vendors
TX/RX + TX/RX(B) TO/FO +
TX/RX – TX/RX(A) TO/FO –
Optomux
Wiring for RS-485 4-Wire (One Port with Interrupts)
The following diagram assumes you are using the PCI-AC48 for one 4-wire port with interrupts. In 4-wire mode, Port A is TX and Port B is RX.
Please note the following equivalents for wiring.
Opto 22 Other
Vendors
TX + TX(B) TO +
TX – TX(A) TO –
Optomux
20
PCI-AC48 User’s Guide
TX –
TX +
Port A
IRQ +
Comm
IRQ –
RX +
1234 567 891012345678910
RX –
Comm
Port B
RX + RX(B) FO +
RX – RX(A) FO –
APPENDIX A: ADVANCED CONFIGURATION
mistic Commands Required for Interrupts
Before a Remote I/O brick can generate an interrupt, the following mistic commands must be executed before the event being monitored occurs:
Set Event Table Entry—An entry must be made instructing the I/O brick to monitor for a specific event occurrence.
Enable Event Table Entry—The event entry must be enabled for scanning by the I/O brick.
Set Event Interrupt Status—The event entry interrupt must be enabled.
Set System Options—The Global Interrupt Enable bit must be set.
And, of course, the event being monitored must then occur.
An interrupt from an I/O unit is cleared by executing a “Read and Clear Event Latches” command. All event entries on a specific I/O unit that are set to generate an interrupt should be specified when reading and clearing, as the interrupt output is cleared by the command.
If more than one I/O unit is set up to generate interrupts, the host CPU must poll each one to determine which interrupt is active. This can be done with a “Read Event Latches” or “Read and Clear Event Latches” command. If possible, it is best to put all signals that may generate interrupts into one I/O unit. This will eliminate the need to poll more than one board and speed up the host CPU interrupt response time.
For additional information on mistic interrupts, see form #270, the mistic Protocol User’s Guide.
How mistic Interrupts Work on the PCI-AC48
The IRQ lines on the Phoenix connector are bidirectional RS-485 links and are normally set as inputs. They are designed to be used with the IRQ output lines found on mistic Remote I/O bricks. The IRQ outputs of Remote I/O bricks are RS-485 drivers, which are held in tri-state mode until an interrupt is requested, at which time the outputs are enabled and set active. The PCI-AC48 receives this signal and sets the IRQ Line Status bit in the Modem Status Register, and a modem status interrupt is generated.
mistic interrupts for the PCI-AC48 are tied into Windows interrupts and look like UART interrupts. IRQ inputs are mapped to the 16C550-compatible CTS signal on each of two UARTs on the PCI-AC48. The CTS status can be polled by reading the Modem Status Register (MSR), and interrupts can be enabled using the Interrupt Enable Register (IER) and checking the delta-CTS bit of the MSR register during the interrupt handler. See the register table on page 22 for details.
The other interrupt sources in the MSR register (delta CD, delta RI, and delta DSR) have been disabled on the circuit board by tying the corresponding UART signals to VCC.
The Windows API WaitCommEvent can be used with its EV_CTS bit mask to detect a CTS interrupt.
Building Custom Software Using UART Registers
If you are not using Opto 22 mistic or Optomux systems and instead are writing custom drivers or modifying software to communicate with the registers on the PCI-AC48’s serial ports, you may find the “Register Table” on page 22 helpful.
The PCI-AC48 adapter card uses a 16550-compatible UART from Exar Corporation (Exar product number XR17C158). For additional register definitions not covered in the table below, see the Exar document for this product at www.exar.com.
PCI-AC48 User’s Guide
21
21
REGISTER TABLE
Register Table
Address
0
1
2
1
Register Read/
RHR receive
holding register
THR transmit
holding register
LSB of divisor
latch when
DLE=1
IER interrupt
enable register
MSB of divisor
latch where
DLE=1
FCR, FIFO
control register
ISR interrupt
status register
2
write
RX3XXX X X XX
WX X X X X X X X
WX X X X X X X X
W04000
WX X X X X X X X
W
R
7 6 5 4 3 2 1 0
RCVR trigger
MSB
0/FIFO
enabled
RCVR trigger
LSB
0/FIFO
enabled
00
00
Bits
interrupt
modem
status
DMA
mode
select
interrupt prior. bit
2
5
receive
line sta-
tus inter-
rupt
transmit
TITO reset
interrupt prior. bit
1
transmit
holding register
interrupt
receiver
FIFO reset
inter-
rupt
prior. bit
0
receive holding register
interrupt
FIFO
enable
inter-
rupt sta-
tus
DLE
3
4
5
6
7
1
Address of register (0–7)
2
Some registers are read/write, some are write-only, some are read-only, and some have different purposes when reading or writing.
3
X = a data bit, either 1 or 0.
4
0 = must be zero when writing
5
The delta-CTS bit indicates if the CTS bit has changed, and this interrupt can be enabled by setting the modem status interrupt of the
IER.
6
The divisor latch enable bit or the LCR determines the mode of the registers at offset 0 and 1.
LCR line con-
trol register
MCR modem
control register
LSR line status
register
MSR modem
status register
SPR scratch
pad register
W
W0 0 0
R/W X X X X X X X X
divisor
latch
enable
0/FIFO
R
R CD RI DSR CTS delta-CD delta-RI
error
set
break
6
trans-
mit
empty
set par-
ity
trans-
mit
holding
empty
even
parity
loop
back
break
interrupt
parity
enable
OP2 OP1 RTS DTR
framing
error
stop bits
parity
error
word
length
bit 1
overrun
error
delta-
DSR
word
length
bit 0
receive
data
ready
delta-
CTS
22
PCI-AC48 User’s Guide
B: B: Technical Specifications Chapter B
B: Technical Specifications
Appendix B
PCI-AC48 Adapter Card
Computer Interface 32-bit, 33 MHz PCI bus (PCI Specification Revision 2.2)
Two serial ports, configurable for any of the following com-
Ports
Isolation 2,500 VAC transient
Communications RS-485 2-wire or 4-wire operation
binations:
Two ports in RS-485 2-wire mode
One port in RS-485 4-wire mode
Baud Rates Serial link to 460,800 baud
Cable Length Distance Up to 3,000 ft. (915 m) @ 115,200 baud
Termination 200 Ohm termination for RS-485 and IRQ
Biasing RS-485 pull-up/pull-down biasing
Indicators
Software Driver System Requirements Microsoft Windows 2000 or Windows XP
Power Requirements 5 VDC @ 600 mA
Operating Temperature 0 °C to 70 °C
Storage Temperature –30 °C to 85 °C
Humidity 95% relative humidity, non-condensing
Transmit, Receive, and IRQ LEDs for each serial port (See page 24 for diagram.)
PCI-AC48 User’s Guide 23
23
PCI-AC48 ADAPTER CARD
LED Indicators
Port A TX
Serial Port A
Port A IRQ (Red)
Port A RX
1234567891012345678910
Port B TX
Serial Port B
Port B IRQ (Red)
Port B RX
24
PCI-AC48 User’s Guide
Loading...