Functions
5.2 CAN transparent
SIMATIC PN/CAN LINK
76
Operating Instructions, 03/2022, A5E39895388-AC
Changing the receive filters during runtime
The receive filter can be changed from the S7 user program at runtime by writing a data
record to the data record index 0x210 of a receive proxy module.
The PN/CAN LINK makes the corresponding data record available on the respective receive
proxy module.
Each receive proxy module can have up to 16 receive filters. If a received CAN message
matches one of the filters, it is entered in the receive buffer.
Each individual filter consists of a 32-bit value
"
Criterion" and a 32-bit value "Mask".
If a bit in "Mask" is "0", the received CAN messages are
not
checked against the corresponding
bit in the "Criterion".
To ensure that a bit set in "Criterion" acts as a filter, the corresponding bit in the "Mask" must
be set to "1".
Structure of the data to be written with WRREC
Data record size: 8*n bytes; n = Number of filters = 1 to 16.
Criterion filter 1 (32-bit, Big Endian)
Mask filter 1 (32-bit, Big Endian)
Criterion filter 2 (32-bit, Big Endian)
Mask filter 2 (32-bit, Big Endian)
...
Criterion filter 16 (32-bit, Big Endian)
Mask filter 16 (32-bit, Big Endian)
Note
If the number of written bytes is not a multiple of "8", the extra bytes are ignored. A
maximum of 16 filters with 4 bytes each for Criterion and Mask are permitted. If the number
of written bytes is
≥
128, the write access (WRREC) is rejected with PROFINET error code
0xDF80B100 and the filter remains unchanged.
Содержание SIMATIC PN/CAN LINK
Страница 1: ......