B&B Electronics 232DRIO User Manual

Size:
199.09 Kb
Download

RS-232Digital Relay I/O

Model 232DRIO

Documentation Number 232DRIO1005 pn#4520-r2

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-5104

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

© B&B Electronics – January 2008

232DRIO-0308Manual Cover Page

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

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

Table of Contents

 

Chapter 1- Introduction...........................................

 

3

232DRIO Features ..................................................

 

3

Packing List .............................................................

 

2

232DRIO Specifications...........................................

 

3

Opto-IsolatedInput................................................................

 

3

Relay Outputs .......................................................................

 

3

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

 

3

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

 

3

Environment ..........................................................................

 

3

Size .......................................................................................

 

3

Chapter 2 - Connections .........................................

 

5

I/O Connections............................................

 

………5

Opto-isolatedInput................................................................

 

5

Relay Outputs .......................................................................

 

5

Ground ..................................................................................

 

5

Serial Port Connections...........................................

 

6

Power Supply Connections......................................

7

Chapter 3 - Commands ...........................................

 

9

Syntax ...................................................................

 

10

I/O Data Bytes.....................................................................

 

11

Read I/O Lines Command

.....................................

13

Set Output Lines Command ..................................

13

Chapter 4 - I/O Interfacing.....................................

 

15

Opto-isolatedInput ................................................

 

15

Relay Outputs........................................................

 

17

Chapter 5 - Software..............................................

 

19

Programming Techniques......................................

 

19

Opening a COM Port...........................................................

 

19

Closing a COM Port ............................................................

 

19

QuickBasic ..........................................................................

 

20

Read I/O States Command.................................................

 

20

Set Output States Command ..............................................

 

20

C/C++..................................................................................

 

21

Read I/O States Command.................................................

 

21

Set Output States Command ..............................................

 

21

232DRIO-0308Manual

Table of Contents

i

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

PH (815) 433-5100--

FAX (815) 433-5104

 

Demonstration Program ........................................

22

Hard Drive Installation.........................................................

22

Running Demonstration Program .......................................

22

APPENDIX A..........................................................

A-1

ASCII Character Codes ........................................

A-1

APPENDIX B..........................................................

B-1

Hexadecimal/Decimal Conversions ......................

B-1

ii

Table of Contents

232DRIO-0308Manual

 

B&B Electronics --PO Box 1040--

Ottawa, IL 61350

 

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

Chapter 1- Introduction

232DRIO Features

The 232DRIO is a general purpose data acquistion controller that is connected to your computer’s RS-232serial port. The 232DRIO offers 1opto-isolatedinput and 2 relay outputs. With these features, the controller can be used to sense external ON/OFF conditions and to control a variety of devices.

The relay outputs are CMOS/TTL compatible. The optically isolated AC/DC input are also CMOS/TTL compatible. For maximum flexibility, both input and outputs are connected with internal screw type terminal blocks. Three LEDs are provided to monitor the status of each of these.

The 232DRIO connects to your computer’s RS-232serial port through aDB-9Fconnector. The unit communicates at a baud rate of 9600, 8 data bits, no parity, and 1 stop bit. This unit cannot be powered through the handshake lines because of the higher current requirement to drive the relays. However, the unit may be powered by an external +12Vdc source brought in through the power pin, pin #9 of the serial port. If the 232DRIO cannot be powered using the previous method, it may be powered with +12Vdc @ 100mA through the supplied terminal blocks. Power supply is available.

232DRIO-0308Manual

3

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

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

Figure 1.1 – 232DRIO Module

Serial Port

RS-232

 

POWER

DB-9S

 

 

 

Transceiver

 

 

TD

 

 

RELAY SPDT

RD

 

 

 

 

 

 

+5V

Microcontroller

 

5-30Vdc/Vac

 

 

R

 

 

Input

 

RELAY SPDT

 

 

 

Opto

 

 

 

 

 

Isolator

 

 

Figure 1.2 – Simplified Block Diagram

Packing List

GND +12Vdc

#2 N/O #2 N/C

#2 Com

#1 N/O

#1 N/C

#1 Com

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

1.232DRIO unit

2.Software

3.This instruction manual

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

232DRIO Specifications

Non-polarized,Optically Isolated Input

4

232DRIO-0308Manual

B&B Electronics --

PO Box 1040 --Ottawa, IL 61350

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

Number of Channels:

1

Indication Mode

 

Logic “0”:

LED on, digital voltage input high

Logic “1”:

LED off, digital voltage input low

Input Electrical Characteristic

Voltage input low:

<1.5 VAC/VDC

Voltage input high:

5-30VAC/VDC @ 1mA to 30mA

Isolation Voltage:

2500 V

Leakage Current:

10 µA max.

Relay Outputs

 

Number of Channels:

2 electromechanical relays

Factory Default:

Both relays de-energized

Indication Mode

 

Logic “0”:

LED off, Relays de-energized

Logic “1”:

LED on, Relays energized

Relay Ratings

 

Contact (standard):

10A @ 120VAC

 

