Siemens Simatic S7 Series System Manual page 180

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Program instructions
7.3 Communication
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.
pp
bbb
Transmit data
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.
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.
180
Parity select
00 =
No parity
01 =
Even parity
10 =
No parity
11 =
Odd parity
Freeport baud rate
000 =
38400
001 =
19200
010 =
9600
011 =
4800
100 =
2400
101 =
1200
110 =
115200
111 =
57600
Number of bytes to transmit
Characters of the message
d
Data bits per character
0 =
8 bits per character
1 =
7 bits per character
mm
Protocol selection
00 =
PPI slave mode
01 =
Freeport mode
10 =
Reserved (defaults to PPI slave mode)
11 =
Reserved (defaults to PPI slave mode)
System Manual, 09/2015, A5E03822230-AC
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents