B&B Electronics 232OPSDA manual Table of Contents

Page 2

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-buffered 0 to 5VDC A/D Inputs

15

Buffered 0 to 5V A/D Inputs

15

0 to 10VDC A/D Input

16

4-20mA Current 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-LEVELCOMMUNICATIONS

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

Image 2
Contents Internet Electronics Mfg. Co. IncDesigned and Manufactured Ottawa, Illinois Table of Contents Page 232OPSDA Features IntroductionGeneral Block Diagram Packing ListAnalog to Digital Converter Software Installation232OPSDA Specifications Digital Output Power SupplyDigital Input CommunicationsConnections Terminal Function Description Block232OPSDA Digital I/O Connections Serial Port Connections232OPSDA Power Supply Connections Commands Syntax Reading A/D Channels Command 0RD Reading Digital I/O CommandSet Digital Output Command StatesNon-buffered 0 to 5VDC A/D Inputs Sampling RateConverter Range Buffered 0 to 5V A/D InputsTo 10VDC A/D Input 20mA Current Loop A/D InputGain = Application Program Interface B232OPSDAReadDigital Syntax CDeinitComPort Purpose B232OPSDASetDigitalOutputReturns See AlsoReturns See Also Low-Level CommunicationsPort Address DeinitComPortPrint #1, Command$ Read A/D CommandCommand$ = !0RA + CHR$channel MSB$ = INPUT$1, #1 LSB$ = INPUT$1, #1Read Digital I/O Command States = ASCReply$ Command$ = !0RDReply$ = INPUT$ 1, #1 Status = states and mask‘ Set Output High states = states or mask Command$ = !0SO + CHR$statesSet Digital Output State States = states and NOTmaskAppendix a Decimal to Hex to Ascii Conversion Decimal to HEX to Ascii Conversion Table