Author Topic: BasicDataLogger2 own text on top sheet file  (Read 5004 times)

suparman

  • Newbie
  • *
  • Posts: 18
    • View Profile
BasicDataLogger2 own text on top sheet file
« on: September 29, 2019, 09:31:29 PM »
Hello,
Now I made a data logger with BasicDataLogger2 and I want to add own text related with my tags that I record
How to add the additional text on top of log file? see red box in my picture below.
Thank you very much.
Regards

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #1 on: October 03, 2019, 03:23:14 PM »
Try the attached modified BasicDataLogger2 component.

It has a new property "LogHeader" which will be added only to newly created log files.
This property is set to have value of "Date-Time" but can be replaced with any other text.

I have made some other changes to log names (fixed bugs) so it's for Archie to take a look at it as well.

Edit: A new property BooleanLogOption was added as of May 02, 2020. It can be set to log boolean values as either "TrueFalse" or "OneZero".

« Last Edit: May 06, 2020, 02:24:01 AM by Godra »

suparman

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #2 on: October 07, 2019, 02:58:07 AM »
Hello Godra,
Thank you for the code. I test and work.

regards

suparman

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #3 on: October 10, 2019, 03:58:55 AM »
The file was updated and replaced in my previous post.

There is a new property "LogFileIncludesHeader" which determines if the header will be written to newly created log files.

suparman

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #4 on: November 12, 2019, 11:30:20 PM »
Thank you very much for update file

georgegraz

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #5 on: September 04, 2020, 10:08:22 AM »
Thanks for the great updates. Using v3.99y Beta 36, I just downloaded.
I have 2 questions.
If I create 1 address for 1 BasicDataLogger2G, Header has a name. If I create with 2 Addresses, Headers leave it Blank, Date & Time OK.

Binary True/False, I don't see the option to go from True/False to 0/1
Thanks for the help

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #6 on: September 04, 2020, 08:40:32 PM »
You should download and try the control from reply #1.

georgegraz

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #7 on: September 05, 2020, 05:05:13 AM »
Thanks. I downloaded it yesterday, but wasn't sure what then? Just replaced the one already there?
George

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #8 on: September 05, 2020, 06:02:08 PM »
There is a new topic that lists steps:  https://www.advancedhmi.com/forum/index.php?topic=2769.0

In your case, you should rename the file you downloaded to BasicDataLogger2G.vb, open it with Notepad and also add that "G" to the line on top that says Public Class BasicDataLogger2.

Then follow the steps to replace it within Components folder.

georgegraz

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #9 on: September 08, 2020, 12:01:30 PM »
Godra,
I get an error list about duplicate names. Do, I need to remove old BasicDataLoggers first? See my errors. I don't get that error if I remove one I added.
Thanks
George.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #10 on: September 08, 2020, 04:23:55 PM »
You didn't follow the steps correctly.

Once you are to add the new file to the correct location then Visual Studio will ask if you want to replace the existing file.

georgegraz

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #11 on: September 11, 2020, 11:23:51 AM »
Thanks Godra. That part is working, As we try this, we found that the filename it creates at midnight, is appending to the previous nights. (See attachment).
Also, not a big deal, but the header names it creates, is coming from the PLC Address.

Thanks
George

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #12 on: September 11, 2020, 05:06:26 PM »
That's not enough information.

Post pictures of your Visual Studio BasicDataLogger2 settings so I can see the LogHeader string you have entered and the file name.

georgegraz

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #13 on: September 14, 2020, 04:28:24 AM »
Godra,
Here is hopefully the info you asked for.
Thanks Again for the help
George

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: BasicDataLogger2 own text on top sheet file
« Reply #14 on: September 14, 2020, 04:39:31 PM »
I don't really know which version of the logger you are using.

Check the attached picture for properties of the logger that's included in this topic.