S7 PLC configuration
This tutorial is intended to demonstrate the process of configuring the Inveo BoxID RFID reader with Siemens S7-300/S7-1200/S7-1500 controllers.
We start by creating a new project and selecting a controller – this can be any controller from the S71200/S71500 family and some S7300 models. In our case, it will be a 1511-1 unit.
Ensure that the reader and the controller are on the same network.
In our case it will be:
- S7-1500 – IP: 192.168.0.1
- Inveo BoxID reader – IP: 192.168.0.2
To configure the network settings in the S7-1200/S7-1500 controller, go to the “Device Configuration” tab. Pressing the right mouse button on the controller image, select the “Properties” tab to open the settings. In the “Ethernet Addresses” tab, set the IP address and subnet mask.
To allow the controller to communicate properly with the RFID reader, find the “Protection and security” tab then set the parameters according to the following guidelines: enable “Full Access” and “Put/Get”. Setting these parameters will allow direct access to the controller’s memory and data exchange between devices.
Configuration file
Next, in the tree of our project, we look for the “External source files” tab, where we will need to include a data file that will be used for communication between the PLC and the RFID reader. The data block can be downloaded from the Inveo website or from the BoxID reader’s built-in web server.
Link to download the file:
https://github.com/majorBien/Inveo-RFID-Reader—Tia-Portal-Sample-programs-and-external-blocks
You can also downlaod it from our site in “Downloads” tab.
Then right-click on the file with the extension “.db” and select the option “generate blocks from source”. After selecting the above option, three data blocks will be created automatically, and their numbers will be given incrementally depending on the presence of other data blocks in the project.
Note !!!
Block date numbers were assigned automatically – you will also need to enter them in the network settings of the BoxID reader in the appropriate place
(this will be described in the next step)
The file name may vary depending on the reader version, e.g. “standard”, “lcd”, “lcdKeyboard”
The configuration of the device from the Tia Portal side has been completed – we will still return to it in order to show the possibilities that the Inveo BoxID reader gives us.
BoxID reader configuration
It’s time to configure the BoxID reader. The operation of this reader is done entirely through the built-in web server. When you connect to the reader for the first time, you should enter its default IP in the browser: 192.168.111.15. During this operation, make sure that our network card is in the same class as the reader.
After connecting with the reader we will be asked for login and password, the default login credentials are:
login – admin
password – admin
It is recommended to change the login and password so that unauthorized people do not have access to change the device configuration.
When using our Discoverer application, our network card may be on a different subnet.
After correctly logging in to the reader’s website, we should see such a panel:
The next step is to set the appropriate IP address for the reader so that it is in the same class as the PLC, as we remember at the beginning we determined that our application will be configured as follows:
- S7-1500 – IP: 192.168.0.1
- Inveo BoxID reader – IP: 192.168.0.2
In order to get this effect, we need to go to the “Administration” tab, then to “Network” and change the “DHCP” parameter to “Disable” and set the IP address to the one our application requires – in this case it will be 192.168.0.2.
After pressing the “Save” button, the changes will be overwritten, and the reader will already restart with the newly assigned IP address. Further possible configuration of the reader via the web server from now on will be possible only after changing the settings of the network card of the computer you are using to the appropriate class of IP address.
DB numbers
We’ve come to a place where the RFID reader and the PLC are on the same network, but they can’t yet exchange any data with each other.
Therefore, we need to enable them to do so by going to the “Services” tab, then “PLC”. In the above tab, select the PLC family, in our case “S7”, and the block date numbers that were assigned automatically at the project configuration stage in Tia Portal. In our case, these were DB1, DB2 and DB3. It is very important to assign the right numbers to the right fields because the blocks differ in functionality. The number of blocks depends on the model of the reader we are configuring.
The last important parameter is the slot, it will vary depending on which controller you are working with. For S71200/S71500 controllers the slot is 0 or 1, for S7300 it is 2.
Also remember to set the IP address of our controller in the “PLC Server Addr” field.
Communication test
To check whether the configuration was successful, enter the “control” block and check whether the value of the variable named “I_liveBit” changes its state. Cyclic switching of the state of the value of this variable symbolizes the correct establishment of communication between devices.
Ending
If the communication works properly it is time to create the first application with the BoxID reader – welcome to the next part of HOWTO: