In today’s world of industrial automation, data is a very important part. Getting instant data from sources and using them for different purposes is as crucial as running a system.
Everyone usually knows how to integrate SCADA with various database systems, like SQL servers. However many ignore the power of PLC in integrating with databases. They too can be used for this purpose.
If we use PLC, programmers can work with them in emergency situations like SCADA failure and get their work done by coding it appropriately. In this post, we will see how to use PLC with SQL database.
For those who are not familiar with SQL server, it is a database management tool which stores a large amount of data in real time format sequentially, and queries are written in it either through some external source, like a PLC, for retrieving data.
For storing data in it, logic is written in PLC which when executed stores data in SQL. This is a simple concept, which is explained further in the post more briefly for it’s advantages.
Suppose you have a very large-scale system where the operator has to feed hundreds of time schedules for operating particular functions every day. Instead of using vast coding and variables in PLC for storing data entered in SCADA and operating it once the time arrives, just feed all the variable data to the SQL server through PLC every time a new recipe is created.
The SQL will store real-time date and time of the values entered and will give operators option of choosing them according to date and time filtered. For example, the SQL has five entries from 1st Oct to 5th Oct for various types of schedules entered. The benefit is that the operator can choose any one required and then run the system.
If SQL was not there, he would have to run only one option of either 1st Oct or any other date. Or else, he would have to utilize memory of SCADA or PLC, which is waste of data and coding. This same thing becomes easier through SQL server.
Another advantage is that SCADA code size becomes reduced and it would be used for other purposes. Scheduling is used in many applications and using PLC for it along with SQL makes system more efficient.
Consider a plant having 10 sequences. Every sequence has a barcode reader in it for starting the action on the required product. If the barcode is read in SCADA, then the corresponding data feed to PLC or in short, SCADA is the medial intervene for initiating communication between PLC and data; then just directly connect PLC with SQL.
SQL will directly communicate with PLC for determining barcodes and other data for starting or stopping a sequence. Such bulk data from plant sequences helps reduce coding in SCADA and makes system faster to operate. Because PLC is written with coding for sequence operation, why not directly connect it with SQL and use the system.
There are many applications where one PLC in a location needs data from another PLC location for doing a work. In that case too, traditionally SCADA is used for integrating all the PLC’s and managing them.
In that case, if PLCs are directly connected to the SQL server, data will be synchronized through the date and time of SQL; thus, eliminating problems of multiple RTC (real-time clock) synchronization of PLCs.
Also, PLC will directly communicate with other PLC for asking any data or give any data through the SQL server. Any alarm or event in a PLC will also be communicated to other PLC and would help in tracking real-time records.
Handshaking is a process where one party is acknowledged by the other party that the job has been completed. Basically, it is a response required so that the party can start its other work. This method works well with PLC and SQL servers.
The SQL server can directly communicate with PLC by sending event notifications in real time, or alarm notification data in real-time. This means, suppose that the job has taken 3 days to complete.
Then the completion acknowledgment will be sent as a separate event to the PLC, and as it also has 3 days of data in it, the operator can view the whole process in SCADA reports easily. So, handshaking is an important reason for communicating PLC with SQL directly.
If you liked this article, then please subscribe to our YouTube Channel for Instrumentation, Electrical, PLC, and SCADA video tutorials.
You can also follow us on Facebook and Twitter to receive daily updates.
Read Next:
Omron PLC logic for sorting the number of products and counting the number of products…
Learn the water fountain control logic using the PLC timers programming to control the high…
Open Telemetry is a framework for collecting data in cloud-native applications including tracing, metrics, and…
This article is about controlling the Pneumatic cylinder and Pneumatic motor in the assembly line…
In this post, we will learn the basic requirements for a network switch to be…
The PLC panel and MCC panel interface signals are start, stop, run feedback, trip, local…
View Comments
Amazing this article!!! Thank you so much!!