Text preview for : 62470F(Metrabus).pdf part of Keithley 62470F(Metrabus) Keithley Metrabus 62470F(Metrabus).pdf



Back to : 62470F(Metrabus).pdf | Home

MetraBus User's Guide




Keithley Instruments, Inc.
28775 Aurora Road, Cleveland, OH 44139
Technical Support: I-888-KEITHLEY
Monday -Friday 8:00 a.m. to 5:OOp.m. (EST)
Fax: (440) 248-6168
httD://www.keithlev.com




Revision F - July, 1994
Pari Number: 62470
The information contained in this manual is believed to be accurate and reliable. However, Keithley
Instruments, Inc., assumes no responsibility for its use or for any infringements of patents or other
rights of third parties that may result from ik use. No license is granted by implication or otherwise
under any patent righk of Keithley Instruments, Inc.


KEITHLEY INSTRUMENTS, INC., SHALL NOT BE LIABLE FOR ANY SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES RELATED TO THE USE OF THIS
PRODUCT. THIS PRODUCT IS NOT DESIGNED WITH COMPONENTS OF A LEVEL OF
RELIABILITY SUITABLE FOR USE IN LIFE SUPPORT OR CRITICAL APPLICATIONS.


Refer to your Keithley hWrumenk license agreement and Conditions of Sale document for specific
warranty and liability information.


MetraByte is a trademark of Keithley hMru.menk, Lnc. AU other brand and product names are
&ademarks or registered trademarks of their respective companies.


@Copyright Keithley Instruments, Inc. 1991,1992, 1993,1994



Au rights reserved. Reproduction or adaptation of any part of this doctunentation beyond that
permitted by Section 117 of the 1976 United States Copyright Act without pem&zion of the Copyright
owner is unlawful.




Keithley MetraByte Division
Keithley Instruments, Inc.
440 Myles Standish Blvd., Taunton, h4A02780
TEL 508/880-3000 * FAX 5081880-0179
Contents
CHAPTER 1 - INTRODUCTION
General Overview. .................................. ,1-l
i:: The MetraBus Cable .................................. l-l
MetraBus Boards 1-2
::: Mounting & Connection.
............................ : : : : : : : : : : : : : : : : : : : II-3
MetraBus Addressing ................................. .I-4
2 Programming ..................................... .I-4
1:7 Additional Notes .................................... l-6



CHAPTER 2 - THE CONTROLLER BOARDS
Part 2A: MDB-64 Driver Board
2A.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . : I??-;
2A.2 Features
2A.3 Specificat'ions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : . 2A-2
2A.4 Setting The Base Address Switch . . . . . . . . . . . . . . . . . . . . . . . . . . 2A-2
2A.5 Installing The MDB-64 Fuse (Fi) . . . . . . . . . . . . . . . . . . . . . . . . . . 2A-3
2A.6 Installing The MDB-64 Driver Card . 2A-3
2A.7 The MDB-64 MetraBus Connector. : : : : : : : : : : : : : : : : : : : : : : : : . 2A-4
2A.8 Programming The MDB-64. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2A-4


Part 2B: MID-64 Driver Board
28.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , . . . . . . . . .28-l
2B.2 Features . 2B-2
28.3 Specificat'ions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : .2B-2
Setting The Base Address Switch . . . . . _. . . . . . . . 2B-2
z-i Use 0-t The Auxiliary Supply . . . . . . . . . . . . . . . : : : : : : : : : : : : . . .2B-3
2B:6 Installing The Mid-64 Drier Card . . . , . . . . . . . . . . . . . . . . . . . . . . 28-3
2B.7 The MID-64 MetraBus Connector . . . , . . . . . . . . . . . . . , , . . . . . . . 2B-4
2B.8 Programming The MID-64 . . . . . . . . . . . . . . . . . . . . . . . . , . . . . . 2B-5


Part 2C: pCMDB-64 Driver Board
2c.1 General .2c-1
2c.2 Specifications 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 .2C-1
2C.3 Use Of An Auxiliary Power Supply. . . . . . . . . . . . . . . . . . . . . . . . . .2C-2
2C.4 System Configuration. . . . . . . . , . ; . . . . . . . . . . . . . . . . . . . . . .2C-2
2c.5 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , . . . . . .2C-7


Part 2D: REhh-64 Driver Board
2D.I General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2D-1
2D.2 Features. . . . . . . . . . . . . . . . . . . . . . . . , . . . . . . . . . . . . . . .2D-2
2D.3 g$;E;tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . : : :X$-g
2D.4
2D.5 Connectors' : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : . * 2D-5
2D.6 Use of An Auxiliary Power Supply . . . . . . . . . . . . . . . . . . . . . . . . : : zLD-77
2D.7 Installation Of The REM-64. . . . . .
2D.8 Programming The REM-64 To Control `M'etraBus : : : : : : : : : : : : : : : : . . 2D-8




.. .
- Ill -
Contents
CHAPTER 3 - THE POWER SUPPLY BOARDS
Part 3A: PWR-ZVPWR-100 Boards
3A.1
3A.2 Features , . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General, . . . . . . . . . . 3A-1
Specifications' : : 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3A-1
3A.4
3A.3 Installing The PWR-55/PWR-100 111: 1 1 1 1 1 1 1 1 1 1 3A-2
3A.5 Use of Other Power . . . . . . . . . . . . . . . . . . . . . . . . . . 3A-2
3A.6 TheMTAP- . . . . . . .
. . . . Supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3A-2
3A-3

Part 38: MBUS-PWR Boards
3B.1 General........................,.............:. 3B-1
3B.2 Features
Specifications' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 38-2
3B.3 Installation . 1 3B-2
3B.4 Use of Output Ground . .
. . . . . Jumper : : : : : : : : : : : : : : : : : : : : : : : : : : : 3B-3
3B.5 3B-3
3B.6 The MBUS-PWk `cbnnkdtdrs : : : : : : : : : : : : : : : : : : : : : : : : : : : :
The MATP-1 3B-3
38.7 3B-3


