The demo application
7.2 Create your own PC application via the USB interface
SIMATIC RF1000
Operating Instructions, 02/2019, C79000-G8976-C432-04
49
Create your own "Read/write memory area" application
Requirements: A corresponding configuration is stored in the reader.
Follow the steps below to create your own application for reading or writing user data:
1.
Establish the connection to the reader ("brp_open_usb_session").
2.
Check cyclically whether a transponder is located in the read range of the reader
("vhl_select").
When a transponder is located in the read range:
–
The transponder is recognized.
–
You can read data from the memory area with the "vhl_read" function.
–
You can write data to the memory area with the "vhl_write" function.
3.
Terminate the connection to the reader ("brp_close_session").
The source code of the demo application can serve as an example for your own application.
Create your own "Parameter assignment via configuration card" application
Follow the steps below to create your own application for parameter assignment of the
reader using a configuration or identification card:
1.
Establish the connection to the reader ("brp_open_usb_session").
2.
Check whether a configuration/identification card is located in the read range of the
reader ("vhl_select"; "AllowConfig = true").
If a configuration/identification card is located in the read range, the status code
"CONFIG_READ" or "HF_ERR" is returned and the configuration is transferred to the
reader. Parameterization is complete as soon as "vhl_select = STATUS_OK" is returned.
3.
Terminate the connection to the reader ("brp_close_session").
4.
Establish the connection to the reader again ("brp_open_usb_session").
The source code of the demo application can serve as an example for your own application.