Keithley Metrabus User Manual

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:OO p.m. (EST)
Fax: (440) 248-6168
httD://www.keithlev.com
Revision F - July, 1994
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, h4A 02780
TEL 508/880-3000 * FAX 5081880-0179
Contents
CHAPTER 1
i::
- INTRODUCTION General Overview.
The MetraBus Cable
..................................
..................................
MetraBus Boards
::: 2
1:7
Mounting & Connection.
MetraBus Addressing
Programming
Additional Notes
............................ : : : : : : : : : : : : : : : : : : : II-3
.................................
.....................................
....................................
CHAPTER 2 - THE CONTROLLER BOARDS
Part 2A: MDB-64 Driver Board
2A.1 2A.2 2A.3 2A.4 2A.5 2A.6 2A.7 2A.8
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . : I??-;
Features
Specificat’ions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : . 2A-2
Setting The Base Address Switch . . . . . . . . . . . . . . . . . . . . . . . . . . 2A-2
Installing The MDB-64 Fuse (Fi) . . . . . . . . . . . . . . . . . . . . . . . . . . 2A-3
Installing The MDB-64 Driver Card
The MDB-64 MetraBus Connector. : : : : : : : : : : : : : : : : : : : : : : : : . 2A-4
Programming The MDB-64. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2A-4
Part 2B: MID-64 Driver Board
28.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , . . . . . . . . .28-l
2B.2
28.3
Features
Specificat’ions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : .2B-2
Setting The Base Address Switch . . . . . _ . . . . . .
z-i 2B:6 2B.7 2B.8
Use 0-t The Auxiliary Supply . . . . . . . . . . . . . . . : : : : : : : : : : : : . . .2B-3
Installing The Mid-64 Drier Card . . . , . . . . . . . . . . . . . . . . . . . . . . 28-3
The MID-64 MetraBus Connector . . . , . . . . . . . . . . . . . , , . . . . . . . 2B-4
Programming The MID-64 . . . . . . . . . . . . . . . . . . . . . . . . , . . . . . 2B-5
,1-l
l-l 1-2
.I-4 .I-4
l-6
. 2A-3
. 2B-2
. . 2B-2
Part 2C: pCMDB-64 Driver Board
2c.1 General 2c.2 2C.3 2C.4 2c.5
Specifications 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Use Of An Auxiliary Power Supply. . . . .
System Configuration. . . . . . . . , . ; .
Programming . . . . . . . . . . . . . . . .
1 1 1 1 1 1 1 1 1
1 1 1
. . . . . . . . .
. . .
. . . . . . . . .
. . .
. . . . . . . . .
. . .
1 1 1 1 1 1
. . . . . .
. . . . . .
. . , . . .
1 1 . . .2C-2 . . .2C-2 . . .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 2D.6 2D.7
2D.8
Connectors’ : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : . * 2D-5
Use of An Auxiliary Power Supply . . . . . . . . . . . . . . . . . . . . . . . . : : zLD-77
Installation Of The REM-64. . . . . .
Programming The REM-64 To Control ‘M’etraBus : : : : : : : : : : : : : : : : . . 2D-8
. . .
- Ill -
.2c-1 .2C-1
Contents
CHAPTER
3
- THE POWER SUPPLY
Part 3A: PWR-ZVPWR-100 Boards
3A.1
3A.2 3A.4
3A.3 3A.5
3A.6
General, , . . . . .
Features Specifications’ : : 1 1 1 1 1 1 1 1
Installing The PWR-55/PWR-100 Use of Other Power
TheMTAP- . . . . Supplies . . . . . . .
Part 38: MBUS-PWR Boards
3B.1 3B.2 3B.3 3B.4 3B.5 3B.6
38.7
CHAPTER 4 -
General........................,.............:.
Features
Specifications’ 1 1 1 1 1 1 1 1 1 Installation . Use of Output Ground Jumper
The MATP-1
The MBUS-PWk ‘cbnnkdtdrs :
. . . . . .
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 . . . . . . . , . . . . . . . . . . . . . . . . . . . .
Configuring The MSS-16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . : : . 4-2
Installing The MDI-16
BOARDS
. . . . . . .
. .
.
.
. . .
. .
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
. . . . . .
. .
1 1 1
. . .
. . . 1 1 1
. .
. . . . . . . . . 3A-2
1 1 1 1 1 1 1 1 1 38-2 : : : : : : : : : 3B-3 : : : : : : : : : 3B-3
3A-1 3A-1 3A-2 3A-2
3A-3
3B-1 3B-2 3B-3 3B-3
;::
. 4-2
CHAPTER 5 -
THE RELAY BOARDS
Part 5A: MEM-8 Electromechanical Relay I/O System
5A.l 5A.2 5A.3 5A.4 5A.5 5A.6
Part
58: MEM-32/A
58.1 5B.2 5B.3 5B.4 5B.5 5B.6 5B.7 5B.8
General. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Specifications . . . . . . . . . , . . . . . . _ . . : ’ ’ ’ ’ * ’ . ’ ’ * *
Using An Auxiliary Power Supply Setting The MEM-8 Board Address : : : : : : : I- : : ’ * ’ . ’ . . ’ ’ ’ ’ ’ ’ * :
Programming The MEM-8 . . . . . . . . . . . . . . . : : : : : : : : : : : : : : . 5A-4
Use of Alternative Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5A-5
& MEM-32/W Electromechanical Relay System
General. . . . . . . . . . . . . . . . . . . .
Features Specifications’ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Using An Auxiliary Power Supply Setting The MEM-32 Board Address : : : :
Typical Output Connections . . . . _ . . . .
Programming The MEM-32 . . Using Compiled Or Assembled ian&&-%
_. . . . . . . . . . . . . . . . . . “I._
....................
....................
....................
....................
....................
....................
....................
....................
SA-1
!iA-3
SA-3 5A-3
5B-1 58-2 5B-2
E-33 58-4 5B-4 5B-7
- iv -
Contents
Part 5C: MSSR-32 Solid State Switching I/O Module
5C.l 5c.2
E-i 5c:5 5C.6
Part 5D: MCPT-8X8 Cross-Point, Matrix Relay Board
5D.l
5D.2 5D.3 5D.4 5D.5 5D.6 5D.7
CHAPTER 6 - THE LOGIC LEVEL l/O BOARDS
Part 6A: MIO-32 Isolated Digital Output Board
6A.l 6A.2 6A.3 6A.4 6A.5 6A.6 6A.7 6A.8
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SC-1
Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SC-2
Specifications
Use Of An AuxkySuppiy: : : : : : : : : : : : : : : : : : : : : : : : : : : : . .5C-2
Configuring The MSSR-32 . . . . , . . . . .
Installing The MSSR-32 . . . . . . . . . . . : : : : : : : : : : : : : : : : : : : : 5C-3
General 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
Use Of An Auxrlrary Power Supply. . . . . . . . . . . . . . . . . . . . . . . . . .5D-3
Jumpers And Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5D-3
Resistor Termination Networks. . Installing The MCPT-8X8. , . . . : : : : : : : : : : : : : : : : : : : : : : : : : : 5D-4
Programming The MCPT-8X8 . . . . . . . . . . . . . . . . . . . . . . . . . . . .5D-4
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6A-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 Using An Auxiliary Power Supply
Installing The MIO-32. . . . . . . : : :
Typical Output Connections
Programming TheMIO-32 . : : : : : : : : : : : : : : : : : : : : : : : : : : : : .
Using Compiled Or Assembled Languages . . . . . . . . . . . . . . . . . . . . . 6A-7
. . SC-2
5c-3
. .5D-1 . .5D-2
5D-4
. 6A-2 . 6A-2
6A-3
:
: : : : : : : : : : : : : : : : : : : : : : 6A-3
. 6A-4
6A-5
Part 6B: MII-32 Isolated Digital Input Board
6B.1 6B.2
68.3 6B.4 6B.5 6B.6 6B.7 6B.8 6B.9
General
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
Using An Auxiliary Power Supply Installing The MI!-32
...
.... : : : : : : : : : : : : : : : : : : : : : : : : :
Configuring The Mll-32 For Non-standard Inputs Typical Input Connections
Programming The Mll-32. : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Using Compiled Or Assembled Languages
..................
.....................
6B-1 6B-2 6B-2 6B-3
:
68-3 654 6B-4
:
6B-5 6B-7
-V-
Contents
CHAPTER 7 - MCN-8 COUNTER/TIMER BOARD
;:: 2 T-56
7:7
7.8
7.9
CHAPTER 8 - THE ANALOG I/O BOARDS
Part 8A: MAO-8 Analog Output Board
8A.l 8A.2 8A.3 8A.4 8A.5 8A.6 8A.7 8A.8
Part 88: MAO-12 Analog Output Board
8B.l General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8B-1
8B.2 Features
8B.3 Specifications : : : 1 : : 1 : : : : : : : : : : : : : : : : : : : : : : : : : : : : . 8B-2
8B.4 8B.5
8B.6 Programming The MAO-1 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8B-5
General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
Features Specification’s* * : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 : : : . . 7-2
Use Of An Auxiliary Supply . . , . . . . . . . . . . . . . . . . . . . . . . . . . . , 7-3
Installing The MCN-8 Cascading The MCN-8’Coun’ters : : : : : : : : : : : : : : : : : : : : : : : : : : . 7-4
Typical Input Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Programming The MCN-8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7
Using Compiled Or Assembled Languages . . . . . . . . . . . . . . . . . . . . . 7-8
General.
Features
Specificatiork’.~ : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 : : : : : . 8A-2
Use Of An Auxrlrary Power Supply Installing The MAO-8
ProgrammingTheMAd-~:::::::::::::::::::::::::::: Calibration And Adjustment Of The MAO-8
Serviceable Parts ..... .. ..
Use Of An Auxiliary Power Supply . . . . . . . . . . . . . . . , . . . . . . , . . 88-3
Installing The MAO-1 2 , . . . . . . . . . . , . . . . . . . . . , . . . . . . . . . . 8B-3
.......................................
.......................
......................
......................
. . 7-2
. 7-3
$A-1
. 8A-2
: : 883-z . . 8A:6
.;;;; ;
. 8B-2
Part 8C: MAI- Analog Input Board
8C.l General. . . .
8C.2
8C.3 8C.4 8C.5
8C.6 Typical Input Connections . . . . . . . s . , . . . . . . . . . . . .
8C.7 8C.8
8C.9 E4 :
8C:12
SC.13 Gain Selection Via Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8C-7
8C.14 3
Features . . . : : : : : : : : : : : : : : : : : : 1 : : : : : : : : : : : : : : : : : 8C-2
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8C-2
Using An Auxiliary Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . 8C-3
Installing The MAI-I 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8C-3
Input Signal Attenuation . . . . . . . . . . . . . . . . . , . . . . . : : : : : : : i 883-z
Measuring Signals Greater Than +I 0 VDC . . . . . . . . . . . . . . . . . .
Measuring Signals Smaller Than +I .25 VDC . . . . . . . . . . . . . . . . . : : . 8&
Measuring Current With The MAI- 6 . . . . . . . . . . . . . . . . . . . . . . . . 8C-6
Auto Convert Mode Of Operation . . . . , . . . . . . . . . . . : . . . . . . . . . 8C-6
A/D Resolution Via Hardware . . . , . . . . , . . . . . . , . . . . . . . . , . . . 8C-7
Programming The MAI- 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , 8C-8
Using Compiled Or Assembled Languages Calibration Procedure For MAI- . , . . . : : : : : : : : : : : : : : : : : : : : 8C-13
- vi-
8C-1
8C-4
8C-12
Contents
Part 8D: MTHERM-20 Thermocouple Input Board
8D.l 8D.2 8D.3 8D.4 8D.5 8D.6
8D.7
8D.8
CHAPTER 9 - THE UTILITY BOARDS
Part 9A: MBB-32 Prototype/Breadboard
9A.1 General . . . , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9A-1
9A.2 9A.3 9A.4 Installing The MBB-32 9A.5 9A.6 9A.7 9A.8
Part 9B: MDG-1 Diagnostic Board
9B.1
98.2
98.3 9B.4
General General
Functional bescnptidn’ 1 : : : : : : : 1 : : : : : : : : : : : : : : : : : : : : : : Functional bescnptidn’ 1 : :
Features 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 Specifications 1 1 1 1 1 1 1 1 Installing The MTHERM-20.
Installing The MTHERM-20. . . . . . . . . . . . . .
Programming The MTHERM-20
Programming The MTHERM-20 .
Other Memory Locations . . . . . . . . . . . . . . . . . . . . . . . . . . _ . . . Other Memory Locations
Calibration Procedure. . . . . . . . . . . . . . . . . . . . . , . . . . . . . . . . Calibration Procedure.
Features . . , . . . . . . . . . . . . .
Specifications . . . . . . . . . . . . . : : : : : : : : : : : : : : : : : : : : : : : : 9A-2
MBB-32 l/O Connections : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9A-3 The Read/Write
Programming The MBB-32. . . .
Possible Uses For The MBB-32 . : : : : : : : : : : : : : : : : : : : : : : : : : : 9A-6
General . . . . . . . . . . . . . . . . . . . , . . . . . . . . . . . . . . . . . . . . ;JI;
Features. . . . . . . . . . . . . . . .
Installing The MDG-1 . _ , . . . . . . : : : : : : : : : : : : : : : : : : : : : : : : 98-2
Example Program. . . . . . . . . . . . ~ . . . . . . . . . . . . . . . . . . . . . .9B-2
Status Lines. . . . . . . . . . . . . . . . . . . . , . . . . . . . .
. . .
. . . .
:
: : : : 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-1 . 8D-2 . 8D-2 , 8D-2 _ 8D-3
: FE
8D-;o
9A-2 9A-2 9A-3
9A-4
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:
1.2
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
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
-
-
r
CONTROL j WSTRB
ADDRESS x-2
BUS
! i
co
c?
-
c2
07
CLEAR
R/W
AO
­A:
A3
K-4
A5
BUSY
­+15 v
-
15 v
+5 ‘d
POWER
+-5 v t5 v +5 v 15 v
-
1 3 5 7 9 10
11 13 14 15 16 17
13 20 21 22 23 25 26 27 29 30 3: 33 34 35 36 37 38 39 41 43 45 47 48 49 50
12
18
24
28
32
40 42 44 46
7
GND.
2
4
GND. GND.
6 8
GND. GND. GND. GND. GND. GND. GND. GND. GND. GND. GND. GND. GND. GND. GND. GND. GND.
+5 v
+5 v
+5 v i5 v
-i5 v
POWE?
I
l-2
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
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:
l
MCPT-8X8: Cross-point relay board
l
MTHERM-20: 20-channel thermocouple
l
MTAP-1: Power supply tap board
32-channel,
solid-state reIay 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
BASICA
l
Microsoft PASCAL
l
Assembly
l
GWBASIC
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 20ADRPTR = 769 30MRESET = 770
4OOU-T ADRJ?TR, 01
‘Declare MetraBus data I/O path 'Declare address pointer location 'MetraBus reset location '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.
l-4
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.
OTJT ADRPTR,Ol 'Set address to 1
40 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:
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 5OOUT DATAIO, 44
REM-64 co
mmands are writes to a COMl or COM2 serial port. The REM-64 has an on-board
m&!roprccessor which interprets
‘Set address pointer to #l ‘Write data 44 to board #l
co
mmands 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
30
PRINT #l, "W" ; 44 ‘Write data “44” to I/O board #l
'Set address pointer to MetraBus address 4
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
I
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.
.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
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
,
COMPUTER
EXPANSION
BUS
L-------------------------_--_-______---------------,
MDB-64 DRIVER BOARD
MFI’RABUS
ADDRESS
DECODE - AND
LOGIC
BASE
AOORESS
SWITCH
TIMING
CONTROL - DRIVER/ -
SIGNAL
LOGIC
METRABUS
CABLE
RECEIVER I
Part 2A
I I
I I
I I I
I I
I
METRABUS
CABLE
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.
Figure 2A-1. MDB-64 Functional Block Diagram
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:
MetraBus connector:
Power required:
50 conductor ribbon cable 3M 3425-4050
-+ 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. for 768 (3OOh), as shown in Figure 2A-2.
-2
The MDB-64 base address switch is preset by the factory
ADDRESS
ADDRESS UNE VALUES:
LINE DECIWL HEX
512
200
256 100
Figure ZA-2. Defautt Base Address Switch SettiRgs.
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
2A-2 METRABUS USER MANUAL
Switch settings indicate o voluc o!
512 i 256 = 768 Dccimoi
(768 decimal, 300h)
followed by [Enter]. When the program asks for the desired
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). 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.
In this case, Fuse Fl must be removed.
2A.6 INSTALLING THE MDB-64 DRIVER CARD
1. Unplug your computer. Remove the cover of your computer and select any empty expansion slot. Remove the
2. 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.
Make certain that the base address switch is properly set and fuse Fl is installed/removed
3. (as needed).
Lnsert the MDB-64 into a PC expansion slot. If needed, straighten the locking tabs on the
4. ends of the connector prior to insertion.
Once the board is in place, plug the MeiraBus cable into the MDB-64. Make sure the
5. 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.
Secure the MDB-64 backplate to the computer frame with a screw and replace the
6. 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.
DATA BUS
POWER
BUSY
+15 v
-15 v +5 v +5 v +5 v +5 v
L t5v
1
3 5 6 7
9 10 1 1 13 15 16 17 19 20
21 22 23 24 25 26 27 28 29 31 33 35 36 37 39 40 41 43
45 46 47 48 49 50
12 14
18
30 32 34
38
42 44
GND.
2 4
GND. GND. GND.
8
GND. GND. GND. GND. GND. GND. GND. GND. GND. GND. GND. GND.
GND. GND. GND. GND. +5 v i-5 v +5 v
-1-5 v i-5 v
POWER
2A-4
Figure ZA-3. MetraBus Connector Pinouts
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
(Decimal)
Base Address +-Oh Base Address +lh Base Address +2h Base Address +3 h
768 Data I/O path (DATAIO) 769
‘770 Software reset (PRESET)
771 Unassigne4l
Address pointer (ADRPTR)
Function
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 use. All references to the above locations assume a base address of 768 decimal
The Address Pointer
(ADRPTR)
functions
in order of typical programming
(300h).
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
in order to identify it from other boards in the MeiraBus system.
have
a unique, non-overlapping board address
(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
2QDATAIO = 76% 30MRELSET = 770 4OMBf8 = 12
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
'Declare address pointer location 'Declare data I/O location 'Declare HetraBus RESET location ‘Declare m-8 board address
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 The MDB-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
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. See the 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
data from the MetraBus I/O board previously targeted by
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.
DATA10 = 768
10
ADRPTR = 769
20
MRESET = 770
30
MA116 = 8
40
OUT MRESET, 00
50 60 START = TIMR
IF (TIKER - START) <
70
IF (INPUDRPTR) AND 192)
80 90 OUT ADRPTR, HAI16+2
IF (INP(ADFU?TR) AND 192)
100
OUT DATAIO, 18
110
IF (INP(ADRPTR) AND 192)
120 130 OUT ADRPTR, HAI16+1 140 IF (INP(ADRPTR) AND 192) THEN 140 150 AIN = INP(DATAI0)
.02 THEN 70
THEN 80 THEN 100 THEN 120
'Declare I/O location 'Declare address pointer location 'Declafe MetraBus RESET location 'Declare MAI- board address
'Input Time 'Wait 20 ms 'Check status 'Point to 'Check status 'Set gain to +5 V range on than 2 'Check status 'Point to result of conversion 'Check status 'Return result to computer
g-bit
A/D resolution
Programming The MDB-64 To Control The l/O Boards
As described above, the three MDB-64 I/O locations have quite distinct 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
functions.
Their order
Digital I/O boards are the easiest to control. Data can be written to DATAIO 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 20ADRPTR = 769 3OMRESET = 770 40MI032 = 0 'Declare MIO-32 board address
5OOUT
ADRPTR, MI032
6OOUT DATAIO, 255
Lines 10 through 40 declare the locations of the MetraBus DATAIO, ADRF’TR, and 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
'Declare data
'Declare
address pointer location
I/O
location
'Declare MetraBus REXXT location
'Point to MIO-32
at
address 0
'Output bit pattern 1111 1111
MDB-64 DRIVER BOARD
soon
after
the
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 20ADRPTR = 769 30MRESET = 770 4OMAO8 = 8 5OOUT ADRPTR, MAO8 6OOUT DATAIO, 255 7OOUT DATAIO, 0 8OOUT ADRPTR, MA116
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.
'Declare Data I/O Location 'Declare Address Pointer Location 'Declare MetraBus RESET Location 'Declare MAO-8 Board Address 'Point to HAO-8 at Address 8 'Output Pull Range Voltage 'Start A/D Conversion 'Select the MSB's address
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 35MAI16 = 8
4OOUT ADRPTR, KAI16+2'Point to 8-bit A/D resolution
SOOUT DATIO,18 'Set gain to + 5 V 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
'Declare MetraBus RESET Location 'Declare MAI- Board Address
range
on channel 2
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
cl
P
2A-10 METRABUS USER MANUAL
Chapter 2: The Controller Boards
2B.l GENERAL
Part 2B
MID-64 DRIVER BOARD
The MID-64 driver board optically isolates the computer bus from acquisition and control computer and MetraBus I/O boards within your
system.
The MID-64 supervises all I/O operations between the
system.
All necessary control signals are
the
MetraBus data
generated within the MID-64, so you don’t have to worry about system level data transfer. Because of its design, a single MID-64 is capable of addressing up to 64 MetraBus I/O boards. The MID-64 contains an on-board, programmable counter/timer capable of periodic
system
interrupt generation. This allows the MetraBus operation in a foreground/background mode emulating many common multitasking environments. A functional block diagram of the MlD-64 is provided in Figure 2B-1.
r--------------------------------------------------------------------~
METfZABUS
COMPUTER :
EXPANSION -
BUS
PC
I BUS -
ADDRESS OECOOE -
LOGIC
BASE
ADDRESS
WITCH
TIMING MEmABuS !
AND
CONTROL - ISOLAlORS DRIER/ ?-+ CABLE
SIGNAL RECEIVER 1 LOGIC
CABLE Mmus
Figure 2B-1. MID-64 Functional Block Diagram
When installed, a 50-pin connector extends out the rear of the computer and connects to the
MetraBus cable. Functionally, the 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 increase system noise immunity. The MID-64 has been designed to allow MetraBus cable lengths of up to loo feet.
The MetraBus industrial data acquisition and control interface, in conjunction with your present computer, allows higher speed, greater accuracy, and total autonomous operation to previously slow, troublesome, applications.
THE CONTROLLER BOARDS
MID-64 DRIVER BOARD
2B-1
2B.2 FEATURES
l
Connects with IBM PC/XT, PC AT, or other bus compatible computers.
l
Allows placement of MetraBus I/O at up to 100 feet from the PC.
l
Full optical isolation to 500 Volts.
l
Fully compatible with software written for the MDB-64 driver board.
l
Interrupt generation capability.
l
Controls up to 512 digital I/O lines.
l
Controls up to 256 (8 or 12-bit) A/D.
l
Controls of 64 @-bit) DACs.
l
Controls up to 64 counter/timers.
l
Extremely cost effective.
l
Adapts to your changing requirements.
28.3 SPECIFICATIONS
Number of Addressable MetraBus
64
Ports:
2B.4
Maximum MetraBus Data TrmR;yz
80 kbytes/s
Maximum Drivable Cable Length: 100 feet at full speed
200 feet at reduced speed
+ 5
Power Required:
PC to MetraBus Isolation:
V: 250 mA typical, 325 rnA maximum
500 volts (minimum)
SETTING THE BASE ADDRESS SWITCH
The MID-64 uses four consecutive locations in the PC I/O address space. This address space
extends from decimal 512 to 1023. The MID-64 Base Address Switch is preset by the factory for 768 (3OOh), as shown in Figure 2A-2.
ADDRESS
LINE
qs iedicote 0 value o!
i 256 = 766 Decimal
or
+ iOD = 300 Hex
Figure 2B-2. Default Base Address Switch Settings.
2B-2 METRABUS USER MANUAL
(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: may cause erratic operation or PC system failure.
To run the INSTALL.EXE program, change to the appropriate directory and at the DOS
prompt, and type INSTALL followed by [Enter]. When the program asks for the desired
base address, enter the new base address in decimal and press [Enter]. The program will
round your address to the nearest 4-bit boundary and check 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 also generates a file named MBUSADR containing the newly selected base address switch settings. The address in the file &!fHJS.ADR may then be read by application programs as an alternative to redefining the MID-64 address in every program. The following short BASIC program shows how to obtain the address from the MBUS.ADR file.
1OOPKN "MBUS.ADR" FOR INPUT AS #1
20 INPUT #l,BASADR
30PRINT BASADR
40
CLOSE #l
The base address location is returned to the variable BASADR for use by your application program.
Setting the base Aadress to a location used by another device
2B.5 USE OF THE AUXILIARY POWER SUPPLY
An auxiliary power supply such as the MBUS-Pm is required for operation of the MID-64, since it does not distribute power from the computer’s supply. See the chapters of this manual dealing with the MBUS-PWR for specifications and installation instructions.
2B.6 INSTALLING THE MID-64 DRIVER CARD
1. Unplug your computer.
2. Remove the cover of your computer and select any empty expansion slot. Remove the back-plate from the selected slot.
3. Make certain that the base address switch is properly set.
4. Insert the MID-64 into the expansion slot. It may help to straighten the locking tabs on the ends of the connector prior to insertion.
THE CONTROLLER BOARDS MID-64 DRIVER BOARD 28-3
5. Once the board has been inserted, plug the MetraBus cable into the MID-64. Make sure that 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 MID-64 back-plate to the computer frame with a screw and replace the computer cover.
NOTE:
The MID-64 is shipped with two resistor nehvorks. 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.
2B.7 THE MID-64 METRABUS CONNECTOR
The MID-64 passes information to and receives data from the MetraBus I/O boards via the MetraBus cable. Figure 2B-3 shows the physical and functional layout of this cable.
The
+15
NOTE: conjunction with an external power supply such as the MBUS-PWR.
DATA m BUS
CONTROL
ADDRESS /
BUS
POWER +5 v
VDC pins are active only when the MID-64 is used in
r
L
C
r
i
r
i
m
D-1
m
m iz
tie
m
CLEAR
WSTRB
%
-iii
A2 23
XT
A5
BUSY
+I5 v
-15 v i5 v
+.5 v +5 v +5 v
1 3 5 7 9 IO
1 1 13 14 15 17
19 2 1 22 23 25 26 27 28 29 30 31 33 34 35 37 39 40 4’1 43 44 45 47 49
12
16 18 20
24
32
36
38
42
46 48 50
2 4 6
8
GND. GND. GND. GND. GND. GND. GND. GND. GND. GND. GND.
GND. GND. GND. GND.
GND.
GND. GN3. GN3. GND. +5 v +5 v +5 v +5 v +5 v
These
POWER
I
28-4
Figure 28-3. The MetraBus Connector
METRABUS USER MANUAL
2B.8 PROGRAMMING THE MID-64
As mentioned earlier, the PC has I/O address locations for such things as disk drives,
printers, serial ports, and other peripherals. The MID-64 base address is located within this
I/O space. The eight MID-64 locations and their associated functions are as follows:
LOCATION
I/O ADDRESS
(DecimaI)
Base Address +Oh Base Address +lh Base Address
+2h
Base Address +3h Base -4~Uress 4h
Base Address +5h Base Address +6h Base Address +7h
768 769 770 771 772 773 774 775
NOTE: Most applications do not require counter/timer interrupt implementation.
For those that do, a short section is included in this manual. The discussion below will deal with the majority of applications and wiIl, for the moment, ignore interrupt implementation.
There are three important address locations:
Address pointer (ADRF’TR)
Data I/O path (DATAIO) Software reset (MRESET)
Function
Data I/O pPath (DATAIO)
Address pPointer (ADRXR)
Software rReset (MRESET)
Unassigned
counter 0 (COUNTO)
Counter 1 (COTJNTI)
Unassigned
Counter cContro1 (CNTCTRL)
The following sections discuss address location functionality in order of typical programming use. All references to the above locations will assume a base address of decimal 768. For the sake of clarity, all references to specific address locations will use the variable names DATAIO, ADRPTR, and MRESET as specified in the table above. Normally, variable
assignments are made at the beginning of your application program, as follows: 1ODATAIO = 768 'Declare Data I/O Location
20ADRPTR = 769 ‘Declare Address Pointer Location
30MRESET = 770
The Address Pointer (ADRPTR)
The function of the MID-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 MetraBus system. (Refer to the section “Setting
the Board Address” for the relevant I/O board.) Writing the Board Address to ADRPTR 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 INP and OUT control the read and write functions respectively. It should be noted that while the examples are written using BASIC, many computer languages supporting data I/O operations may be used. Refer to the programming manual for the
THE CONTROLLER BOARDS
‘Declare RELSET Location
MID-64 DRIVER BOARD
28-5
language that you are using for the correct syntax. The following example illustrates how to set ADRF’TR to address 12 for a MEM-8 board:
10 ADRPTR = 769 20DATAI0 = 768
30MRESET = 770
40MEMB = 22 ‘Declare MEN-8 board address
50
OUT ADRPTR, KEN8
'Declare address pointer location 'Declare data I/O location 'Declare MetraBus RESET location
'Point to MELM-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 microseconds. Since this address is latched on the MID-&, it can be read
back using the BASIC INF’ command, for example:
60
ADDRESS = INPCADRPTR)
The BASIC variable ADDRESS contains the address of the MetraBus I/O board currently
targeted. If the above INP co
mmand is issued soon after the previous OUT command, the
ADDRESS variable would contain a value of 12. Reading the address pointer returns 6 bits of
address information and two bits of status information (R/W and BUSY), as follows:
Address Byte
BIT D7 D6 D5 D4
BUSY Pu’W A5
A4
D3 D2 Dl
A3
A2 Al A0
DO
NOTE: The driver board inverts the polarity of the actual
signals.
bus control
Normally, the BUSY and R/W status bits will be low (non-zero>. When this is true, the data returned is identical to the contents of the address bus. See Programming The MID-64 To
Control The I/O Boards for an example and an expknation of how to monitor the status bits.
The Data I/O Register (DATA/O)
Once the address pointer has been set, data may be written to and read from a targeted
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:
7OOUT DATAIO, 128
This command outputs a value of 128 which might activate a relay on the The actual functions that it specifies is dependent on the board accessed.
Data
can be read from the
80DAT
= INP (DATAIO)
Data I/O with a single lNP con-man
d, as follows:
The BASIC variable DAT wiIl contain data from the MetraBus I/O board previously targeted by the ADRM’R. All MetraBus output boards latch data sent to them and therefore, have data
MEM-8
relay
board.
2B-6 METRABUS USER MANUAL
Loading...
+ 170 hidden pages