CHAPTER 4 - MDI-16/M%-16 SOLID STATE SWITCHING I/O SYSTEM
General, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , . . . . . . 4-1
Features
Specifications 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ;::
Using An Auxiliary Supply . . . . . . . , . . . . . . . . . . . . . . . . . . . . . 4-2
Configuring The MSS-16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . : : . 4-2
Installing The MDI-16




CHAPTER 5 - THE RELAY BOARDS
Part 5A: MEM-8 Electromechanical Relay I/O System
5A.l General. . . . . . . . . . . . . . . . . . . . . . . . . . . . SA-1
5A.2 Specifications . . . . . . . . . , . . . . . . _. .
_. . . .
: ' ' ' ' * ' . ' ' * * !iA-3
. . . . . . . . . . . . . . "I._

5A.3 Using An Auxiliary Power Supply SA-3
5A.4 Setting The MEM-8 Board Address : : : : : : : I- : : ' * ' . ' . . ' ' ' ' ' ' * : 5A-3
5A.5 Programming The MEM-8 . . . . . . . . . . . . . . . : : : : : : : : : : : : : : . 5A-4
5A.6 Use of Alternative Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5A-5


Part 58: MEM-32/A & MEM-32/W Electromechanical Relay System
58.1 General. . . . . . . . . . . . . . . . . . . . .................... 5B-1
5B.2 Features .................... 58-2
5B.3 Specifications' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 .................... 5B-2
5B.4 Using An Auxiliary Power Supply ....................
5B.5 Setting The MEM-32 Board Address : : : : .................... E-33
5B.6 Typical Output Connections . . . . _ . . . . .................... 58-4
5B.7 Programming The MEM-32 . . .................... 5B-4
5B.8 Using Compiled Or Assembled ian&&-% ' .................... 5B-7




- iv -
Contents
Part 5C: MSSR-32 Solid State Switching I/O Module
5C.l General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SC-1
5c.2 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SC-2
Specifications . . SC-2
E-i Use Of An AuxkySuppiy: : : : : : : : : : : : : : : : : : : : : : : : : : : : . .5C-2
5c:5 Configuring The MSSR-32 . . . . , . . . . . 5c-3
5C.6 Installing The MSSR-32 . . . . . . . . . . . : : : : : : : : : : : : : : : : : : : : 5C-3


Part 5D: MCPT-8X8 Cross-Point, Matrix Relay Board
5D.l General . .5D-1
5D.2 Specifications : -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 . .5D-2
5D.3 Use Of An Auxrlrary Power Supply. . . . . . . . . . . . . . . . . . . . . . . . . .5D-3
5D.4 Jumpers And Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5D-3
5D.5 Resistor Termination Networks. . 5D-4
5D.6 Installing The MCPT-8X8. , . . . : : : : : : : : : : : : : : : : : : : : : : : : : : 5D-4
5D.7 Programming The MCPT-8X8 . . . . . . . . . . . . . . . . . . . . . . . . . . . .5D-4



CHAPTER 6 - THE LOGIC LEVEL l/O BOARDS
Part 6A: MIO-32 Isolated Digital Output Board
6A.l General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6A-1
6A.2 Features . 6A-2
6A.3 Specifications 1 1 1 1 1 1 1: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1: 1 1 . 6A-2
6A.4 Using An Auxiliary Power Supply 6A-3
6A.5 Installing The MIO-32. . . . . . . : : : : : : : : : : : : : : : : : : : : : : : : : : 6A-3
6A.6 Typical Output Connections . 6A-4
6A.7 Programming TheMIO-32 . : : : : : : : : : : : : : : : : : : : : : : : : : : : : . 6A-5
6A.8 Using Compiled Or Assembled Languages . . . . . . . . . . . . . . . . . . . . . 6A-7


Part 6B: MII-32 Isolated Digital Input Board
6B.1 General ........................................ 6B-1
6B.2 Features ............ 6B-2
68.3 Specifications ......... 1 1 1 1 1 1 1 1: 1 1 1 1 1 1 1 1 1 1 1 1: 1 1 1 1 1 1 6B-2
6B.4 Using An Auxiliary Power Supply 6B-3
6B.5 Installing The MI!-32 ... .... : : : : : : : : : : : : : : : : : : : : : : : : : : 68-3
6B.6 Configuring The Mll-32 For Non-standard Inputs .................. 654
6B.7 Typical Input Connections 6B-4
6B.8 Programming The Mll-32. : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 6B-5
6B.9 Using Compiled Or Assembled Languages ..................... 6B-7




-V-
Contents
CHAPTER 7 - MCN-8 COUNTER/TIMER BOARD
General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
;:: Features . . 7-2
Specification's* * : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1: : : . . 7-2
2 Use Of An Auxiliary Supply . . , . . . . . . . . . . . . . . . . . . . . . . . . . . , 7-3
Installing The MCN-8 . 7-3
T-56 Cascading The MCN-8'Coun'ters : : : : : : : : : : : : : : : : : : : : : : : : : : . 7-4
7:7 Typical Input Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
7.8 Programming The MCN-8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7
7.9 Using Compiled Or Assembled Languages . . . . . . . . . . . . . . . . . . . . . 7-8



