Wednesday, August 23, 2017

Bridging SQL to Profibus


A client came to us with a situation where he required some data on his SQL database to be sent to his PLC. In his case, he has a couple of sensors inserting data directly to his SQL database and he needed these data to be processed by his Profibus PLC controller so that the correct actions could be taken.

The solution accepted by the client was a SQL to Profibus bridge. IDX offered to provide a custom software that would extract the SQL data in real-time and expose the extracted data as a Modbus TCP slave device. The data could then be converted to a Profibus protocol using a gateway such as the Anybus X-Gateway AB9001, and sent directly to the PLC controller.

We provided the client with a custom software called IDX 8. IDX 8 is a customised software offered by IDX, it contains a suite of different functionalities which includes tag management, remote monitoring, historian, alarms and events, data exchange, etc. The function of interest here is its data exchange component which allows for real-time data to be shared with various different systems.
After the client installed IDX 8 on his test server that he brought over for a demonstration of our proposed solution. We continued to setup IDX 8 to extract the SQL data and expose it as a Modbus slave, the steps for the setup are as follows:
  • Setup Data Exchange service
  • Setup SQL interface
  • Setup Modbus Slave interface
After the setup we demonstrated to the client that the data was indeed being extracted from the SQL database, this is shown below using the “Live Tag View” function that IDX 8 supplies:
The ANYBUS X-Gateway AB9001
To configure the AB9001, all that is required is an “IPConfig.exe” tool supplied by HMS and a web browser. We used the “IPConfig.exe” tool to setup the IP address of the AB9001 gateway then configured the Modbus settings using a web browser by accessing the device’s web interface using the assigned IP address.
The hardest part in this process was the mapping of the Modbus transactions to instruct the Modbus master to read the correct values from the correct Modbus slave registers. Once that was done, we used the “Transaction Monitor” function that is provided by the device through its web server to demonstrate to the client that the values read by IDX 8 was indeed being exposed as a Modbus slave device. This is shown in the image below:
Setting up the Anybus X as a PROFIBUS slave
Setting up the Profibus DP slave on the Anybus X-Gateway was done by just assigning a slave address to the device on its “Profibus DP V-1” menu in its web server. After that we then checked the mapping of the Modbus Master registers to the Profibus DP Slave device using the “Mapping Overview” page provided by the web server.
To confirm that the gateway was indeed ready for Profibus communication, we setup a Profibus Master simulation using a tool called Profitrace from Procentec. We demonstrated to the client that the Profibus Master was indeed in data communications with the gateway and that data from that was originally from the SQL was indeed being sent through to the simulated master, this is shown in the image below:

Author: Jackson Kao

No comments:

Post a Comment