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 24 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.
Mistic is a registered trademark and Cyrano, Generation 4, G4, Optomux, and OPTOWARE are trademarks of Opto 22.
ARCNET is a registered trademark of Datapoint Corporation.
IBM is a registered trademark and IBM PC, XT, AT, and PS/2 are trademarks of International Business Machines Corporation.
Microsoft and MS-DOS are registered trademarks and Windows is a trademark of Microsoft Corporation.
Page 3
TABLE OF CONTENTS
TABLE OF CONTENTS
List of Figures and Tables............................................................................... vii
Welcome ........................................................................................................... xi
About This Manual .................................................................................................................... xi
Document Conventions.............................................................................................................. xii
About Opto 22 ............................................................................................................................ xiii
Table B-6: Current Requirements for Pamux-Compatible Analog Modules ..................................... B-9
Pamux User’s Guide
ix
Page 10
TABLE OF CONTENTS
x
Pamux User’s Guide
Page 11
WELCOME
WELCOME
Opto 22’s Pamux system provides low-cost, high-speed distributed control of both digital and analog
I/O. A Pamux system can span up to 500 feet and can support up to 32 stations with a total of up to
512 I/O points.
This manual provides all the information you will need to set up and use a Pamux system. It features
complete descriptions of all Pamux components, including the B4, B5, and B6 brain boards and the
AC28 and AC36 adapter cards. It provides detailed instructions on setting up a Pamux system and
programming the system with or without Opto 22’s Pamux software driver. Several handy appendices
at the back of the manual feature troubleshooting procedures and general tips, hardware
specifications, frequently asked questions, a glossary of terms, and information on Opto 22 Product
Support.
Note:Information in this manual relating to Pamux brain boards applies only to the revisions of the brain
boards indicated below:
TABLE OF CONTENTS
•AC28: Revision C or later. For revision B or earlier, request Opto 22 form 218.
•B4: Revision L or later. For revision K or earlier, request Opto 22 form 127.
•B5: Revision J or later. For revision I or earlier, request Opto 22 form 145.
•B6: Revision G or later. For revision F or earlier, request Opto 22 form 154.
ABOUT THIS MANUAL
This manual is organized as follows:
•Chapter 1: Introduction — Overview of the Pamux system, with descriptions and
illustrations of all Pamux components: AC28, AC36, B4, B5, B6, TERM1, TERM2, and UCA4.
•Chapter 2: System Setup — Everything you need to know to design and construct a
Pamux system. Includes details on laying out a system, setting up Pamux stations,
connecting field wiring, connecting stations to the bus to form a system, powering the
system, linking to an adapter card, and connecting field wiring.
•Chapter 3: Programming with the Pamux Driver — Complete information on how to
use Opto 22’s Pamux software driver, designed for use on a PC with an AC28 or AC36
adapter card. Covers installation of the driver under DOS or Windows, provides a complete
command reference for use under both platforms, and includes examples of programming
code.
Pamux User’s Guide
xi
Page 12
TABLE OF CONTENTS
•Chapter 4: Programming without the Pamux Driver — Details on all issues that must
be addressed when communicating with Pamux without using the Pamux driver. Provides
descriptions of the Pamux bus layout and timing, plus detailed information on how to read
from and write to digital and analog Pamux stations. Includes extensive programming
examples.
•Appendix A: Troubleshooting — Tips on resolving system setup and communication
problems.
•Appendix B: Specifications — Detailed reference information on Pamux brain boards,
cables, connectors, and power supplies.
•Appendix C: Temperature Conversion Routines — Complete algorithms required to
convert readings from thermocouple and ICTD probe modules into temperatures.
•Appendix D: Product Support — Information on how to get help from Opto 22.
•Appendix E: Glossary — Definitions of commonly used terms.
DOCUMENT CONVENTIONS
•Bold typeface indicates text to be typed. Unless otherwise noted, such text may be entered
in upper or lower case. (Example: “At the DOS prompt, type cd \windows.”)
Italic
•
•File names appear in all capital letters. (Example: “Open the file TEST1.TXT.”)
•Key names appear in small capital letters. (Example: “Press
•Key press combinations are indicated by hyphens between two or more key names. For
•“Press” (or “click”) means press and release when used in reference to a mouse button.
•Menu commands are sometimes referred to with the Menu➝Command convention. For
•Numbered lists indicate procedures to be followed sequentially. Bulleted lists (such as this
typeface indicates emphasis and is used for book titles. (Example: “See the
OptoControl User’s Guide
example,
F1 key. Similarly, CTRL-ALT-DELETE is the result of pressing and holding the CTRL and ALT keys,
SHIFT-F1 is the result of holding down the SHIFT key, then pressing and releasing the
then pressing and releasing the
example, “Select File➝Run” means to select the Run command from the File menu.
one) provide general information.
for details.”)
SHIFT.”)
DELETE key.
xii
Pamux User’s Guide
Page 13
ABOUT OPTO 22
Thank you for purchasing OptoWare.
Opto 22’s quest to deliver total control to industrial automation customers dates back to its
beginnings in 1974 with the introduction of optically-isolated solid-state relays. Today, Opto 22 is
the number one provider of I/O systems, with more than 45 million points of I/O working reliably
worldwide. After earning a reputation for consistent innovation and leadership in automation
hardware, Opto 22 realized it was time to take a new approach to control software. In 1988 Opto 22
introduced the first flowchart-based control programming language. Opto 22 continues to deliver
successively more advanced generations of hardware and software.
Opto 22’s products are organized in a comprehensive 7-layer architecture that establishes the
foundation for future innovation and provides strong
support for today’s customers.
Opto 22 has targeted four key markets: Enterprise,
Systems, Components and Verticals. Opto 22 provides
bi-directional data exchange software for integrating
manufacturing data into the Enterprise Market, softwaredriven control solutions for the Systems Market, hardware
and drivers for the Components Market, and Vertical
Market solutions for the water, energy, and semiconductor
industries.
TABLE OF CONTENTS
SOFTWARE
CONTROLLERS
INTERFACES
BRAIN BOARDS
RACKS
I/O MODULES
All Opto 22 products are manufactured in the U.S. at the
company’s headquarters in Temecula, California, and are
sold through a global network of distributors, system
integrators and OEMs. Sales offices are located throughout the United States. For more information,
contact Opto 22, 43044 Business Park Drive, Temecula, CA 92590-3614. Phone Opto 22 Inside Sales
at 1-800-452-OPTO or Opto 22 Headquarters at 909-695-3000. Fax us at 909-695-3095.
You can also visit our Web site at http://www.opto22.com.
SOLID-STATE RELAYS
Pamux User’s Guide
xiii
Page 14
TABLE OF CONTENTS
xiv
Pamux User’s Guide
Page 15
INTRODUCTION
INTRODUCTION
WHAT IS PAMUX?
Pamux is a high-speed, high-density distributed I/O system that accommodates both digital and
analog brain boards and I/O modules. A Pamux bus can extend up to 500 feet from a host computer
or other programming device.
Pamux supports up to 32 distributable stations containing up to 512 I/O points. Each station is
composed of a Pamux brain board and an I/O mounting rack; the final station on the Pamux bus must
also include a terminator board. Digital (B4 and B5) and analog (B6) stations may be mixed on a single
bus.
All Pamux stations within a system are daisy-chained via a 50-pin flat-ribbon cable, as shown in Figure 1-1.
Figure 1-1: Typical Pamux System
Pamux User’s Guide
1-1
Page 16
INTRODUCTION
A host computer with a standard 8-MHz I/O bus linked to a Pamux system can access eight digital I/O
points in under three microseconds and 512 digital I/O points in under 200 microseconds. The host
computer can also access 16 analog input points in under six milliseconds and 16 analog output
points in about 15 milliseconds.
The Pamux product line is ideal for low-noise applications, such as:
•Robotics
•Numerical control
•Conveyor line control
•Sequence-of-events fault detection
Because it is an external high-speed parallel I/O system, Pamux is better suited to environments with
low electromagnetic or radio frequency interference. Noisy applications are better suited to I/O systems
that offer greater noise immunity, such as Opto 22’s Mistic and Optomux systems.
1-2
Pamux User’s Guide
Page 17
PAMUX COMPONENTS
This section describes and illustrates each of the components of the Pamux family.
AC28 ADAPTER CARD
Note:Information on the AC28 applies to revision C or later. For revision B or earlier, refer to Opto 22 form 218.
The AC28 is a high-speed adapter card designed to link the Pamux bus to IBM PC/AT or compatible
computers. The AC28 is compatible with computers that feature a standard 8-MHz ISA bus.
Each AC28 can access up to 512 points of I/O. Four AC28s can be installed in one PC, supporting up to
2,048 points of I/O.
INTRODUCTION
Figure 1-2: AC28 Adapter Card
Pamux User’s Guide
1-3
Page 18
INTRODUCTION
AC36 ADAPTER CARD
The AC36 is an adapter card that provides a Pamux bus interface for a TTL parallel port. It is
compatible with parallel-port devices for MULTIBUS, STD bus, and VME bus products. (MULTIBUS is
a patented Intel bus and a registered trademark of Intel Corp.)
Each AC36 can access up to 512 points of I/O.
Figure 1-3: AC36 Adapter Card
B4 BRAIN BOARD
Note: Information on the B4 applies to revision L or later. For revision K or earlier, refer to Opto 22
form 127.
The Pamux B4 is an addressable digital brain board that can control up to 32 input or output points in
distributed I/O applications. The B4 is designed for use with the G4PB32H mounting rack for single-point
digital I/O, or the PB32HQ mounting rack for quad pak digital I/O (four points of I/O per module).
The B4 features a 70-pin header connector that attach to a digital I/O mounting rack. Up to 16 B4 brain
boards may be linked on a single Pamux bus to control up to 512 points of digital I/O.
1-4
Pamux User’s Guide
Figure 1-4: B4 Brain Board
Page 19
INTRODUCTION
B5 BRAIN BOARD
Note:Information on the B5 applies to revision J or later. For revision I or earlier, refer to Opto 22
form 145.
The Pamux B5 is an addressable digital brain board that can control up to 16 input or output points in
distributed I/O applications. The B5 is designed for use with a variety of Opto 22 I/O mounting racks,
including racks that accept single-point digital I/O, SNAP digital I/O, quad pak digital I/O, as well as
racks with integrated digital I/O circuitry.
The B5 features a 50-pin female connector to attach to a mounting rack and two 50-pin male connectors
to attach to the Pamux bus or a terminator board. Up to 32 B5 brain boards may be linked on a single
Pamux bus to control up to 512 points of digital I/O.
Figure 1-5: B5 Brain Board
Pamux User’s Guide
1-5
Page 20
INTRODUCTION
B6 BRAIN BOARD
Note: Information on the B6 applies to revision G or later. For revision F or earlier, refer to Opto 22 form 154.
The Pamux B6 is an addressable analog brain board that can control up to 16 input or output points
in distributed I/O applications. The B6 is designed for use with Opto 22 mounting racks that feature
header connectors, including the PB4AH (four points of analog I/O), PB8AH (eight points), and
PB16AH (16 points) using Opto 22 Classic analog modules.
The B6 features a 50-pin female connector to attach to a mounting rack and two 50-pin male
connectors to attach to the Pamux bus or a terminator board. Up to 32 B6 brain boards may be linked
on a single Pamux bus to control up to 512 points of analog I/O.
The B6 includes an on-board microprocessor that continually scans all I/O points on the mounting
rack, performs necessary conversions, and then updates a dual-port RAM. The host computer
transfers data along the Pamux bus by reading from or writing to the dual-port RAM.
1-6
Pamux User’s Guide
Figure 1-6: B6 Brain Board
Page 21
INTRODUCTION
TERM1 TERMINATOR BOARD
Both ends of a Pamux bus must be terminated. At the host computer end of the bus, an adapter card
such as the AC28 includes terminator resistors. At the other end, the final Pamux brain board on the bus
must be terminated with a TERM1 or TERM2 terminator board.
Terminator boards plug directly into B5 and B6 brain boards. At a B4 station, a terminator board plugs
into the I/O mounting rack such that the component side of the terminator board faces away from the
modules.
Figure 1-7: TERM1 Terminator Board
TERM2 TERMINATOR BOARD
The TERM2 is identical to the TERM1 in size and function. The only difference between the boards is
that the TERM2 offers lower line impedance than the TERM1.
If your Pamux system uses a cable with characteristics that differ from those recommended, you may
need to terminate the bus with the TERM2 rather than the TERM1.
Figure 1-8: TERM2 Terminator Board
Pamux User’s Guide
1-7
Page 22
INTRODUCTION
UCA4 UNIVERSAL COMMUNICATION ADAPTER
The UCA4 is a general-purpose adapter card used to connect any TTL device to the Pamux bus. Its
purpose is to allow a user to build a custom interface to a Pamux system. For example, the UCA4 can be
used to connect Pamux to a PDP-11, an Intel single-board computer, or any other device with a
parallel
I/O interface.
The UCA4 features terminators, bus drivers, a 50-pin header connector used to interface with the
Pamux bus, and two 50-pin male connectors used to link with a TTL device. Because the incoming
pins on the UCA4 are not defined, users can wire-wrap their own custom TTL logic on the board (a
wiring schematic is provided). In addition, on-board SIP sockets allow users to incorporate additional
logic circuity directly on the board. All active parts are socketed to simplify replacement.
Figure 1-9: UCA4 Universal Communication Adapter
1-8
Pamux User’s Guide
Page 23
SYSTEM SETUP
SYSTEM SETUP
OVERVIEW
This chapter explains how to construct a Pamux system with B4, B5, and B6 stations. It covers general
system configuration, installation of brain boards into I/O mounting racks, jumper configuration, cables
and connectors, power supplies, and accessory devices.
DESIGNING A SYSTEM
Pamux is a distributed I/O system linked via a 50-pin flat-ribbon cable. As long as the total cable length
does not exceed 500 feet, Pamux stations can be installed anywhere along the system. In addition, B4,
B5, and B6 stations can be daisy-chained within a single Pamux system. This provides total flexibility in
laying out your system configuration.
Each Pamux station consists of a brain board and an I/O mounting rack. Digital stations use B4 and B5
boards; analog stations use B6 boards. The B4 controls up to 32 points of digital I/O, the B5 controls up
to 16 points of digital I/O, and the B6 controls up to 16 points of analog I/O.
In addition to a brain board and mounting rack, the last station on a Pamux bus must also include a
terminator board (TERM1 or TERM2).
When laying out a system, keep in mind that the high cost of electrical wiring generally makes it best to
place the control or monitoring I/O point as close to the controlled device as possible.
Note that round parallel ribbon cable should not be used with Pamux because it may introduce crosstalk between overlaying data lines. Use flat-ribbon cable only. (See Appendix B for cable specifications.)
Figures 2-1, 2-2, and 2-3 show three system configuration options: clustered, distributed, and distributed
clustered. Clustered systems are used to accommodate several Pamux stations in a tight location.
Distributed systems include single Pamux stations distributed over a larger area. Distributed clustered
systems involve clusters of Pamux stations distributed over several locations. As long as the total cable
length does not exceed 500 feet, the choice of system configuration is up to you.
Pamux User’s Guide
2-1
Page 24
SYSTEM SETUP
Figure 2-1: Pamux Clustered System
Figure 2-2: Pamux Distributed System
Figure 2-3: Pamux Distributed Clustered System
2-2
Pamux User’s Guide
Page 25
SETTING UP A B4 STATION
This section describes how to install the B4 digital I/O brain board on a compatible mounting rack. It
also discusses B4 configuration issues, including how to set jumpers for the address, watchdog, and
reset line. Finally, it addresses how to install a terminator board when a B4 station is at one end of a
Pamux system and describes the LED indicators.
INSTALLING THE B4 ON A MOUNTING RACK
The B4 brain board measures 9.25 by 2.9 inches. It includes a 70-pin box connector along its bottom
edge to attach to a digital I/O mounting rack. Two levers are located on opposite corners of the board.
These levers operate with the card guides on the mounting rack to hold the brain board in place or to
help release it from the rack.
Figure 2-4 is a detailed illustration of the B4 along with its dimensions.
SYSTEM SETUP
Figure 2-4: Dimensions of the B4 Brain Board
The B4 can be installed in either of two I/O mounting racks:
•G4PB32H —
•PB32HQ —
The G4PB32H mounting rack uses single-point digital modules. It offers a dense footprint and point-bypoint I/O configuration flexibility.
The PB32HQ also offers a dense footprint but uses Opto 22 quad pak modules. Each quad pak contains
four discrete points of I/O in one package. The PB32HQ is thus configured in four-point increments.
Figure 2-5 shows how the B4 brain board is installed on either mounting rack.
32 channels of single-point G4 I/O
32 channels of quad pak I/O (8 modules, 4 points per module)
Pamux User’s Guide
2-3
Page 26
SYSTEM SETUP
Figure 2-5: Installation of the B4 on a Mounting Rack
Figures 2-6 and 2-7 show the mounting dimensions of these racks.
Figure 2-6: Mounting Dimensions of the G4PB32H
2-4
Pamux User’s Guide
Page 27
Figure 2-7: Mounting Dimensions of the PB32HQ
SYSTEM SETUP
Figure 2-8 shows the vertical dimensions of the B4 mounted on either rack.
Figure 2-8: Vertical Dimensions of the B4 Mounted on a Rack
SETTING B4 JUMPERS
The B4 includes eight jumpers. Jumpers 1 through 4 set the address, jumpers 5 and 6 set the watchdog
functionality, and jumpers 7 and 8 determine the behavior of the reset line.
Jumpers 1–4 (Address)
These jumpers configure the base address of the B4. Since the brain board controls 32 points of I/O,
while the Pamux data bus is only eight bits wide, the B4 must be accessed as four consecutive banks of
eight I/O channels each. Each bank has its own address.
The four banks on the B4 have contiguous addresses. The bank 0 address is the base address of the B4;
the bank 1 address is the base address plus one; the bank 2 address is the base address plus two; and
the bank 3 address is the base address plus three. Hence, only the base address needs to be configured.
Refer to Table 2-1 to determine how to set this base address.
Note that each Pamux station on a bus must have a unique address.
Pamux User’s Guide
2-5
Page 28
SYSTEM SETUP
Table 2-1: B4 Address Jumpers
BBaasse e AAddddrreessssJJuummppeer r 44JJuummppeer r 33JJuummppeer r 22JJuummppeer r 11
0OutOutOutOut
4OutOutOutIn
8OutOutInOut
12OutOutInIn
16OutInOutOut
20OutInOutIn
24OutInInOut
28OutInInIn
32InOutOutOut
36InOutOutIn
40InOutInOut
44InOutInIn
48InInOutOut
52InInOutIn
56InInInOut
60InInInIn
Jumpers 5 and 6 (Watchdog)
A watchdog timer shuts down a process when the host computer goes off line. The watchdog timer on
the B4 depends on a periodic read or write strobe from the host processor. The individual B4 need not be
addressed. The absence of a strobe for a specified time activates the watchdog function.
Using jumpers 5 and 6, you can configure the B4 to trigger one of four actions upon a timeout. Refer to
Table 2-2.
Table 2-2: B4 Watchdog Jumpers
WWaattcchdog hdog FFuunnccttiiononJJuummppeer r 66JJuummppeer r 55
No actionInIn
Activate relay channel 0InOut
Deactivate all relay channelsOutIn
Activate relay channel 0
and deactivate relay channels 131
2-6
Pamux User’s Guide
OutOut
Page 29
SYSTEM SETUP
The watchdog timeout interval is set within the hardware and cannot be changed by the user. Refer to
Table 2-3 for minimum, typical, and maximum watchdog timeout values.
Table 2-3: Watchdog Timeout Values
MMii nnii mmuu mmTTyyppiiccaallMMaaxxiimmuumm
1.0 sec1.6 sec2.25 sec
Jumpers 7 and 8 (Reset)
One of the control lines on the Pamux bus is the reset line. This line is used for turning off the relays on
all Pamux stations on the bus. Note that the reset is not intended to be used to shut off outputs upon a
system communication error.
Two jumpers control how the reset line affects the B4. Jumper 7 determines the polarity of the reset
line, either active high or active low, as shown in Table 2-4. In general, it does not matter which polarity
you select as long as you are consistent throughout your Pamux system.
Table 2-4: B4 Reset Jumper
RReesseet t LLeevveellJJuummppeer r 77
Active HighIn
Active LowOut
Jumper 8 determines how the reset line affects the watchdog timer function of channel 0.
If jumper 8 is not installed, the reset line will not affect the watchdog timer function. Hence, if channel 0
activates due to a watchdog condition, an active reset line will have no effect on channel 0 (although it
will deactivate any other channels that are on).
If jumper 8 is installed and the watchdog jumpers are configured to activate channel 0 upon a timeout,
the state of channel 0 depends on whether or not the reset activates before the timeout occurs:
•If the reset line activates first, all outputs will deactivate. If a subsequent timeout occurs, no
effect will take place until the reset line deactivates, at which time the watchdog function will
take place and channel 0 will activate.
•If the timeout occurs first, the watchdog function takes place and channel 0 activates. If a
subsequent reset occurs, channel 0 will not be affected and will remain active.
TERMINATING A B4 STATION
For stations on a Pamux bus to operate correctly, both ends of the bus must be terminated. The host
computer and the last Pamux station on the bus are the only devices that should be terminated. Note
that if you are using an Opto 22 Pamux adapter card, the host computer is automatically terminated,
since termination resistors are built into the card.
Pamux User’s Guide
2-7
Page 30
SYSTEM SETUP
To terminate a B4 station, plug a Pamux bus terminator board (TERM1 or TERM2) into either connector
on the I/O mounting rack. When the terminator board is installed correctly, its component side faces
away from the I/O modules and its red wire connects to the +5V terminal on the rack.
Figure 2-9 illustrates the proper installation of the terminator board.
Figure 2-9: Terminator Board Installed on a B4-Compatible Mounting Rack
B4 LED INDICATORS
The B4 brain board includes the following LEDs:
•Select (Address) — This LED is on whenever the brain board is addressed (read from or
written to) on the Pamux bus. It is off otherwise. For each operation the LED stays on for about
250 msec, so if the bus is very active the LED may appear constantly on.
•Watchdog — This LED stays on if the Pamux bus is idle (no strobe is present) for more than
1.2 seconds. It is off otherwise. Note that unlike the Select LED, this LED monitors overall bus
activity.
2-8
Pamux User’s Guide
Page 31
SETTING UP A B5 STATION
This section describes how to install the B5 digital I/O brain board on a compatible mounting rack. It
also discusses B5 configuration issues, including how to set jumpers for the address, watchdog, and
reset line. Finally, it addresses how to install a terminator board when a B5 station is at one end of a
Pamux system and describes the LED indicators.
INSTALLING THE B5 ON A MOUNTING RACK
The B5 brain board measures 4.6 by 4.5 inches. It includes a 50-pin female connector to attach to a
digital I/O mounting rack. At the top of the brain board are two 50-pin male header connectors used to
link the brain board to the Pamux bus. For the last brain board on a Pamux bus, one of these connectors
holds the terminator board.
Figure 2-10 is a detailed illustration of the B5 along with its dimensions.
SYSTEM SETUP
Figure 2-10: Dimensions of the B5 Brain Board
Pamux User’s Guide
2-9
Page 32
SYSTEM SETUP
The following I/O mounting racks are available for the Pamux B5 brain board:
•G4PB8H —
•G4PB16H —
•G4PB16HC —
•G4PB16J/K/L —
•PB4H —
•PB8H —
•PB16H —
•PB16HC —
•PB16HQ —
•PB16J/K/L —
8 channels of single-point G4 digital I/O
16 channels of single-point G4 digital I/O
16 channels of single-point G4 digital I/O
16 channels of integrated single-point digital inputs
4 channels of single-point standard digital I/O
8 channels of single-point standard digital I/O
16 channels of single-point standard digital I/O
16 channels of single-point standard digital I/O
4 channels of quad pak I/O (four points per module)
16 channels of integrated single-point digital inputs
•SNAPD4M — 16 Channels of SNAP digital I/O
•SNAPD4M — 16 Channels of SNAP digital with tie points
•SNAPD4M — 16 Channels of SNAP digital with pluggable connectors
Figure 2-11 shows how the B5 brain board mounts on these racks.
Figure 2-11: Installation of the B5 on a Mounting Rack
2-10
Pamux User’s Guide
Page 33
SYSTEM SETUP
Figures 2-12 through 2-21 show the mounting dimensions of these racks with the B5 brain board
installed.
Figure 2-12: Mounting Dimensions of the G4PB8H with a B5 Installed
Figure 2-13: Mounting Dimensions of the G4PB16H with a B5 Installed
Pamux User’s Guide
2-11
Page 34
SYSTEM SETUP
Figure 2-14: Mounting Dimensions of the G4PB16HC with a B5 Installed
Figure 2-15: Mounting Dimensions of the G4PB16J/K/L with a B5 Installed
2-12
Pamux User’s Guide
Page 35
Figure 2-16: Mounting Dimensions of the PB4H with a B5 Installed
SYSTEM SETUP
Figure 2-17: Mounting Dimensions of the PB8H with a B5 Installed
Pamux User’s Guide
2-13
Page 36
SYSTEM SETUP
Figure 2-18: Mounting Dimensions of the PB16H with a B5 Installed
Figure 2-19: Mounting Dimensions of the PB16HC with a B5 Installed
2-14
Pamux User’s Guide
Page 37
SYSTEM SETUP
Figure 2-20: Mounting Dimensions of the PB16HQ with a B5 Installed
Figure 2-22 shows the vertical dimensions of the B5 mounted on any rack except the PB16HQ.
Figure 2-22: Vertical Dimensions of the B5 Mounted on Racks other than the PB16HQ
Figure 2-23 shows the vertical dimensions of the B5 mounted on the PB16HQ. This rack accepts quad
pak modules, which are taller than standard digital I/O modules.
Figure 2-21: Mounting Dimensions of the PB16J/K/L with a B5 Installed
Pamux User’s Guide
2-15
Page 38
SYSTEM SETUP
Figure 2-23: Vertical Dimensions of the B5 Mounted on a PB16HQ
SETTING B5 JUMPERS
The B5 includes nine jumpers. Jumpers 0 through 4 set the address, jumpers 5 and 6 set the watchdog
functionality, jumper 7 sets the reset line polarity, and jumper 8 determines how the reset line affects
the watchdog timer.
Jumpers 0–4 (Address)
These jumpers configure the base address of the B5. Since the brain board controls 16 points of I/O,
while the Pamux data bus is only eight bits wide, the B5 must be accessed as two consecutive banks of
eight I/O channels each. The least significant bit of the Pamux address bus is used to select which bank
is accessed (0 = low bank, 1 = high bank). The other 5 bits of the Pamux bus address determine which
Pamux station is active.
Refer to Table 2-5 on the following page to determine how to set the base address of the B5.
Note: That each Pamux station on a bus must have a unique address.
Jumpers 5 and 6 (Watchdog)
A watchdog timer shuts down a process when the host computer goes off line. The watchdog timer on
the B5 depends on a periodic read or write strobe from the host processor. The individual B5 need not be
addressed. The absence of a strobe for a specified time activates the watchdog function.
Using jumpers 5 and 6, you can configure the B5 to trigger one of four actions upon a timeout. Refer to
Table 2-6 on page 2-19.
2-16
Pamux User’s Guide
Page 39
Table 2-5: B5 Address Jumpers
BBaasse e AAddddrreessssJJuummppeer r 44JJuummppeer r 33JJuummppeer r 22JJuummppeer r 11JJuummppeer r 00
0OutOutOutOutOut
2OutOutOutOutIn
4OutOutOutInOut
6OutOutOutInIn
8OutOutInOutOut
10OutOutInOutIn
12OutOutInInOut
14OutOutInInIn
16OutInOutOutOut
18OutInOutOutIn
20OutInOutInOut
SYSTEM SETUP
22OutInOutInIn
24OutInInOutOut
26OutInInOutIn
28OutInInInOut
30OutInInInIn
32InOutOutOutOut
34InOutOutOutIn
36InOutOutInOut
38InOutOutInIn
40InOutInOutOut
42InOutInOutIn
44InOutInInOut
46InOutInInIn
48InInOutOutOut
50InInOutOutIn
52InInOutInOut
54InInOutInIn
56InInInOutOut
58InInInOutIn
60InInInInOut
62InInInInIn
Pamux User’s Guide
2-17
Page 40
SYSTEM SETUP
The watchdog timeout interval is set within the hardware and cannot be changed by the user. Refer to
Table 2-7 for minimum, typical, and maximum watchdog timeout values.
Table 2-6: B5 Watchdog Jumpers
WWaattcchdohdog g FF uunnccttii ononJJuummppeer r 66JJuummppeer r 55
No actionInIn
Activate relay channel 0InOut
Deactivate all relay channelsOutIn
Activate relay channel 0
and deactivate relay channels 115
OutOut
Table 2-7: Watchdog Timeout Values
MMii nnii mmuu mmTTyyppiiccaallMMaaxxiimmuumm
1.0 sec1.6 sec2.25 sec
Jumpers 7 and 8 (Reset)
One of the control lines on the Pamux bus is the reset line. This line is used for turning off the relays on
all Pamux stations on the bus. Note that the reset is not intended to be used to shut off outputs upon a
system communication error.
Two jumpers control how the reset line affects the B5. Jumper 7 determines the polarity of the reset
line, either active high or active low, as shown in Table 2-8. In general, it does not matter which polarity
you select as long as you are consistent throughout your Pamux system.
Table 2-8: B5 Reset Jumper
RReessee t t LLeevvee llJJuummppeer r 77
Active HighIn
Active LowOut
Jumper 8 determines how the reset line affects the watchdog timer function of channel 0.
If jumper 8 is not installed, the reset line will not affect the watchdog timer function. Hence, if channel 0
activates due to a watchdog condition, an active reset line will have no effect on channel 0 (although it
will deactivate any other channels that are on).
2-18
Pamux User’s Guide
Page 41
SYSTEM SETUP
If jumper 8 is installed and the watchdog jumpers are configured to activate channel 0 upon a timeout,
the state of channel 0 depends on whether or not the reset activates before the timeout occurs:
•If the reset line activates first, all outputs will deactivate. If a subsequent timeout occurs, no
effect will take place until the reset line deactivates, at which time the watchdog function will
take place and channel 0 will activate.
•If the timeout occurs first, the watchdog function takes place and channel 0 activates. If a
subsequent reset occurs, channel 0 will not be affected and will remain active.
TERMINATING A B5 STATION
For stations on a Pamux bus to operate correctly, both ends of the bus must be terminated. The host
computer and the last Pamux station on the bus are the only devices that should be terminated. Note
that if you are using an Opto 22 Pamux adapter card, the host computer is automatically terminated,
since termination resistors are built into the card.
To terminate a B5 station, plug a Pamux bus terminator board (TERM1 or TERM2) into either connector
on the brain board. When the terminator board is installed correctly, its component side faces away
from the brain board components and its red wire connects to the +5V terminal on the rack.
Figure 2-24 illustrates the proper installation of the terminator board.
Figure 2-24: Terminator Board Installed on a B5-Compatible Mounting Rack
B5 LED INDICATORS
The B5 brain board includes the following LEDs:
•Address — This LED is on whenever the brain board is addressed (read from or written to) on
the Pamux bus. It is off otherwise. For each operation the LED stays on for about 250 msec, so
if the bus is very active the LED may appear constantly on.
•Watchdog — This LED stays on if the Pamux bus is idle (no strobe is present) for more than
1.2 seconds. It is off otherwise. Note that unlike the Select LED, this LED monitors overall bus
activity.
Pamux User’s Guide
2-19
Page 42
SYSTEM SETUP
SETTING UP A B6 STATION
This section describes how to install the B6 analog I/O brain board on a compatible mounting rack. It
also discusses B6 configuration issues, including how to set jumpers for the address, watchdog, and
reset line. Finally, it addresses how to install a terminator board when a B6 station is at one end of a
Pamux system and describes the LED indicators.
INSTALLING THE B6 ON A MOUNTING RACK
The B6 brain board measures 6.40 by 4.75 inches. It includes a 50-pin female connector to attach to an
analog I/O mounting rack. At the top of the brain board are two 50-pin male header connectors used to
link the brain board to the Pamux bus. For the last brain board on a Pamux bus, one of these connectors
holds the terminator board.
Figure 2-25 is a detailed illustration of the B6 along with its dimensions.
Three I/O mounting racks are available for the Pamux B6 brain board:
•PB4AH —
•PB8AH —
•PB16AH —
2-20
Pamux User’s Guide
Figure 2-25: Dimensions of the B6 Brain Board
4 channels of single-point standard analog I/O
8 channels of single-point standard analog I/O
16 channels of single-point standard analog I/O
Page 43
SYSTEM SETUP
Each mounting rack accommodates any combination of analog input or output modules and connects to
the Pamux B6 brain board via a 50-pin header connection. The mounting rack includes a fuse for the 5volt line.
Figures 2-26 through 2-28 show the mounting dimensions of these racks with the B6 brain board
installed.
Figure 2-26: Mounting Dimensions of the PB4AH with a B6 Installed
Figure 2-27: Mounting Dimensions of the PB8AH with a B6 Installed
Pamux User’s Guide
2-21
Page 44
SYSTEM SETUP
Figure 2-28: Mounting Dimensions of the PB16AH with a B6 Installed
Figure 2-29 shows the vertical dimensions of the B6 mounted on any rack.
SETTING B6 JUMPERS
The B6 includes eight jumpers. Jumpers 1 through 5 set the address, jumper 6 is disabled, jumper 7 sets
the reset line polarity, and jumper 8 sets the watchdog functionality.
Jumpers 1–5 (Address)
These jumpers configure the base address of the B6. The brain board can control 16 points of analog
I/O. Data is passed to and from the host computer using one address register and one data register.
Each B6 thus requires only two consecutive addresses.
Refer to Table 2-9 on the following page to determine how to set the base address of the B6.
Note that each Pamux station on a bus must have a unique address.
2-22
Pamux User’s Guide
Figure 2-29: Vertical Dimensions of the B6 Mounted on a Rack
Page 45
Table 2-9: B6 Address Jumpers
BBaasse e AAddddrreessssJJuummppeer r 55JJuummppeer r 44JJuummppeer r 33JJuummppeer r 22JJuummppeer r 11
0OutOutOutOutOut
2OutOutOutOutIn
4OutOutOutInOut
6OutOutOutInIn
8OutOutInOutOut
10OutOutInOutIn
12OutOutInInOut
14OutOutInInIn
16OutInOutOutOut
18OutInOutOutIn
20OutInOutInOut
SYSTEM SETUP
22OutInOutInIn
24OutInInOutOut
26OutInInOutIn
28OutInInInOut
30OutInInInIn
32InOutOutOutOut
34InOutOutOutIn
36InOutOutInOut
38InOutOutInIn
40InOutInOutOut
42InOutInOutIn
44InOutInInOut
46 InOutInInIn
48InInOutOutOut
50InInOutOutIn
52InInOutInOut
54InInOutInIn
56InInInOutOut
58InInInOutIn
60InInInInOut
62InInInInIn
Pamux User’s Guide
2-23
Page 46
SYSTEM SETUP
Jumper 6
This jumper has been disabled and thus has no effect.
Jumper 7 (Reset)
One of the control lines on the Pamux bus is the reset line. This line is used to clear all analog outputs
on a B6 station to zero scale, then to set the configuration of the B6 to input on all positions. Note that
the reset is not intended to be used to shut off outputs upon a system communication error.
Jumper 7 determines the polarity of the reset line, either active high or active low, as shown in Table 2-
10. In general, it does not matter which polarity you select as long as you are consistent throughout your
Pamux system.
Table 2-10: B6 Reset Jumper
RReesseet t LLeevveellJJuummppeer r 77
Active HighIn
Active LowOut
Jumper 8 (Watchdog)
A watchdog timer shuts down a process when the host computer goes off line. The watchdog function
of the B6 can be enabled or disabled with jumper 8. Since the B6 watchdog function is also under
software control, the watchdog register must be written to and the jumper must be removed for the
watchdog to be enabled.
Table 2-11 shows how jumper 8 affects the watchdog. For information on software configuration of the
watchdog, see Chapter 3.
Table 2-11: B6 Watchdog Jumper
WWaa ttcchdohdoggJJuummppeer r 88
DisabledIn
EnabledOut
2-24
Pamux User’s Guide
Page 47
SYSTEM SETUP
TERMINATING A B6 STATION
For stations on a Pamux bus to operate correctly, both ends of the bus must be terminated. The host
computer and the last Pamux station on the bus are the only devices that should be terminated. Note
that if you are using an Opto 22 Pamux adapter card, the host computer is automatically terminated,
since termination resistors are built into the card.
To terminate a B6 station, plug a Pamux bus terminator board (TERM1 or TERM2) into either connector
on the brain board. When the terminator board is installed correctly, its component side faces away
from the brain board components and its red wire connects to the +5V terminal on the rack.
Figure 2-30 illustrates the proper installation of the terminator board.
Figure 2-30: Terminator Board Installed on a B6-Compatible Mounting Rack
B6 LED INDICATORS
The B6 brain board includes the following LEDs:
•Address — This LED is on whenever the brain board is addressed (read from or written to) on
the Pamux bus. It is off otherwise. For each operation the LED stays on for about 250 msec, so
if the bus is very active the LED may appear constantly on.
•Access — This LED is on whenever access has been granted to the dual-port RAM. It
remains on until access is released. (See Chapter 4 for details on getting and releasing
access.)
•Power — This LED is on whenever power is connected to the board. It is off otherwise.
Pamux User’s Guide
2-25
Page 48
SYSTEM SETUP
CONNECTING AND POWERING A SYSTEM
Pamux stations are linked to each other and to a host computer or other device via a 50-pin flat-ribbon
cable. Opto 22 provides a number of pre-made cables, and other vendors also offer compatible cables
and connectors. Refer to Appendix B for a list of approved cables and connectors.
The minimum power requirements for each Pamux station are 5 VDC at 0.5 A. The final Pamux station
on a bus requires an additional 1 A for the terminator board. In addition, B6 analog Pamux stations
require +15 VDC and -15 VDC power supplies with current requirements that depend on the modules
installed.
Make sure the 5V power supply is floating (not earth-grounded). Also, to benefit from optical isolation,
make sure the 5V common is not tied to the ±15V common.
Appendix B details all power requirements for digital and analog Pamux stations along with a list of the
current requirements for analog modules. Refer to this appendix for these requirements and for a list of
vendors that provide compatible power supplies.
NOTE: Always check all power supply polarities before powering up any system.
CONNECTING TO AN ADAPTER CARD
A Pamux system must be programmed through a host computer or similar device connected to the
Pamux bus via an interface card.
The most commonly used Pamux adapter card is the AC28, designed for IBM PC/AT systems. Up to four
of these Opto 22 cards may be installed in a host computer, enabling control of up to four Pamux buses
with a total of up to 2,048 points of I/O.
Other Opto 22 adapter cards include the AC36, used to connect a Pamux bus to a TTL parallel port, and
the UCA4, a universal Pamux bus adapter card. These adapter cards are described and illustrated in
Chapter 1.
Appendix B provides specifications on these and other Pamux components.
SETTING AC28 JUMPERS
The AC28 includes six jumpers. Jumpers J6, J7, J8, and J9 are used to set the AC28 base address.
Jumpers R8 and R9 are used to set the reset port address. Tables 2-12 and 2-13 show the jumper
configurations for these addresses.
2-26
Pamux User’s Guide
Page 49
Table 2-12: AC28 Base Address Jumpers
BBaasse e AAddddrreessssJJuummppeer r JJ99JJuummppeer r JJ88JJuummppeer r JJ77JJuummppeer r JJ66
100 hexInOutInIn
140 hexInOutInOut
180 hexInOutOutIn
280 hexOutInOutIn
Table 2-13: AC28 Reset Port Address Jumpers
RReesseet t PPoorrt t AAddddrreessssJJuummppeer r RR99JJuummppeer r RR88
0E0 hexInIn
1E0 hexInOut
2E0 hexOutIn
3E0 hexOutOut
SYSTEM SETUP
Note:The IBM PC can only use addresses 2E0 and 3E0.
AC28 ACKNOWLEDGMENT DATA
Pamux now includes a provision for identifying the last board communicated with via acknowledge
lines. The acknowledgment data is read at the reset port address.
This feature works only with the following revisions of Pamux boards:
•AC28: Revision C or later
•B4: Revision L or later
•B5: Revision J or later
•B6: Revision G or later
Refer to Table 2-14 as a guide to using this feature.
Table 2-14: Communication Acknowledgment
PPaammuux x CCononffiigguurraattiiononDDaattaa
Old AC28 with no connection or any boardFF hex
New AC28 with no connection or an old Pamux brain board00 hex
New AC28 with new B401 hex
New AC28 with new B502 hex
New AC28 with new B603 hex
Pamux User’s Guide
2-27
Page 50
SYSTEM SETUP
CONNECTING FIELD WIRING
This section provides detailed information on wiring digital, quad pak, and analog I/O modules to Pamux
systems. It includes examples of how to wire all currently available Pamux-compatible modules. For a
complete list of all modules that can be used with Pamux systems, see Appendix B.
WIRING DIGITAL MODULES
This section lists all Pamux-compatible digital modules and provides wiring diagrams for both input and
output modules.
Each digital I/O channel has two terminals corresponding to each installed digital module. Terminals 1
and 2 correspond to a module in channel 0, terminals 3 and 4 correspond to a module in channel 1, and
so on. For polarized modules, the positive connection goes to the first terminal of the pair and the
negative connection goes to the second.
Input Modules
Use Figure 2-31 to wire the digital DC and AC input modules listed in Table 2-15. The diagram shows a
DC input module wired to channel 0 and an AC input module wired to channel 1 on a G4PB16H rack.
For the digital input modules listed in Table 2-15, the input device may be wired to either terminal. The
polarity of the power does not matter except for the G4IDC5K, G4IDC5D, and IDC5D.
2-28
Pamux User’s Guide
Page 51
Table 2-15: Digital DC and AC Input Modules
DDC C IInnppuut t MModuodulleessAAC C IInpnpuut t MModuodulleess
G4IAC5G4IAC5
G4IAC5AG4IAC5A
G4IAC5MAG4IAC5MA
G4IDC5G4IDC5
G4IDC5BG4IDC5G
G4IDC5DG4IDC5MA
G4IDC5GIAC5
G4IDC5KIAC5A
G4IDC5MAIDC5
IDC5IDC5G
SYSTEM SETUP
IDC5BSNAPIAC5
IDC5DSNAPIAC5A
IDC5G- - -
IAC5- - -
IAC5A- - -
SNAPIDC5- - -
Figure 2-31: Wiring for DC and AC Input/Output Modules
Pamux User’s Guide
2-29
Page 52
SYSTEM SETUP
Output Modules
Use Figure 2-31 on the previous page to wire the digital DC and AC output modules listed in Table 2-16.
The diagram shows a DC output module wired to channel 6 and an AC output module wired to channel 7
on a G4PB16H rack.
For the digital output modules listed in Table 2-16, the load may be wired to either line. The polarity of
the power does not matter except for the G4ODC5, G4ODC5A, G4ODC5MA, ODC5, ODC5A,
SNAPODC5SRC, and SNAPODC5SNK.
For DC output modules used with inductive loads, add a commutating diode (typically a 1N4005) to the
circuit as shown on the channel 6 connection to the G4PB16H rack.
Table 2-16: Digital DC and AC Output Modules
DDC C OOuuttpuput t MMoodudulleessAAC C OOuuttpuput t MMoodduulleess
G4ODC5G4OAC5
G4ODC5AG4OAC5A
G4ODC5MAG4OAC5A5
G4ODC5RG4OAC5AMA
G4ODC5R5G4OAC5MA
ODC5G4ODC5R
ODC5AG4ODC5R5
ODC5ROAC5
SNAPODC5SRC,OAC5A
SNAPODC5SNKOAC5A5
- - -SNAPOAC5
2-30
Pamux User’s Guide
Page 53
SYSTEM SETUP
WIRING QUAD PAK MODULES
This section lists all quad pak modules and provides wiring diagrams for both input and output modules.
Each quad pak I/O module consists of two pairs of circuits. These circuit pairs share a common point.
A quad pak module connects to four numbered terminals and two common (“C”) terminals, as follows:
•Terminal 1 and the upper C terminal correspond to a circuit in channel 0.
•Terminal 2 and the upper C terminal correspond to a circuit in channel 1.
•Terminal 3 and the lower C terminal correspond to a circuit in channel 2.
•Terminal 4 and the lower C terminal correspond to a circuit in channel 3.
For polarized modules, the positive connection goes to the C terminal and the negative connection goes
to the numbered terminal.
Input Modules
Use Figure 2-32 to wire the quad pak DC and AC input modules listed in Table 2-17. The diagram shows
a DC input module wired to channels 16–19 and an AC input module wired to channels 0–3 on a
PB16HQ rack.
For the quad pak input modules listed in Table 2-17, the input device may be wired to either terminal.
The polarity of the power does not matter for any of the modules.
Table 2-17: Quad Pak DC and AC Input Modules
DDC C IInnppuut t MModuodulleessAAC C IInpnpuut t MModuodulleess
IDC5QIDC5Q
IDC5BQIAC5Q
IAC5QIAC5AQ
IAC5AQ
Pamux User’s Guide
2-31
Page 54
SYSTEM SETUP
Output Modules
Use Figure 2-32 on the previous page to wire the quad pak DC and AC output modules listed in Table 2-
18. The diagram shows a DC output module wired to channels 24–27 and an AC output module wired to
channels 8–11 on a PB16HQ rack.
For the quad pak output modules listed in Table 2-18, the load may be wired to either line.
Note that the ‘C” terminal of DC output modules must be more positive when switching DC leads.
For DC output modules used with inductive loads, add a commutating diode (typically a 1N4005) to the
circuit as shown on the channel 27 connection to the PB16HQ rack.
Table 2-18: Quad Pak DC and AC Output Modules
DDC C OOuuttpuput t MMoodudulleessAAC C OOuuttpuput t MMoodduulleess
ODC5QOAC5Q
ODC5AQ
2-32
Pamux User’s Guide
Page 55
SYSTEM SETUP
WIRING ANALOG MODULES
This section lists all Pamux-compatible analog modules and provides wiring diagrams for each module
type.
Analog modules require up to four terminals per analog I/O channel. On the analog mounting rack, the
lower A and B terminals are typically used to distribute a 24 VDC shared-loop source for use with 4–20
mA modules.
Note that two types of analog modules are available: those that provide transformer isolation and those
that do not. Transformer-isolated modules include a “T” in the model number (e.g., AD3T, AD10T2) and
provide channel-to-channel isolation. For a list of all analog modules, as well as their current
requirements, see Appendix B.
IMPORTANT: Once connected to a rack, modules without transformer isolation create an electrical connection
from the negative field terminal (which is connected to the upper A terminal on the rack) to the
±15 VDC common. Hence, these modules do not offer channel-to-channel isolation. If you require
such isolation, select transformer-isolated modules only.
Voltage Input and Output Modules
Use Figure 2-33 to wire all of the analog voltage input or output modules listed in Table 2-19 except the
AD15T. The diagram shows a voltage output module wired to channel 0, and two voltage input modules
wired to channels 2 and 4 on a PB16AH rack.
Note that for the AD9T and AD13T, there is no connection on the mounting rack (A and B terminals).
Instead, the connections are made directly to the module.
To wire the AD15T, refer to Figure 2-36 on page 2-38.
Table 2-19: Voltage Input and Output Modules
VVoollttage age IInnpuput t MModuodulleessVVoollttage age OOuuttppuut t MModuodulleess
AD6DA4
AD6TDA4T
AD6HSDA5
AD7DA6
AD9TDA7
AD11- - -
AD12- - -
AD12T- - -
AD15T (AC only)- - -
AD13T- - -
Pamux User’s Guide
2-33
Page 56
SYSTEM SETUP
Figure 2-33: Wiring for Voltage Input and Output Modules
Milliamp Current Input and Output Modules
Use Figures 2-34 and 2-35 to wire the analog milliamp current input or output modules listed in Table 2-
20. The examples show wiring to a PB16AH rack on channels 0, 1, and 3.
Figure 2-34 shows wiring with individual power supplies. Figure 2-35 shows wiring with a shared loop
supply. In Figure 2-35, the wiring takes advantage of the fact that all lower A terminals on the mounting
rack are tied together. These provide a convenient tie point for shared loop source return. Connect one
lower A terminal to the shared loop source “–,” then jumper each upper A to its respective lower A for
each current module.
The current loop for an input or output current device must be powered by a user’s external supply.
Table 2-20: Milliamp Current Input and Output
MMii lllliiaammp p CCuurrrreennt It Innppuut t MModuodulleessMMiilllliiaammp p CCuurrrreennt t OOuuttppuut t MModuodulleess
AD2TDA3
AD3DA3T
AD3TDA8
2-34
Pamux User’s Guide
Page 57
SYSTEM SETUP
Figure 2-34: Wiring for Milliamp Current Input and Output Modules
with Individual Power Supplies
Figure 2-35: Wiring for Milliamp Current Input and Output Modules
with Shared Power Supplies
Pamux User’s Guide
2-35
Page 58
SYSTEM SETUP
0 to 5 Amp AC/DC Current Input Modules
Use Figure 2-36 to wire the 0–5A AC/DC current input module listed in Table 2-21. The example shows
wiring of the AD16 to channel 0 on a PB16AH rack.
The 0–5A AC/DC current input module can be used to measure current directly or indirectly by using a
standard current transformer. Applications include measuring or monitoring current through a field
device such as a motor, solenoid, or lamp.
Table 2-21: 0 to 5 Amp AC/DC Current Input Module
0 0 tto 5 o 5 AAmmp p AACC//DC CDC Cuurrrrenent It Inpunput t MMoodduullee
AD16T
Figure 2-36: Wiring for 0–5A Current Input and 28–140 VAC Input Modules
Thermocouple Input Modules
Use Figure 2-37 to wire the analog thermocouple input modules listed in Table 2-22. The example shows
a thermocouple input module wired to channel 3 on a PB16AH rack.
When wiring thermocouples, verify that you are using the proper polarity and wire color (see Table 2-
22). Also, ensure that the wire type from the thermocouple to field terminals is consistent and does not
introduce other thermocouples.
Thermocouple modules do not include a connection to the A and B terminals. Instead, the thermocouple
wires are attached to screws located directly on the module.
Some thermocouple modules require a linearization algorithm to convert readings to temperatures. See
Appendix C for details.
2-36
Pamux User’s Guide
Page 59
Table 2-22: Thermocouple Input Data
SYSTEM SETUP
MMododuulleessTT//C C TTyyppee
AD5, AD5TJWhiteRed
AD8, AD8TKYellowRed
AD17TRBlackRed
AD18TTBlueRed
AD19TEPurpleRed
AD17TSBlackRed
PPoollaarriitt yy//CCoo ll oorr
++
Figure 2-37: Wiring for Thermocouple and ICTD Temperature Input Modules
ICTD Temperature Input Modules
Use Figure 2-37 to wire the analog ICTD temperature input module listed in Table 2-23 to an Opto 22
ICTD probe. The example shows wiring to channel 0 on a PB16AH rack.
Note:That, like the thermocouple modules, ICTD modules also require a linearization algorithm to convert
readings to temperatures. See Appendix C for details.
Table 2-23: ICTD Temperature Input Module
IICCTTD D TTeemmpeperraattuurre e IInpnpuut t MModuodullee
AD4
Pamux User’s Guide
2-37
Page 60
SYSTEM SETUP
RTD Input Modules
Use Figure 2-38 to wire the analog RTD input modules listed in Table 2-24. Wire colors may vary, but
make sure two wires of the same color are connected as shown. The example shows a three-wire RTD
probe connected to channel 0 on a PB16AH rack.
When using an AD10T2 with a four-wire RTD probe, do not connect the fourth wire. Connect three wires
as shown for the three-wire RTD example.
For a two-wire RTD probe, add a second wire of the same type and gauge to one end, connecting it as
you would a three-wire RTD.
Some RTD modules require a linearization algorithm to convert readings to temperatures. See Appendix
C for details.
Table 2-24: RTD Input Modules
RRTTD D IInnppuut t MModuodulleess
AD10T2
AD14T
2-38
Pamux User’s Guide
Figure 2-38: Wiring for RTD Input Modules
Page 61
SYSTEM SETUP
Rate Input Modules
Use Figure 2-39 to wire the analog rate modules listed in Table 2-25. The example shows the possible
wiring options to channels 0 and 3 on a PB16AH rack. Note that the internal pull-up is between the +
input post and the upper B terminal. Also, the – input and the upper A barrier terminal are connected
directly to the analog common when the module is plugged into the analog rack.
Rate modules measure the frequency of an incoming signal and produce a count based on the number
of cycles per second (Hertz). For example, a count value of 1,000 indicates a frequency of 1,000 Hz. This
module is ideal for directly reading the frequency of a signal or a rotating disk for RPM calculations, for
example.
Table 2-25: Rate Input Modules
RRaatt e e IInpunput t MMoodduulleess
AD20
Figure 2-39: Wiring for Rate Input Modules
Pamux User’s Guide
2-39
Page 62
PROGRAMMING
PROGRAMMING
WITH THE PAMUX DRIVER
WITH THE PAMUX DRIVER
OVERVIEW
Most Pamux systems feature an AC28 adapter card installed in an IBM PC/AT personal computer. If you are
using an AC28, you have the option to use Opto 22’s Pamux driver to simplify communication to the Pamux bus.
This chapter explains how to use the DOS and Windows versions of this driver with AC28. If you are
not using an AC28, or if you do not wish to use the Pamux software driver, you may skip this
chapter and proceed directly to Chapter 4, “Programming without the Pamux Driver.”
WHAT IS THE PAMUX DRIVER?
The Pamux analog/digital driver is a subroutine that provides an interface between Pamux stations and
application programs written in high-level languages, such as BASIC, C, C++, and Pascal. The driver
allows the programmer to talk to Pamux by calling a single subroutine. This reduces the task of
communicating to all analog and digital I/O down to understanding how to call the driver subroutine.
The software driver diskette includes DOS and Windows versions of the Pamux driver. The DOS version
is called PDRIVER.OBJ or PDRIVER.COM (choose the file type you need). The Windows version is the
dynamically linked library called Pamux.DLL.
The Pamux driver performs the following functions:
•Converts the data returned by Pamux to a form that is easily manipulated in a high-level
language.
•Carries out all necessary handshaking with the Pamux bus.
•Transparently handles input masking on write operations for digital stations.
•Performs error checking and returns diagnostic codes. This saves you time and effort that
would be spent becoming familiar with the intricacies of the Pamux bus structure.
To use the driver in your application program, you need to know the following:
•How to call a subroutine from the language you chose for your application
•How to tell the driver what Pamux command to send by assigning values to parameters
•How to interpret the data passed back by the driver
This chapter explains everything you need to know to use the driver in a DOS or Windows environment.
If you are using Windows, you can skip the following section and proceed directly to page 3-30.
Pamux User’s Guide
3-1
Page 63
PROGRAMING WITH THE PAMUX DRIVER
USING THE PAMUX DRIVER UNDER DOS
INSTALLATION
The Pamux driver is provided on one disk. You should make a backup copy of this disk before installing
the driver. (For instructions on copying disks, refer to your DOS manual.)
The Pamux driver disk includes DOS and WIN directories. To use the driver under DOS, you will need to
copy the contents of the DOS directory to an appropriate directory on your hard drive.
For complete installation instructions, view the README.TXT file on the driver disk.
PAMUX DRIVER PARAMETERS
Every call to the Pamux driver must include five parameters. These parameters provide the driver with
all information needed to fully specify the command to be sent. Data and error codes are also passed
back to the application program through these parameters.
Below is an example of a call to the driver in a Microsoft Interpreted BASIC program:
All parameters passed to the driver must be 16-bit integers. Notice that all variable names in the
command above end with a percent sign (%). In BASIC, the % indicates that a variable is a 16-bit
integer.
The five Pamux parameters are:
1. ERRCOD — An integer variable that contains an error code. A value of zero returned in this
parameter indicates that no errors occurred and the command was successfully executed. A
value less than zero indicates that the driver detected an error and the command was not
executed. The value indicates the type of error encountered. For example, -1 represents
“Configuration Required,” indicating that a Pamux analog board has lost its configuration due
to a reset or a power loss.
2.ADDRESS — An integer variable that contains the address of the intended Pamux unit (0–63
decimal).
3.COMMAND — An integer variable that contains the number of the desired command.
4.POSITION — An integer variable that contains either the module position or bank number to
be affected by the command. A bank is a group of eight positions. Each bank takes one
address position.
5.VALUE ARRAY — An eight-element integer array used to hold data values that help describe
the command’s execution. Also used to hold all returned data.
3-2
Pamux User’s Guide
Page 64
PROGRAMING WITH THE PAMUX DRIVER
USING THE PAMUX DRIVER WITH INTERPRETED BASIC OR QBASIC
To call the Pamux driver subroutine from a program written in Interpreted BASIC or QBasic, the program
must load the driver, name it, declare and initialize variables, and call the driver. These steps are
described below.
Load the Pamux Driver
To use the driver in your application program, you must first load the subroutine into memory. This is
done with two commands: DEF SEG and BLOAD.
DEF SEG is used to tell BASIC where to put the driver. The driver should be loaded above BASIC. This
location depends on the size of DOS and the BASIC interpreter. A typical value for a system with 640 KB
of memory is 3600 hex. The following statement can be used in most cases without modifications:
DEF SEG = &H3600
BLOAD is used to tell the BASIC interpreter to load the driver subroutine from disk to memory. This
statement must follow the DEF SEG statement, since BASIC must know where to put the driver before it
can load it. The following BLOAD statement instructs BASIC to load the driver at the currently defined
segment:
BLOAD “PDRIVER.COM”, 0
The 0 in the statement above tells BASIC to start loading at an offset of 0 from the currently defined
segment.
The file containing the version of the driver to be loaded under Interpreted BASIC or QBasic is
PDRIVER.COM.
Name the Pamux Driver
The CALL statement calls the driver subroutine from a BASIC program. The CALL statement must
include the name of a variable whose value indicates where the subroutine is located in relation to the
currently defined segment. If you have loaded the driver as described previously, the variable must be
equal to 0. The name Pamux must be used when using the BASIC compiler. Hence, the following simple
assignment statement should appear in your program before the driver is called:
Pamux = 0
Declare and Initialize the Parameters
All variables passed to the driver subroutine must be declared and initialized before the driver can be
called. The VALUE% array parameter must be declared using the DIM statement. Each element should
then be set to a default value. The following program segment is an example:
‘ Dimension the array
‘ Fill all array elements with 0
‘ Initialize all parameters
Pamux User’s Guide
3-3
Page 65
PROGRAMING WITH THE PAMUX DRIVER
Call the Pamux Driver
The driver subroutine can be called from any place in your program any number of times. The CALL
statement is used to call machine language subroutines. The following is a sample statement that calls
the driver from Interpreted BASIC:
Note: that the VALUE% array is passed by including the first element of the array in the CALL statement.
The variables included in the CALL statement must be included in the statement in the order indicated
above. The actual name of the variables can be different as long as the variables are the correct type
(16-bit integers) and size. For example, the fifth parameter must be an eight-element integer array.
HINT: Placing the CALL statement within a subroutine in your program produces much more readable code and
reduces the chance for errors.
3-4
Pamux User’s Guide
Page 66
PROGRAMING WITH THE PAMUX DRIVER
PAMUX ERROR CODES
Table 3-1 describes the errors returned by the Pamux driver under DOS:
Table 3-1: Pamux Driver Error Codes under DOS
EErrrroorrDDeescscrriippttiionon
-1Configurati on required (due to reset or loss of power)
-2Invalid address (address > 63)
-3Invalid bank (address + bank > 63)
-4Invalid point (point + 8 * address > 511)
-5Invalid command
-6Invalid range
-7Turnaround time-out (analog board did not respond)
-8Analog watchdog time-out
WORKING WITH BANKS
The concepts of Addresses and Banks can be a little confusing when dealing with a Pamux I/O system.
Every group of 8 channels in a Pamux system (a Bank) is related to an Address and a Bank Number.
Every Pamux system is composed of 64 Banks (8 channels each).
A 16-channel Pamux brain board (B5 or B6) has two banks. Bank 0 refers to channels ) to 7 and Bank 1
refers to channels 8 through 15.
The B4 Pamux brain board addresses 4 Banks.
BBanank k NNuummbbeerrCChanhannneellss
00 to 7
18 to 15
216 to 23
324 to 31
When using the driver, Address% is set to the base address of the brain board, then the group of 8
channels is selected by setting the Bank (Position%) to 0, 1, 2, or 3.
One last bit of confusion…the Pamux driver allows an alternate addressing scheme. It is possible to
leave Address always set to (0). The Bank of 8 channels is then selected by setting Bank to a value from
0 through 63! This technique may be easier in a system with a mixture of B4, B5, and B6 brain boards.
Pamux User’s Guide
3-5
Page 67
PROGRAMING WITH THE PAMUX DRIVER
COMMAND REFERENCE
This section describes all analog and digital Pamux commands. These commands are passed to the
driver by setting the COMMAND parameter to the correct command number, as defined below.
#Command#Command
0Set Base Address12Write Digital Point
1Set Reset Address13Configure Analog Bank
2Set Reset Level14Configure Analog Bank, Expanded
3Reset15Configure Analog Point
4Configure Digital Bank16Read Analog Bank
5Configure Digital Bank, Expanded17Read Analog Point
6Configure Digital Point18Write Analog Bank
7Read Digital Bank19Write Analog Point
8Read Digital Bank, Expanded20Set Analog Watchdog Timeout
9Read Digital Point21Write Analog Watchdog Bank
10 Write Digital Bank22Write Analog Watchdog Point
11 Write Digital Bank, Expanded
The format of each command description in this section is as follows:
COMMAND NAME
P
URPOSE
C
OMMAND TYPE
P
ARAMETERS
R
EMARKS
:
What the command does.
:
“Driver” indicates the command affects only the driver configuration. “Digital,” “Analog,” and
“Digital and analog” indicate the types of Pamux brain boards that will accept the command.
:
Which of the five parameters passed to the driver are relevant to the command. While all five
parameters must be passed to the driver each time it is called, only some of these parameters are
required to fully specify the command and to store returned data.
:
What the command does and how it should be used.
E
XAMPLE
3-6
Pamux User’s Guide
:
Actual BASIC program segment that demonstrates the use of the command. Examples are in
Microsoft’s Interpreted BASIC (not QBasic) as implemented on a PC.
Page 68
PROGRAMING WITH THE PAMUX DRIVER
SET BASE ADDRESS0
Purpose:
Configures the driver with the base address of the AC28 to use when sending future commands.
Command Type:
Driver
Parameters:
COMMAND
VALUE ARRAY
Contains the value (zero).
The first element of this array contains a single value that selects the address.
Valid values are:
VALUE%(0)Base Address
0100 hex (default base address)
To properly initialize the driver with the correct reset address of the AC28 card, send this command
before sending a reset command.
The driver assumes a default AC28 reset address of 0E0 hex. If a value greater than 12 is specified,
the driver returns a -6 in the ERRCOD% variable.
This command need only be sent once during initialization.
This command has no effect when using the driver resident in the LC4.
E
XAMPLE
:
This example tells the driver to use 1E0 hex as the AC28 reset address.
100COMMAND% = 1
110VALUE%(0) = 1
120GOSUB 1000
1000CALL Pamux(ERRCOD%,ADDRESS%,COMMAND%,POSITION%,VALUE%(0))
1010IF ERRCOD% < 0 THEN GOTO 2000
1020RETURN
3-8
Pamux User’s Guide
‘ Set reset address command
‘ Value of 1 = 1E0 hex
‘ Call the driver
.
.
Page 70
PROGRAMING WITH THE PAMUX DRIVER
SET RESET LEVEL2
P
URPOSE
C
OMMAND TYPE
P
ARAMETERS
:
Configures the driver with the reset level to use when sending a reset command to Pamux.
:
Driver
:
COMMAND
VALUE ARRAY
Contains the value 2.
The first element of this array contains a single value that selects the reset
level. Valid values are:
VALUE%(0)
Reset Level
0Active Low
1Active High (default)
R
EMARKS
:
This command must be sent before sending a Reset command.
For proper operation of the Reset command, set the reset level to match the jumper setting of each
Pamux brain board. All Pamux brain boards connected to the same AC28 must be configured to the
same reset level.
The driver assumes a default active high level.
This command need only be sent once during initialization.
E
XAMPLE
:
This example tells the driver to use an active low value when a Reset command is sent.
100COMMAND% = 2‘ Set Reset Level command
110VALUE%(0) = 0‘ Value of 0 = active low
120GOSUB 1000‘ Call the driver
For proper operation of this command, the Set Reset Address and Set Reset Level commands must
already have been sent to set the proper AC28 reset address and level.
E
XAMPLE
:
This example resets all Pamux units.
100COMMAND% = 3‘ Reset command
110GOSUB 1000‘ Call the driver
Contains the value 4.
Contains the address of the Pamux brain board.
Contains the bank number.
The first element of this array contains a one-byte bitmask (0–255) specifying
the configuration of the bank. Each bit corresponds to one module position. If a
bit is set to 1, the corresponding module position is configured as an output. If a
bit is set to 0, the corresponding module position is configured as an input.
R
EMARKS
:
All output module positions must first be configured as outputs before they can be activated. The
driver will ignore any write commands to positions configured as inputs and no errors will be
returned.
E
XAMPLE
:
This example configures bank 1 at address 4 with the first four positions as inputs and the second
four positions as outputs. Remember, bank 1 represents modules at positions 8 through 15, so in
this example bit 0 of the bitmask corresponds to module position 8 and bit 7 of the bitmask
corresponds to module position 15.
1000CALL Pamux(ERRCOD%,ADDRESS%,COMMAND%,POSITION%,VALUE%(0))
1010IF ERRCOD% < 0 THEN GOTO 2000
1020RETURN
‘ Configure Digital Bank command
‘ Address of brain board
‘ Bank number
‘ High nibble = outputs,
low nibble = inputs
‘ Call the driver
.
.
Pamux User’s Guide
3-11
Page 73
PROGRAMING WITH THE PAMUX DRIVER
CONFIGURE DIGITAL BANK, EXPANDED5
P
URPOSE
C
OMMAND TYPE
P
ARAMETERS
:
Configures a bank of eight digital I/O points.
:
Digital
:
COMMAND
ADDRESS
POSITION
VALUE ARRAY
Contains the value 5.
Contains the address of the Pamux brain board.
Contains the bank number.
Each element of this array corresponds to a module position within the bank.
Element 0 corresponds to the first module position, element 7 corresponds to
the last. If an element is set to 1, the corresponding module position is
configured as an output. If an element is set to 0, the corresponding module
position is configured as an input.
R
EMARKS
:
All output module positions must first be configured as outputs before they can be activated. The
driver will ignore any write commands to positions configured as inputs and no errors will be
returned.
E
XAMPLE
:
This example configures bank 0 at address 5 with module positions 0, 2, 4, and 6 configured as
inputs and positions 1, 3, 5, and 7 configured as outputs.
‘ Configure Digital Bank, Expanded
‘ Address of brain board
‘ Bank number 0
‘ Input module 0
‘ Output module 1
‘ Input module 2
‘ Output module 3
‘ Input module 4
‘ Output module 5
‘ Input module 6
‘ Output module 7
‘ Call the driver
3-12
Pamux User’s Guide
Page 74
PROGRAMING WITH THE PAMUX DRIVER
CONFIGURE DIGITAL POINT6
P
URPOSE
C
OMMAND TYPE
P
ARAMETERS
:
Configures one digital point as an input or output.
:
Digital
:
COMMAND
ADDRESS
POSITION
— Contains the value 6.
Contains the address of the Pamux brain board.
Contains the point number. Legal values are 0 to 15 for B5 and B6, 0 to 31
for B4.
VALUE ARRAY
The first element of this array contains a 0 if the point is to be configured as an
input, or anything else if the point is to be configured as an output.
R
EMARKS
:
All output module positions must first be configured as outputs before they can be activated. The
driver will ignore any write commands to positions configured as inputs and no errors will be
returned.
The POSITION value is a point offset starting from the value in the ADDRESS parameter. The point
number in the POSITION parameter can range from 0 to 511 if the ADDRESS parameter is 0. An
error will be returned if the values in these parameters exceed the limits.
E
XAMPLE
:
This example configures point 0 at address 1 as an output.
100COMMAND% = 6‘ Configure Digital Point command
110ADDRESS% = 1‘ Address of brain board
120POSITION% = 0‘ Point number 0
130VALUE%(0) = 1‘ Configure as an output
140GOSUB 1000‘ Call the driver
Contains the value 7.
Contains the address of the Pamux brain board.
Contains the bank number.
The first element of this array contains returned data in the form of a one-byte
bitmask (0–255). This bitmask specifies the status of the bank. Each bit
corresponds to one module position. If a bit is set to 1, the corresponding
module position is active (on). If a bit is set to 0, the corresponding module
position is inactive (off).
E
XAMPLE
:
This example reads back eight points at address 4 of bank 1 and then displays the resultant value
bitmask.
100COMMAND% = 7‘ Read Digital Bank command
110ADDRESS% = 4‘ Address of brain board
120POSITION% = 1‘ Bank number
130GOSUB 1000‘ Call the driver
Contains the value 8.
Contains the address of the Pamux brain board.
Contains the bank number.
Each element of this array contains returned data corresponding to a module
position within the bank. Element 0 corresponds to the first module position,
element 7 corresponds to the last. If an element is set to -1, the corresponding
module position is active (on). If an element is set to 0, the corresponding
module position is inactive (off).
E
XAMPLE
:
This example reads the status of eight points at address 32 at bank 0 and then displays the status
of each point.
100COMMAND% = 8‘ Read Digital Bank, Expanded
110ADDRESS% = 32‘ Address of brain board
120POSITION% = 0‘ Bank number
130GOSUB 1000‘ Call the driver
140FOR I% = 0 TO 7
150IF VALUE%(I%) = 0 THEN STAT$ = "OFF"
Contains the value 9.
Contains the address of the Pamux brain board.
Contains the point number.
The first element of this array contains returned data. The value will be -1 if the
point is active (on), or 0 if the point is inactive (off).
R
EMARKS
:
The POSITION value is a point offset starting from the value in the ADDRESS parameter. The point
number in the POSITION parameter can range from 0 to 511 if the ADDRESS parameter is 0. An
error will be returned if the values in these parameters exceed the limits.
E
XAMPLE
:
This example reads the state of the module at position 123 and displays the status.
100COMMAND% = 9‘ Read Digital Point command
110ADDRESS% = 0‘ Address of brain board
120POSITION% = 123‘ Position 123
130GOSUB 1000‘ Call the driver
140IF VALUE%(0) = 0 THEN PRINT "Module Is Off"
Note: This is an example of an alternate numbering scheme for I10 points. Both ADDRESS% and Bank (if used)
are set to zero and I/O points are numbered linearly from 0 to 511.
3-16
Pamux User’s Guide
Page 78
PROGRAMING WITH THE PAMUX DRIVER
WRITE DIGITAL BANK10
P
URPOSE
C
OMMAND TYPE
P
ARAMETERS
:
Writes to a bank of eight digital I/O points.
:
Digital
:
COMMAND
ADDRESS
POSITION
VALUE ARRAY
Contains the value 10.
Contains the address of the Pamux brain board.
Contains the bank number.
The first element of this array contains a one-byte bitmask (0–255) specifying
how the bank will be written to. Each bit corresponds to one module position. If
a bit is set to 1, the corresponding module position will be activated (turned on).
If a bit is set to 0, its corresponding module position will be deactivated (turned
off).
R
EMARKS
:
Only I/O points configured as outputs will be affected.
E
XAMPLE
:
This example turns on all eight points of bank 1 at address 3. The example assumes that these
points have been previously configured as outputs.
100COMMAND% = 10‘ Write Digital Bank command
110ADDRESS% = 3‘ Address of brain board
120POSITION% = 1‘ Bank number
130VALUE%(0) = 255‘ Turn all points on
140GOSUB 1000‘ Call the driver
Contains the value 11.
Contains the address of the Pamux brain board.
Contains the bank number.
Contains the values to be written to each position in the specified bank. Each
element of the array corresponds to one module position. Element 0 corresponds
to the first module position, element 7 corresponds to the last. If an element is
set to any number other than 0, the corresponding module position will be
activated (turned on). If an element is set to 0, the corresponding module
position will be deactivated (turned off).
R
EMARKS
:
Only I/O points configured as outputs will be affected.
E
XAMPLE
:
This example activates modules on bank 0 at address 5, positions 0, 2, 4, and 6, and deactivates
positions 1, 3, 5, and 7 at the same address. The example assumes that these positions have been
previously configured as outputs.
100COMMAND% = 11‘ Write Digital Bank, Expanded
110ADDRESS% = 5‘ Address of brain board
120POSITION% = 0‘ Bank number
130VALUE%(0) = 1‘ Turn on module 0
140VALUE%(1) = 0‘ Turn off module 1
150VALUE%(2) = 1‘ Turn on module 2
160VALUE%(3) = 0‘ Turn off module 3
170VALUE%(4) = 1‘ Turn on module 4
180VALUE%(5) = 0‘ Turn off module 5
190VALUE%(6) = 1‘ Turn on module 6
200VALUE%(7) = 0‘ Turn off module 7
210GOSUB 1000‘ Call the driver
Contains the value 12.
Contains the address of the Pamux brain board.
Contains the point number.
The first element of this array contains any value other than 0 if the point will be
activated (turned on), or a 0 if the point will be deactivated (turned off).
R
EMARKS
:
The position to be written to must have been previously configured as an output, otherwise this
command will have no effect.
The POSITION value is a point offset starting from the value in the ADDRESS parameter. The point
number in the POSITION parameter can range from 0 to 511 if the ADDRESS parameter is 0. An
error will be returned if the values in these parameters exceed the limits.
E
XAMPLE
:
This example deactivates position 2 at address 32. The example assumes that this position has
been previously configured as an output.
100COMMAND% = 12 ‘ Write Digital Point command
110ADDRESS% = 32 ‘ Address of brain board
120POSITION% = 2 ‘ Position 2
130VALUE%(0) = 0 ‘ Turn module off
140GOSUB 1000‘ Call the driver
Contains the value 13.
Contains the address of the Pamux brain board.
Contains the bank number.
The first element of this array contains a one-byte bitmask (0–255) specifying
the configuration of the bank. Each bit corresponds to one module position. If a
bit is set to 1, the corresponding module position will be configured as an
output. If a bit is set to 0, the corresponding module position will be configured
as an input.
R
EMARKS
:
All output module positions must first be configured as outputs before values can be written to
them. The driver will ignore any write commands to positions configured as inputs and no errors
will be returned.
E
XAMPLE
:
This example configures bank 1 at address 4 with the first four positions as inputs and the second
four positions as outputs. Remember, bank 1 represents modules at positions 8 through 15, so in
this example bit 0 of the bitmask corresponds to module position 8 and bit 7 of the bitmask
corresponds to module position 15.
100COMMAND% = 13‘ Configure Analog Bank command
110ADDRESS% = 4‘ Address of brain board
120POSITION% = 1‘ Bank number
130VALUE%(0) = &HF0‘ High nibble = outputs,
140GOSUB 1000‘ Call the driver
1000CALL Pamux(ERRCOD%,ADDRESS%,COMMAND%,POSITION%,VALUE%(0))
1010IF ERRCOD% < 0 THEN GOTO 2000
1020RETURN
3-20
Pamux User’s Guide
low nibble = inputs
.
.
Page 82
PROGRAMING WITH THE PAMUX DRIVER
CONFIGURE ANALOG BANK, EXPANDED14
P
URPOSE
C
OMMAND TYPE
P
ARAMETERS
:
Configures a bank of eight analog I/O points.
:
Analog
:
COMMANDContains the value 14.
ADDRESSContains the address of the Pamux brain board.
POSITIONContains the bank number.
VALUE ARRAYEach element of this array corresponds to a module position within the bank.
Element 0 corresponds to the first module position, element 7 corresponds to
the last. If an element is set to 0, the corresponding module position will be
configured as an input. If an element is set to 1, the corresponding module
position will be configured as an output.
R
EMARKS
:
All output module positions must first be configured as outputs before values can be written to
them. The driver will ignore any write commands to positions configured as inputs and no errors
will be returned.
E
XAMPLE
:
This example configures bank 0 at address 5 with module positions 0, 2, 4, and 6 configured as
inputs and positions 1, 3, 5, and 7 configured as outputs.
Configures the position of an analog point as an input or output.
:
Analog
:
COMMAND
ADDRESS
POSITION
VALUE ARRAY
Contains the value 15.
Contains the address of the Pamux brain board.
Contains the point number.
The first element of this array contains a 0 if the point will be configured as an
input, or anything else if the point will be configured as an output.
R
EMARKS
:
All output module positions must first be configured as outputs before values can be written to
them. The driver will ignore any write commands to positions configured as inputs and no errors
will be returned.
The POSITION value is a point offset starting from the value in the ADDRESS parameter. The point
number in the POSITION parameter can range from 0 to 511 if the ADDRESS parameter is 0. An
error will be returned if the values in these parameters exceed the limits.
E
XAMPLE
:
This example configures point 0 at address 1 as an output.
100COMMAND% = 15‘ Configure Analog Point command
110ADDRESS% = 1‘ Address of brain board
120POSITION% = 0‘ Point number 0
130VALUE%(0) = 1‘ Configure as an output
140GOSUB 1000‘ Call the driver
Contains the value 16.
Contains the address of the Pamux brain board.
Contains the bank number.
Each element of this array contains returned data corresponding to a module
position within the bank. Element 0 corresponds to the lowest module position,
element 7 corresponds to the highest.
E
XAMPLE
:
This example reads the status of eight points at address 32 of bank 0, and then displays the value
of each point.
100COMMAND% = 16‘ Read Analog Bank command
110ADDRESS% = 32‘ Address of brain board
120POSITION% = 0‘ Bank number
130GOSUB 1000‘ Call the driver
140FOR I% = 0 TO 7
150PRINT "MODULE ";I%;": ";VALUE%(I%)
160NEXT
Contains the value 17.
Contains the address of the Pamux brain board.
Contains the point number.
The first element of this array contains returned data read from the point.
The POSITION value is a point offset starting from the value in the ADDRESS parameter. The point
number in the POSITION parameter can range from 0 to 511 if the ADDRESS parameter is 0. An
error will be returned if the values in these parameters exceed the limits.
E
XAMPLE
:
This example reads the state of the module at position 8 and displays the status.
100COMMAND% = 17‘ Read Analog Point command
110ADDRESS% = 0‘ Address of brain board
120POSITION% = 8‘ Position 8
130GOSUB 1000‘ Call the driver
140PRINT VALUE%(0)‘ Display the analog value
Contains the value 18.
Contains the address of the Pamux brain board.
Contains the bank number.
Contains the values to be written to each position in the bank. Each element of
the array corresponds to a module position within the bank. Element 0
corresponds to the first module position, element 7 corresponds to the last.
R
EMARKS
:
Only I/O points configured as outputs will be affected.
E
XAMPLE
:
This example writes the value 3,048 to module positions 4, 5, and 6 and writes the value 0 to all
other module positions at address 6 of bank 1. The example assumes that these positions have
been previously configured as outputs.
Contains the value 19.
Contains the address of the Pamux brain board.
Contains the point number.
The first element of this array contains the value to be written to the point.
All output module positions must first be configured as outputs before values can be written to
them. The driver will ignore any write commands to positions configured as inputs and no errors
will be returned.
The POSITION value is a point offset starting from the value in the ADDRESS parameter. The point
number in the POSITION parameter can range from 0 to 511 if the ADDRESS parameter is 0. An
error will be returned if the values in these parameters exceed the limits.
E
XAMPLE
:
This example writes the value 98 to position 15 at address 30. The example assumes that this
position has been previously configured as an output.
100COMMAND% = 19‘ Write Analog Point command
110ADDRESS% = 30‘ Address of brain board
120POSITION% = 15‘ Position 15
130VALUE%(0) = 98‘ Value to be written
140GOSUB 1000‘ Call the driver
Contains the value 20.
Contains the address of the Pamux brain board.
The first element of this array contains the value of the watchdog timeout
interval for the analog brain board watchdog.
R
EMARKS
:
The value in the first element of the VALUE array can be an integer from 0 to 65,535. This
represents a delay length in units of 10 milliseconds, resulting in a range from 10 milliseconds to
10.92 minutes. A value of 0 disables the watchdog feature.
Use the Write Analog Watchdog command to set the values to be assigned to the outputs should a
watchdog timeout occur.
E
XAMPLE
:
This example sets the analog watchdog delay for the board at address 12 to 8 minutes (480
seconds). This results from writing the value 48,000 to address 12. Note that integer values above
32,767 must be entered in hex when using BASIC.
100COMMAND% = 20‘ Set Analog Watchdog Timeout
110ADDRESS% = 12‘ Address of brain board
120VALUE%(0) = &HBB80‘ 48000 decimal = BB80 hex
130GOSUB 1000‘ Call the driver
Writes to a bank of eight analog watchdog registers.
:
Analog
:
COMMAND
ADDRESS
POSITION
VALUE ARRAY
Contains the value 21.
Contains the address of the Pamux brain board.
Contains the bank number.
Contains the values to be written to each watchdog register in the bank. Each
element of this array corresponds to the watchdog register of one module
position within the bank. Element 0 corresponds to the first module position’s
watchdog register, element 7 corresponds to the last module position’s
watchdog register.
R
EMARKS
:
When a watchdog timeout occurs, the values in the watchdog registers are written to their
corresponding output module positions. This task is performed automatically by the analog Pamux
brain board if a watchdog time has been previously set with the Set Analog Watchdog Timeout
command.
Only I/O points configured as outputs are affected.
E
XAMPLE
:
This example writes the value 1,024 to the watchdog registers of all module positions at address
10 of bank 1. The example assumes that these positions have been previously configured as
outputs.
100COMMAND% = 21‘ Write Analog Watchdog Bank
110ADDRESS% = 10‘ Address of brain board
120POSITION% = 1‘ Bank number
130FOR I% = 0 TO 7‘ Fill all VALUE% elements with 1024
140VALUE%(I%) = 1024
150NEXT
160GOSUB 1000‘ Call the driver
1000CALL Pamux(ERRCOD%,ADDRESS%,COMMAND%,POSITION%,VALUE%(0))
1010IF ERRCOD% < 0 THEN GOTO 2000
1020RETURN
3-28
Pamux User’s Guide
.
.
Page 90
PROGRAMING WITH THE PAMUX DRIVER
WRITE ANALOG WATCHDOG POINT22
P
URPOSE
C
OMMAND TYPE
P
ARAMETERS
:
Writes to an analog watchdog register.
:
Analog
:
COMMAND
ADDRESS
POSITION
VALUE ARRAY
Contains the value 22.
Contains the address of the Pamux brain board.
Contains the point number.
The first element of this array contains the value to be written to the watchdog
register of the point.
R
EMARKS
:
The POSITION value is a point offset starting from the value in the ADDRESS parameter. The point
number in the POSITION parameter can range from 0 to 511 if the ADDRESS parameter is 0. An
error will be returned if the values in these parameters exceed the limits.
When a watchdog timeout occurs, the values in the watchdog registers are written to their
corresponding output module positions. This task is performed automatically by the analog Pamux
brain board if a watchdog time has been previously set with the Set Analog Watchdog Timeout
command.
Only I/O points configured as outputs are affected.
E
XAMPLE
:
This example writes the value 90 to the watchdog register of position 15 at address 36. The
example assumes that this position has been previously configured as an output.
100COMMAND% = 22‘ Write Analog Watchdog Point
110ADDRESS% = 36‘ Address of brain board
120POSITION% = 15‘ Position 15
130VALUE%(0) = 90‘ Value to be written
140GOSUB 1000‘ Cal
1000CALL Pamux(ERRCOD%,ADDRESS%,COMMAND%,POSITION%,VALUE%(0))
1010IF ERRCOD% < 0 THEN GOTO 2000
1020RETURN
l the driver
.
.
Pamux User’s Guide
3-29
Page 91
PROGRAMING WITH THE PAMUX DRIVER
USING THE PAMUX DRIVER UNDER WINDOWS
INSTALLATION
The Pamux driver is provided on one disk. You should make a backup copy of this disk before installing
the driver.
The Pamux driver disk includes DOS and WIN directories. To use the driver under Windows, you will
need to copy files from the WIN directory to appropriate directories on your hard drive.
For complete installation instructions, view the README.TXT file on the driver disk.
Briefly, you will need to copy the file Pamux.DLL to your application directory or your Windows System
directory. Note that Windows searches for DLLs first in memory, then in the current working directory,
and finally in the Windows and Windows System directories.
In addition, you will need to copy header files (Pamux.H for C and Pamux.BAS for BASIC) to the directory
in which your application source code is located.
The driver disk also includes the import library file Pamux.LIB. This file tells the linker that the Pamux
APIs are part of a DLL. If this library file is used, the Pamux APIs do not need to be included in the
imports section of the application’s DEF file. Import libraries are not required for Visual Basic; the
Pamux.BAS file serves this purpose.
ARCHITECTURE
The Pamux driver is implemented as a Microsoft Windows DLL that allows Windows applications (such
as Visual Basic) to communicate with Pamux I/O. The driver, Pamux.DLL, provides a set of APIs in the C
language. This driver may be used with any Windows language that supports DLLs, such as Visual
Basic, C, or C++.
The Pamux driver allows up to four AC28 cards to be used. Before an application can access an AC28
using the driver, the PamuxCardOpen() function must be used to acquire a handle to the AC28.
The driver allows multiple applications to access the AC28s simultaneously, although it does not provide
a means of locking I/O for exclusive access by one application.
The driver keeps track of inputs and outputs to prevent a “1” from being written to a digital input.
Writing a “1” to a digital input causes a “1” to be read from the input regardless of the actual state of
the input module.
3-30
Pamux User’s Guide
Page 92
PROGRAMING WITH THE PAMUX DRIVER
PAMUX APIS
Required API Calls
For many applications, only four Pamux APIs are required. These perform the following functions:
•Open an AC28 to configure the AC28 and get a handle.
•Configure outputs.
•Read and write I/O.
•Close the AC28 when the application is about to end.
Naming Conventions
API names in the Pamux library start with “Pamux.” Example: “PamuxDigPointRead.”
API names follow the object-operation format, with the object first and the operation second. Example:
“PamuxDigPointRead,” where “PamuxDigPoint” (the object) is first and “Read” (the operation) follows.
Utility functions, provided primarily for Visual Basic, start with “PamuxUtil.” Example:
“PamuxUtilBitEqual.”
Banks and Points
Any I/O point can be addressed multiple ways. A 16-channel I/O board has two banks. Point 0, the first
point, is accessed using a bank number of 0 and a point number of 0. Point 8 can be accessed in two
ways:
1.A bank number of 0 and a point number of 8, or
2.A bank number of 1 and a point number of 0.
Common API Parameters and Return Values
int hAc28Handle to an AC28 card. Handles are acquired using PamuxCardOpen().
int BankA bank number (0 to 63).
int PointA point or channel number on a rack starting with zero.
OutputMaskA “1” bit represents an output. Used to configure outputs.
Return Values
All functions in the Pamux.DLL return an error value unless otherwise noted. A non-zero value indicates
an error has occurred. An example of a function that does not return an error value is
PamuxDigBankReadFast().
Pamux User’s Guide
3-31
Page 93
PROGRAMING WITH THE PAMUX DRIVER
API COMMAND REFERENCE
The APIs listed in this section include function prototypes and descriptions. In general, most APIs return
an integer error number. Zero indicates no error.
AC28 OPERATIONS
PamuxCardOpen, PamuxCardClose
P
ROTOTYPES
int PamuxCardOpen(int far* phAc28, int far* pUserQty, int BaseIoPort, int
ResetIoPort, BOOL ResetLevel=FALSE);
int PamuxCardClose(int hAc28);
D
ESCRIPTION
Opens access to an AC28 card. phAc28 gets a handle. pUserQty gets the number of users or
applications using the card. The user number will be 1 on the first successful call. Three parameters
must be specified: the I/O Port addresses for the AC28 base port, its reset port, and the reset level.
These three parameters must correspond to jumper settings on the AC28 card.
:
:
PamuxCardReset
P
ROTOTYPE
D
ESCRIPTION
:
int PamuxCardReset(int hAc28);
:
Resets the AC28 card, turning off all outputs. This is not called automatically when the AC28 is
opened.
3-32
Pamux User’s Guide
Page 94
PROGRAMING WITH THE PAMUX DRIVER
DIGITAL BANK OPERATIONS
The term “bank” refers to groups of eight digital I/O points. A 32-channel Pamux board with a B4 brain
board has four banks. It is faster to read a bank all at once rather than to read each point individually.
Note that channel 0 corresponds to the least significant bit. For example when reading a bank with
channels 0, 3, and 4 on and all other channels off, the returned value would be 19 hex (11001 binary, or
25 decimal).
PamuxDigBankConfig
P
ROTOTYPES
int PamuxDigBankConfig(int hAc28, int Bank, int OutputMask);
int PamuxDigBank16Config(int hAc28, int Bank, UINT OutputMask);
int PamuxDigBank32Config(int hAc28, int Bank, long OutputMask);
D
ESCRIPTION
:
:
Configures a bank of digital I/O points as either inputs or outputs. A “1” in the mask indicates an
output. Use PamuxDigBankConfig for configuring eight points,PamuxDigBank16Config for 16 points, or PamuxDigBank32Config for 32
points.
PamuxDigBankRead
P
ROTOTYPES
int PamuxDigBankRead(int hAc28, int Bank, int far* pData);
int PamuxDigBank16Read(int hAc28, int Bank, int far* pData);
int PamuxDigBank32Read(int hAc28, int Bank, long far* pData);
D
ESCRIPTION
:
:
Reads inputs and outputs and places the result in pData. Use PamuxDigBankRead for
reading eight points, PamuxDigBank16Read for 16 points, or PamuxDigBank32Read
for 32 points.
Pamux User’s Guide
3-33
Page 95
PROGRAMING WITH THE PAMUX DRIVER
PamuxDigBankWrite
P
ROTOTYPES
int PamuxDigBankWrite(int hAc28, int Bank, int Data);
int PamuxDigBank16Write(int hAc28, int Bank, int Data);
int PamuxDigBank32Write(int hAc28, int Bank, long Data);
D
ESCRIPTION
:
:
Writes outputs using the value in Data. Inputs are not affected if written to. Use
PamuxDigBankWrite for writing to eight points, PamuxDigBank16Write for 16
points, or PamuxDigBank32Write for 32 points.
3-34
Pamux User’s Guide
Page 96
PROGRAMING WITH THE PAMUX DRIVER
DIGITAL POINT OPERATIONS
PamuxDigPointConfig
P
ROTOTYPE
D
ESCRIPTION
PamuxDigPointRead
P
ROTOTYPE
:
int PamuxDigPointConfig(int hAc28, int Bank, int Position, BOOL bOutput);
:
Configures a point as either an input or output. A non-zero value in bOutput will configure the
point as an output.
:
int PamuxDigPointRead(int hAc28, int Bank, int Point, BOOL far* pData);
D
ESCRIPTION
:
Reads the value of a point and puts the value in pData. The value will be either 1 for on or 0 for
off.
PamuxDigPointWrite
P
ROTOTYPE
D
ESCRIPTION
:
int PamuxDigPointWrite(int hAc28, int Bank, int Point, BOOL Data);
:
Writes to a point using the value in Data. A non-zero value for Data will turn the point on.
Pamux User’s Guide
3-35
Page 97
PROGRAMING WITH THE PAMUX DRIVER
DIGITAL “FAST” OPERATIONS
For high-speed applications, these APIs can be used to bypass some error-checking and port
calculations. The configure functions should be used to configure outputs.
PamuxDigIoPortGet
P
ROTOTYPE
D
ESCRIPTION
PamuxDigBankReadFast
:
int PamuxDigIoPortGet(int hAc28, int far* pBank, int far* pPoint, int far*
pIoPort);
:
Provides the I/O port needed given the AC28 handle, the bank number, and the point number.
P
ROTOTYPE
D
ESCRIPTION
:
int PamuxDigBankReadFast(int IoPort);
:
Reads one byte (eight bits) from the specified I/O port. Does nothing more than call the function
_inp(), and hence may be used in Visual Basic as a general-purpose INP function. The return
value is the value read rather than a Pamux error code.
PamuxDigBankWriteFast
P
ROTOTYPE
D
ESCRIPTION
:
void PamuxDigBankWriteFast(int IoPort, int Data);
:
Writes one byte (eight bits) to the specified port. Does nothing more than call the function
_out(), and hence may be used in Visual Basic as a general-purpose OUT function.
3-36
Pamux User’s Guide
Page 98
PROGRAMING WITH THE PAMUX DRIVER
ANALOG BANK OPERATIONS
PamuxAnaBank16Config
P
ROTOTYPE
D
ESCRIPTION
PamuxAnaBank16Read
P
ROTOTYPE
:
int PamuxAnaBank16Config(int hAc28, int Bank, UINT OutputMask);
:
Configures a bank of analog I/O points as either inputs or outputs. A 1 in the mask indicates an
output.
:
int PamuxAnaBank16Read(int hAc28, int Bank, int far DataArray16)
D
ESCRIPTION
:
Reads a bank of 16 analog points and places the values in the DataArray (channel 0 in element
0 and channel 15 in element 15).
PamuxAnaBank16Write
P
ROTOTYPE
D
ESCRIPTION
:
int PamuxAnaBank16Write(int hAc28, int Bank, int far DataAray)
:
Writes values to a bank of analog points (channel 0 value in element 0).
Pamux User’s Guide
3-37
Page 99
PROGRAMING WITH THE PAMUX DRIVER
ANALOG POINT OPERATIONS
PamuxAnaPointConfig
P
ROTOTYPE
D
ESCRIPTION
PamuxAnaPointRead
P
ROTOTYPE
:
int PamuxAnaPointConfig(int Bank, int Position, BOOL bOutput);
:
Configures an analog point as either an input or output. A non-zero value to bOutput will
configure the point as an output.
:
int PamuxAnaPointRead(int hAc28, int Bank, int Point, int far* pData)
D
ESCRIPTION
:
Reads the value of an analog point.
PamuxAnaPointWrite
P
ROTOTYPE
D
ESCRIPTION
:
int PamuxAnaPointWrite(int hAc28, int Bank, int Point, int Data)
:
Writes the value in Data to an analog point.
3-38
Pamux User’s Guide
Page 100
PROGRAMING WITH THE PAMUX DRIVER
ANALOG WATCHDOG OPERATIONS
PamuxAnaWatchdogSet
P
ROTOTYPE
D
ESCRIPTION
PamuxAnaWatchdogTime
P
ROTOTYPE
:
int PamuxAnaWatchdogSet(int hAc28, int Bank, int Time100, int far DataArray)
:
Sets up the watchdog timer for an analog point. Time100 units are hundredths of a second.
:
int PamuxAnaWatchdogTime(int hAc28, int Bank, int Time100)
D
ESCRIPTION
Sets the value of the watchdog timer in units of hundredths of a second. Setting Time100 to 0
will disable the watchdog. Setting the time to 0 can also be used to reset the watchdog error flag if
it has tripped. This and any other analog function can be used to “tickle” the watchdog to prevent it
from tripping.
:
ANALOG STATUS OPERATIONS
PamuxAnaStatusGetAsError
P
ROTOTYPE
D
ESCRIPTION
:
int PamuxAnaStatusGetAsError(int hAc28, int Bank)
:
Gets an analog board’s status and returns an equivalent error. Analog read functions also return the
same result after performing their read. An analog configure function can be used to clear the
“power-up” error. The “old data” error is cleared by the B6 processor as it updates inputs. This
function could be used to wait for fresh input data.
Pamux User’s Guide
3-39
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.