Connection between s7 1200 and sql server

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
shakil385
Posts: 1
Joined: Sun Nov 20, 2016 3:19 am

Connection between s7 1200 and sql server

Post by shakil385 »

Hello dear, I need to connect my PLC s7 1200 with sql database to get plc tags value bt i
cannot convert them on datablock and even facing problems to configure sql block.
Can anybody give me sample program.
aliuta2000
Posts: 17
Joined: Wed Dec 16, 2015 8:17 pm

Re: Connection between s7 1200 and sql server

Post by aliuta2000 »

Hello,
i am aslo new in this area for connection between PLC and SQL server.
I have succeded to Instal and to configure Microsoft SQL 2014 express.I havecreated succesfull databes and table inside.
If there is somebody with experince to give an TIA V 13/ V14 example of connection , will be greate .

Thank you in advance.
CoMod
Site Admin
Posts: 3992
Joined: Thu Feb 16, 2006 3:25 pm
Location: Russia

Re: Connection between s7-1200 and sql server

Post by CoMod »

Connection between s7-1200 and sql server via "User program" ?
OPC
https://support.industry.siemens.com/cs ... ontrollers
or direct acess to s7-1200/s7-1500/s7-300/s7-400 via Profinet https://www.mhj-tools.com/comdrvs7/
https://www.youtube.com/watch?v=o7BKYhf3Sys
aliuta2000
Posts: 17
Joined: Wed Dec 16, 2015 8:17 pm

Re: Connection between s7 1200 and sql server

Post by aliuta2000 »

Yes, i am curious if there is any chance for direct connection S71200/1500/S7-300/400 to a server for reading /writting to DB .

i have seen it is possible via WinCC, are few examples, but i have senn some movies where are direct connection to a DB.

Is more interesting direct connection.
If you/ somebody else have some example, this i am intereste to learn.
Thank you in advance
CoMod
Site Admin
Posts: 3992
Joined: Thu Feb 16, 2006 3:25 pm
Location: Russia

Re: Connection between s7 1200 and sql server

Post by CoMod »

https://www.mhj-tools.com/comdrvs7/
Download the demo version: Demo ComDrvS7 V6 (ZIP)
with many examples in english language.
Answers to FAQs
Faq & Info
Faq & Info
Posts: 178
Joined: Thu Oct 13, 2005 6:42 pm
Location: Frequently Asked Questions – Часто Задаваемые Вопросы

Connecting a S7-1200 / S7-1500 to a SQL Database

Post by Answers to FAQs »

(sfaq) https://support.industry.siemens.com/cs ... /109779336
Connecting a S7-1200 / S7-1500 to a SQL Database

Code: Select all

https://support.industry.siemens.com/cs/document/109779336/connecting-a-s7-1200-s7-1500-to-a-sql-database
Image