Author Topic: ChartBySampling (version 3.98r or later)  (Read 10823 times)

DEG

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: ChartBySampling (version 3.98r or later)
« Reply #15 on: September 05, 2015, 03:32:56 PM »
HI,
Failed to win DICIMAL IN DATALOGGER,
 I've tried everything

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: ChartBySampling (version 3.98r or later)
« Reply #16 on: September 05, 2015, 03:50:24 PM »
Try this

- Open AdvancedHMIControls\Components\BasicDataLogger2.vb
- Go to line 215 and edit the StoreValue to this:
Code: [Select]
    Private Sub StoreValue()
        Try
            If Not m_PauseLogging Then
                Dim StringToWrite As String = m_Prefix
                If m_TimeStampFormat IsNot Nothing AndAlso (String.Compare(m_TimeStampFormat, "") <> 0) Then StringToWrite &= Date.Now.ToString(m_TimeStampFormat)


                For Each item In PLCAddressValueItems
                    If item.ScaleFactor = 1 Then
                        StringToWrite &= "," & item.LastValue
                    Else
                        Try
                            StringToWrite &= "," & item.LastValue * item.ScaleFactor
                        Catch ex As Exception
                            StringToWrite &= "," & "INVALID-Check scale factor"
                        End Try
                    End If
                Next
                sw.WriteLine(StringToWrite)
                sw.Flush()
            End If
        Catch ex As Exception
        End Try
    End Sub

DEG

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: ChartBySampling (version 3.98r or later)
« Reply #17 on: September 05, 2015, 05:31:44 PM »
THANK ARCHIE

DEG

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: ChartBySampling (version 3.98r or later)
« Reply #18 on: September 05, 2015, 09:14:43 PM »
I'm trying to develop software for PT100 temperature. Needed to keep temperatures taken, then release a report in XLS or PDF, but within a range of two dates and plot it.
ADVANCEDHMI, allowed to develop a part of it.
I HAVE THE GRAPHIC AND SAVED THE INFORMATION .LOG, missing TAKE information between two dates and graph it.
I would greatly appreciate develop so we can learn along the way.
Here's an example

DEG

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: ChartBySampling (version 3.98r or later)
« Reply #19 on: October 25, 2015, 04:42:56 PM »
Hi archi.
As I can do to make the ChartArea behave dynamically. because it is lost. Look at the picture, and I TREATY treaty and do not get it

bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: ChartBySampling (version 3.98r or later)
« Reply #20 on: November 14, 2015, 03:42:31 PM »
Is this 2 ChartBySamplings or just one ?
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

DEG

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: ChartBySampling (version 3.98r or later)
« Reply #21 on: November 15, 2015, 08:47:39 AM »
one

bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: ChartBySampling (version 3.98r or later)
« Reply #22 on: November 19, 2015, 12:20:34 PM »
I am using 3.99a and wanted to use Time , so I changed XValueType to Time, but it only display 12:00AM  over and over. I went into line 225 and changed it to
Code: [Select]
MyBase.Series(index).Points.AddXY(Now.ToString("dd-MMM-yy HH:mm:ss"), CDbl(m_PLCAddressItems(index).GetScaledValue(e.PLCComEventArgs.Values(0))))
App would not run with new change. How do I fix this? TIA.

In addition to Godra's suggestionm you will need to edit AdvancedHMIControls\Controls\ChartBySampling.vb

Go to line 198 and change to this:

        MyBase.Series(index).Points.AddXY(Now, CDbl(m_PLCAddressItems(index).GetScaledValue(e.PLCComEventArgs.Values(0))))
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

pedro.ma

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: ChartBySampling (version 3.98r or later)
« Reply #23 on: November 24, 2015, 01:04:58 PM »
Hi good morning to all, I need some help with this control. I'm using 3.99 version. Anyone have an idea of how I can change the time of the reading of the chart? I want a read every ten minutes.

dmroeder

  • Global Moderator
  • Full Member
  • *****
  • Posts: 206
    • View Profile
Re: ChartBySampling (version 3.98r or later)
« Reply #24 on: November 24, 2015, 03:13:59 PM »
Hi good morning to all, I need some help with this control. I'm using 3.99 version. Anyone have an idea of how I can change the time of the reading of the chart? I want a read every ten minutes.

Change the communication drivers "PollRateOverride" property to 600000.  Keep in mind that any other object tied to that driver will update at 10 minutes as well.  If you have objects that need a faster update rate, then you can use separate drivers.

gvinson

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: ChartBySampling (version 3.98r or later)
« Reply #25 on: March 28, 2016, 11:56:28 AM »
Hi Archie thanks again for all your hard work on this project.  I am using the ChartBySampling and when I set the X axis to "Time" it only shows 12:00 A.M. on the chart in run time.  I am using the latest version of software and it appears that the fix you suggested on line 198 in the code may not be relevant in the newer version.  Any suggestions to get this part working?

Thanks!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: ChartBySampling (version 3.98r or later)
« Reply #26 on: March 28, 2016, 12:21:58 PM »
I am using the ChartBySampling and when I set the X axis to "Time" it only shows 12:00 A.M. on the chart in run time.  I am using the latest version of software and it appears that the fix you suggested on line 198 in the code may not be relevant in the newer version.  Any suggestions to get this part working?
In Solution Explorer, under the AdvancedHMIControls project, expand down the controls folder and edit ChartBySampling.vb

Go to line 233 and modify it like this:

        MyBase.Series(index).Points.AddXY(Now, CDbl(m_PLCAddressItems(index).GetScaledValue(e.PLCComEventArgs.Values(0))))