Programming
6.2 Programming via USB interface
SIMATIC RF1000
Operating Instructions, 02/2019, C79000-G8976-C432-04
29
By activating/deactivating the "Autoread" function, the "MessageBuffer" is deleted. This
ensures that no incorrect results are supplied by a subsequent call of the
"Autoread_GetMessage" function when no card is located in the antenna field.
Function call
int
brp_exec_comand(
int Handle,
byte devcode,
byte cmdcode,
byte * param,
byte param_len,
init timeout,
init * Status,
byte * resp,
int * resp_len,
init max_resp_len
);
Table 6- 15 Description of the parameters
Parameter
Description
brp_exec_comand
The parameter activates/deactivates the "Autoread" functionality of the
SIMATIC RF1070R.
Handle
The session key returned by the function "brp_open_usb_session".
devcode
0x05
cmdcode
0x00
param
Buffer for the function parameters:
•
0x00: The "Autoread" functionality is deactivated and VHL functions can
be used.
•
0x01: The "Autoread" functionality is permanently switched on. There is
a permanent check as to whether a card is located in the antenna field.
•
0x02: The "Autoread" functionality is executed once as soon as a card
enters the antenna field. This is followed by a switch to VHL mode. The
card identification is executed one more time with another call using the
parameter value 0x02.
param_len
0x01
timeout
Time in [ms] until the action is aborted (500 is the recommended value).
Status
OK
You will find more information on the reader status in the section "Status
resp
Buffer for the received data
resp_len
Current length of the response data in bytes
max_resp_len
Maximum length of the response data
Return value
•
BRP_OK
You will find more information on return values in the section "Return val-