Specifications
SIMATIC Instructions
9-188
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Table 9-26 Special Memory Bytes SMB86 to SMB94, and SMB186 to SMB194
Port 0 DescriptionPort 1
SMB90
SMB91
SMB190
SMB191
Idle line time period given in milliseconds. The first character received
after idle line time has expired is the start of a new message. SM90
(or SM190) is the most significant byte and SM91 (or SM191) is the
least significant byte.
SMB92
SMB93
SMB192
SMB193
Inter-character/message timer time-out value given in milliseconds. If
the time period is exceeded, the receive message is terminated.
SM92 (or SM192) is the most significant byte, and SM93 (or SM193)
is the least significant byte.
SMB94 SMB194 Maximum number of characters to be received (1 to 255 bytes).
Note: This range must be set to the expected maximum buffer size,
even if the character count message termination is not used.
Using Character Interrupt Control to Receive Data
To allow complete flexibility in protocol support, you can also receive data using
character interrupt control. Each character received generates an interrupt. The
received character is placed in SMB2, and the parity status (if enabled) is placed in
SM3.0 just prior to execution of the interrupt routine attached to the receive
character event.
SMB2 is the Freeport receive character buffer. Each character received while in
Freeport mode is placed in this location for easy access from the user program.
SMB3 is used for Freeport mode and contains a parity error bit that is turned on
when a parity error is detected on a received character. All other bits of the byte
are reserved. Use this bit either to discard the message or to generate a
negative acknowledge to the message.
Note
SMB2 and SMB3 are shared between Port 0 and Port 1. When the reception of a
character on Port 0 results in the execution of the interrupt routine attached to that
event (interrupt event 8), SMB2 contains the character received on Port 0, and
SMB3 contains the parity status of that character. When the reception of a
character on Port 1 results in the execution of the interrupt routine attached to that
event (interrupt event 25), SMB2 contains the character received on Port 1 and
SMB3 contains the parity status of that character.