B&B Electronics 232OPSDA User Manual

Size:
143.29 Kb
Download

Not Recommended for New Installations.

Please contact Technical Support for more information.

Optically Isolated Serial

Data Acquisition Module

232OPSDA Module

Documentation Number 232OPSDA1397

This product

Designed and Manufactured

In Ottawa, Illinois

USA

of domestic and imported parts by

B&B Electronics Mfg. Co. Inc.

707 Dayton Road --P.O. Box 1040--Ottawa, IL 61350 PH (815)433-5100--FAX (815)433-5105

Internet: http://www.bb-elec.com orders@bb-elec.com support@bb.elec.com

Copyright © 1997 by B&B Electronics Mfg. Co. All rights reserved.

Documentation Number 232OPSDA1397 Manual

Cover Page

B&B Electronics --PO Box 1040--Ottawa, IL 61350

 

PH (815) 433-5100--FAX (815)433-5105

 

TABLE OF CONTENTS

 

CHAPTER 1: INTRODUCTION ...........................................................

1

232OPSDA FEATURES ...........................................................................

1

PACKING LIST .........................................................................................

2

SOFTWARE INSTALLATION ......................................................................

3

232OPSDA SPECIFICATIONS ..................................................................

3

Analog to Digital Converter ..............................................................

3

Digital Input.......................................................................................

4

Digital Output ....................................................................................

4

Power Supply .....................................................................................

4

Communications ................................................................................

4

CHAPTER 2: CONNECTIONS .............................................................

5

A/D CONNECTIONS.................................................................................

5

DIGITAL I/O CONNECTIONS.....................................................................

7

Digital Input.......................................................................................

7

Digital Output ....................................................................................

7

SERIAL PORT CONNECTIONS ...................................................................

7

POWER SUPPLY CONNECTIONS ...............................................................

9

CHAPTER 3: COMMANDS ................................................................

11

SYNTAX ................................................................................................

12

READING A/D CHANNELS COMMAND...................................................

13

READING DIGITAL I/O COMMAND ........................................................

14

SET DIGITAL OUTPUT COMMAND .........................................................

14

CHAPTER 4: A/D..................................................................................

15

SAMPLING RATE ...................................................................................

15

A/D CONVERTER RANGE ......................................................................

15

Non-buffered0 to 5VDC A/D Inputs................................................

15

Buffered 0 to 5V A/D Inputs.............................................................

15

0 to 10VDC A/D Input......................................................................

16

4-20mACurrent Loop A/D Input .....................................................

16

CHAPTER 5: SOFTWARE ..................................................................

19

APPLICATION PROGRAM INTERFACE .....................................................

19

B232OPSDA_ReadAnalog...............................................................

19

B232OPSDA_ReadDigital...............................................................

20

B232OPSDA_SetDigitalOutput .......................................................

21

deinitComPort..................................................................................

21

initComPort......................................................................................

21

LOW-LEVEL COMMUNICATIONS............................................................

22

Read A/D Command ........................................................................

23

Read Digital I/O Command .............................................................

24

Set Digital Output State ...................................................................

26

Documentation Number 232OPSDA1397 Manual Table of Contents i

B&B Electronics --PO Box 1040--Ottawa, IL 61350

PH (815) 433-5100--FAX (815)433-5105

APPENDIX A: DEC TO HEX TO ASCII CONVERSION..........

A-27

APPENDIX B: 232OPSDA SCHEMATIC & BOARD .................

B-29

ii Table of Contents Documentation Number 232OPSDA1397 Manual

B&B Electronics --PO Box 1040--Ottawa, IL 61350

PH (815) 433-5100--FAX (815)433-5105

Chapter 1: Introduction

232OPSDA Features

The 232OPSDA is an optically isolated data acquisition module that is connected to your computer’s RS-232serial port. It provides 2500V of optical isolation protection between the I/O andRS-232side of the module. The 232OPSDA offers six channels of12-bitA/D, one digital input, and one digital output. The six A/D input channels can be used for a number of applications. One A/D channel can read a4-20mAanalog current, two buffered channels read voltages between 0 and 5V, twonon-bufferedchannels read voltages between 0 and 5V, and one channel can read voltages between 0 and 10V.

The 232OPSDA connects to your computer’s RS-232serial port through aDB-25S(female) connector. The module automatically detects baud rates from 1,200 to 9,600. A data format of 8 data bits, 1 stop bit, and no parity is used.

The RS-232side of the 232OPSDA is port powered. Power is drawn from RTS and DTR regardless of whether they are asserted HIGH or LOW. In addition, an isolated external power supply is required to power the I/O side of the module. Bothport-poweringand the external power supply are required. The 232OPSDA requires a power supply that produces9-16VDC@ 10mA (not including power consumption of external devices).

