Programming interface
4.2 The demo application
SIMATIC RF1060R
22
Operating Instructions, 05/2017, C79000-G8976-C432-02
4.2.2
Creating your own application
Requirement
●
You have installed the DLL file and the demo application.
●
The reader is connected.
Note that the demo application is capable of running without Microsoft Visual Studio
(Express) being installed. You can view the source code with a text editor. To edit the source
code you require Microsoft Visual Studio (Express) on your PC.
Creating your own application
Follow the steps below to create your own application:
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").
There is transponder in the read range:
–
The transponder is recognized.
–
Read out the serial number ("vhl_get_snr").
–
Signal the application that the transponder with the serial number "x" was recognized.
–
Check cyclically whether the transponder is still in the read range.
The transponder is no longer within the read range:
–
Signal the application that the transponder with the serial number "x" is no longer
recognized.
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.