B&B Electronics 485SDD16 manual Set Module Address Command, Set Turn-around Delay Command

Page 9

Set Module Address Command

The Set Module Address command is used to change the address of a 485SDD16. This commands requires one data byte. This data byte is used to specify the module's new address. Addresses can be assigned any decimal value from 0 to 255. The address is stored in non-volatile memory and is effective immediately. Each module must be assigned its own unique address when connected to an RS-485 muti-node network.

Command: !{addr}SA

Argument: {new address}

Response: none

ASCII Example: !0SA9

Dec. Example: !0SA<57>

Hex. Example: !0SA<39>

Bin. Example: !0SA<00111001>

Description: Change module address from ASCII "0" (48 decimal) to address ASCII "9" (57 decimal).

Set Turn-around Delay Command

The Set Turn-around Delay command sets the amount of time the 485SDD16 waits before transmitting its response. This ensures that no two drivers are enabled at the same time on a two-wire RS- 485 network. The turn-around delay is stored in non-volatile memory. This command requires a data byte that specifies the turn- around delay. Where {turn-around delay} is a number from 0 to 255. One unit of turn-around is equal to one character transmission time. The turn-around delay can be computed as follows:

character time = (1 / baud rate) * 10 turn-around delay = character time * data byte

Command:

!{addr}SC

Argument:

{turn-around delay}

Response:

none

ASCII Example: !9SC♦

Dec. Example: !9SC<04>

Hex. Example: !9SC<04>

Bin. Example: !9SC<00000100>

Description: Set module 9's (decimal 57) turn-around delay to four

character transmission times (@ 9600 baud

the turn-around delay =

4.17ms).

 

 

 

485SDD16-1005 Manual

13

Define I/O Lines Command

The Define I/O Lines command is used to define each of the 16 I/O lines as either an input or an output. This command requires two data bytes. Each data byte defines eight I/O lines. The first data byte defines the eight most significant I/O lines (15 - 8). The second data byte defines the eight least significant digital I/O lines (7 - 0). If a bit position is set to a "0" then the I/O line will defined as an input. If a bit position set to a "1" then the I/O line will be defined as an output.

Command: !{addr}SD

Argument: {I/O msb}{I/O lsb}

Response: none

ASCII Example: !0SDUA

Dec. Example: !0SD<85><65>

Hex. Example: !0SD<55><41>

Bin. Example: !0SD<01010101><01000001>

Description: Define module 0's (decimal 48) I/O lines. The first byte define I/O lines #14, 12, 10, & 8 as outputs and I/O lines #15, 13, 11, & 9 as inputs; the second byte define I/O lines #6, & 0 as outputs and I/O lines #7, 5, 4, 3, 2, & 1 as inputs.

14

485SDD16-1005 Manual

B&B Electronics -- 707 Dayton Road -- Ottawa, IL 61350

B&B Electronics -- 707 Dayton Road -- Ottawa, IL 61350

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

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

Image 9
Contents Designed and Manufactured Ottawa, Illinois Electronics Mfg. Co. IncInternet Sales@bb-elec.com Support@bb-elec.comTable of Contents 485SDD16 Features 485SDD16 SpecificationsIntroduction Power Supply CommunicationsSize Digital I/O Connections Connections485SDD16 I/O Port Pinout Serial Port ConnectionsExample of Multi-Node Network 485SDD16 Commands CommandsEquivalent Values SyntaxRead I/O Lines Command Set Output Lines CommandBit Assignments for I/O Lines Set Turn-around Delay Command Set Module Address CommandDefine I/O Lines Command Command AddrSC ArgumentRead Configuration Command Set Power-up States CommandRead Configuration command returns the modules I/O Command AddrRC Argument None ResponseDigital Inputs InterfacingDigital Outputs Isolated Solid State InputSoftware Programming TechniquesDigital I/O Mask Values MSdefs = MSdefs and mask LSdefs = LSdefs and mask Set Output States CommandMSpups = MSpups and mask LSpups = LSpups and mask MSstates = MSstates or mask LSstates = LSstates or maskSet Power-up States Command Define I/O Lines CommandCmnd$ = ! + CHR$Maddr + SO + CHR$MSstates + CHR$LSstates Maddr =MSpups = MSpups and NOTmask LSpups = LSpups and NOTmask Set Module Address CommandCmnd$ = ! + CHR$Maddr + SS + CHR$MSpups + CHR$LSpups LSpups = LSpups or &H20Running Demonstration Program Demonstration Program485SDD16-1005 Manual Appendix a Decimal485SDD16-1005 Manual Appendix a 119 120 121 122 123 124 125 126 127485SDD16-1005 Manual Appendix B Appendix B252 Decimal to Hexadecimal Conversion3rd Hex digit 240 4th Hex digit Decimal equals 10FC hexadecimalAppendix C Table C.1 DTB25 Connections Table C.2 DBM16 I/O ConnectionsDBM16 Interfacing 485SDD16-1005 Manual Appendix C Figure C.4 Solid State InputPower Supply Input Voltage DBM16 Specifications LinesTotal Connections SizeFigure C.10 DBM16 Schematic Msb~ I/O msbI/O lsb ~ I/O lsb #addrRD00FF01FE Comp = not x and &HFF485SDD16-1005 Manual Appendix D Table D-1 Extended Commands