CHAPTER 8 - THE ANALOG I/O BOARDS
Part 8A: MAO-8 Analog Output Board
8A.l General. ....................................... $A-1
8A.2 Features . 8A-2
8A.3 Specificatiork'.~ : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 : : : : : . 8A-2
8A.4 Use Of An Auxrlrary Power Supply ....................... : : 883-z
8A.5 Installing The MAO-8
8A.6 ProgrammingTheMAd-~:::::::::::::::::::::::::::: . . 8A:6
8A.7 Calibration And Adjustment Of The MAO-8 ...................... .;;;; ;
8A.8 Serviceable Parts ..... .. .. ......................


Part 88: MAO-12 Analog Output Board
8B.l General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8B-1
8B.2 Features . 8B-2
8B.3 Specifications : : : 1 : : 1 : : : : : : : : : : : : : : : : : : : : : : : : : : : : . 8B-2
8B.4 Use Of An Auxiliary Power Supply . . . . . . . . . . . . . . . , . . . . . . , . . 88-3
8B.5 Installing The MAO-1 2 , . . . . . . . . . . , . . . . . . . . . , . . . . . . . . . . 8B-3
8B.6 Programming The MAO-1 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8B-5


Part 8C: MAI- Analog Input Board
8C.l General. . . . 8C-1
8C.2 Features . . . : : : : : : : : : : : : : : : : : : 1: : : : : : : : : : : : : : : : :
8C-2
8C.3 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8C-2
8C.4 Using An Auxiliary Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . .
8C-3
8C.5 Installing The MAI-I 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8C-3
8C.6 Typical Input Connections . . . . . . . s . , . . . . . . . . . . . . 8C-4
8C.7 Input Signal Attenuation . . . . . . . . . . . . . . . . . , . . . . . : : : : : : : i 883-z
8C.8 Measuring Signals Greater Than +I 0 VDC . . . . . . . . . . . . . . . . . .
8C.9 Measuring Signals Smaller Than +I .25 VDC . . . . . . . . . . . . . . . . . : : . 8&
Measuring Current With The MAI- 6 . . . . . . . . . . . . . . . . . . . . . . . . 8C-6
E4 : Auto Convert Mode Of Operation . . . . , . . . . . . . . . . . : . . . . . . . . . 8C-6
8C:12 A/D Resolution Via Hardware . . . , . . . . , . . . . . . , . . . . . . . . , . . . 8C-7
SC.13 Gain Selection Via Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8C-7
8C.14 Programming The MAI- 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , 8C-8
Using Compiled Or Assembled Languages 8C-12
3 Calibration Procedure For MAI- . , . . . : : : : : : : : : : : : : : : : : : : : 8C-13




- vi-
Contents
Part 8D: MTHERM-20 Thermocouple Input Board
8D.l General . 8D-1
8D.2 Functional bescnptidn' 1 : : : : : : : 1 : : : : : : : : : : : : : : : : : : : : : : . 8D-2
8D.3 Features . 8D-2
8D.4 Specifications 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 , 8D-2
8D.5 Installing The MTHERM-20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . _8D-3
8D.6 Programming The MTHERM-20 . . . . . . . . . . . : : : : : : : : : : : : : : :
8D.7
8D.8
Other Memory Locations . . . . . . . . . . . . . . . . . . . . . . . . . . _ . . .
Calibration Procedure. . . . . . . . . . . . . . . . . . . . . , . . . . . . . . . . 8D-;o
:FE

CHAPTER 9 - THE UTILITY BOARDS
Part 9A: MBB-32 Prototype/Breadboard
9A.1 General . . . , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9A-1
9A.2 Features . . , . . . . . . . . . . . . . 9A-2
9A.3 Specifications . . . . . . . . . . . . . : : : : : : : : : : : : : : : : : : : : : : : : 9A-2
9A.4 Installing The MBB-32 9A-2
9A.5 MBB-32 l/O Connections : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9A-3
9A.6 The Read/Write Status Lines. . . . . . . . . . . . . . . . . . . . , . . . . . . . . 9A-3
9A.7 Programming The MBB-32. . . . 9A-4
9A.8 Possible Uses For The MBB-32 . : : : : : : : : : : : : : : : : : : : : : : : : : : 9A-6


Part 9B: MDG-1 Diagnostic Board
9B.1 General . . . . . . . . . . . . . . . . . . . , . . . . . . . . . . . . . . . . . . . . ;JI;
98.2 Features. . . . . . . . . . . . . . . .
98.3 Installing The MDG-1 . _, . . . . . . : : : : : : : : : : : : : : : : : : : : : : : : 98-2
9B.4 Example Program. . . . . . . . . . . . ~ . . . . . . . . . . . . . . . . . . . . . .9B-2



CHAPTER10 - FACTORYRETURNS




APPENDIX
Appendix A - Serial Communications Tutorial
Appendix B - Configuration Worksheets




- vii -
a

a


a




...
- VIII -
Chapter 1

INTRODUCTION




1.1 GENERAL
The MetraBus system provides a low-cost means of connecting real-world I/O devices to a
computer. The system is available in two configurations: (1) tightly coupled to an IBM PC bus
system or (2) remotely operated through RS-232/422 serial communications from any
computer.

Under the supervision of a PC, MetraBus digital, analog, and counter-timer measurement, and
control interfaces can control cost-effective industrial I/O systems. Each MetraBus system can
measure and control hundreds of analog, digital, and counter/timer I/O points. Several
MetraBus systems can simultaneously control thousand of I/O points.

