![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#46 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 1,044
|
Quote:
In the (admittedly short) time I've been working on TIA Portal, I've NEVER done a compilation of the HW...in fact, when I selected PLC > Compile, the only options I saw were for SW download. Then I realised, I had to be OFFLINE to be able to compile the HW! So, I went OFFLINE and did your 3 steps above. And "Bingo!" I can now reach 192.168.0.1. (see pics) Then, On the web page, I logged in with my Admin01 account (having bumped up the privilege from Minimum to Administrative) and clicked on "Data Log". Unfortunately, the file was empty ![]() Anyway, this is a huge step forward for me. Lesson learnt: If in doubt, do a full HW and SW compilation! Cheers! Last edited by Mas01; September 18th, 2023 at 07:18 AM. |
|
![]() |
![]() |
#47 |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 1,044
|
With respect to WHY the dataLog's empty, I will create some tags and Trace these outputs from DB7...
|
![]() |
![]() |
#48 |
Member
![]() ![]() Join Date: Mar 2022
Location: UK - The Norf
Posts: 273
|
The log isn't open yet.
1. DataLogCreate 2. DataLogOpen 3. DataLogWrite 4. DataLogClose 5. DataLogDelete (optional) Set up the DataLogOpen block with the same name and ID as the create block and then it will allow the DataLogWrite block to function. |
![]() |
![]() |
#49 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 1,044
|
Quote:
The F1-help says "Data log opens automatically when you execute the instructions "DataLogCreate" and "DataLogNewFile". Last edited by Mas01; September 18th, 2023 at 10:20 AM. |
|
![]() |
![]() |
#50 |
Lifetime Supporting Member
![]() ![]() Join Date: Nov 2006
Location: UK
Posts: 6,656
|
Although I can't see it in the help, I would expect this function to operate asynchronously over several plc cycles - as you are using the first scan bit you may not be giving the function enough time to process your request.
__________________
S7-300 to 1500 conversions done - email (minus the spam) to spams7conversions@hotmail.com |
![]() |
![]() |
#51 | |
Lifetime Supporting Member
![]() ![]() Join Date: Jun 2013
Location: MI
Posts: 3,151
|
Quote:
My guess is that it might Open automatically when the Create succeeds, but it probably doesn't do anything when the Create fails, such as when the log is already created |
|
![]() |
![]() |
#52 |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 1,044
|
Hmm, one good bit of news...Every time the REPORT button is pressed on the HMI, a new row is added to the CSV file...I've counted the button presses and the number of rows in the CSV is the same, and increments accordingly.
Am I writing to the datalog correctly? Hope you can see code in 2nd picture. Thanks Last edited by Mas01; September 18th, 2023 at 12:01 PM. |
![]() |
![]() |
#53 |
Member
![]() ![]() Join Date: Mar 2022
Location: UK - The Norf
Posts: 273
|
Looks like you’re writing the values to your data area in the DB after you’ve triggered the datalog blocks? Although that should mean that the second time you hit the button, you should get the results from the previous try logged unless you have it zero’d somewhere.
I think you have more trust in that button pressed bit than I would, I prefer to have things sequenced through multiple bits to ensure it executes in the correct order. |
![]() |
![]() |
#54 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 1,044
|
Quote:
My main problem right now is why I'm seeing zeros in the CSV. Question: Does it look to you that I'm writing to the datalog correctly with those MOVE commands? Thanks Last edited by Mas01; September 18th, 2023 at 01:02 PM. |
|
![]() |
![]() |
#55 |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 1,044
|
I'm getting frustrated again - in the report_db which defines each "row" of the CSV, should these be 'Retain' or not? Just wondering if it's got anything to do with why I'm only seeing zeros, when I want the values as they appear in the pictures (monitor mode values).
Thanks |
![]() |
![]() |
#56 |
Member
|
If it does take a few scans to log the data perhaps instead of using the button pulse, set a bit with the button then use that bit, reset the bit when the done bit is on (to be on the safe side perhaps a timeout timer to reset it should it fail.
|
![]() |
![]() |
#57 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 1,044
|
Quote:
I'll look into that first thing tomorrow, cheers. |
|
![]() |
![]() |
#58 |
Lifetime Supporting Member
![]() ![]() Join Date: Nov 2006
Location: UK
Posts: 6,656
|
Tried this out on an S7-1510S CPU, using the Siemens example as a basis and it does what is says on the tin. bCreate and bWrite are on for one scan.
__________________
S7-300 to 1500 conversions done - email (minus the spam) to spams7conversions@hotmail.com |
![]() |
![]() |
#59 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 1,044
|
Quote:
Is the data being logged correctly? Thanks |
|
![]() |
![]() |
#60 |
Lifetime Supporting Member
![]() ![]() Join Date: Nov 2006
Location: UK
Posts: 6,656
|
Yes.
__________________
S7-300 to 1500 conversions done - email (minus the spam) to spams7conversions@hotmail.com |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
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 |