B&B Electronics 232SDD16 manual Define I/O Lines Command, Set Power-up States Command

Page 9

Command: !0SO

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

Response: none

ASCII Example: !0SOUA

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

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

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

Description: the first byte sets output lines #14, 12, 10, & 8 HIGH and output lines #15, 13, 11, & 9 LOW; the second byte sets output lines #6, & 0 HIGH and output lines # 7, 5, 4, 3, 2, & 1 LOW. Note: If any of these lines are defined as inputs the bit settings are ignored.

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: !0SD

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: 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.

232SDD16-1005 Manual

13

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: !0SS

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><10000000>

Description: 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 #7 HIGH and output lines #6, 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 and the outputs power-up state. Four 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.

14

232SDD16-1005 Manual

B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350

B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350

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

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

Image 9
Contents Electronics Mfg. Co. Inc Designed and Manufactured Ottawa, IllinoisInternet Table of Contents 232SDD16 Features Introduction232SDD16-1005 Manual 232SDD16 Specifications CommunicationsSize Digital I/O Connections Connections232SDD16 I/O Port Pinout Serial Port ConnectionsPower Supply Connections RS-232 Connector Pinout232SDD16 To DTE Connections 232SDD16 To DCE Connections232SDD16 Commands CommandsEquivalent Values SyntaxRead I/O Lines Command Set Output Lines CommandBit Assignments for I/O Lines Define I/O Lines Command Set Power-up States CommandRead Configuration Command Bin. Example !0RC01010101010000010101000001000000 Digital Inputs InterfacingIsolated Solid State Input Software 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 CommandMSdefs = MSdefs or mask LSdefs = LSdefs or mask MSdefs = MSdefs and NOTmask LSdefs = LSdefs and NOTmaskRunning Demonstration Program Demonstration ProgramAppendix a Appendix B Decimal to Hexadecimal Conversion 232SDD16-1005 Manual Appendix C Figure C.1 DTB25 Outline DrawingTable C.2 DBM16 I/O Connections Table C.1 DTB25 ConnectionsDBM16 Interfacing Figure C.2 DBM16 Outline DrawingFigure C.6 Isolated Solid State Input DBM16 Specifications Lines InputsOutputs 232SDD16-1005 Manual Appendix C Msb~ I/O msbI/O lsb ~ I/O lsb #0RD00FF01FE Comp = not x and &HFF232SDD16-1005 Manual Appendix D Table D-1 Extended Commands