AdvancedHMI Software

General Category => Additional Components => Topic started by: Archie on March 06, 2018, 11:53:22 AM

Title: Charting App for BasicDataLogger
Post by: Archie on March 06, 2018, 11:53:22 AM
This started out as an update to the QuickChart provided by Godra, but changed significant enough that I wanted to post it on its own thread. You can open the solution and run it as it. Either Reload the test file or browse to your own log file.

The biggest differences from Godra's Quickchart:

- No auto mode, you must manually click Reload file
- Pan and zoom buttons as opposed to date and time selection

Still a work in progress, so it may still have some bugs. The next step is to make it into a control that can be added to a form in an AdvancedHMI project.
Title: Re: Charting App for BasicDataLogger
Post by: Archie on March 06, 2018, 04:09:05 PM
Updated with a bug fix
Title: Re: Charting App for BasicDataLogger
Post by: Archie on March 06, 2018, 11:16:20 PM
Update 2
Title: Re: Charting App for BasicDataLogger
Post by: Godra on March 11, 2018, 01:37:40 PM
Using Archie's version should definitely be considered over using the QuickChart from other topic.
It is working far faster, should support far larger log files and can be resized.

Attached in this post is the modified version which includes support for Annotations.
The attached picture shows what it looks like.

Until the time Archie provides this chart in the form of a control, this is what I would suggest:

1) Make any desired modifications to the solution and then create .exe file
2) Move this .exe file to the location of your log files
3) It would be possible to add a button to AHMI project, which would run this .exe file. Take a look at this topic:

    https://www.advancedhmi.com/forum/index.php?PHPSESSID=ddac8c8db92f3db9c2512b235f3cc51b&topic=1532.0


It might be possible to add this chart project to your AHMI project, reference things properly and use it from there (I have not tried it yet).
Title: Re: Charting App for BasicDataLogger
Post by: Godra on March 11, 2018, 04:10:27 PM
It is also possible to add AUTO Refresh for the live chart.

These would be the steps:

1) Add a timer to the form and set its Interval to 10000 (be mindful about the number you would want to use).
2) Add a button to the form, possibly to look like the attached picture, and name it AUTORefreshButton. You could set its anchor points to either Bottom or Bottom, Right.
3) Add the code similar to the following:

Code: [Select]
    Private Sub AUTORefreshButton_Click(sender As Object, e As EventArgs) Handles AUTORefreshButton.Click
        Me.Timer1.Enabled = Not Me.Timer1.Enabled
        If Me.Timer1.Enabled Then
            Me.AUTORefreshButton.BackColor = Color.Red
        Else
            Me.AUTORefreshButton.UseVisualStyleBackColor = True
        End If
    End Sub

    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        Me.ReloadFileButton.PerformClick()
    End Sub
Title: Re: Charting App for BasicDataLogger
Post by: Godra on April 01, 2018, 02:53:51 PM
Attached in this post is a version that can also show annotation labels (see the attached picture).

These labels are currently positioned along the X axis, in the 1st and 2nd interval lines, and might overlap if close to each other.
If the window is either Maximized or Restored then you might need to click Refresh Chart button to properly position the labels.

Mouse over a label will show a tooltip with more info (applicable series, date/time as well as the value which is already shown on the label itself).
This works the same for vertical annotation lines.

There is also Auto Refresh button.
Title: Re: Charting App for BasicDataLogger
Post by: Brian2123 on February 14, 2019, 10:02:52 AM
How exactly do I run this I am new to this
Title: Re: Charting App for BasicDataLogger
Post by: Godra on February 14, 2019, 08:01:42 PM
The simplest thing you could do is download the 2 files attached in this post.
Then go to the folder where you downloaded these files and double click the DataLoggerChart.exe file.
It will open the program for you and load the PLCdataLog.log file.
All the buttons and the checkboxes should be self-explanatory but do experiment with them to see what they do (if the change you make is not immediately visible then refresh the chart).

You would normally place this DataLoggerChart.exe file in the folder where your log files reside and create a shortcut to this exe file on the desktop.

This exe file is created by the solution posted in the previous post but, since you don't seem to be familiar with that process, I have attached the resulting file here. You would have to use the solution to make any desired changes to the program.

The attached log file is just an example of the log file and could eventually be deleted.

Read the previous posts for any other info.
Title: Re: Charting App for BasicDataLogger
Post by: Brian2123 on February 14, 2019, 10:37:04 PM
Thanks so much this is a really big help I cant thank you enough
Title: Re: Charting App for BasicDataLogger
Post by: jazzplayermark on February 15, 2019, 05:10:12 PM
This is nice!
Title: Re: Charting App for BasicDataLogger
Post by: JohnnyTronic on February 08, 2020, 03:32:19 PM
coool.this is what I wanted. Now I have to figure out how to customize.
Title: Re: Charting App for BasicDataLogger
Post by: Godra on March 15, 2020, 01:11:28 AM
The solution file in Reply #5 and the exe file in Reply #7 have been updated and replaced.

This was done to support the reading of the header line that can be created by the modified version of the BasicDataLogger2 which can be found here:

https://www.advancedhmi.com/forum/index.php?topic=2519.msg15192#msg15192

Title: Re: Charting App for BasicDataLogger
Post by: Bmorg7 on June 16, 2020, 12:38:54 PM
New to a lot of this, but got the chart program working well with AHMI and changed the log file name and where it points to in the chart program. What I'm wondering is if there's a way to change the "series0, series 1, etc, to have its own individual names rather than indexed. Using it for a Water system and monitoring Temperature and flow, would like to be able to change the legend and series options to be labeled temp and flow instead of series0 and series 1. Still learning VB and am unsure where to do this or how it would be implemented.
Title: Re: Charting App for BasicDataLogger
Post by: dkchpe on August 21, 2020, 01:10:49 AM
hi everyone, I'm brand new VB. i have run into an issue with this datalogger chart which is cool by the way, i need to log values in an omron plc but plc makes a comma instead of a dot, i know well why it does but is there any of you who have fixed it with a new chart or have made a fix to existing data logger.
I am aware that if you have to see floating point then you throw @F behind registered but that seems not to work for the datalogger.
'm quite new to vb so if you can help then it will be a huge help.

Title: Re: Charting App for BasicDataLogger
Post by: Godra on August 21, 2020, 02:15:29 AM
See if this might help you in any way:

  https://forums.mrplc.com/index.php?/topic/29046-real-values-on-older-versions-of-programmer/
Title: Re: Charting App for BasicDataLogger
Post by: dkchpe on August 21, 2020, 03:06:34 AM
Thanks Godra, it's not quite that or maybe it is, i seems like if i have the  value 2,8999 then the data logger see it like this:  2 in the first serie and then 8999 in second serie because the plc show 2,8999 and not 2.8999 so the datalogger works fine because it seperates on commas, so my gues is that if the plc show 2.8999 instead it will fit in too datalogger chart afterwards.



Problem solved, Thanks Godra.

I was windows related.
Title: Re: Charting App for BasicDataLogger
Post by: g.mccormick on January 19, 2022, 03:09:23 PM
How would I pull this into a full ADVHMI project?  I would like to incorporate this data viewer  into a project that I am starting.