Siemens S7/TIA v18: Logging of Data...

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
Hi,

I've created this 'report summary' page (see pic).

Basically, this screen is a summary of all the tags saved (by pressing a SAVE button) from previous screens.

What I need to do now is... when the operator presses "Generate Report", it populates all this data into a report/save file...could be a simple spreadsheet (like in Mitsubishi Q-series, you can save this sort of data to a CSV/excel file).

It is not a scheduled logging of data (e.g. once per minute) - it just needs to be logged when the button is pressed...I envisage a 'new row' being created in the 'spreadsheet' each time the button is pressed.

Also, I can't figure out 'where' such a file would be saved (has the PLC S7-1212C got a memory card in it? Would it be saved to my development laptop) or how the spreadsheet would be accessed?

All a bit new to me, so any help would be appreciated.
Cheers

REORT_page.png
 
Last edited:
There is a reporting function in WinCC (I have never used it).
But only from Comfort Panels and up.

Another way could be WinCC scripting, but again only from Comfort Panels and up.

You can write to the flash card in S7-1200 (when installed) with the DataLog library functions.
edit: Under the extended instructions .. Recipe and data logging.
You can access the log files via the webserver.
The S7-1200 does not have to have a flash card installed, not like in S7-1500 where it is mandatory.
 
There is a reporting function in WinCC (I have never used it).
But only from Comfort Panels and up.

Another way could be WinCC scripting, but again only from Comfort Panels and up.

You can write to the flash card in S7-1200 (when installed) with the DataLog library functions.
edit: Under the extended instructions .. Recipe and data logging.
You can access the log files via the webserver.
The S7-1200 does not have to have a flash card installed, not like in S7-1500 where it is mandatory.

Thanks, @JesperMP.

My HMI is a KTP1200 Basic PN - so I'm guessing it's lower spec than a Comfort panel.

There must some stuff online/youtube, so I will have a look. Cheers
 
Don't know the siemens HMI's but generally look at the Events page perhaps this enables you to save data in probably CSV type file that can be imported to Excel, it may be you need to write a script to do that but don't know if scripting is supported on that panel, I'm sure others here know what is required.
I suspect that the files will be saved on the HMI memory or SD card, be aware that regardless of if it is on the HMI or PLC card that you will need to do some housekeeping i.e. remove older files or the memory will fill up.
 
There are datalog blocks. You don't need an MMC or SD card to do it, but obviously it does take the PLC memory. I think it's load memory, but I'm not sure because it doesn't show up in the program info page at all.

It's a bit of a pain to get it going, I don't think I found any good tutorial videos on it and my Hans Berger book didn't have any useful information that wasn't in the help file.
Once I worked it out, I bundled it all into an FB as what I needed took a lot of rungs of logic and several repeated tags and I condensed this down to five inputs to my FB. It's a bit rough and has no error handling, but it does what I need it to.
 
There is a reporting function in WinCC (I have never used it).
But only from Comfort Panels and up.

Another way could be WinCC scripting, but again only from Comfort Panels and up.

You can write to the flash card in S7-1200 (when installed) with the DataLog library functions.
edit: Under the extended instructions .. Recipe and data logging.
You can access the log files via the webserver.
The S7-1200 does not have to have a flash card installed, not like in S7-1500 where it is mandatory.

Anyone know why I cannot tick this box? See picture

For info, My PLC CPU is a S7-1212C.

I was trying to follow the steps in this video @28s
https://www.youtube.com/watch?v=E2tdtwrT_sE

Thanks

webserver not selectable.png
 
Last edited:
Pay attention to the HTTPS box, if you just type in the IP address it won't work, you have to use the "https://" prefix. Caught me out the first time I tried using it.

You also have to set up a user with a password and make sure in the access level tab you've ticked the boxes relevant to datalogs.
 
Pay attention to the HTTPS box, if you just type in the IP address it won't work, you have to use the "https://" prefix. Caught me out the first time I tried using it.

You also have to set up a user with a password and make sure in the access level tab you've ticked the boxes relevant to datalogs.
Thanks for point that out!...that box was already ticked by default and, to be honest, I wasn't even sure what it meant.
Cheers
 
Pay attention to the HTTPS box, if you just type in the IP address it won't work, you have to use the "https://" prefix. Caught me out the first time I tried using it.

You also have to set up a user with a password and make sure in the access level tab you've ticked the boxes relevant to datalogs.

I've written to the datalog, but struggling to go to IP address of the PLC 192.168.0.1 (with or without "https://" prefix)

Where is this 'access level' tab? I need to set up a username/password.

Thanks
 
Last edited:
I've written to the datalog, but struggling to go to IP address of the PLC 192.168.0.1 (with or without "https://" prefix)

Where is this 'access level' tab? I need to set up a username/password.

Thanks

In the screenshot from the earlier post (#9) there's a table titled user management. Add a user and set permissions there.
I would have thought it would let you see the PLC landing page without that though. It must be the only thing on your network with that IP or I don't think you could go online with it.
 
In the screenshot from the earlier post (#9) there's a table titled user management. Add a user and set permissions there.
I would have thought it would let you see the PLC landing page without that though. It must be the only thing on your network with that IP or I don't think you could go online with it.


I've created an account, Admin01 with a password (had to go Offline to create it).

Gone back online now.

Still don't see drop-screen when I type 192.168.0.1.

For info, I'm hardwired (ethernet) to PLC. I also have Wifi enabled. Would that cause a problem? I think I'm being thick here...

Account created.png not reachable.png
 
Last edited:

Similar Topics

Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi again, When the "REPORT" button is pressed (on a different screen), it takes the operator to the...
Replies
7
Views
666
Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi, The operator has reported that, from time-to-time, when he presses the "Generate Report" button...
Replies
5
Views
463
General Question: The PLC and HMI that I've been working on (a laser measurement system) is soon to be transported to the site where it will be...
Replies
2
Views
699
Hi, I'm not sure how to do this... Basically, I want to restrict the user input values for this tag to be in the range 20.001 to 25.0. I...
Replies
17
Views
1,632
Can someone help me with this? I'm no good at SCL - virtually everything I've done so far has been ladder logic. The return value from the...
Replies
13
Views
1,107
Back
Top Bottom