Summary of Contents for B&B Electronics RS-232 Digital I/O Module 232SDD16
Page 1
RS-232 Digital I/O Module Model 232SDD16 Documentation Number 232SDD16-1005 pn#3604-r1 This product Designed and Manufactured In Ottawa, Illinois of domestic and imported parts by B&B Electronics Mfg. Co. Inc. 707 Dayton Road -- P.O. Box 1040 -- Ottawa, IL 61350 PH (815) 433-5100 -- FAX (815) 433-5104 Internet: http://www.bb-elec.com...
Chapter 1- Introduction 232SDD16 Features The 232SDD16 is a general purpose control module that is connected to your computer’s RS-232 serial port. The 232SDD16 offers 16 discrete digital I/O lines. With these features, the module can be used to sense external ON/OFF conditions and to control a variety of devices.
Chapter 2 - Connections This chapter will cover the connections required for the 232SDD16. There are three sets of connections: digital I/O, serial port, and power supply. Do not make any connections to the 232SDD16 until you have read this chapter. Digital I/O Connections Connections to the I/O lines are made through the DB25S (female) I/O port connector.
Table 2.2 - RS-232 Connector Pinout Signal DB-25S Direction at Pin # Signal 232SDD16 Transmit Data (TD) Input Connection is required. Receive Data (RD) Output Connection is required. Request to Send Input May be used to power (RTS) unit if kept high. Signal Ground (SG) Connection is required.
Chapter 3 - Commands There are only two commands required to control the 232SDD16: set output lines, and read I/O lines. Three additional commands are used for configuring the module: define I/O lines, set power-up states, and read configuration. Command strings are from four to six bytes in length;...
A byte represents an eight-bit binary number (11111111), therefore each byte can represent eight I/O lines. Each bit is assigned a bit position and a weight (value). Refer to Table 3.3. Table 3.3 - Bit Assignments for I/O Lines MOST SIGNIFICANT I/O BYTE I/O Line # Bit Position Hex Weight...
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, &...
Page 10
Command: !0RC 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) ASCII Example: !0RCUAP@ Dec. Example: !0RC<85><65><80><64> Hex. Example: !0RC<55><41><50><40> Bin. Example: !0RC<01010101><01000001><01010000><01000000> Description: the first byte (MSB of I/O definitions) - I/O lines #14, 12, 10, &...
Chapter 4 - I/O Interfacing This chapter will explain "HIGH" and "LOW" states and show some general examples of how to interface to the I/O lines. Caution must be taken not to exceed 232SDD16 specifications listed in Chapter 1 when interfacing to external devices. Failure to stay within these specifications could result in damage to the unit and will void warranty.
Figure 4.4 - Isolated Solid State Input Digital Outputs Digital outputs are used to turn external devices on or off. Digital outputs are CMOS/TTL compatible and operate between 0Vdc and +5Vdc. Outputs can be used to control solid state output modules, CMOS and TTL logic circuits.
Chapter 5 - Software This chapter will be divided into two sections. The first section covers programming techniques for constructing a command string, receiving data and manipulating data in QuickBASIC. The second section discusses how to install and run the demonstration program on an IBM PC or compatible.
Step 5 - Determining the I/O line definitions: MSdefs = MSdefs AND mask LSdefs = LSdefs AND mask By "ANDing" the value of MSdefs or LSdefs with the appropriate mask of an I/O line, the I/O line definition can be determined. If the status is equal to zero the I/O line is an INPUT.
Define I/O Lines Command Step 1a - Construct the command string: Define an I/O line as Output MSdefs = MSdefs OR mask LSdefs = LSdefs OR mask By "ORing" the current definitions with the appropriate I/O line mask, the I/O line's data bit will be set to a "1" (HIGH) and the I/O line will be defined as an Output.
Demonstration Program The 232SDD16 Demonstration (SDD16) Program (IBM PC or Compatible) provides the user with examples of how to receive and transmit commands to the 232SDD16. The SDD16.EXE is the executable program, the SDD16.BAS file is the source code in QuickBASIC.
APPENDIX A ASCII Character Codes 232SDD16-1005 Manual Appendix A B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350 PH (815) 433-5100 -- FAX (815) 433-5104 DECIMAL to HEX to ASCII CONVERSION TABLE DEC HEX ASCII KEY DEC HEX ASCII DEC HEX ASCII DEC HEX ASCII ctrl @ ctrl A ctrl B...
APPENDIX B Hexadecimal/Decimal Conversions 232SDD16-1005 Manual Appendix B B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350 PH (815) 433-5100 -- FAX (815) 433-5104 The decimal (base 10) numbering system represents each position in successive powers of 10, with each decimal symbol having a value from 0 to 9.
Page 19
Hexadecimal to Decimal Conversion: Decimal = (1st Hex digit x 4096) + (2nd Hex digit x 256) + (3rd Hex digit x 16) + (4th Hex digit) Each "Hex digit" is the decimal equivalent value of the hexadecimal symbol. Example: Convert 10FC hexadecimal to decimal.
APPENDIX C Interface Modules for SDD16 Models 232SDD16-1005 Manual Appendix C B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350 PH (815) 433-5100 -- FAX (815) 433-5104 DTB25 The DTB25 connects to the SDD16 models to provide easy access to the available I/O lines. The DTB25 plugs directly into the SDD16's DB25S I/O Port connector.
DBM16 Interfacing This section will show some general examples of how to interface the DBM16 I/O lines to external devices. Caution must be taken not to exceed the DBM16 specifications, failure to do so could result in damage to the DBM16 and will void the warranty. Before connecting the DBM16 to the SDD16 module and connecting any external device to the DBM16 determine which I/O lines on the SDD16 module are inputs and which are outputs.
Figure C.6 - Isolated Solid State Input Outputs Digital outputs are used to turn "ON" or turn "OFF" external devices. Outputs can be used to control solid state output modules, logic circuits, and relays. Caution must be taken not to exceed the power capability of the outputs.
DBM16 Specifications I/O Lines Total: 16 (Factory default - set to inputs) Inputs Voltage range: 0Vdc to +50Vdc Low Voltage: 0Vdc to +1.5Vdc High Voltage: +2.5Vdc to +50Vdc Internal pull-up current: 0.5 ma Outputs Output Voltage: +50Vdc max. Output current: 350 ma max.
Page 25
232SDD16-1005 Manual Appendix C C-11 B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350 PH (815) 433-5100 -- FAX (815) 433-5104...
Appendix D Adding Data Field Confirmation 232SDD16-1005 Manual Appendix D B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350 PH (815) 433-5100 -- FAX (815) 433-5104 With serial communications in a laboratory environment, the possibility of a communication error occurring is minimal. However, in a harsh or an industrial environment the possibility increases.
Page 27
Table D-1 Extended Commands Function Command Response Read I/O Lines #0RD {I/O msb}{~I/O msb}{I/O lsb}{~I/O lsb} Set Output Lines #0SO{I/O no response msb}{~I/O msb}{I/O lsb}{~I/O lsb} Define I/O Lines #0SD{I/O no response msb}{~I/O msb}{I/O msb}{~I/O msb} Set Power-up #0SS{I/O no response States msb}{~I/O msb}{I/O...