MetraBus fills the gap between I/O plug-in boards and dedicated industrial controllers. Plug-
in boards and a personal computer are finding applications in process measurement and
control applications and product test stations. However, the large number of date I/O points
required, the proximity of the sensors to the control room combined Gith a finite number of
expansion slots available in a personal computer often require versatile systems that are
flexible, provide for enhanced expansion capability and are inexpensive. The MetraBus family
of industrial data acquisition products retains the close link of the personal computer to a data
acquisition system while offering extreme flexibility at a price that rivals many plug-in I/O
boards.

Key MetraBus features include:

l Low cost I/O
l Ease of programming
l Simple packaging and interconnection
l Reliability
l 100% personal computer compatible
l Local, high speed interfaces
l Remote capability, up to 1.2 km from computer


1.2 THE METRABUS
The MetraBus system is an extension of the computer bus to real world measurement and
control devices. All MetraBus I/O boards share the 5O-conductor cable illustrated in Figure l-
1. The MetraBus cable consists of:

l 6 Address lines


INTRODUCTION I- 1
l 8 Datalines
l 4 Control/status lines
l 3 Power supplies
l Ground conductors between all address data and control

- co 1 2
7 GND.
c?
- 3 4 GND.
c2 5 6 GND.
7 8 GND.
9 10 GND.
11 12 GND.
13 14 GND.
- 07 15 16 GND.
r CLEAR 17 18 GND.
CONTROL j WSTRB 13 20 GND.
!
i R/W 21 22 GND.
AO 23 24 GND.
-
A: 25 26 GND.
ADDRESS x-2 27 28 GND.
BUS A3 29 30 GND.
K-4 3: 32 GND.
A5 33 34 GND.
BUSY 35 36 GND.
-
+15 v 37 38 GND.
- 15 v 39 40 GND.
+5 `d 41 42 +5 v




I
POWER +-5 v 43 44 +5 v
t5 v 45 46 +5 v POWE?
+5 v 47 48 i5 v
- 15 v 49 50 -i5 v


Figure 1-l. The MetmBus Connector


Six address lines yield 26 = 64 individual addresses on the MetraBus. Each MetraBus address
may control any one of the following:

* 8 Digital I/O points
* One 8-bit A/D point
* One half of a la-bit A/D
* One 8-bit D/A
l One 8-bit counter/timer




l-2 METRASUS USER MANUAL
1.3 AVAILABLE METRABUS BOARDS
MetraBus I/O boards are controlled by the PC through one of the MetraBus controller/driver
cards. These I/O Boards are as follows:

l pCMDB-64: PS/2 compatible MetraBus controller board
l MDB-64: IBM PC compatible MetraBus controller board
l MID-64: IBM PC compatible controller card with full optical isolation between PC and
MetraBus.
REM-64: Remote MetraBus controller. Communication via RS-232/422 serial. Multidrop
up 16 REM-64 per computer serial port.
l INTMDB-64: Intelligent MetraBus controller board. This board is described in a separate
manual.

Both local and remote MetraBus systems control the same family of signal acquisition and
control boards. The boards and their various functions are as follows:

l MID-16/M%-%: 16 solid-state relays
. MEM-8: 8 electromechanical relays
l MEM-32: 32 electromechanical relays
l MIO-32: 32-channel, optically isolated TTL output
l MII-32: 32-channe1, optically isolated TT'L input
l MAI-16: Wchannel, 12-bit A/D
l MAO-8: &channel, 8-bit D/A
l MAO-12: 12-Channel, 12-bit A/D
l MCN-8: 8 Channel, &bit counter timer
l MJ3B32: 32-bit prototype board with four fully decoded addresses
l MDG-1: Diagnostic/training board with LEDs
l MBUS-PWR: MetraBus power supply
l MSSR-32: 32-channel, solid-state reIay board
l MCPT-8X8: Cross-point relay board
l MTHERM-20: 20-channel thermocouple
l MTAP-1: Power supply tap board




1.4 PACKAGING & INTERCONNECTION
All MetraBus I/O boards are 19" rack mountable using either the RMT-02 housing, a standard
NEMA cabinet, or any 7" x 6"~ 2" enclosure. A 50-way, 0.05" spacing ribbon cable connects the
MetraBus controller/driver card to the I/O boards. This MetraBus cable operates at lengths
of up to 100'. Connectors are standard, 50-pin insulation-displacement type; their parallel
architecture allows placement at any point along the MetraBus cable.




INTRODUCTION 1 -3
1.5 CONCEPTUAL VIEW OF METRABUS
MetraBus is an extension of the PC I/O control address space. The MetraBus controller card
implements three control functions, as follows:

* An address Ppinter
l A data input/output path
l A reset/clear line

An I/O OUT command from the PC sets the address pointer to a MetraBus I/O board at its
address. Data may then move to or from the selected I/O boards. A RESET/CLEAR may
come from the PC at any time, clearing all I/O boards and resetting the address pointer to
zero.



1.6 PROGRAMMING METRABUS
MetraBus is programmable from any PC-usable language having INPUT and OUTPUT
commands capable of manipulating the I/O bus. Examples of such languages are:

l c l Assembly
l BASICA l GWBASIC
l Microsoft PASCAL l TURBO PASCAL


In addition, the REM-64 MetraBus controller allows connection of a MetraBus'system to any
computer with an Rs-232/RS-422 interface. A REM-64 can be controlled from any language
capable of writing and reading the computer's serial ports.

Programming the MetraBus is a two-step procedure: (1) set the address pointer then (2) read
or write the data. The following discussion wiIl use the variables DATAIO, ADRPTR, and
MRESET in order to help clarify MetraBus progr amming technique. These variables are
generally set at the beginning of your programs for ease of manipulation as follows:

lODATA = 768 `Declare MetraBus data I/O path
20ADRPTR = 769 'Declare address pointer location
30MRESET = 770 'MetraBus reset location
4OOU-T ADRJ?TR, 01 'Set the address pointer to address #l
5OOUT DATAIO,45 'Write data 45 to address 1


