![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#61 |
Member
![]() ![]() Join Date: Mar 2022
Location: UK - The Norf
Posts: 246
|
Looks like you're trying to log the whole data structure in your DB. The help file says there's no nesting of structures, which means the DTL values may not be permitted.
The helpfile doesn't specify, but I wonder if the header string is subject to the same restrictions as the name string. The name (on a 1200) is restricted to ASCII 0x20 to 0x7E. I've been using a counter and VAL_STRG converter to provide the name for my logs and I had an issue early on with the string placing a space at the end and it wouldn't run due to not having a valid name. Also didn't realise it automatically opens the log on creation. |
![]() |
![]() |
#62 |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 918
|
|
![]() |
![]() |
#63 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 918
|
Quote:
So if I understand you correctly, a data type STRUCT is not allowed here (see pic)? EDIT: My mistake, you're talking about the DTL (date) types...I could temporarily remove them to see what happens. Maybe if I change it so that each item in the struct is like a separate entry in the DB it might work. (?) Last edited by Mas01; September 19th, 2023 at 04:13 AM. |
|
![]() |
![]() |
#64 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 918
|
Quote:
I did a SET of a bit (DB_Create_Flag) when 'first scan' is true (network 3 attached). But the .Done bit from DataLogCreate_DB is never set, so the Reset is never performed (network 37 attached). I really don't know why that is. |
|
![]() |
![]() |
#65 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 918
|
Quote:
For bCreate and bWrite , you need to set them TRUE in order to Create and Open the data Log. |
|
![]() |
![]() |
#66 |
Lifetime Supporting Member
![]() ![]() Join Date: Nov 2006
Location: UK
Posts: 6,616
|
I manually set those bits (using modify operand) and then reset them programatically at the end of the FB, the screen shot trimmed off that bit of code.
__________________
S7-300 to 1500 conversions done - email (minus the spam) to spams7conversions@hotmail.com |
![]() |
![]() |
#67 |
Lifetime Supporting Member
![]() ![]() Join Date: Nov 2006
Location: UK
Posts: 6,616
|
i.e.
__________________
S7-300 to 1500 conversions done - email (minus the spam) to spams7conversions@hotmail.com |
![]() |
![]() |
#68 |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 918
|
I'm now getting realistic values being populated in the CSV file, but there's only 3 columns and no headers. (see first pic)
There should be 23 columns in the CSV file. The 3 columns that are there are for the first 3 elements of Data, as defined in the DB (see 2nd pic). p.s. I've "trimmed" the struct to remove potentially problematic types like DTL/Date. Can Anyone help? Thanks Last edited by Mas01; September 19th, 2023 at 07:00 AM. |
![]() |
![]() |
#69 |
Lifetime Supporting Member
![]() ![]() Join Date: Nov 2006
Location: UK
Posts: 6,616
|
How are you deleting the log file to test your changes?
I get all headers + columns of data, including Date and DTL
__________________
S7-300 to 1500 conversions done - email (minus the spam) to spams7conversions@hotmail.com |
![]() |
![]() |
#70 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 918
|
Quote:
I was assuming that each new Write to the CSV file would also add any missing headers and columns. To see the new CSV file, I go to 192.168.0.1 and log in with the username/password. Then I open up the CSV to look for any changes/updates. |
|
![]() |
![]() |
#71 |
Lifetime Supporting Member
![]() ![]() Join Date: Nov 2006
Location: UK
Posts: 6,616
|
Delete the log file and try again, the headers get written when you create the log.
__________________
S7-300 to 1500 conversions done - email (minus the spam) to spams7conversions@hotmail.com Last edited by L D[AR2,P#0.0]; September 19th, 2023 at 09:07 AM. |
![]() |
![]() |
#72 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 918
|
Quote:
In the new file, the number of columns is correct, the values therein are correct and the number of headers is correct...as you can see, I still need to add a lot more headers (2nd pic). Still work needs doing on this...need to add a few DTL/Date tags (I removed them from the struct in case they were problematic, so I was only logging Reals). Nonetheless, a big step forward! p.s. If anyone knows how to change language setting from Spanish to English in Excel, please let me know. Last edited by Mas01; September 19th, 2023 at 10:28 AM. |
|
![]() |
![]() |
#73 |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 918
|
Apologies - I tell a lie, deleting log from web page didn't quite work, so I used DataLogDelete to delete it.
|
![]() |
![]() |
#74 |
Member
![]() ![]() Join Date: Mar 2022
Location: UK - The Norf
Posts: 246
|
I don’t think it allows you to delete open data logs.
I said it was a pain to get this going! I assembled it all into an FB and there’s around 5 tags to assign. |
![]() |
![]() |
#75 | |
Member
![]() ![]() Join Date: Oct 2020
Location: Leicester, England
Posts: 918
|
Quote:
I just need to add a few more MOVE commands (if it's a MOVE I should be using) to move a few more things into the data log:
Can these be moved with MOVE commands or do they have their own special commands? |
|
![]() |
![]() |
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 09:55 AM |
Siemens S7/TIA v18: Is there a "first scan" in TIA portal?... | Mas01 | LIVE PLC Questions And Answers | 4 | September 1st, 2023 11:29 AM |
Siemens S7/TIA v18: What does "Object Number" mean?... | Mas01 | LIVE PLC Questions And Answers | 4 | August 31st, 2023 11:41 AM |
Siemens S7/TIA v18: Data conversion DTL to DATE...... | Mas01 | LIVE PLC Questions And Answers | 1 | August 29th, 2023 09: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 09:45 AM |