
Appendix
A.2 Operation of optical handheld readers, access control readers or serial devices
SIMATIC RF170C
Operating Instructions, 02/2022, J31069-D0176-U001-A6-7618
65
A.2.5
Functions and commands for optical handheld readers (≥ AS 2) access
control readers / serial devices
With the “Freeport protocol” the communications module RF170C RS-422/RS-232 has a
further interface setting. The "Freeport protocol" allows communication between any serial
field device (e.g. barcode scanner, access control reader, intelligent sensor or other serially
connected automation component) and the ET 200pro. One or two field devices of the same
type can be operated with an RF170C via RS-232 or RS-422.
The parameter assignment options for the protocol are descried in section ""Module
parameters" parameter group (Page 30)".
Functions and commands
Communication can be established using the ident blocks / the ident profile and the function
block FB 45. The “Write” command handles the sending of data and the “Read” command the
reception.
Table A- 10 Compatible controllers/program blocks
Program blocks
Controllers
S7-300 / S7-400 and
STEP 7 V5.5
S7-1200 and
STEP 7 Basic/Professional
S7-1500 and
STEP 7 Basic/Professional
FB 45
Yes
No
No
Ident profile/Ident blocks
as of V2.0
Yes
Yes
Yes
The following table shows the block-specific commands that you can execute with serial field
devices.
Table A- 11 Overview of the commands
Program blocks
Command
Description
FB 45
Init_run
Initialize the device
The parameter value "option_1" can be set to "0" or "2". Further input
is unnecessary.
Read
Read data
•
Address "0x0000"
The length of the valid data is entered in the first 2 bytes of the
result. The user data is entered starting at the third byte. Max. net
data 231 bytes; no error message if the length is exceeded.
When the "On receipt of the end delimiter(s)" parameter is used,
the result is increased by 1 or 2 bytes accordingly.
•
Address "0x0002"
No length information in the result; max. net data 233 bytes
Write
Sending data
The address must be specified as “0xFFFF”. Max. net data 233 bytes
(without length information); no error message if the length is
exceeded