Version 1.0, August 31, 2001, Copyright, Hugh Jack 1993-2001

31.4.1 RS-232

 

· This standard is based on a high being +3 to +15V, and an off being -3 to -15V (+/-12V is commonly used).

 

· The typical connection scheme is shown below. notice that the lines are crossed between connectors. Also note that in some cases the dsr/dtr lines are not used. (Note: these are the lines used when connecting to a modem)

 

 

 

· The line names are,

  1. TXD/RXD - (transmit data, receive data) these lines pass data one way from sender to receiver.
  2. DSR/DTR - (data set ready, data terminal ready) these handshaking lines indicate when the remote machine is ready to receive data.
  3. COM - a common ground to keep things from blowing up, etc.

 

· A cable that emulates a modem connection between two devices is shown below and is called a null modem cable.

 

 

· There are typically two connectors used for these devices. (Note: the connectors have very fine numbers on them)

 

 

· The main pin assignments for the DB-25 are,

  1. Commonly used pins
    1. 1 - GND (chassis ground)
    2. 2 - TXD (transmit data)
    3. 3 - RXD (receive data)
    4. 4 - RTS (request to send)
    5. 5 - CTS (clear to send)
    6. 6 - DSR (data set ready)
    7. 7 - COM (common)
    8. 8 - DCD ()
    9. 20 - DTR (data terminal ready)
  2. Other pins
    1. 9 - Positive Voltage
    2. 10 - Negative Voltage
    3. 11 - not used
    4. 12 - Secondary Received Line Signal Detector
    5. 13 - Secondary Clear to Send
    6. 14 - Secondary Transmitted Data
    7. 15 - Transmission Signal Element Timing (DCE)
    8. 16 - Secondary Received Data
    9. 17 - Receiver Signal Element Timing (DCE)
    10. 18 - not used
    11. 19 - Secondary Request to Send
    12. 21 - Signal Quality Detector
    13. 22 - Ring Indicator (RI)
    14. 23 - Data Signal Rate Selector (DTE/DCE)
    15. 24 - Transmit Signal Element Timing (DTE)
    16. 25 - Busy

 

· The pin assignments for the DB-9 are,

  1. 1 - DCD
  2. 2 - RXD
  3. 3 - TXD
  4. 4 - DTR
  5. 5 - COM
  6. 6 - DSR
  7. 7 - RTS
  8. 8 - CTS
  9. 9 - RI

 

· There are other settings such as half/full duplex.

 

· When communicating between two devices the setting must agree baud rate, stop bits, parity, data bits, full/half duplex, etc.

 

· The figure below shows a PLC connected to a data terminal with a serial line. This is followed by ladder logic to use the serial connection.

 

 

 

 

 

 

 

31.4.1.1 - ASCII Functions