B&B Electronics RS-485 manual Set Digital Output Command, Set Module Address Command, AddrSOstates

Page 20

Set Digital Output Command

The Set Digital Output command is used to set the states of the 3 digital output lines. This command requires a data byte. The data byte is used to specify the output states. Bits 0-2 correspond to the states of digital outputs 0-2. If a bit is a 0 then the output will be set LOW. If a bit is a 1 then the output will be set HIGH. Refer to Table 3.6. NOTE: This command ignores Bits 3-7 of the data byte.

Command Syntax

!{addr}SO{states}

Where {states} is a byte in which Bits 0-2 correspond to the outputs states of Digital Outputs 0-2

Unit Response no response

Table 3.6 - Set Digital Output Data Byte Values

 

Data Byte

 

 

 

Digital Outputs

 

Bit 2

Bit 1

Bit 0

 

#2

 

#1

 

#0

 

 

 

 

 

 

 

 

0

0

0

 

LOW

 

LOW

 

LOW

0

0

1

 

LOW

 

LOW

 

HIGH

0

1

0

 

LOW

 

HIGH

 

LOW

0

1

1

 

LOW

 

HIGH

 

HIGH

1

0

0

 

HIGH

 

LOW

 

LOW

1

0

1

 

HIGH

 

LOW

 

HIGH

1

1

0

 

HIGH

 

HIGH

 

LOW

1

1

1

 

HIGH

 

HIGH

 

HIGH

Set Module Address Command

The Set Module Address command is used to change the address of a 485SDA10. This command requires a data byte. The data byte is used to specify the new address of the unit. The address of a module is stored in non-volatile memory.

Command Syntax

!{addr}SA{new address} Response Syntax

no response

Where {addr} is the current address of the module and {new address} is a byte representing the new address.

16

485SDA103798 Manual

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

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

Image 20 Contents
Internet Electronics Mfg. Co. IncDesigned and Manufactured Ottawa, Illinois 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 +Typical Connections Ref InputAnalog Ground 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 CommandsEquivalent Values Reading A/D Channels CommandSyntax Read A/D Response AddrRA#Ch#MSBch#LSBch#-1MSB...ch0MSBch0LSB 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 ValuesRead Module Configuration Command Set Power-up States CommandSet Turn-around Delay Command Addressstatesdelay Reference Inputs Sampling RateInput Range Data Range Converting DataPage Read A/D Command Command$ = ! + CHR$addr + RA + CHR$channelPrint #1, Command$ MSB$ = INPUT$1, #1 LSB$ = INPUT$1, #1Reply$ = INPUT$ 1, #1 Read Digital I/O CommandCommand$ = ! + CHR$addr + RD 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 Comp = not x and &HFF #addrRA00FF00FF01FE 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