Author Topic: BasicDataLogger2 for new file creating  (Read 1862 times)

suparman

  • Newbie
  • *
  • Posts: 18
    • View Profile
BasicDataLogger2 for new file creating
« on: November 07, 2018, 09:06:39 PM »
Hello,
I has been try the data BasicDatalogger2 but it seem not work what I want. I want to log the plc data daily.
I has been set the "CreateNewLogFileDaily" to true and after I run the project and the date has been change, my program not created new file.
When the new file created?

thank you

Suparman

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: BasicDataLogger2 for new file creating
« Reply #1 on: November 07, 2018, 09:21:30 PM »
What version of AdvancedHMI?

suparman

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: BasicDataLogger2 for new file creating
« Reply #2 on: November 07, 2018, 09:41:33 PM »
v3.99y Beta12

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: BasicDataLogger2 for new file creating
« Reply #3 on: November 07, 2018, 09:51:10 PM »
It looks like it has to reach MaximumPoints which doesn't seem logical

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: BasicDataLogger2 for new file creating
« Reply #4 on: November 07, 2018, 10:08:52 PM »
There are 2 properties: "CreateNewLogFileDaily" and "CreateNewLogFileAtMaxPoints".

Maybe suparman should post the screenshot of all the settings of his BasicDataLogger2, attach the first created log file and suggest if he is looking for log files in the correct location.
« Last Edit: November 07, 2018, 10:12:06 PM by Godra »

suparman

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: BasicDataLogger2 for new file creating
« Reply #5 on: November 07, 2018, 10:22:43 PM »
see my picture. In the logger data you can see the logger continued eventhough the date has been change.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: BasicDataLogger2 for new file creating
« Reply #6 on: November 07, 2018, 10:36:03 PM »
The CreateNewLogFileDaily property, when set to True, should force inclusion of the date.

There might be a bug with the FileNameIncludesDate property, so set it to False as a test.
I might have time tomorrow to check this and give you some more info.

Out of curiosity, your screenshot shows 2 log files: mylog1-08-Nov-2018.log and mylog1-09-Nov-2018.log.
What settings you had when these were created?

suparman

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: BasicDataLogger2 for new file creating
« Reply #7 on: November 08, 2018, 12:40:43 AM »
"FileNameIncludesDate" property can't change to false if "CreateNewLogFileDaily" property set to true.
About my screen shoot please don't care about mylog1-08-Nov-2018.log file. It's just my test program previously.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: BasicDataLogger2 for new file creating
« Reply #8 on: November 08, 2018, 10:47:35 PM »
Try using the attached modified BasicDataLogger2.vb component.

Download the attachment, right-click the "Components" folder inside the AdvancedHMIControls project, select Add/Existing Item, browse to the download location and double-click the file.
Do replace the existing stock component, close all the forms and rebuild the solution.

One line of code was added to the StoreValue() sub.
« Last Edit: November 08, 2018, 10:50:21 PM by Godra »

suparman

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: BasicDataLogger2 for new file creating
« Reply #9 on: November 09, 2018, 12:13:30 AM »
Yes it is running.
Thank you Godra. Maybe it can improve for next version.

regards

suparman