Siemens S7/TIA v18: DataLogCreate output DONE is FALSE - why?...

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
See the attached image.

The Datalog should be created when I press Report_Button_Pressed on the HMI.

This image is taken when I pressed the button with my finger (left index finger, before you ask).

Does anyone know why the output (DONE) from DataLogCreate is FALSE.

AFAIK, the DONE is only TRUE for one cycle, but that should be enough to set the flag that I have circled. Anyone know why this flag is FALSE?

Thanks

Why is this FALSE.png
 
I'd recommend setting up the trace function to track REQ DONE BUSY ERROR and STATUS, and then you can see what the block thinks is going on scan by scan.
 
I'd recommend setting up the trace function to track REQ DONE BUSY ERROR and STATUS, and then you can see what the block thinks is going on scan by scan.

Sorry to be a pain. How do I do this? I'll check F1-help too...

EDIT: Just watching a video about it now...
 
Last edited:
Remove the start number from your ID. It's an in/out tag so it sets itself.
That same ID needs to be used for your write block and close blocks.

Also, it will only create one log with the same name, so if successfully completed once it needs a different name to work again.
 
Remove the start number from your ID. It's an in/out tag so it sets itself.
That same ID needs to be used for your write block and close blocks.

Also, it will only create one log with the same name, so if successfully completed once it needs a different name to work again.

OK thanks, I've done that now.

ID start value removed.png
 
I'd recommend setting up the trace function to track REQ DONE BUSY ERROR and STATUS, and then you can see what the block thinks is going on scan by scan.

I did this trace.

When I press the HMI button, the BUSY flag momentarily goes to 1. However, DONE remains at 0 throughout.

TRACE - no change in Report DONE.png
 
Then you definitely definitely want to include STATUS and ERROR as well, to see what the block thinks is going on.


Best guess is that you'll get an Error bit going high next scan, and a status that when you look it up in the help file indicates that the data log is already created (either same name or same ID or something). Either that or it'll yell at you for not having a memory card. 300/400/1500 always need a memory card. 1200 has some built in load memory, so it only needs the memory card for really big programs or things like data logging.


If the data log already exists, you can just start writing to it.
 
Then you definitely definitely want to include STATUS and ERROR as well, to see what the block thinks is going on.


Best guess is that you'll get an Error bit going high next scan, and a status that when you look it up in the help file indicates that the data log is already created (either same name or same ID or something). Either that or it'll yell at you for not having a memory card. 300/400/1500 always need a memory card. 1200 has some built in load memory, so it only needs the memory card for really big programs or things like data logging.


If the data log already exists, you can just start writing to it.

Okay, thanks again...I'll trace more tags this time. Cheers
 
Then you definitely definitely want to include STATUS and ERROR as well, to see what the block thinks is going on.


Best guess is that you'll get an Error bit going high next scan, and a status that when you look it up in the help file indicates that the data log is already created (either same name or same ID or something). Either that or it'll yell at you for not having a memory card. 300/400/1500 always need a memory card. 1200 has some built in load memory, so it only needs the memory card for really big programs or things like data logging.


If the data log already exists, you can just start writing to it.

OK @mk42, I put some extra tags on the trace.

ERROR bit is set, along with STATUS value 28672 (at time t1). See pic.

Error STATUS 28672.png
 
cancel that....

The TOP of the brown bar is 32915 (8093 hex).

"Data log already exists"...so why is that an error?


You're asking it to create the data log. It can't because it already exists. From a process standpoint, that means you're good, move on to the next step.


I'd say change your logic so that it doesn't try to create the data log every time, and trigger the write from the HMI button instead. at least for testing purposes.
 
You're asking it to create the data log. It can't because it already exists. From a process standpoint, that means you're good, move on to the next step.


I'd say change your logic so that it doesn't try to create the data log every time, and trigger the write from the HMI button instead. at least for testing purposes.

Ah, I think the penny's finally starting to drop...

Yes, that HMI button press going into the DataLogCreate is the wrong thing to do. The user will be pressing that button several times a day when wanting to WRITE to the datalog.

A new datalog doesn't need to be created for each press of the button.
 

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
669
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
466
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
701
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,636
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,109
Back
Top Bottom