comptonalvaro
Member
Hello.
I am a very begginer about PLCs, and I would like to know if it is possible the following case.
I have a S7 PLC and a TP1500 touchscreen which saves logs in a SD card. This logs has alarms, errors and another information.
Now, I want to save the data in a Sql Server database.
I want to develop a small application for PC, using C#, to can communicate with the PLC. I have read about S7Net, S7Net Plus, Sharp7 and Snap7, they allow the communication about both devices.
The idea is that this PC application receive notifications from the PLC, the it can handle and send and email to user, save the message in the database and do more actions.
But for me one problem is that all the examples that I have seen using the libraries for C#, it allows to PC read and write data to PLC, but I don't see the option in which the PC is waiting to be notify by the PLC. So is the PC application which has to read data periodically from the PLC, in a infite loop, and check if there is logs or not.
I have seen the possibility that I coould use Lsql blocks in the PLC program to save the data directly in the database. it is a good option, but how the process is direct, the PC application doesn't know about it at first, so I can't send notifications to the user. For that, I should to check the data in database periodically to know. So it is a bit less efficient. For this solution I see the example in the Siemens web: Connecting a S7-1200 PLC / S7-1500 PLC to a SQL Database - ID: 109779336 - Industry Support Siemens.
In sumary, I would like to know if there is some way the PLC notifies to the PC application, which is listening for events, instead to have to read PLC periodically in a loop.
Thanks.
I am a very begginer about PLCs, and I would like to know if it is possible the following case.
I have a S7 PLC and a TP1500 touchscreen which saves logs in a SD card. This logs has alarms, errors and another information.
Now, I want to save the data in a Sql Server database.
I want to develop a small application for PC, using C#, to can communicate with the PLC. I have read about S7Net, S7Net Plus, Sharp7 and Snap7, they allow the communication about both devices.
The idea is that this PC application receive notifications from the PLC, the it can handle and send and email to user, save the message in the database and do more actions.
But for me one problem is that all the examples that I have seen using the libraries for C#, it allows to PC read and write data to PLC, but I don't see the option in which the PC is waiting to be notify by the PLC. So is the PC application which has to read data periodically from the PLC, in a infite loop, and check if there is logs or not.
I have seen the possibility that I coould use Lsql blocks in the PLC program to save the data directly in the database. it is a good option, but how the process is direct, the PC application doesn't know about it at first, so I can't send notifications to the user. For that, I should to check the data in database periodically to know. So it is a bit less efficient. For this solution I see the example in the Siemens web: Connecting a S7-1200 PLC / S7-1500 PLC to a SQL Database - ID: 109779336 - Industry Support Siemens.
In sumary, I would like to know if there is some way the PLC notifies to the PC application, which is listening for events, instead to have to read PLC periodically in a loop.
Thanks.