B&B Electronics 485SDD16 manual Set Power-up States Command, Read Configuration Command

Page 10

Set Power-up States Command

The Set Power-up States command is used to set the states of output lines when the module's power is recycled. This command requires two data bytes. These data bytes specify the output state of each output line. The first data byte represents the eight most significant I/O lines (15 - 8). The second data byte represents the eight least significant I/O lines (7 - 0). If a bit position is set to a "0" then the state of that output line will be set LOW. If a bit position is set to a "1" then the state of that output line will be set HIGH.

Command: !{addr}SS

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

Response: none

ASCII Example: !0SSÛ@

Dec. Example: !0SS<219><64>

Hex. Example: !0SS<DB><40>

Bin. Example: !0SS<11011011><01000000>

Description: Set module 0's (decimal 48) power-up states. The first byte sets output lines #15, 14, 12, 11, 9, & 8 HIGH and output lines #13, & 10 LOW at power-up; the second byte sets output line #6 HIGH and output lines #7, 5, 4, 3, 2, 1, & 0 LOW at power-up. NOTE: If any of these lines are defined as inputs the bit settings are ignored.

Read Configuration Command

The Read Configuration command returns the module's I/O

definitions, the outputs power-up state, the module's address, and the turn-around delay. Six data bytes are returned. The first two data bytes contain the definition of the eight most significant I/O lines (15 - 8) and the eight least significant I/O lines (7 - 0) respectively. If a bit position is set to a "0" the I/O line is defined as an input, if set to a "1" the I/O line is defined as an output. The second two data bytes contain the power-up states of the most significant output lines (15 -

8)and the least significant output lines (7 - 0) respectively. If a bit position is set to a "0" the power-up state of the output will be LOW, if set to a "1" the output will be HIGH. The fifth data byte is the module's address. The sixth data byte is the turn-around delay.

Command:

!{addr}RC

 

Argument:

none

 

Response:

definition of the sixteen I/O lines in two 8 bit bytes, and

the power-up states in two 8 bit bytes. (shown in bold face)

 

 

 

485SDD16-1005 Manual

15

ASCII Example: !9RCUAP@9

Dec. Example: !9RC<85><65><80><64><57><04>

Hex. Example: !9RC<55><41><50><40><39><04>

Bin. Example: !0RC<01010101><01000001><01010000><01000000> <00111001><00000100>

Description: Read module 9's (decimal 57) configuration. The first byte (MSB of I/O definitions) - I/O lines #14, 12, 10, & 8 are outputs and I/O lines #15, 13, 11, & 9 are inputs; the second byte (LSB of I/O definitions) - I/O lines #6, & 0 are outputs and I/O lines #7, 5, 4, 3, 2, & 1 are inputs; the third byte (MSB of output power-up states) - output lines #14, & 12 HIGH and output lines #10, & 8 LOW at power-up; the fourth byte (LSB of output power-up states) - output line #6 HIGH and output line #0 LOW at power-up; the fifth byte (module address) is set ASCII "9" (decimal 57); the sixth byte (turn- around delay) is a decimal 4.

16

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 10
Contents Internet Electronics Mfg. Co. IncDesigned and Manufactured Ottawa, Illinois Sales@bb-elec.com Support@bb-elec.comTable of Contents 485SDD16 Specifications 485SDD16 FeaturesIntroduction Communications Power SupplySize 485SDD16 I/O Port Pinout ConnectionsDigital I/O Connections Serial Port ConnectionsExample of Multi-Node Network Equivalent Values Commands485SDD16 Commands SyntaxSet Output Lines Command Read I/O Lines CommandBit Assignments for I/O Lines Define I/O Lines Command Set Module Address CommandSet Turn-around Delay Command Command AddrSC ArgumentRead Configuration command returns the modules I/O Set Power-up States CommandRead Configuration Command Command AddrRC Argument None ResponseInterfacing Digital InputsIsolated Solid State Input Digital OutputsProgramming Techniques SoftwareDigital I/O Mask Values MSpups = MSpups and mask LSpups = LSpups and mask Set Output States CommandMSdefs = MSdefs and mask LSdefs = LSdefs and mask MSstates = MSstates or mask LSstates = LSstates or maskCmnd$ = ! + CHR$Maddr + SO + CHR$MSstates + CHR$LSstates Define I/O Lines CommandSet Power-up States Command Maddr =Cmnd$ = ! + CHR$Maddr + SS + CHR$MSpups + CHR$LSpups Set Module Address CommandMSpups = MSpups and NOTmask LSpups = LSpups and NOTmask LSpups = LSpups or &H20Demonstration Program Running Demonstration ProgramDecimal 485SDD16-1005 Manual Appendix a119 120 121 122 123 124 125 126 127 485SDD16-1005 Manual Appendix aAppendix B 485SDD16-1005 Manual Appendix B3rd Hex digit Decimal to Hexadecimal Conversion252 240 4th Hex digit Decimal equals 10FC hexadecimalAppendix C Table C.2 DBM16 I/O Connections Table C.1 DTB25 ConnectionsDBM16 Interfacing Figure C.4 Solid State Input 485SDD16-1005 Manual Appendix CTotal DBM16 Specifications LinesPower Supply Input Voltage Connections SizeFigure C.10 DBM16 Schematic 00FF01FE #addrRDMsb~ I/O msbI/O lsb ~ I/O lsb Comp = not x and &HFFTable D-1 Extended Commands 485SDD16-1005 Manual Appendix D