Figure 1.1: 232OPSDA Module

Documentation Number 232OPSDA1397 Manual

1

B&B Electronics --PO Box 1040--Ottawa, IL 61350

PH (815) 433-5100--FAX (815)433-5105

Terminal Blocks

TB 7

TB 6

Digital I/O

Digital Input

 

 

 

Digital Output

 

Optical Isolation

Microprocessor

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Serial Port

DB-25S

TB 4

A/D Converter

 

A/D 4

 

 

 

 

 

 

 

 

 

TB 5

A/D 5

0

1

2

3

 

A/D

A/D

A/D

A/D

 

Analog Inputs

 

 

 

 

 

 

 

 

 

 

 

RS-232

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Tranceiver

 

 

 

 

 

 

 

 

 

 

TB 0

A/D 0

A/D0

A/D1

A/D2

A/D3

 

TB 1

A/D 1

 

 

Signal

 

 

 

 

 

 

 

 

 

 

TB 2

A/D 2

Conditioning

 

TB 3

A/D 3

 

 

Circuitry

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 1.2: General Block Diagram

Packing List

TD

RD

Examine the shipping carton and the contents for physical damage. The following items should be in the shipping carton:

1.232OPSDA module

2.One 232OPSDA 3.5” disk

3.This instruction manual

If any of these items are missing or damaged, contact B&B Electronics immediately.

2 Documentation Number 232OPSDA1397 Manual

B&B Electronics --PO Box 1040--Ottawa, IL 61350

PH (815) 433-5100--FAX (815)433-5105

Software Installation

The 232OPSDA comes with several a demonstration program. To install these programs on your hard drive:

1.Place the disk in drive A.

2.Type A: and press the<ENTER> key.

3.Type INSTALL and press the<ENTER> key.

4.Follow the instructions given by the program.

The file, READ.ME, contains corrections and additions to the printed user’s manual. The file, FILES.LST, contains a list and description of the files installed on the hard drive. The file, HISTORY.LST, contains a historic description of the 232OPSDA.

232OPSDA Specifications

Analog to Digital Converter

 

Resolution:

12 bit

Channels:

6

A/D Connections:

Terminal Blocks

4-20mAchannel:

1

Input Resistance:

10Ω

Input Offset voltage:

1500µ V

Input Offset Voltage Drift:

0.5µ V/° C

Signal Conditioning Error:

±3% of output

0 to 5V Buffered Input Channels:

2

Input Resistance:

1TΩ

Input Offset voltage:

1500µ V

Input Offset Voltage Drift:

0.5µ V/° C

Signal Conditioning Error:

±1% of output

0 to 10V Input Channel:

1

Input Resistance:

200KΩ

Input Offset voltage:

1500µ V

Input Offset Voltage Drift:

0.5µ V/° C

Signal Conditioning Error:

±1% of output

0 to 5V Non-bufferedInput Channels:

2

Input Offset voltage:

1500µ V

Input Offset Voltage Drift:

0.5µ V/° C

Total Unadjusted Error:

±1.75LSB

Non-bufferedA/D input channels must be driven from a source impedance less than 1KΩ .

Documentation Number 232OPSDA1397 Manual

3

B&B Electronics --PO Box 1040--Ottawa, IL 61350

PH (815) 433-5100--FAX (815)433-5105

Digital Input

 

Channels:

1

Voltage Range:

-30VDCto +30VDC

Low Voltage:

-30VDCto 1.0VDC

High Voltage:

2.0VDC to 30VDC

Leakage Current:

1 A maximum

Digital Output

 

Channels:

1

Low Voltage:

0.6VDC @ 8.7mA

High Voltage:

4.3VDC @ -5.4mA

Power Supply

 

Input Voltage:

9-16VDC@ 10mA (Does not include the

 

power consumption of external devices.)

Connections:

Terminal Blocks

Communications

 

Standard:

RS-232(unit is DCE)

Baud Rate:

1,200 to 9,600 (automatic detection)

Format:

8 data bits, 1 stop bit, no parity

Isolation Protection:

2500V (Power supply not considered)

Port Power:

RTS and DTR (either state)

Connections:

DB-25S(female)

4 Documentation Number 232OPSDA1397 Manual

B&B Electronics --PO Box 1040--Ottawa, IL 61350

PH (815) 433-5100--FAX (815)433-5105

Chapter 2: Connections

This chapter will cover the connections required for the 232OPSDA. Four sets of connections are required: A/D converter, digital I/O, serial port, and power supply connections. Do not make any connections until you have read this chapter. If you do not use a particular type of connection, it is still important to read each section. Table 2.1 shows the terminal block assignments.

Table 2.1: Terminal Block Assignments

Terminal

Function

Description

Block

 

 

TB 0

A/D 0

4-20mACurrent Loop Input Channel*

TB 1