Set the MetraBus address pointer by issuing a single comman d to the MetraBus controller
board. Once set, the address pointer is latched and need not be reset until a different address
is required.

Writing and reading data from a MetraBus I/O board is transparent once the address pointer
is set. Issuing an OUT command will write data to the targeted I/O board. Likewise, issuing
an INP command will retrieve data from the I/O board via the data I/O path.

40 OTJTADRPTR,Ol 'Set address to 1
500UT DATAIO,45 'Write data 45 to address 1
6OVAL = INP(DATAI0) 'Read back data from 1

The MetraBus controller board and all attached MetraBus I/O boards may be reset by writing
to the reset address. Here is an example in BASIC:

l-4 METRABUS USER MANUAL
40 OUT MRESET, 00 `Clear the MetraBus


Examples of all MetraBus programming features are available on the MetraBus diskettes.



MDB-64 vs. REM-64 Programming
Direct bus plug-in controller boards (MDB-64 and MID-64) program differently than the
REM-64 MetraBus serial controller board. Commands to the MDB-64 and MID-64 are direct
statements to an I/O port. For example, in BASIC:
40 OUT ADRPTR, 01 `Set address pointer to #l
5OOUT DATAIO, 44 `Write data 44 to board #l


REM-64 commands are writes to a COMl or COM2 serial port. The REM-64 has an on-board
m&!roprccessor which interprets commands from the personal computir. The REM-64 issues
commands to the I/O boards (via the MetraBus cable) identical to those issued by an MDB-64
or MID-64. For example, in BASIC:
10 PRINT #l,"B" ; 1 'Activate REM-64 #l
20 PRINT #1, "A" ; 4 'Set address pointer to MetraBus address 4
30 PRINT #l, "W" ; 44 `Write data "44" to I/O board #l


Since the MDB-64 and REM-64 use different hardware connections, programs for the MDB-64
are not compatible with those for the REM-64.



Programming l/O Boards
MetraBus I/O boards fall into three major categories:

l Digital in and out
l Analog in and out
l Counter/timer

Digital MetraBus I/O boards program with byte wide (8 bits) write and read commands.
Driving a single digital line high or reading the status of a single line requires one bit.
Therefore, 8 lines (or bits) are controlled when writing to or reading from the digital I/O
boards.

Data to a MetraBus digital ouQut board is latchtid and may be read back from the board. This
data readable feature is usable when manipulating the I/O lines, thus making digita
programming easy.

Analog output boards are controlled as an g-byte port, one byte per channel. The analog
equivalent of the &bit data is output by the DAC on the MetraBus analog output board.

Analog input for the MetraBus is full-featured, allowing user control of application specific
parameters. Prior to reading A/D data from a MetraBus MAI-16, the range channel and type
(12-bit or 8-bit) must be set. An A/D conversion is triggered by software only.


INTRODUCTION I- 5
The MCN-8 counter/ timer board has two functions available from software: clear counter
and read counter. Writing to a counter will clear it while reading a counter will retrieve the
current count in the register.



I .7 SUMMARY
The remainder of this manual covers the individual MetraBus controller boards and I/O
function boards. The electrical interfacing and programming aspects of each board are
explained.

All explanations and example programs are as if the I/O board is under the control of an
MDB-64. The MIX-64 is a complete and simple implementation of the MetraBus concept.
The MID-64 and REM-64 embody additional features, and are treated in this manual with
programming examples for each.

The lNTMDI3-64 is an intelligent stand-alone driver/controller board for the MetraBus, It is
usable as a dedicated, low-cost controller, or as a satellite controller monitored/controkd by
a larger host computer. This board is described in the INTMDB-64 user's manual.

Schematics for the MetraBus are available in the MetraBus schematic package.




I-6 METRAHJS USER MANUAL
Chapter 2: The Controller Boards Part 2A

MDB-64 DRIVER BOARD



2A.l GENERAL
The MDB-64 driver board is the functional heart of the MetraBus system. This board
supervises all I/O operations between the computer and MetraBus I/O boards within your
system. Since the MBD-64 generates all necessary control signals, it controls system-level data
transfer. Because of its design, a single MDB-64 is capable of addressing up to 64 MetraBus
I/O boards. Figure 2A-1 is a functional block diagram of the MDB-64.
I
I I

,
MFI'RABUS I
TIMING METRABUS
COMPUTER ADDRESS I
CABLE METRABUS
EXPANSION DECODE - AND
CONTROL - DRIVER/ - CABLE
BUS LOGIC
SIGNAL RECEIVER I
I
LOGIC I
I
I
BASE I
AOORESS
I
SWITCH
I
I
L-------------------------_--_-______---------------,


Figure 2A-1. MDB-64 Functional Block Diagram


