B&B Electronics RS-485 manual 485SDA10 Commands

Page 16

Chapter 3 - Commands

There are only three commands required to control the 485SDA10:

Read A/D command

Read digital I/O command

Set output states command

There are four commands used to configure the module:

Set power-up states command

Set turn-around delay command

Set module address command

Read module configuration command

The command string consists of four bytes. Some commands require an additional data byte. For information on adding data field confirmation to the data fields refer to Appendix A. See Table 3.1.

Table 3.1 - 485SDA10 Commands

Function

 

Command

Response

 

 

 

 

Read A/D Channels

 

!{addr}RA{#}

{ch#msb}{ch#lsb}

 

 

 

{ch(#-1)msb}...

 

 

 

{ch0msb}{ch0lsb}

Read Digital I/O

 

!{addr}RD

{I/O states}

Set Output States

 

!{addr}SO{#}

no response

Set Module Address

 

!{addr}SA{new addr}

no response

Set Power-up States

 

!{addr}SS{#}

no response

Set Turn-around Delay

 

!{addr}SC{#}

no response

Read Configuration

 

!{addr}RC

{addr}{powerup

 

 

 

states}{turn-around

 

 

 

delay}

NOTE: Each {...} represents one byte.

Before going into the specifics of each command, it is important to understand that a byte has a value from 0 to 255 and can be represented in decimal (0 to 255), hexadecimal (00 to FF), or by an ASCII character. The commands in Table 3.1 are shown in ASCII, for example:

ASCII

Hex

Decimal

!0RD

<21><30><52><44>

(33)(48)(82)(68)

 

 

 

12

 

485SDA103798 Manual

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

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

Image 16 Contents
Designed and Manufactured Ottawa, Illinois Electronics Mfg. Co. IncInternet Table of Contents Software Tables485SDA103798 Manual Table of Contents Iii 485SDA10 Features 485SDA10 UnitSoftware Installation Packing ListUninstall Getting StartedWindows Windows 9x and Windows NTA/D with Variable Resistor 485SDA10 Specifications Inputs #0-10 Ref Input +Analog Ground Ref InputTypical Connections Digital I/O Connections 485SDA10 I/O Port PinoutDigital Inputs #0-2 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 CommandsSyntax Reading A/D Channels CommandEquivalent Values Ch#MSBch#LSBch#-1MSB...ch0MSBch0LSB AddrRA#Read A/D Response Reading Digital I/O Command AddrRDStates Read Digital I/O Response for OutputsSet Digital Output Command Set Module Address CommandAddrSOstates Set Digital Output Data Byte ValuesSet Turn-around Delay Command Set Power-up States CommandRead Module Configuration Command Addressstatesdelay Input Range Sampling RateReference Inputs Data Range Converting DataPage Read A/D Command Command$ = ! + CHR$addr + RA + CHR$channelPrint #1, Command$ MSB$ = INPUT$1, #1 LSB$ = INPUT$1, #1Command$ = ! + CHR$addr + RD Read Digital I/O CommandReply$ = INPUT$ 1, #1 Set Digital Output States Digital I/O Mask ValuesCommand$ = !0SO + CHR$states Command$ = ! + CHR$addr + SO + CHR$newaddrSet Module Address Addr =States = states and NOTmask Addr = 5 states =Set Turn-around Delay Command$ = ! + CHR$addr + SC + CHR$delayRead Module Configuration 00FF01FE #addrRA00FFComp = 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