• Communicate directly with a SQL server SQL communication in a PLC!
without the need of Windows-software as Automatic Syd has developed a SQL client, which OPC server, Visual Basic, .NET etc. can be used in a standard Siemens S7 PLC with • Easy to configure and integrate in the PLC Ethernet connectivity. program, including diagnosis and fault This eliminates the requirement for a Windows based, third-party software gateway or any handling. hardware gateway, as the PLC communicates • Available for standard Ethernet enabled directly with the SQL server! Siemens S7 CPU’s without the use of special hardware modules.
Data between production and office
The need for data exchange between production floor and the production planning office keeps increasing. The planning department requests to know the current capacity throughout the production to be able to react on production stops and bottlenecks. The demand for evaluating the material, energy and time consumption increases. To obtain certain certifications it is a must to be able to log and trace the complete life cycle of a particular product. The benefits of this solution:
Flexible production • No risk of an unstable Windows
Many factories today have order based environment with the need for continuous production, where the production facilities must updates, or programs which suddenly stop be reconfigured for every different order. If this working after the installation of a Service reconfiguration is done manually, the risk of Pack or software update. failure increases. Further typically no • Full integration of SQL communication in documentation for the actual used production the current control system, enabling easy parameters for the particular orders is preserved. visualization of SQL communication status Direct data communication between the ERP in the existing user interface (e.g. SCADA or system and the PLC’s on the production floor gives operator panel). the production stations directly access to order • Only one place to parameterize which data information for the current order. to transfer to/from the SQL server. The Afterwards the exact used parameters, measured configuration is done with simple ladder process values and any alarms can be logged. programming in the PLC. No OPC server, driver .ini file, tag list or gateway to reconfigure! • The performance is typically better than OPC connections due to less overhead. PLCSQL – independent SQL client in a Siemens PLC
Configuring PLCSQL Programming the dataflow
PLCSQL is available as a S7 Example project with a At Automatic Syd we asked ourselves: Why is it Siemens WinCC Flexible user interface.interface From always necessary to reconfigure the desired values within this interface it iss possible to configure the to be transferred to/from to the SQL-server SQL connection (network card type, server IP somewhere else, than exactly where you need address, port, user name,, password etc.). them? With the PLCSQL solution it is the PLC- programmer, with the use of simple ladder programming who decides which values are used. In the example below all the necessary code is shown to log a new value from the PLC to the SQL server. A measured process value is saved as parameter 82.
If preferred, this configuration can be made
programmatically instead.. All setup parameters are saved in a simple setup DB block in the PLC. P This enables development of functions for dynamic setup parameters,, e.g. for handling server failover swap etc. The bit UpdatedParameters for parameter 82 is The SQL queries for retrieving, inserting or set to high. The PLCSQL will then automatically manipulating SQL data can be freely customized as save this value in the SQL server – without any a text string in the PLC. In the example project proj we further programming! The same simple method is have included function blocks for generating used to read e.g. g. order values from the SQL dynamic SQL queries for logging and retrieving server. The client is able to handle the BOOL, INT, data in an easy way. DINT and STRING data types.
Tested Siemens CPUs Tested SQL-servers
• S7-300 with integr. PN, e.g.. 315-2DP/PN 315 • Microsoft SQL Server 2005 • SoftPLC, (WinAC), e.g. Microboxbox 427B 427 and C • Microsoft SQL Server 2008 Express • ET200s CPU, e.g. IM151-8 • Microsoft SQL Server 2008 Advanced • S7-300 with network card, e.g. CP343-1 • Microsoft SQL Server 2012 RC0 • S7-400 with onboard network card • MySQL 5.1 • S7-400 with integrated PN controller.