The MDB-64 is a `half-slot" board that installs in any PC expansion slot. A 50-pin connector
extends through the rear of the computer and connects to the MetraBus cable. Functionally,
MetraBus has a parallel-bus architecture with the MetraBus cable carrying all data, address,
and control signals, as well as distributing power to the MetraBus I/O boards. Ground
conductors are interleaved between all signal lines to reduce system noise. The MDB-64
allows MetraBus cable lengths of up to 100 feet.

The MetraBus industrial data acquisition and control interface allows higher speed, greater
accuracy, and total autonomous operation to otherwise slow and troublesome applications.



A.2 FEATURES
l Interfaces with IBM PC/XT, PC AT or other bus-compatible computers.
l Allows placement of MetraBus I/O boards at up to 100 feet from the computer.
l Compatible with many off-the-shelf software packages.
l Controls up to 512 digital I/O lines.
l Controls up to 256 (8 or U.-bit) A/D.
l Controls up to 64 @-bit) DACs.



THE CONTROLLER BOARDS MDB-64 DRIVER BOARD 2A-1
l Extremely cost effective.
l Adapts to your changing requirements.



2A.3 SPECIFICATIONS
Number of addressable MetraBus 64
ports:

Maximum MetraBus data transfer 80 kbytes/s
rate:

Maximum drivable cable length: 100 feet at full speed
200 feet at reduced speed

MetraBus cable type: 50 conductor ribbon cable

MetraBus connector: 3M 3425-4050
Power required: -+5 V: 250 rr~4 typical, 325 n-4 maximum



2A.4 SE'TJING THE BASE ADDRESS SWITCH
The MD13-64 uses four consecutive locations in the PC I/O address space. This address space
extends from decimal 512 to 1023. The MDB-64 base address switch is preset by the factory
for 768 (3OOh),as shown in Figure 2A-2.
ADDRESS ADDRESS UNE VALUES:
LINE DECIWL HEX
512 200
-2 256 100




Switch settings indicate o voluc o!

512 i 256 = 768 Dccimoi




Figure ZA-2. Defautt Base Address Switch SettiRgs.
(768 decimal, 300h)


If I/O address 768 (300h) is occupied by another device, you must reset the base address
switch. Refer to your PC manual for available addresses in the I/O space.

Once you have selected an address, change the base address switch accordingly. For
assistance with the settings, use the INSTALLEXE program provided on your MetraBus
diskette.

NOTE: Setting the base address to a location used by another device
may cause erratic operation or PC system failure.

To run the INSTALLEXE program, change to the appropriate directory and at the DOS
prompt, and type INSTALL followed by [Enter]. When the program asks for the desired


2A-2 METRABUS USER MANUAL
base address, enter the new base address in decimal and press [Enter]. The program rounds
your address to the nearest 4-bit boundary and checks for conflicts with other devices.
Choosing an address less than 512 or greater than 1023 results in an error message. When the
program determines an address is suitable, it displays the settings you must make on the Base
Address Switch.

INSTALL.EXE performs an additional function: it generates a file named MBUS.ADR
containing the newly selected Base Address Switch settings. The address in the file
MBUS.ADR may then be read by application programs as an alternative to m-defining the
MDB-64 address in every program. The following short BASIC program shows how to obtain
the address from the MBUSADR file.

lOOPEN "KBUS.ADR" FOR INPUT AS #l
20 INPUT #~,BASADR
30 PRINT BASADR
40 CLOSE #l



The base address location is returned to the variable BASADR for use by your application
program.



2A.5 INSTALLING THE MDB-64 FUSE.(Fl)
MBD-64 fuse Fl allows the PC to supply +5 VDC to the MetraBus I/O boards via the
MetraBus cable. Large systems and those using +15 V will require an additional high-quality
power supply such as the MBUS-PWR (see Contents). In this case, Fuse Fl must be removed.
Failure to remove the fuse when using the MDB-44 with an external power supply causes the
fuse to blow.

If the MetraBus System is to draw power from the PC power supply, the fuse Fl must be
installed. This fuse is a Littlefuse #312001,3AG 2A fast blow.



2A.6 INSTALLING THE MDB-64 DRIVER CARD
1. Unplug your computer.
2. Remove the cover of your computer and select any empty expansion slot. Remove the
backplate from the selected slot. If you are using an IBM PC/XT, note that the MDB-64
does not operate correctly in the short expansion slot farthest to the right (I8) next to the
power supply. This slot is reserved for the IBM expander card and is not available for
peripherals since the bus signals are slightly different from the other slots.
3. Make certain that the base address switch is properly set and fuse Fl is installed/removed
(as needed).
4. Lnsert the MDB-64 into a PC expansion slot. If needed, straighten the locking tabs on the
ends of the connector prior to insertion.
5. Once the board is in place, plug the MeiraBus cable into the MDB-64. Make sure the
locking tabs are locked around the mating portions of the MetraBus connector. The
mating portions of the connectors are keyed and should plug-in easily. Check the
keyways for correct alignment prior to insertion, Avoid applying force to the connector.
6. Secure the MDB-64 backplate to the computer frame with a screw and replace the
computer cover.

THE CONTROLLER BOARDS MDB-64 DRIVER BOARD 2A-3
NOTE: The MDB-64 is shipped with two resistor networks. These
termination resistors are to be installed in sockets RN1 and RN2 on the
last MetraBus I/O board in your system. These resistor networks are
used to minimize signal reflection due to long MetraBus cable lengths.
They are optional, however, and have little effect for cables of 50 feet or
less.




2A.7 THE MDB-64 METRABUS CONNECTOR
The MDB-64 passes information to and receives data from the MetraBus I/O boards via the
MetraBus cable. Figure ZA-3 shows the physical and functional layout of this cable.

NOTE: The +15 VDC pins are active only when the MDB-64 is used
in conjunction with an external power supply such as the MBUS-PWR.

1 2 GND.
3 4 GND.
5 6 GND.
DATA 7 8 GND.
BUS 9 10 GND.
11 12 GND.
13 14 GND.
15 16 GND.
17 18 GND.
19 20 GND.
21 22 GND.
23 24 GND.
25 26 GND.
27 28 GND.
29 30 GND.
31 32 GND.
33 34 GND.
BUSY 35 36 GND.
+15 v 37 38 GND.
-15 v 39 40 GND.
+5 v 41 42 +5 v
POWER +5 v 43 44 i-5 v
+5 v 45 46 +5 v POWER
+5 v 47 48 -1-5 v
L t5v 49 50 i-5 v


Figure ZA-3. MetraBus Connector Pinouts




2A-4 METRABUS USER MANUAL
2A.8 PROGRAMMING THE MDB-64
As mentioned earlier, the PC has I/O address locations for such things as disk drives,
printers, serial ports, and other peripherals. The MDB-64 Base Address is located within this
I/O space. The three MDB-64 locations and their functions are as follows:

LOCATION I/O ADDRESS Function
(Decimal)

BaseAddress+-Oh 768 Data I/O path (DATAIO)
BaseAddress+lh 769 Addresspointer (ADRPTR)
BaseAddress+2h `770 Softwarereset (PRESET)
BaseAddress+3h 771 Unassigne4l


