Author Topic: Charting App for BasicDataLogger  (Read 17625 times)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Charting App for BasicDataLogger
« 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.
« Last Edit: March 06, 2018, 04:09:34 PM by Archie »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Charting App for BasicDataLogger
« Reply #1 on: March 06, 2018, 04:09:05 PM »
Updated with a bug fix
« Last Edit: March 06, 2018, 11:16:42 PM by Archie »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Charting App for BasicDataLogger
« Reply #2 on: March 06, 2018, 11:16:20 PM »
Update 2

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #3 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).
« Last Edit: May 20, 2019, 12:44:19 AM by Godra »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #4 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
« Last Edit: March 12, 2018, 12:01:03 PM by Godra »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #5 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.
« Last Edit: March 15, 2020, 01:02:32 AM by Godra »

Brian2123

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #6 on: February 14, 2019, 10:02:52 AM »
How exactly do I run this I am new to this

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #7 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.
« Last Edit: March 15, 2020, 01:03:47 AM by Godra »

Brian2123

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #8 on: February 14, 2019, 10:37:04 PM »
Thanks so much this is a really big help I cant thank you enough

jazzplayermark

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #9 on: February 15, 2019, 05:10:12 PM »
This is nice!

JohnnyTronic

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #10 on: February 08, 2020, 03:32:19 PM »
coool.this is what I wanted. Now I have to figure out how to customize.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #11 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

« Last Edit: June 17, 2020, 01:05:37 AM by Godra »

Bmorg7

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #12 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.

dkchpe

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #13 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.


Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Charting App for BasicDataLogger
« Reply #14 on: August 21, 2020, 02:15:29 AM »