B&B Electronics RS-485 manual AddrRA#, Ch#MSBch#LSBch#-1MSB...ch0MSBch0LSB, Read A/D Response

Page 18

The Read A/D channels command returns two bytes for each channel read. The two bytes represent the most significant byte (MSB) and least significant byte (LSB) of the reading. The MSB is received first, followed by the LSB. This command requires a data byte. The data byte is used to specify the number of the highest channel to be read. All channels less than this channel will be read as well. For example, if the data byte has a value of 6, then channels 0 to 6 will be read. The highest channel is read first. Command Syntax

!{addr}RA{#}

Where “{#}” is a byte that specifies the number of the highest channel to be read. See Table 3.3

Response Syntax

{ch(#)MSB}{ch(#)LSB}{ch(#-1)MSB}...{ch0MSB}{ch0LSB}

The most significant byte of the channel specified is received first. The least significant byte and the lower channels will follow in descending order. “{chxMSB}” and “{chxLSB}” represent the most and least significant bytes of the A/D conversion result.

Table 3.3 - Read A/D Response

# of Channels Specified

 

Response

 

 

 

 

 

Channels Returned

 

Bytes

decimal

Hex

ASCII

 

(order of response)

 

Returned

 

 

 

 

 

 

0

0

NUL

 

Channel 0

 

2

1

1

SOH

 

Channels 1,0

 

4

2

2

STX

 

Channels 2,1,0

 

6

3

3

ETX

 

Channels 3,2,..,0

 

8

4

4

EOT

 

Channels 4,3,..,0

 

10

5

5

ENQ

 

Channels 5,4,..,0

 

12

6

6

ACK

 

Channels 6,5,..,0

 

14

7

7

BEL

 

Channels 7,6,..,0

 

16

8

8

BS

 

Channels 8,7,..,0

 

18

9

9

HT

 

Channels 9,8,..,0

 

20

10

A

LF

 

Channels 10,9,..,0

 

22

NOTE: There are three test channels that can be read: Ref+, Ref-, and Ref+/2. Specify 13 (0Dh) to read Ref+, 12 (0Ch) to read Ref-, and 11 (0Bh) to read Ref+/2.

14

485SDA103798 Manual

B&B Electronics -- 707 Dayton Rd. -- PO Box 1040 -- Ottawa, IL 61350

PH (815) 433-5100 -- FAX (815) 434-7094

Image 18 Contents
Electronics Mfg. Co. Inc Designed and Manufactured Ottawa, IllinoisInternet Table of Contents Software Tables485SDA103798 Manual Table of Contents Iii 485SDA10 Features 485SDA10 UnitSoftware Installation Packing ListWindows UninstallGetting Started Windows 9x and Windows NTA/D with Variable Resistor 485SDA10 Specifications Inputs #0-10 Ref Input +Ref Input Analog GroundTypical Connections Digital Inputs #0-2 Digital I/O Connections485SDA10 I/O Port Pinout Digital Outputs #0-2Digital Ground Typical Digital I/O ConnectionsSerial Port Connections RS-485 Terminal Block ConnectionsPower Supply Connections Typical RS-485 2-wire ConnectionCommands 485SDA10 CommandsReading A/D Channels Command SyntaxEquivalent Values AddrRA# Ch#MSBch#LSBch#-1MSB...ch0MSBch0LSBRead A/D Response States Reading Digital I/O CommandAddrRD Read Digital I/O Response for OutputsAddrSOstates Set Digital Output CommandSet Module Address Command Set Digital Output Data Byte ValuesSet Power-up States Command Set Turn-around Delay CommandRead Module Configuration Command Addressstatesdelay Sampling Rate Input RangeReference Inputs Data Range Converting DataPage Print #1, Command$ Read A/D CommandCommand$ = ! + CHR$addr + RA + CHR$channel MSB$ = INPUT$1, #1 LSB$ = INPUT$1, #1Read Digital I/O Command Command$ = ! + CHR$addr + RDReply$ = INPUT$ 1, #1 Set Digital Output States Digital I/O Mask ValuesSet Module Address Command$ = !0SO + CHR$statesCommand$ = ! + CHR$addr + SO + CHR$newaddr Addr =States = states and NOTmask Addr = 5 states =Set Turn-around Delay Command$ = ! + CHR$addr + SC + CHR$delayRead Module Configuration #addrRA00FF 00FF01FEComp = not x and &HFF Table A-1 Extended Commands Appendix B Analog Input Impedance Simplified Analog Input Analysis 1 2 LSB = R s + 1k Ω × 60pF × ln2048485SDA103798 Manual Appendix B Appendix C Decimal to HEX to Ascii Table Table C-1 Decimal to HEX to Ascii TableClass a Equipment
Related manuals
Manual 39 pages 36.61 Kb Manual 46 pages 1.37 Kb