You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old September 6th, 2023, 06:15 AM   #1
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,052
Siemens S7/TIA v18: Logging of Data...

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
Attached Images
File Type: png REORT_page.png (173.1 KB, 132 views)

Last edited by Mas01; September 6th, 2023 at 06:20 AM.
  Reply With Quote
Old September 6th, 2023, 06:50 AM   #2
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts: 16,154
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.
__________________
Jesper
NOTICE:
JesperMP has passive-aggressive tendencies, can be impolite and may even use sarcasm !
Also: ᛁᚠ ᚢᚬᚢ ᚴᚬᚾ ᚱᛅᚬᛏ ᚦᛁᛋ ᚦᛅᚾ ᚢᚬᚢ ᚼᚬᚠᛅ ᚴᚬᛁᚾᛅᛏ ᛘᚢ ᚱᛅᛋᛒᛅᚴᛏ
  Reply With Quote
Old September 6th, 2023, 06:54 AM   #3
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,052
Quote:
Originally Posted by JesperMP View Post
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
  Reply With Quote
Old September 6th, 2023, 07:02 AM   #4
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 5,502
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.
  Reply With Quote
Old September 6th, 2023, 07:37 AM   #5
Puddle
Member
United Kingdom

Puddle is offline
 
Join Date: Mar 2022
Location: UK - The Norf
Posts: 278
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.
  Reply With Quote
Old September 13th, 2023, 12:25 PM   #6
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,052
Quote:
Originally Posted by JesperMP View Post
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
Attached Images
File Type: png webserver not selectable.png (53.3 KB, 105 views)

Last edited by Mas01; September 13th, 2023 at 12:31 PM.
  Reply With Quote
Old September 13th, 2023, 01:38 PM   #7
mk42
Lifetime Supporting Member
United States

mk42 is offline
 
Join Date: Jun 2013
Location: MI
Posts: 3,154
Quote:
Originally Posted by Mas01 View Post
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

Are you online (with any device in the project)? No HW changes are allowed while online. That's what usually catches me.
  Reply With Quote
Old September 13th, 2023, 02:38 PM   #8
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,052
Quote:
Originally Posted by mk42 View Post
Are you online (with any device in the project)? No HW changes are allowed while online. That's what usually catches me.
I've finished work for the day and I'm back home, but I'll be sure to check first thing tomorrow.
Cheers
  Reply With Quote
Old September 14th, 2023, 04:58 AM   #9
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,052
Quote:
Originally Posted by mk42 View Post
Are you online (with any device in the project)? No HW changes are allowed while online. That's what usually catches me.
Yep - that's exactly what it was. I was online at the time.
All sorted now, cheers, @mk42.
Attached Images
File Type: png webserver tick.png (55.9 KB, 88 views)
  Reply With Quote
Old September 14th, 2023, 05:37 AM   #10
Puddle
Member
United Kingdom

Puddle is offline
 
Join Date: Mar 2022
Location: UK - The Norf
Posts: 278
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.
  Reply With Quote
Old September 14th, 2023, 05:40 AM   #11
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,052
Quote:
Originally Posted by Puddle View Post
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
  Reply With Quote
Old September 14th, 2023, 09:19 AM   #12
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,052
Quote:
Originally Posted by Puddle View Post
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 by Mas01; September 14th, 2023 at 09:26 AM.
  Reply With Quote
Old September 14th, 2023, 09:24 AM   #13
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,052
Just for info...It looks like data's being written to the DataLog, because Report_DB.Data.x has values in it:
Attached Images
File Type: png report DB.png (44.2 KB, 80 views)

Last edited by Mas01; September 14th, 2023 at 09:30 AM.
  Reply With Quote
Old September 14th, 2023, 09:30 AM   #14
Puddle
Member
United Kingdom

Puddle is offline
 
Join Date: Mar 2022
Location: UK - The Norf
Posts: 278
Quote:
Originally Posted by Mas01 View Post
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.
  Reply With Quote
Old September 14th, 2023, 09:48 AM   #15
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,052
Quote:
Originally Posted by Puddle View Post
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...
Attached Images
File Type: png Account created.png (65.8 KB, 13 views)
File Type: png not reachable.png (21.1 KB, 14 views)

Last edited by Mas01; September 14th, 2023 at 10:18 AM.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Siemens S7/TIA v18: Only allow input of alphanumeric values...... Mas01 LIVE PLC Questions And Answers 19 September 6th, 2023 10:55 AM
Siemens S7/TIA v18: Is there a "first scan" in TIA portal?... Mas01 LIVE PLC Questions And Answers 4 September 1st, 2023 12:29 PM
Siemens S7/TIA v18: What does "Object Number" mean?... Mas01 LIVE PLC Questions And Answers 4 August 31st, 2023 12:41 PM
Siemens S7/TIA v18: Data conversion DTL to DATE...... Mas01 LIVE PLC Questions And Answers 1 August 29th, 2023 10:16 AM
Siemens S7/TIA v18: WinCC: F7 needs to SAVE data AND advance the screen...... Mas01 LIVE PLC Questions And Answers 9 July 14th, 2023 10:45 AM


All times are GMT -4. The time now is 04:55 PM.


.