Table of Contents

Advertisement

Quick Links

PAMUX USER'S GUIDE
PAMUX USER'S GUIDE
Form 726-960905 — September 1996
43044 Business Park Drive, Temecula, CA 92590-3614
Phone: 800/321-OPTO (6786) or 909/695-3000
Fax: 800/832-OPTO (6786) or 909/695-2712
Internet Web site: http://www.opto22.com
Product Support Services:
800/TEK-OPTO (835-6786) or 909/695-3080
Fax: 909/695-3017
E-mail: support@opto22.com
Bulletin Board System (BBS): 909/695-1367

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PAMUX and is the answer not in the manual?

Questions and answers

Summary of Contents for OPTO 22 PAMUX

  • Page 1 PAMUX USER’S GUIDE PAMUX USER’S GUIDE Form 726-960905 — September 1996 43044 Business Park Drive, Temecula, CA 92590-3614 Phone: 800/321-OPTO (6786) or 909/695-3000 Fax: 800/832-OPTO (6786) or 909/695-2712 Internet Web site: http://www.opto22.com Product Support Services: 800/TEK-OPTO (835-6786) or 909/695-3080 Fax: 909/695-3017 E-mail: support@opto22.com...
  • Page 2 Pamux User’s Guide Form 726-960905 — September 1996 Copyright © 1996 Opto 22. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means without the written permission of Opto 22.
  • Page 3: Table Of Contents

    About This Manual ........................xi Document Conventions ......................xii About Opto 22 ..........................xiii Chapter 1: Introduction..................1-1 What Is Pamux? ......................... 1-1 Pamux Components ........................1-3 AC28 Adapter Card ......................1-3 AC36 Adapter Card ......................1-4 B4 Brain Board ........................1-4 B5 Brain Board ........................
  • Page 4 What Is the Pamux Driver? ......................3-1 Using the Pamux Driver under DOS .................... 3-2 Installation .......................... 3-2 Pamux Driver Parameters....................3-2 Using the Pamux Driver with Interpreted BASIC or QBasic ..........3-3 Pamux Error Codes ......................3-5 Working with Banks......................3-5 Command Reference ......................3-6 Using the Pamux Driver under Windows ................
  • Page 5 TABLE OF CONTENTS Reading from and Writing to Digital Pamux Stations ..............4-5 Reading Digital Inputs ......................4-5 Writing Digital Outputs ......................4-6 Reading from and Writing to Analog Pamux Stations ............... 4-6 Pamux Internal Registers ....................4-7 Gaining and Releasing Access ................... 4-9 Reading an Analog Channel ....................
  • Page 6 AD10T2 ..................00 OHM PLATINUM RTD AD17T ................... type r or type s thermocouple AD18T ....................type t thermocouple AD19T ....................type e thermocouple Appendix D: Product Support ................. D-1 Appendix E: Glossary ..................E-1 Index vi Pamux User’ s Guide...
  • Page 7 Figure 2-1: Pamux Clustered System ..................2-2 Figure 2-2: Pamux Distributed System ..................2-2 Figure 2-3: Pamux Distributed Clustered System ................2-2 Figure 2-4: Dimensions of the B4 Brain Board ................2-3 Figure 2-5: Installation of the B4 on a Mounting Rack ............... 2-4 Figure 2-6: Mounting Dimensions of the G4PB32H ................
  • Page 8 Table 2-25: Rate Input Modules....................2-39 Table 3-1: Pamux Driver Error Codes under DOS ................ 3-5 Table 3-2: Status/Error Codes Returned by Pamux Driver APIs ............3-41 Table 4-1: Pamux Bus Pin Definitions ..................4-1 Table 4-2: Pamux Internal Registers ....................4-8...
  • Page 9 Table B-2: Pamux-Compatible I/O Modules ................B-5 Table B-3: Opto 22 Cables for Pamux .................... B-7 Table B-4: Third-Party Pamux-Compatible Cables ................B-7 Table B-5: Pamux Connectors ....................... B-7 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

    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.
  • Page 12: Document Conventions

    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.
  • Page 13: About Opto 22

    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.
  • Page 14 TABLE OF CONTENTS xiv Pamux User’ s Guide...
  • Page 15: Chapter 1: 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;...
  • 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.
  • Page 17: Pamux Components

    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.
  • Page 18: Ac36 Adapter Card

    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).
  • Page 19: B5 Brain Board

    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.
  • Page 20: B6 Brain Board

    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.
  • Page 21: Term1 Terminator Board

    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.
  • Page 22: 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.
  • Page 23: Chapter 2: System Setup

    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).
  • Page 24: Figure 2-1: Pamux Clustered System

    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

    The G4PB32H mounting rack uses single-point digital modules. It offers a dense footprint and point-by- point 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.
  • Page 26: Figure 2-5: Installation Of The B4 On A Mounting Rack

    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: Setting B4 Jumpers

    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.
  • Page 28: Table 2-1: B4 Address Jumpers

    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 2-6 Pamux User’ s Guide...
  • Page 29: Terminating A B4 Station

    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.
  • Page 30: B4 Led Indicators

    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.
  • Page 31: Setting Up A B5 Station

    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.
  • Page 32: Figure 2-11: Installation Of The B5 On A Mounting Rack

    SYSTEM SETUP The following I/O mounting racks are available for the Pamux B5 brain board: • G4PB8H — 8 channels of single-point G4 digital I/O • G4PB16H — 16 channels of single-point G4 digital I/O • G4PB16HC — 16 channels of single-point G4 digital I/O •...
  • Page 33: Figure 2-12: Mounting Dimensions Of The G4Pb8H With A B5 Installed

    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: Figure 2-14: Mounting Dimensions Of The G4Pb16Hc With A B5 Installed

    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-16: Mounting Dimensions of the PB4H with a B5 Installed Figure 2-17: Mounting Dimensions of the PB8H with a B5 Installed Pamux User’s Guide 2-13...
  • Page 36: Figure 2-18: Mounting Dimensions Of The Pb16H With A B5 Installed

    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: Figure 2-20: Mounting Dimensions Of The Pb16Hq With A B5 Installed

    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. Pamux User’s Guide 2-15...
  • Page 38: Setting B5 Jumpers

    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.
  • Page 39: Table 2-5: B5 Address Jumpers

    SYSTEM SETUP Table 2-5: B5 Address Jumpers Pamux User’s Guide 2-17...
  • Page 40: Table 2-6: B5 Watchdog Jumpers

    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.
  • Page 41: Terminating A B5 Station

    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.
  • Page 42: Setting Up A B6 Station

    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.
  • Page 43: Figure 2-26: Mounting Dimensions Of The Pb4Ah With A B6 Installed

    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 5- volt line. Figures 2-26 through 2-28 show the mounting dimensions of these racks with the B6 brain board installed.
  • Page 44: Setting B6 Jumpers

    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...
  • Page 45: Table 2-9: B6 Address Jumpers

    SYSTEM SETUP Table 2-9: B6 Address Jumpers Pamux User’s Guide 2-23...
  • Page 46: Table 2-10: B6 Reset Jumper

    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.
  • Page 47: Terminating A B6 Station

    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.
  • Page 48: Connecting And Powering A System

    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.
  • Page 49: Ac28 Acknowledgment Data

    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: •...
  • Page 50: Connecting Field Wiring

    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.
  • Page 51: Figure 2-31: Wiring For Dc And Ac Input/Output Modules

    SYSTEM SETUP Table 2-15: Digital DC and AC Input Modules Figure 2-31: Wiring for DC and AC Input/Output Modules Pamux User’s Guide 2-29...
  • Page 52: Table 2-16: Digital Dc And Ac Output Modules

    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 2-30 Pamux User’s Guide...
  • Page 53: Wiring Quad Pak Modules

    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 Pamux User’s Guide 2-31...
  • Page 54: Table 2-18: Quad Pak Dc And Ac Output Modules

    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 2-32 Pamux User’s Guide...
  • Page 55: Wiring Analog Modules

    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.
  • Page 56: Figure 2-33: Wiring For Voltage Input And Output Modules

    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 2-34 Pamux User’s Guide...
  • Page 57: With Individual Power Supplies

    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: Figure 2-36: Wiring For 0–5A Current Input And 28–140 Vac Input Modules

    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: Figure 2-37: Wiring For Thermocouple And Ictd Temperature Input Modules

    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.
  • Page 60: Figure 2-38: Wiring For Rtd Input Modules

    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 Figure 2-38: Wiring for RTD Input Modules 2-38 Pamux User’s Guide...
  • Page 61: Figure 2-39: Wiring For Rate Input Modules

    (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 Figure 2-39: Wiring for Rate Input Modules Pamux User’s Guide 2-39...
  • Page 62: 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.”...
  • Page 63: Using The Pamux Driver Under Dos

    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.
  • Page 64: Using The Pamux Driver With Interpreted Basic Or Qbasic

    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:...
  • 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...
  • Page 66: Pamux Error Codes

    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.
  • Page 67: Command Reference

    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 Set Base Address...
  • Page 68 PROGRAMING WITH THE PAMUX DRIVER SET BASE ADDRESS Purpose: Configures the driver with the base address of the AC28 to use when sending future commands. Command Type: Driver Parameters: COMMAND Contains the value (zero). VALUE ARRAY The first element of this array contains a single value that selects the address.
  • Page 69 PROGRAMING WITH THE PAMUX DRIVER SET RESET ADDRESS URPOSE Configures the driver with the reset address of the AC28 to use when sending a reset command. OMMAND Driver ARAMETERS COMMAND Contains the value 1. VALUE ARRAY The first element of this array contains a single value that selects the reset address.
  • Page 70 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.
  • Page 71 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. XAMPLE This example resets all Pamux units. COMMAND% = 3 ‘ Reset command GOSUB 1000 ‘...
  • Page 72 Digital ARAMETERS COMMAND Contains the value 4. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the bank number. VALUE ARRAY 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.
  • Page 73 Digital ARAMETERS COMMAND Contains the value 5. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the bank number. VALUE ARRAY 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.
  • Page 74 OMMAND Digital ARAMETERS COMMAND — Contains the value 6. ADDRESS Contains the address of the Pamux brain board. POSITION 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.
  • Page 75 Digital ARAMETERS COMMAND Contains the value 7. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the bank number. VALUE ARRAY 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.
  • Page 76 Digital ARAMETERS COMMAND Contains the value 8. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the bank number. VALUE ARRAY 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.
  • Page 77 Digital ARAMETERS COMMAND Contains the value 9. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the point number. VALUE ARRAY 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).
  • Page 78 Digital ARAMETERS COMMAND Contains the value 10. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the bank number. VALUE ARRAY 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).
  • Page 79 Digital ARAMETERS COMMAND Contains the value 11. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the bank number. VALUE ARRAY 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.
  • Page 80 Digital ARAMETERS COMMAND Contains the value 12. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the point number. VALUE ARRAY 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).
  • Page 81 Analog ARAMETERS COMMAND Contains the value 13. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the bank number. VALUE ARRAY 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.
  • Page 82 Analog ARAMETERS COMMAND Contains the value 14. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the bank number. VALUE ARRAY 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.
  • Page 83 Analog ARAMETERS COMMAND Contains the value 15. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the point number. VALUE ARRAY 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.
  • Page 84 Analog ARAMETERS COMMAND Contains the value 16. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the bank number. VALUE ARRAY 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.
  • Page 85 OMMAND Analog ARAMETERS COMMAND Contains the value 17. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the point number. VALUE ARRAY The first element of this array contains returned data read from the point. 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.
  • Page 86 Analog ARAMETERS COMMAND Contains the value 18. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the bank number. VALUE ARRAY 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.
  • Page 87 OMMAND Analog ARAMETERS COMMAND Contains the value 19. ADDRESS Contains the address of the Pamux brain board. POSITION Contains the point number. VALUE ARRAY The first element of this array contains the value to be written to the point. EMARKS All output module positions must first be configured as outputs before values can be written to them.
  • Page 88 Analog ARAMETERS COMMAND Contains the value 20. ADDRESS Contains the address of the Pamux brain board. VALUE ARRAY The first element of this array contains the value of the watchdog timeout interval for the analog brain board watchdog. 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.
  • Page 89 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.
  • Page 90 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.
  • Page 91: Using The Pamux Driver Under Windows

    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’...
  • Page 92: Pamux Apis

    A “1” bit represents an output. Used to configure outputs. OutputMask 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().
  • Page 93: Api Command Reference

    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 ROTOTYPES int PamuxCardOpen(int far* phAc28, int far* pUserQty, int BaseIoPort, int ResetIoPort, BOOL ResetLevel=FALSE);...
  • Page 94: Digital Bank Operations

    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.
  • Page 95 PROGRAMING WITH THE PAMUX DRIVER PamuxDigBankWrite 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); 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.
  • Page 96: Digital Point Operations

    PROGRAMING WITH THE PAMUX DRIVER DIGITAL POINT OPERATIONS PamuxDigPointConfig ROTOTYPE int PamuxDigPointConfig(int hAc28, int Bank, int Position, BOOL bOutput); ESCRIPTION Configures a point as either an input or output. A non-zero value in bOutput will configure the point as an output.
  • Page 97: Digital "Fast" Operations

    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 ROTOTYPE void PamuxDigBankWriteFast(int IoPort, int Data);...
  • Page 98: Analog Bank Operations

    PROGRAMING WITH THE PAMUX DRIVER ANALOG BANK OPERATIONS PamuxAnaBank16Config ROTOTYPE int PamuxAnaBank16Config(int hAc28, int Bank, UINT OutputMask); ESCRIPTION Configures a bank of analog I/O points as either inputs or outputs. A 1 in the mask indicates an output. PamuxAnaBank16Read ROTOTYPE...
  • Page 99: Analog Point Operations

    PROGRAMING WITH THE PAMUX DRIVER ANALOG POINT OPERATIONS PamuxAnaPointConfig ROTOTYPE int PamuxAnaPointConfig(int Bank, int Position, BOOL bOutput); ESCRIPTION Configures an analog point as either an input or output. A non-zero value to bOutput will configure the point as an output.
  • Page 100: Analog Watchdog Operations

    PROGRAMING WITH THE PAMUX DRIVER ANALOG WATCHDOG OPERATIONS PamuxAnaWatchdogSet ROTOTYPE int PamuxAnaWatchdogSet(int hAc28, int Bank, int Time100, int far DataArray) ESCRIPTION Sets up the watchdog timer for an analog point. Time100 units are hundredths of a second. PamuxAnaWatchdogTime ROTOTYPE int PamuxAnaWatchdogTime(int hAc28, int Bank, int Time100) ESCRIPTION Sets the value of the watchdog timer in units of hundredths of a second.
  • Page 101: Pamux Utility Operations

    These interpolation functions are useful for converting between engineering units and raw analog counts. Pamux analog input and output values range between 0 and FFF hex (4,095 decimal). These values typically correspond to engineering units, such as pH and psi. For example, to convert raw counts (from 0 to FFF hex) to a percentage, use: float fPercent=PamuxUtilScaleI2F(0,0xFFF,0F,100.F,nRawCount);...
  • Page 102: Status/Error Codes

    STATUS/ERROR CODES A 0 returned as a status or error code by a Pamux API indicates no error. The most common error codes are listed below. The complete set of status and error codes can be found in the Pamux header files (Pamux.H or Pamux.BAS).
  • Page 103 PROGRAMING WITH THE PAMUX DRIVER 3-42 Pamux User’s Guide...
  • Page 104: Overview

    It then addresses all programming issues for both digital and analog Pamux stations, providing specific examples written in MS-DOS QBasic. If you are using the Pamux driver, you may skip this chapter or review it as a background reference to acquire a deeper understanding of Pamux communication.
  • Page 105: Bus Timing

    Figure 4-1: Write Timing on the Pamux Bus READ TIMING To generate the Pamux bus read cycle, first apply the Pamux address to the bus, wait for at least 100 nanoseconds, then activate the read strobe. After 2000 nanoseconds, the data will be available.
  • Page 106: Direct Programming Of Pamux Stations With Ac28

    For more complete examples that handle error checking and provide a set of functions, see the Pamux.DLL source code, which is written in C/C++. This source code is found on the Pamux driver disk (in the WIN\SOURCE directory) and on the Opto 22 BBS.
  • Page 107: Utility Subroutines Used In Examples

    PROGRAMING WITHOUT THE PAMUX DRIVER Address of digital brain board. CONST MyDigitalBoard% = 0 ‘ Assume digital B4 or B5 at address 0 Address of analog brain board. ‘ Assume analog B6 at address 4 CONST MyAnalogBoard% = 4 Address of a nonexistent brain board. This is used to demonstrate the use of the reset register to determine if a board is present and functioning.
  • Page 108: Turn Off Reset

    OUT MyAc28ResetPort%, NOT MyAc28ResetLevel% READING FROM AND WRITING TO DIGITAL PAMUX STATIONS The I/O on digital B4 and B5 Pamux stations is accessed eight bits at a time. Channel 0 is the least significant bit. READING DIGITAL INPUTS The following example reads 16 digital input channels and prints the hex representation on the screen.
  • Page 109: Writing Digital Outputs

    This handshaking scheme prevents contention problems. Each analog Pamux brain board takes up two byte locations on the bus. The upper address is the control register, the lower address is the data register. The control and data registers are at the following locations: •...
  • Page 110: Pamux Internal Registers

    To read or write analog Pamux data, you must access each brain board’s internal registers (dual-port RAM locations). The following is a map of the Pamux analog internal registers. All values are in hex and can be read from or written to, since all registers are RAM locations.
  • Page 111 PROGRAMING WITHOUT THE PAMUX DRIVER Table 4-2: Pamux Internal Registers 4-8 Pamux User’s Guide...
  • Page 112: Gaining And Releasing Access

    First, write the hex value 82 to the control register (AC28 base address + Pamux address + 1). Then read the data register (AC28 base address + Pamux address) and test bit 7 of the byte just read. Bit 7 is the semaphore bit.
  • Page 113: Reading An Analog Channel

    PROGRAMING WITHOUT THE PAMUX DRIVER To release access, write a hex 82 to the control register, then write anything to the data register. The function below illustrates how to do this in QBasic. The ReleaseAccess function releases access by simply writing any value to the semaphore register.
  • Page 114: Configuring And Writing To Analog Channels

    CONFIGURING AND WRITING TO ANALOG CHANNELS The Pamux analog brain board configures all channels as inputs on power-up or after a reset. Thus, if you are using output modules, they must be configured before they can be turned on.
  • Page 115 PROGRAMING WITHOUT THE PAMUX DRIVER The following example configures an analog output and, within a loop, continuously writes a changing value to the output. ‘ Non-zero if we have access DIM HaveAccess% DIM DataPort%: DataPort% = MyAc28IoPort% + MyAnalogBoard% DIM ControlPort%: ControlPort% = DataPort% + 1...
  • Page 116: Watchdog Registers

    (see Chapter 3 for details). The watchdog can be used to set a time interval that a Pamux analog brain board will wait. If the brain board is not accessed by the host within the interval, the board will enter a watchdog state. In this condition the analog brain board will set bit 2 in the status register, then output all values contained in the watchdog registers to their corresponding module positions.
  • Page 117: Status Register

    • Bit 2 — Watchdog timeout flag Bit 0 is set to 1 if the Pamux B6 brain board has been reset due to a power-up condition or a reset signal from the host. Bit 1 is set to a 1 every time the microprocessor transfers data to and from the dual-port RAM and can be used to indicate if the current data is fresh.
  • Page 118: Performing Diagnostics

    PERFORMING DIAGNOSTICS Check Board Type This example uses the capability of newer Pamux products to identify an I/O brain board type and to determine if a brain board was actually accessed. You can verify that a brain board was successfully accessed by reading the reset register.
  • Page 119: Common Subroutines

    PROGRAMING WITHOUT THE PAMUX DRIVER Determine Suitable I/O Addresses for an AC28 If an I/O address is unused, the I/O address should read &HFF or all 1’ s . If the AC28 is not installed and the Reset I/O address in not already in use, the following statement should print “255”: PRINT INP( MyAc28ResetPort% ) The following loop will check a range of I/O port addresses for conflicts before the AC28 is installed.
  • Page 120 PROGRAMING WITHOUT THE PAMUX DRIVER CombineUpperAndLowerBytes This function takes two bytes and combines them into a 16-bit integer. QBasic requires an “if” condition to prevent an overflow exception. This is used to read and combine two eight-bit port values into one 16-bit integer such as when reading analog inputs.
  • Page 121 PROGRAMING WITHOUT THE PAMUX DRIVER 4-18 Pamux User’ s Guide...
  • Page 122: Overview

    5 and 6 to do so. On B6 boards, install jumper 8 to disable the watchdog. 2. Apply power to the Pamux unit to be tested. If the power LED doesn’t light, check the fuse on the mounting rack. Note that the power LED may be on the brain board or on the mounting rack.
  • Page 123: Notes On Leds

    2. The watchdog LED on the B4 and B5 boards will stay on as long as no communication is taking place (the read and write lines on the Pamux bus are not strobing). Once the read or write line strobes, the watchdog LED will go off. If no other communication takes place, the watchdog LED will stay off for approximately 1.6 seconds and then turn back on.
  • Page 124: Useful Tips

    • After a power-up or reset condition, it is important to reconfigure the analog brain board by writing to the configuration registers. The B6 brain board clears all dual- port RAM locations upon a power-up or reset. Since the configuration register is a RAM location, it will also be cleared. Pamux User’s Guide A-3...
  • Page 125 TROUBLESHOOTING AND TIPS A-4 Pamux User’s Guide...
  • Page 126: Appendix B: Specifications

    50-pin male header connector Range Up to 500 feet total length AC36 ADAPTER CARD Description Pamux bus adapter card for a TTL parallel port using the Intel multibus port configuration. Power requirements 5 VDC ±0.1 V @ 1 A Operating temperature 0°C to 70°C...
  • Page 127: B4 Brain Board

    2.2 µsec bus cycle for 8 positions (read or write) at 500 feet Data rates Range Up to 500 feet total length Up to 16 B4 brain boards per Pamux bus LED indicators Address, watchdog Configuration jumpers Address, reset, watchdog...
  • Page 128: B6 Brain Board

    8.8 µsec bus cycle per analog channel (read or write) at 500 Data rates feet Range Up to 500 ft total length Up to 32 B6 brain boards per Pamux bus LED indicators Access, address, power Configuration jumpers Address, reset, watchdog...
  • Page 129: Pamux-Compatible I/O Mounting Racks

    Table B-1: Pamux-Compatible I/O Mounting Racks PAMUX-COMPATIBLE ANALOG I/O MODULES Table B-2 on the following page lists all the analog I/O modules currently available for Pamux systems. Please note that this list is subject to change. If you do not see a particular type of module, or if you require further information on any module, contact Opto 22.
  • Page 130: Table B-2: Pamux-Compatible I/O Modules

    SPECIFICATIONS Table B-2: Pamux-Compatible I/O Modules Pamux User’s Guide B-5...
  • Page 131: Pamux Compatible Digital I/O Modules

    SPECIFICATIONS Table B-2: Pamux-Compatible I/O Modules (cont’d) PAMUX COMPATIBLE DIGITAL I/O MODULES All 5-Volt logic I/O modules from the SNAP, G4, Classic, and QuadPak families are compatible with Pamux digital brainboards. B-6 Pamux User’ s Guide...
  • Page 132: Cables And Connectors

    The Pamux bus connects to a host computer or other device via a 50-pin flat-ribbon cable. The maximum length of the Pamux bus is 500 feet. Opto 22 provides a number of pre-made cables for the Pamux system, as listed in Table B-3. Contact Opto 22 TechSupport at 800/835-6786 for more information.
  • Page 133: Power Supplies

    SPECIFICATIONS POWER SUPPLIES Each non-terminated Pamux station requires a power supply of 5 VDC at 0.5 A. The final Pamux station on a bus requires an additional 0.5 A for a TERM1 or TERM2 terminator board, bringing the total current requirements for terminated stations to 1 A. To assure proper operation, the voltage at each Pamux station should be between 4.9 and 5.1 VDC.
  • Page 134: Table B-6: Current Requirements For Pamux-Compatible Analog Modules

    SPECIFICATIONS Table B-6: Current Requirements for Pamux-Compatible Analog Modules Pamux User’s Guide B-9...
  • Page 135 SPECIFICATIONS B-10 Pamux User’ s Guide...
  • Page 136: Overview

    The data returned from a direct reading of an analog input will include an offset of 4096 to accommodate over- and under-range indications. If you are using the Pamux driver, this offset is subtracted automatically. If you are not using the driver, you must first subtract 4096 before using the reading in an algorithm.
  • Page 137: Algorithms

    TEMPERATURE CONVERSIONS ROUTINES ALGORITHMS These algorithms should be used for all Pamux-compatible analog input modules that produce data to be converted to temperatures. The algorithms are listed by input module. ICTD TEMP = (0.08262 * VALUE%) - 188.4 AD5, AD5T...
  • Page 138: Ad8, Ad8T................................................................................... Type K Thermocouple

    A0, A1, and A2 depend on VALUE% and can be derived from the following table: AD10T2 .00 OHM PLATINUM RTD A 100-ohm platinum RTD (reference DIN 43 760, alpha = 0.00385) must be used with the AD10T2 for the following conversion algorithms to be accurate. Pamux User’s Guide C-3...
  • Page 139 When used as a T When used as a T When used as a T When used as a Type S thermocouple: ype S thermocouple: ype S thermocouple: ype S thermocouple: ype S thermocouple: ≥ C-4 Pamux User’ s Guide...
  • Page 140: Ad18T ................................................................................................. Type T Thermocouple

    TEMP = A0 + (A1 * B) + (A2 * B ) +(A3 * B ) + (A4 * B where A0, A1, A2, A3, and A4 depend on VALUE% and can be derived from the following table: Pamux User’s Guide C-5...
  • Page 141 TEMPERATURE CONVERSIONS ROUTINES C-6 Pamux User’ s Guide...
  • Page 142 PRODUCT SUPPORT PRODUCT SUPPORT If you have any questions about this product, contact Opto 22 Product Support Monday through Friday, 8 a.m. to 5 p.m. Pacific Time. Phone: 800/TEK-OPTO (835-6786) 909/695-3080 Fax: 909/695-3017 E-mail: support@opto22.com Bulletin Board System (BBS): 909/695-1367...
  • Page 143 PRODUCT SUPPORT D-2 Pamux User’ s Guide...
  • Page 144 I/O. AC36 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. Each AC36 can access up to 512 points of I/O.
  • Page 145 An interface card that connects an analog or digital I/O mounting rack to a communication bus, such as the Pamux bus. A single common cable used to connect all devices on a system. The Pamux bus is a 50-pin flat- ribbon cable.
  • Page 146 A software program that provides instructions for transferring data between an application program and a peripheral device. The Pamux driver provides an interface that allows a user to program a Pamux system. Dynamic link library, a library of executable functions that can be accessed by one or several Windows applications.
  • Page 147 A high-speed, high-density distributed I/O system that accommodates both digital and analog brain boards and I/O modules. Pamux supports up to 32 stations containing up to 512 I/O points. A Pamux bus can extend up to 500 feet from a host computer or other programming device.
  • Page 148 GLOSSARY TERM1 A terminator board for the Pamux bus. The final Pamux brain board on the bus must be terminated with a TERM1 or TERM2 terminator board. TERM2 A terminator board for the Pamux bus, 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.
  • Page 149 GLOSSARY E-6 Pamux User’s Guide...
  • Page 150 Windows functions, adapter cards. See AC28; AC36; UCA4 3-39 connecting to, 2-26 API, definition of, E-1 definition of, E-1 APIs, PAMUX driver, 3-31 to 3-41 address jumpers applications for PAMUX, 1-2 B4, 2-5, 2-6 architecture B5, 2-16, 2-17...
  • Page 151 C C C C C station, setting up, 2-3 to 2-39 termination, 2-7 cables, 2-1, 2-26, A-1 vertical dimensions, 2-5 table of, B-7 command reference for PAMUX driver description, 1-5 DOS, 3-6 to 3-7 dimensions, 2-9 Windows, 3-32 to 3-41 illustration, 1-5...
  • Page 152 4-7 driver, definition of, E-3 Interpretive BASIC, 3-3 E E E E E bus, connecting PAMUX to, 1-3 error codes, 3-5 definition of, E-3 PAMUX driver, under Windows, 3-41 J J J J J F F F F F...
  • Page 153 INDEX N N N N N PAMUX driver, 3-1 to 3-7, A-2 noise, 1-2 APIs, 3-31 to 3-41 definition of, E-4 architecture, 3-30 description, 3-1 to 3-7 O O O O O DOS command reference, 3-6 to 3-7 Opto 22 Product Support, D-1...
  • Page 154 Set Reset Level command, 3-9 wiring, 2-31 specifications, B-1 to B-9 quad pak output modules status codes for PAMUX driver under table of, 2-32 Windows, 3-41 wiring, 2-32 status register, 4-14 to 4-17 subroutines, 4-4, 4-16 to 4-17...
  • Page 155 Write Analog Watchdog Bank command, 3-28 Write Analog Watchdog Point command, 3-29 Write Digital Bank command, 3-17 Write Digital Bank, Expanded command, 3-18 Write Digital Point command, 3-19 write timing, 4-2 writing digital outputs, 4-6 6 6 6 6 6 PAMUX User’s Guide...

Table of Contents