Author Topic: Trending Chart  (Read 13474 times)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Trending Chart
« on: February 21, 2019, 10:49:56 AM »
For those not following the latest 3.99y beta updates. I wanted to point out that beta 21 now includes a ChartWithLogging control. This is the combination of a BasicDataLogger, ChartBySampling, and a historical data viewer.

You simply add it to the form, add some PCLAddressValueItems, then run the application.

This was one of the top requested controls that has been missing from AdvancedHMI. It will close some of the gap between AdvancedHMI and other HMI packages.

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Trending Chart
« Reply #1 on: February 26, 2019, 11:54:58 AM »
Anyway to limit number of decimal places?
David

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Trending Chart
« Reply #2 on: February 26, 2019, 01:13:40 PM »
Not in the current version, but it will be in the next update. A new property of YAxisNumericFormat has been added

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Trending Chart
« Reply #3 on: February 26, 2019, 02:19:44 PM »


Custom time stamp on event at the bottom would be helpful also, Such us just hour and minute of capture without date.


This is really a great addition Archie, I can see a lot uses for this, I want to test some rapid captures as soon as I can. Use it like a Chart recorder so the ability to start and stop the logging anytime would be useful also.   For that just a minute and sec time stamp would be useful. I can see the benefit of putting one of these on a a form by itself fort that purpose.
David

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Trending Chart
« Reply #4 on: February 28, 2019, 07:41:05 AM »
Archie I have been running different variations / configurations for several days now. It seems to work very well.
A few observations , some I already shared. Some of these might not be practical but I will just throw them out for whatever value they bring. I am sure you are working on some things I don't know about.
Main thing for me is configuration options.

1. Ability to start and stop the chart from the U/I
2. Time Stamp Options - Don't always need everything- Minute and second only for faster scans. Hour and minute, Day and time/ Don't see much need for the year.
3. Log File Location. Would like to choose directory withot it adding  "\datalog\2019"  to the path
4 Custom Labels

This may be too much to ask:
a.) Changing Logging parameters while HMI is running
            Such as - PLC address(s) to log  but this could be accomplished from the HMI without you to changing anything by changing the value of the address that has been configured using indirect addressing in the PLC and putting a control on the HMI to change the value. A menu would do that.
b.) Time interval
I think these things could make the chart more flexible and perhaps even aid in troubleshooting intermittent problems on a machine.  We have used external recorders for that in the past. eliminating the need to program traps in the PLC.
I would be interested in your and others thoughts on these things.

Maybe VB is not up to the task for some of that or at least not easily.
« Last Edit: February 28, 2019, 07:43:12 AM by DavidSr »
David

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Trending Chart
« Reply #5 on: February 28, 2019, 07:47:26 AM »
Some of these items have been added. I'm still working on a few others. I should have an update available today or tomorrow.

DavidSr

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Trending Chart
« Reply #6 on: February 28, 2019, 07:56:35 AM »
Some of these items have been added. I'm still working on a few others. I should have an update available today or tomorrow.
Great-!

As I look at the chart config options and AdvancedHMI overall I wonder if  the configuration options for many of the controls could have an option to use a specific value as is currently done or a PLC address.

   I am thinking of an option to select one or the other when configuring the control

Maybe you are doing that somewhere, Since I am new to ADVHMI I have not seen all of it.
« Last Edit: February 28, 2019, 08:05:06 AM by DavidSr »
David

Gene T.

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Trending Chart
« Reply #7 on: March 01, 2019, 12:20:41 PM »
Archie, I know I probably can't see the forest for the trees here but I am missing something.
I created two forms each with a ChartWithLogging trend. On the first form in the Properties for DataDirectory I put
.\Pressure Trend and a Folder was created called Pressure Trend and inside of that folder the datalog and 2019 folders
were created with the datalog.csv created in the 2019 folder. On the second form for the DataDirectory I put .\Vibration Trend. This Folder isn't being created thus the trend is not working. So what am I not understanding here?

PS. I am using v399yBeta26

Thanks,
Gene
« Last Edit: March 01, 2019, 12:38:07 PM by Gene T. »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Trending Chart
« Reply #8 on: March 01, 2019, 03:03:37 PM »
Archie, I know I probably can't see the forest for the trees here but I am missing something.
I created two forms each with a ChartWithLogging trend. On the first form in the Properties for DataDirectory I put
.\Pressure Trend and a Folder was created called Pressure Trend and inside of that folder the datalog and 2019 folders
were created with the datalog.csv created in the 2019 folder. On the second form for the DataDirectory I put .\Vibration Trend. This Folder isn't being created thus the trend is not working. So what am I not understanding here?
Does the chart show data at all?

If so,my first guess is this is caused by a .NET issue where it doesn't "dispose" of hidden forms when the application is closed. The ChartWithLogging caches the days data for performance purposes. It relies in proper disposing to write the cache on closing (or a change of day). In the MainForm there is this piece of code that takes care of that issue:
Code: [Select]
       Dim index As Integer
        While index < My.Application.OpenForms.Count
            If My.Application.OpenForms(index) IsNot Me Then
                My.Application.OpenForms(index).Close()
            End If
            index += 1
        End While

If you removed that code or created your own startup form, then it will not dispose the items correctly.

Gene T.

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Trending Chart
« Reply #9 on: March 01, 2019, 03:50:10 PM »
The first chart shows data just fine. The second chart is blank.
I did not remove any code. I added two formchangebuttons on the mainform
one for each form containing a chart. I am sure that it must be something with my setup but I wanted to verify that I have the DataDirectory configured properly.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Trending Chart
« Reply #10 on: March 01, 2019, 04:09:27 PM »
The first chart shows data just fine. The second chart is blank.
I did not remove any code. I added two formchangebuttons on the mainform
one for each form containing a chart. I am sure that it must be something with my setup but I wanted to verify that I have the DataDirectory configured properly.
Does it work if both charts are on the same form?

Gene T.

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Trending Chart
« Reply #11 on: March 01, 2019, 04:29:40 PM »
Yes it works fine if both are on the same form.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Trending Chart
« Reply #12 on: March 02, 2019, 05:19:23 AM »
Yes it works fine if both are on the same form.
Does your second form have a driver instance on it?

Gene T.

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Trending Chart
« Reply #13 on: March 02, 2019, 08:52:22 AM »
Does your second form have a driver instance on it?
Yes it has a different driver instance.






Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Trending Chart
« Reply #14 on: March 02, 2019, 04:02:29 PM »
I wasn't able to replicate exactly, but some issues were fixed that was possibly related. These are in the Beta27 release