For the sake of clarity, all references to specific address locations use the variable names
DATAIO, ADRFTR, and MRESET as specified in the table above. Normally, variable
assignments are made at the beginning of your application program. For example,
ZODATAEO = 768 'Declare data I/O location
20ADRPTR = 769 'Declare addxess pointer location
30WSET = 770 'Declare RESET location


The following sections discuss address location functions in order of typical programming
use. All references to the above locations assume a base address of 768 decimal (300h).


The Address Pointer (ADRPTR)
The function of the MDB-64 address pointer is to point to the specific MetraBus I/O board to
be accessed. Each MetraBus I/O Board must have a unique, non-overlapping board address
in order to identify it from other boards in the MeiraBus system. (Refer to the section "Setting
the board address" for the relevant I/O board.) Writing the board address to ADFUYIR sets
the current MetraBus address and targets the specific I/O board for use. Once the address
pointer is set to a particular board address, data can be written to or read from that board.
The BASIC commands IN? and OUT control the read and write functions respectively. It
should be noted that while the example are written using BASIC, many computer languages
supporting data I/O operations may be used. Refer to the programming manual for the
language that you are using for the correct syntax. The following example illustrates how to
set the address pointer to a MetraBus I/O board (MEM-8) at address 12.
10ADRPTR = 769 'Declare address pointer location
2QDATAIO = 76% 'Declare data I/O location
30MRELSET= 770 'Declare HetraBus RESET location
4OMBf8 = 12 `Declare m-8 board address
5OOUT ADRPTR, MEM8 'Point to HEM-8 at address 12

Once the MetraBus address pointer is set, it does not change until another OUT command
changes it. Setting the address pointer is a fast operation on the personal computer bus,
taking less than 10 p.

Remember that the address pointer is used to point to a MetraBus I/O board address. Since
this address is latched on the MDB-64, it can be read back using the BASIC INP command, as
follows:
60ADDREXS = INP(ADRPTR)


THE CONTROLLER BOARDS MDB-64 DRIVER BOARD ZA-5
The BASIC variable ADDRESS contains the current MetraBus I/O board address. If the above
INP command were issued immediately after the previous OUT command, the ADDRESS
variable would contain a valued of 12. Reading the address pointer returns six bits of address
information and two bits of status information (R/W and BUSY), as shown below:

Address Byte
BIT D7 D6 D5 D4 D3 D2 Dl DO

BUSY R/w A.5 A4 A3 A2 Al A0



NOTE: The driver board inverts the polarity of the actual bus control
signals.

Normally, the BUSY and R/W status bits are low (non-zero). When this is true, the data
returned is identical to the contents of the address pointer. See Programming TheMDB-64 7'0
Covttiol The I/O Boar& for an example and an explanation of how to monitor the status bits.


The Data l/O Register (DATAIO)
Once the address pointer has been set, data may be written to and read from a MetraBus I/O
board. All data transfer takes place through DATAIO. Accessing specific functions on the
MetraBus I/O board and passing data back to the computer via DATA10 may be
accomplished using the BASIC OUT command

70 OUT DATAIO, 128

This command calls for a value of 128 which might activate a relay on the MEM-8 relay board.
The actual functions that it specifies is dependent on the board accessed.

You may read data from the data I/O with a single IN7 command, as follows:
EODAT = INP(DATAI0)

The BASIC variable DAT contains data from the MetraBus I/O board previously targeted by
the ADRPTR. All MetraBus output boards latch data sent to them and therefore, have data
readable capability. This means that if the above IN? command were issued after the
previous OUT command, variable DAT would contain a value of 128.


The Sofiware RESET (MRESET)
A software reset causes alI MetraBus I/O boards connected to the MetraBus cable to be reset
to a known state. Seethe description of the I/O board for more details. The following shows
how to use the software RESET feature for all MetraBus I/O boards.
80 OUT HRZSET, 00
90 START = TIMER
100 IF (TIZGR - START) < .02 THEN 100

The BASIC Timer command is used to insure a wait of 20 ms for the reset pulse to finish.




214-6 METRABUS USER MANUAL
Notes On The Use Of Compiled Or Assembled Languages
Execution speeds with compiled and assembled languages may call for precautions. As
mentioned earlier, when reading the currently latched MetraBus I/O address, the lowest six
bits contain address information while the two most significant bits carry status information.

Prior to any BASIC Inp or Out command, check the status bits (R/W and Busy). The
following example shows the proper status checks.
10 DATA10 = 768 'Declare I/O location
20 ADRPTR = 769 'Declare address pointer location
30 MRESET = 770 'Declafe MetraBus RESET location
40 MA116 = 8 'Declare MAI- board address
50 OUT MRESET, 00
60 START = TIMR 'Input Time
70 IF (TIKER - START) < .02 THEN 70 'Wait 20 ms
80 IF (INPUDRPTR) AND 192) THEN 80 'Check status
90 OUT ADRPTR, HAI16+2 'Point to g-bit A/D resolution
100 IF (INP(ADFU?TR) AND 192) THEN 100 'Check status
110 OUT DATAIO, 18 'Set gain to +5 V range on than 2
120 IF (INP(ADRPTR) AND 192) THEN 120 'Check status
130 OUT ADRPTR, HAI16+1 'Point to result of conversion
140 IF (INP(ADRPTR) AND 192) THEN 140 'Check status
150 AIN = INP(DATAI0) 'Return result to computer




Programming The MDB-64 To Control The l/O Boards
As described above, the three MDB-64 I/O locations have quite distinct functions. Their order
of execution generally follows a consistent pattern when programming any MetraBus I/O
board. The following examples illustrate programming techniques used with both digital and
analog I/O Boards. For prograrnmin g information on a specific board, refer to the board
description.


Digital l/O Boards
Digital I/O boards are the easiest to control. Data can be written to DATAIO soon after
setting the address pointer. Digital output boards typically have several &bit ports. In the
following example, a digital output board (MIO-32) is at board address 0 and the MDB-64 is at
computer I/O Address 768 decimal (3OOh).
lODATA = 768 'Declare data I/O location
20ADRPTR = 769 'Declare address pointer location
3OMRESET = 770 'Declare MetraBus REXXT location
40MI032 = 0 'Declare MIO-32 board address
5OOUT ADRPTR, MI032 'Point to MIO-32 at address 0
6OOUT DATAIO, 255 'Output bit pattern 1111 1111


Lines 10 through 40 declare the locations of the MetraBus DATAIO, ADRF'TR, and the
MRESET functions, as well as declare the MIO-32 board address. Line 50 sets the address
pointer to the MIO-32 digital output board. Line 60 outputs a value of 255 to the MIO-32,
setting all outputs high.




THE CONTROLLER BOARDS MDB-64 DRIVER BOARD 2A-7
Digital input board (Mu-32) programmin g is similar to that for digital output boards. Digital
input boards typically have several B-bit ports. After the address pointer has been set, data
can be read from the DATAIO, as follows:
lODATA = 768 'Declare Data I/O Location
20ADRPTR = 769 'Declare Address Pointer Location
30MRBSET = 770 'Declare MetraBus RESET Location
40MII32 = 4 'Declare MII-32 Board Address
5OOUT ADRPTR, MI132 'Point to MII-32 at Address 4
60DATIN = INP(DATAI0) 'Get data from DATA10


Lines 10 through 40 declare the locations of the MetraBus DATAIO, ADKPTR, and the
MRESET functions, as well as declare the MU-32 board address. Line 50 sets the address
pointer to the MIl-32 digital input board. Line 60 reads the contents of one of the four &bit
ports on the m-32 and stores the result in the BASIC variable DATIN.


Analog I/O Boards
Analog output boards (MAO-8) use one MetraBus I/O address per channel. Setting the
Address Pointer to the appropriate address and writing data to the DATAIO will produce an
analog output. The following example shows how to set the address pointer and output a
voltage.
lODATA = 768 'Declare Data I/O Location
20ADRPTR = 769 'Declare Address Pointer Location
30MRESET = 770 'Declare MetraBus RESET Location
4OMAO8 = 8 'Declare MAO-8 Board Address
5OOUT ADRPTR, MAO8 'Point to HAO-8 at Address 8
6OOUT DATAIO, 255 'Output Pull Range Voltage
7OOUT DATAIO, 0 'Start A/D Conversion
8OOUT ADRPTR, MA116 'Select the MSB's address


Lines 10 through 40 declare the locations of the MetiaBus DATAIO, ADRPTR, and the
MRXSET functions, as well as declare the MAO-8 board address. Line 50 sets the address
pointer to channel 0 of the MAO-8 board. Line 60 outputs the highest voltage possible for its
selected range.

Analog Input boards (MAI-16) require additional steps, however, in order to set the gain and
resolution for the desired channel prior to taking data. Assume an MAI- board has been set
at Board Address 8.

lODATA = 768 'Declare Data I/O Location
20ADRPTR = 769 'Declare Address Pointer Location
30MRESET = 770 'Declare MetraBus RESET Location
35MAI16 = 8 'Declare MAI- Board Address
4OOUT ADRPTR, KAI16+2'Point to 8-bit A/D resolution
SOOUT DATIO,18 'Set gain to + 5 V range on channel 2
6OCUT ADRPTR, MAI16+1'Point to result of conversion
90AIN = INP(DATAI0) 'Return result to computer


Lines 10 through 35 declare the locations of the MetraBus DATAIO, ADRPTR, and the
MXESET functions, as well as declare the MN-16 board address.

Line 40 selects the gain/channel selection mode for the board at address 8 (see MN-16
description for full explanation).


2A-a METRABUS USER MANUAL
Line 50 sets the gain to + 5V full scale range on channel 2.

Line 60 points to the B-bit conversion mode for the board and channel previously selected.

Line 70 starts the A/D conversion process.

Line 80 points to the results of the A/D conversion.

Line 90 returns the result to the computer and stores the data in the variable AJN.




THE CONTROLLER BOARDS MDB-64 DRIVER BOARD 2A-9