16
PLC与SQL数据库的数据交互 PLC与SQL数据库的数据交互 PLC与SQL数据库的数据交互
Connecting a S7-1200 / S7-1500 to a SQL Database
The Tabular Data Stream protocol (TDS) gives you the ability to establish a direct connection with a Microsoft SQL server. Using TDS, you can log in to an SQL server database and transmit SQL instructions. In this way it is possible to read data from the database, or send them to the database for storage.Based on the "Open User Communication blocks" (TCON, TSEND, TRCV and TDISCON), S7-1500 and S7-1200 can emulate the TDS protocol and establish a connection to a Microsoft SQL server. By using the statements "insert into", "update" and "select" you can store data in the database, update and read data from the database.