Programming
6.2 Programming via USB interface
SIMATIC RF1000
28
Operating Instructions, 02/2019, C79000-G8976-C432-04
Function call
int
vhl_write(
int Handle,
byte VHLFile,
word Address,
word Length,
byte * Data,
int * Status
);
Table 6- 14 Description of the parameters
Parameter
Description
vhl_write
The parameter writes data to a previously specified memory area of the
card.
Handle
The session key returned by the function "brp_open_usb_session".
VHLFile
Number of the VHL file that is to be used.
Address
Start address of the data that is going to be written.
Length
Length of the data that is going to be written as of the start address.
Data
Area in which the written data is stored (max. 65535 bytes).
Status
•
OK
•
CARD_NOT_SELECTED_ERR
•
HF_ERR
•
HW_ERR
•
CONFIG_ERR
•
AUTH_ERR
•
READ_ERR
You will find more information on the reader status in the section "Status
Return value
•
BRP_OK
You will find more information on return values in the section "Return val-
6.2.1.13
Autoread_SetMode
This function controls the "Autoread" functionality during runtime. The memory content of the
cards that enter the antenna field of the reader is automatically read in "Autoread" mode
without an explicit read job. The read data is output with the "Autoread_GetMessage"
function.
Note that the "vhl_select" function is executed cyclically in "Autoread" mode. If the
"vhl_select" function is executed as well, this can result in the card not being recognized
when it enters the antenna field of the reader because it was already read in "Autoread"
mode. In addition, the mode is ended with the function call "vhl_select" in "Autoread" mode.
Make sure that the "vhl_select" function is not executed in addition in "Autoread" mode.