SDM-SIO1 Serial Input/Output Module
18
4.1.7 SerialInChk
This returns the number of characters that have been received by the SDM-SIO1
and that are currently held in its buffer (0-2047).
4.1.8 SerialInRecord
No special information.
4.1.9 SerialFlush
This command will purge all information in the logger and SDM-SIO1 transmit
and receive buffers.
4.1.10 Serial Input Errors
For any of the serial input instructions above, the character ‘?’ will be returned in
place of the expected data whenever a parity, framing or overrun error is detected.
These errors are only flagged for RS-232/RS-485/RS-422 data coming into the
SDM-SIO1. A large number of such characters could indicate an incorrectly setup
protocol configuration using the SerialOpen command, or one of the wires is loose
or incorrectly terminated.
4.2 Configuring handshaking and receive only modes
4.2.1 Using RTS/CTS and automatic handshaking
Handshaking is a method used by RS-232 to ensure communications equipment is
free to receive or transmit data. This interface is often called RTS/CTS (Hardware
handshaking) or DTR/DTE.
Automatic handshaking for the SDM-SIO1 is activated through use of the
‘SerialOpen’ commands ‘BaudRate’ setting. When the ‘BaudRate’ value is set to
a negative number the SDM-SIO1 will enable automatic handshaking. It is worth
noting that normally setting the ‘BaudRate’ to a negative number will enable
automatic baud rate detection, this is not the case for the SDM-SIO1.
When enabled the two I/O ports (pins 8 and 9) will operate as RTS and CTS lines.
It is important that the remote equipment supports handshaking as no data will be
sent if handshaking is enabled but isn’t supported by the equipment the SDM-SIO1
is connected to.
Once handshaking is enabled pins 8 and 9 are no longer available for general use
and are dedicated to the auto-handshaking system.
Enabling handshaking will increase active current consumption due to the extra
RS-232 load. It will not affect sleep current however as the RS-232 chip is
disabled (sleep is set by calling the ‘SerialClose’ function).
For connection diagrams and further information on using handshaking consult
Section 3.3 within this manual.