8A @ 30VDC (resistive)

Max. switching capacity: 1200VA/240W

Max. operating voltage:

250VAC/125VDC

Max. carrying current:

10A (AC), 8A (DC) – standard

Min. permissible load:

100 mA @ 5 VDC

Relay Form:

Form C, single-poledouble-throw

 

(SPDT)

Output Terminals:

Normally open (N/O) or

 

Normally close (N/C)

Relay Life (mech.):

10 million operations min.

Relay Life (load dependent): 100 thousand operations min.

Operating Time:

10 msec. max. (mean: ~5.1ms)

Power Supply

 

Input Voltage:

9-16VDC

Input Current:

100 mA

Connections:

Blue terminal block field wiring

Communications

Pin #9 (Power pin) of DB9F

 

Standard:

RS-232(unit is DCE)

Baud Rate:

9600

Format:

8 data bits, 1 stop bit, no parity

Environment

0°-70°C

Operating Temperature:

Operating Humidity:

0-95%,non-condensing

Storage Temperature:

-20°-70°C

Size

4.60”L x 2.40"W x 1.32"H

 

 

232DRIO-0308Manual

5

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

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

Chapter 2 - Connections

Do not make any connections to the 232DRIO until you have read this chapter. Remember to power down the unit and any other connected devices before making any kinds of connections. Also be sure that the wires connected to the terminal blocks will support the voltage and current requirements of your external devices.

This chapter will cover the connections for the 232DRIO. There are four sets of connections: opto-isolatedinput (optional), relay outputs, serial port, and power supply.

I/O Connections

Connections to the I/O lines are made through the internal block terminals. These should clearly be labeled on the board. Refer to Table 2.1. See Chapter 5 for I/O interfacing examples.

Opto-isolatedInput (black terminal blocks)

The non-polarized,opto-isolatedinput line is CMOS/TTL compatible and can handle voltages from 0Vdc/Vac to +30Vdc/Vac. Refer to the Specification for a complete detail.

Relay Outputs (blue terminal blocks)

The relay output lines have a maximum operating voltage of +250Vac/+125Vdc and are CMOS/TTL compatible. Refer to the Specification for a complete detail. Both relays are de-energized at factory default settings.

Ground

Connect the ground correspondingly as marked. Do not interchange the grounds for input and power. Otherwise, the input will not be optically isolated. The input is non-polarizedso the input ground could be connected to either one of the black terminal while the power ground must be connected as marked on the blue terminal.

6

232DRIO-0308Manual

B&B Electronics --

PO Box 1040 --Ottawa, IL 61350

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

Table 2.1 - 232DRIO Terminal Blocks

Blue

 

Black

Function

Pin #

Function

Pin #

 

 

 

Opto-IsolatedInput

1

- Ground Input Power

1

2

+12Vdc Input Power

2

Opto-IsolatedInput

3

#2 N/C-NormallyClosed

 

Non-polarized

4

#2 N/O-NormallyOpened

 

0-30Vdc/Vac

5#2 C-Common

6#1 C-Common

7#1 N/C-NormallyClosed

8#1 N/O-NormallyOpened

Serial Port Connections

In order to communicate to the 232DRIO module it must be connected to an RS-232serial port. The unit is designed for a baud rate of 9600, so the serial port must be set for this rate. A data format of 8 data bits, 1 stop bit and no parity is used. The 232DRIO 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 232DRIO should be connected using a “straight through”DB-25cable 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 232DRIO should be connected using a “null modem” cable (see Table 2.4).

Table 2.2 – RS232 Connector Pinout

DB-9S

 

Signal

 

 

Direction at

 

Pin #

Signal

232DRIO

Notes

2

Receive Data (RD)

Output

Required

3

Transmit Data (TD)

Input

Required

5

Signal Ground (SG)

------

Required

9

Power pin

Input

Can be wired to

 

 

 

power unit

232DRIO-0308Manual

7

B&B Electronics --

PO Box 1040 --Ottawa, IL 61350

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

Table 2.3 – 232DRIO To DTE Connections

232DRIO

 

DTE DB-25

DTE DB-9

Pin #

Signal

Connection

Connection

2

Receive Data (RD)

3

2

3

Transmit Data (TD)

2

3

5

Signal Ground (SG)

7

5

9

Ring Indicator

22

9

Table 2.4 – 232DRIO To DCE Connections

232DRIO

 

DCE DB-25

DCE DB-9

Pin #

Signal

Connection

Connection

2

Receive Data (RD)

2

3

3

Transmit Data (TD)

3

2

5

Signal Ground (SG)

7

5

9

Ring Indicator

22

9

Power Supply Connections

The power requirement is 12VDC at 100mA. Power to the 232DRIO can be wired through the RS-232serial port pin #9 (power pin) or by an external power supply through the blue terminal blocks. Serial ports cannot provide enough power to supply the 232DRIO’s 100 milliamp requirement.

Chapter 3 - Commands

8

232DRIO-0308Manual

B&B Electronics --

PO Box 1040 --Ottawa, IL 61350

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