Program instructions
7.3 Communication
S7-200 SMART
180 System Manual, 09/2015, A5E03822230-AC
Changing PPI communications to Freeport mode
SMB30 and SMB130 configure the communications ports, 0 and 1 respectively, for Freeport
operation and provide selection of baud rate, parity, and number of data bits. The following
figure describes the Freeport control byte. One stop bit is generated for all configurations.
00 =
01 =
10 =
No parity
Even parity
No parity
0 =
1 =
8 bits per character
7 bits per character
000 =
001 =
010 =
011 =
100 =
101 =
110 =
38400
19200
9600
4800
2400
1200
115200
00 =
01 =
10 =
11 =
PPI slave mode
Freeport mode
Reserved (defaults to PPI slave mode)
Reserved (defaults to PPI slave mode)
The Transmit instruction lets you send a buffer of one or more characters, up to a maximum
of 255. The following figure shows the format of the Transmit buffer.
Number of bytes to transmit
Characters of the message
If an interrupt routine is attached to the transmit complete event, the CPU generates an
interrupt (interrupt event 9 for port 0 and interrupt event 26 for port 1) after the last character
of the buffer is sent.
You can transmit without using interrupts (for example, sending a message to a printer) by
monitoring SM4.5 (port 0) or SM4.6 (port 1) to signal when transmission is complete.
You can use the Transmit instruction to generate a BREAK condition by setting the number
of characters to zero and then executing the Transmit instruction. This generates a BREAK
condition on the line for 16-bit times at the current baud rate. Transmitting a BREAK is
handled in the same manner as transmitting any other message, in that a Transmit interrupt
is generated when the BREAK is complete and SM4.5 or SM4.6 signals the current status of
the Transmit operation.