AdvancedHMI Software
General Category => Support Questions => Topic started by: suparman 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
-
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".
-
Hello Godra,
Thank you for the code. I test and work.
regards
suparman
-
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.
-
Thank you very much for update file
-
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
-
You should download and try the control from reply #1.
-
Thanks. I downloaded it yesterday, but wasn't sure what then? Just replaced the one already there?
George
-
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.
-
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.
-
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.
-
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
-
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.
-
Godra,
Here is hopefully the info you asked for.
Thanks Again for the help
George
-
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.
-
OK. I started over. I now have the latest of everything. (see Attachment). It doesn't have the column headers ( They are blank). I won't know until morning, if the filename is correct. Thanks for all the help.
George
-
LogHeader is the property where you enter what you want to see in the spreadsheet.
Since you are dealing with CSV files then you can make the LogHeader have a text like: Date-Time, Tank 1 Level, Tank 2 Level ... etc
-
Godra,
Thanks very very much for all your help. I think we got it. It isn't appending the filename to the previous one which was getting really big. I'm getting header Names now.
Have a great day.
George