A/D 1

Buffered 0 to 5V A/D Channel**

TB 2

A/D 2

Buffered 0 to 5V A/D Channel

TB 3

A/D 3

0 to 10V A/D Channel

TB 4

A/D 4

Non-buffered0 to 5V A/D Channel

TB 5

A/D 5

Non-buffered0 to 5V A/D Channel

TB 6

Digital out

Digital Output

TB 7

Digital in

Digital Input

GND

GND

Ground

+12VDC

+12VDC

Power Supply Connection

*The current loop input uses a non-invertingamplifier that has a gain of 23.064. Space forthrough-holeresistors is provided to change the gain. By decreasing the gain, currents up to 100mA can be read with A/D 0.

**This A/D input uses a voltage follower circuit. Spaces for throughhole resistors are provided to convert the voltage follower into a noninverting amplifier with gain > 1.

A/D Connections

The A/D connections are made on the I/O port which consists of ten terminal blocks. Terminal Blocks 0-5are A/D channels0-5.These six A/D channels are referenced to GND (terminal block 8). The4-20mACurrent Loop A/D channel requires connections different from the other five channels, so two different diagrams are shown for required A/D connections. Figure 2.1 shows the connections required for the4-20mACurrent Loop channel (A/D 0), and Figure 2.2 shows the connections required for A/D channels 1- 5.

Documentation Number 232OPSDA1397 Manual

5

B&B Electronics --PO Box 1040--Ottawa, IL 61350

PH (815) 433-5100--FAX (815)433-5105

RS-232Port

232OPSDA

A/D0

A/D1

A/D2

A/D3

 

A/D4

A/D5

GND

 

 

 

 

 

 

 

 

 

 

TB0

TB1

 

TB2

TB3

TB4

TB5

 

TB8

 

 

 

 

 

 

 

 

 

 

Output

 

Input

4-20mA

4-20mACurrent

4-20mA

Current Loop

Loop

Current Loop

Transmitter

 

Receiver

Return

 

Out

Figure 2.1: Current Loop Channel Connections (A/D 0)

NOTE: When using the 4-20mACurrent Loop Input with the setup shown in Figure 2.1, A/D1-5cannot be used and should be connected to the terminal block labeled GND.

232OPSDA

A/D 1 A/D 2 A/D 3 A/D 4 A/D 5 A/D 0 GND

TB 1

TB 2

TB 3

TB 4

TB 5

TB 0

TB 8

0 to 5VDC Input

0 to 5VDC Input

0 to 10VDC Input

0 to 5VDC Input

0 to 5VDC Input

GND

Figure 2.2: Required Connections for A/D 1- A/D 5

6 Documentation Number 232OPSDA1397 Manual

B&B Electronics --PO Box 1040--Ottawa, IL 61350

PH (815) 433-5100--FAX (815)433-5105

Digital I/O Connections

The digital I/O connections are made on the I/O port, which consists of terminal blocks. Table 2.1 shows the terminal block assignments.

Digital Input

Terminal block 7 is the digital input line. This input is CMOS/TTL compatible and can handle voltage from -30VDCto 30VDC. If a digital input is from-30VDCto 1.0VDC, the state will be read as a “0” (LOW). If a digital input is from 2.0VDC to 30VDC, the state will be read as a “1” (HIGH). If the digital input is not used, it should be connected to GND. Figure 2.3 show the connections required for the digital input.

Digital Output

Terminal Block 6 is the digital output line. This line is CMOS/TTL compatible. When the digital output is set to “0” (LOW), the output voltage will be between 0 and 0.6VDC. When the digital output is set to “1” (HIGH), the output voltage will be between 4.3VDC to 5.0VDC. Figure 2.3 shows the connections required for the digital output.

232OPSDA

Digital Output

TB 6

TB 7

Digital Input

 

TB 8

GND

 

 

 

0 to 5VDC Output

-30VDCto 30VDC Inpu

To Device GND

Figure 2.3: Digital I/O Required Connections

Serial Port Connections

In order to communicate with the 232OPSDA module it must be connected to an RS-232serial port. The unit automatically detects baud rates from 1,200 to 9,600. A data format of 8 data bits, 1 stop bit and no parity is used. The 232OPSDA is configured as a DCE device (See Table 2.2). If your communications equipment is configured as a DTE device, such as a standard IBM PC serial port, the 232OPSDA should be connected using a “straight through” DB25 cable or a standardDB-9toDB-25cable adapter as shown in Table 2.3. If your communications equipment is configured as a DCE device, such as a modem, the 232OPSDA should be connected using a “null modem” cable (See Table 2.4).

Documentation Number 232OPSDA1397 Manual

7

B&B Electronics --PO Box 1040--Ottawa, IL 61350

PH (815) 433-5100--FAX (815)433-5105