Specifications
SDM-SIO1 Serial Input/Output Module
4.1.6 SerialOutBlock
No special information. This can also be used to set the general purpose output
line (see Appendix A).
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). In addition it also
allows the program to determine the state of the input handshaking line by
setting bit 16 of the returned number if the port is high. If that port (pin 8) is
not connected then the instruction can be used in the same way as with a
standard port. If the port can be high or you wish to determine the state of the
handshaking line, please refer to Appendix A.1 for further details and program
examples.
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 insure 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 connected to the SDMSIO1.
Once handshaking is enabled pins 8 and 9 are no longer available for general
use and are dedicated to the auto-handshaking system.
18