s7-1200 or Comfort panel to SQL

rQx

Lifetime Supporting Member
Join Date
Oct 2010
Location
Trelleborg
Posts
1,051
Hi,

Today I have a s7-1200 with comfort panel logging to excel from vbscript.

The thing my customer want is to logg values to SQL instead of .csv as we do today. I have googled and I can't seem to find if it is possible. Maybe I have to switch to s7-1500, but I would rather not since this is more expensive both hardware and software. I rather not add a PC on site either for the database. I will also add that my knowledge of SQL, MQTT, OPC UA and s7-1500 is zero. I'll write down my thoughts

1. I think that I can't log it with the s7-1200 straigh off so I was thinking if I can use the Comfort panel maybe with VBscript? Install SQL compact edition on the HMI if that is possible?

2. Another thing would be to log it on Amazon Web Service. I've read that I have to use the MQTT blocks and I found an example here: https://support.industry.siemens.co...mqtt_client-for-simatic-s7-cpu?dti=0&lc=en-DE
It says on the page that "Note
Using MQTT with a qualified domain name is only possible with SIMATIC S7-1500."

But when reading in the pdf is says "With S7-1200 CPUs you can you can reach the MQTT broker with TIA Portal
V16 library block and Firmware 4.4 via a domain name ("Qualified Domain
Name", in short: QDN)"

So I guess that the functionality of the MQTT is the same for 1200 and 1500?

3. The s7-1200 can now be OPC UA server, does this help me?


Thoughts?

/Tim
 
To the best of my knowledge, it is not possible.

I think the most direct and futureproof solution is to have an OPC UA client for SQL. And then let the S7-1200 be OPC UA Server.
If you google for "OPC UA client SQL server" you should get plenty of hits.

An alternative is OPC DA. For example Simatic Net as OPC DA server on the PC, and the an OPC DA Client for SQL.
OPC DA is simpler than OPC UA. But on the other hand requires the OPC DA server as a software on the PC, and is going to be less future-proof.
 
You might be able to install SQL Server Compact v4.0 on the HMI's Windows Embedded Compact platform. (I think it uses CE6?)
SQL CE has been deprecated though for the last 7 years, but still supported.
 
Can you install any non-Siemens software on Siemens Comfort panels ?
I know there was a work-around with the older panels, but I havent heard it is possible with the Comfort Panels.
 
Perhaps you can't. I might be spoiled by Beckhoff Panels :)

Anywho, if the customer is asking you to log to a SQL server, ask where that server is.
You don't want to log to the HMI anyway if it's important data. Operators and their forklifts you know.
 
To the best of my knowledge, it is not possible.

I think the most direct and futureproof solution is to have an OPC UA client for SQL. And then let the S7-1200 be OPC UA Server.
If you google for "OPC UA client SQL server" you should get plenty of hits.

An alternative is OPC DA. For example Simatic Net as OPC DA server on the PC, and the an OPC DA Client for SQL.
OPC DA is simpler than OPC UA. But on the other hand requires the OPC DA server as a software on the PC, and is going to be less future-proof.

Thanks for the input! Maybe this is the best approach with OPC UA Server option. Good thing they just released the UA for s7-1200
 
I've looked into this before, but do not have any direct experience using it: https://plcdirectsql.com/en/

Basically it's a set of serial number locked (to the CPU) function blocks that facilitate communication directly to and from a SQL server, without needing an intermediary like a PC.
 
Last edited:
I've looked into this before, but do not have any direct experience using it: https://plcdirectsql.com/en/

Basically it's a set of serial number locked (to the CPU) function blocks that facilitate communication directly to and from a SQL server, without needing an intermediary like a PC.

Thanks for the info. I've now read the user guide and in it it says I have to download MsSQL on my PC and act as an server. So I guess I need a PC on site or connect my equipmen to internet to be able to use this. But it may come in handy
 
I've looked into this before, but do not have any direct experience using it: https://plcdirectsql.com/en/

Basically it's a set of serial number locked (to the CPU) function blocks that facilitate communication directly to and from a SQL server, without needing an intermediary like a PC.

Read alittle bit more, it seems that it can only write to a limited columns. I have approx 30 columns that I wan't to write. That being said, I'm not used to SQL so I may interpret the user guide wrong
 
I've searched for OPC UA client for logging and the prices was pretty high. OPC datalogger from software toolbox was 1000$, SQL4automation is 750$. Does anyone have experience with a littlebit more inexpensive OPC UA client logger to SQL? Or maybe MQTT to AWS is cheaper but more to program by myself.
 
If it helps... I made the Siemens library for MQTT work without problems, but that was on older version, without DNS..
 

Similar Topics

Hello Dear engineers; I'm using a comfort panel (Tp1200) in conjunction with CPU-300 (Siemens brand) and TIA PORTAL V.13. I've searched among...
Replies
1
Views
8,704
Hi all, On my project I have a TP1200 Comfort Panel (6AV2 124-0MC01-0AX0). Unfortunately I don't get to see the hardware until I get to site. I...
Replies
1
Views
4,454
Hi all, Quick question. I have an alarm block in my 1200 PLC with multiple alarm inputs declared as bits. Say db500.dbx0.0 to dbx3.7 I have a...
Replies
6
Views
3,894
Guys, Is this touch panel limiting the types and size of SD/MMC card for data logging?
Replies
0
Views
2,533
Been fighting all morning with a stubborn HMI. It just won´t connect with the plc. attaching from settings. Have i missed anything? Both plc and...
Replies
5
Views
297
Back
Top Bottom