Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

The scatter graph stops re-painting

I have an application running under Win10. For some reason the scattergraph stops updating. I am using a delegate to append data from a different thread. Normally works fine, but for some reason stops re-paining the graph after a random number of appends.

 

I appreciate any help.

 

Thanks!

0 Kudos
Message 1 of 5
(3,422 Views)

Hey Steverino,

 

Could you provide a little more context about how where it's failing? Is your code freezing entirely? Also, is the function to append data running and just not updating the graph somehow, or is that point in the code never reached? It would probably be useful to write output to the console each time you append data and see if you've stopped reaching that part of the code.

 

Cheers,

Ryan C.

0 Kudos
Message 2 of 5
(3,369 Views)

If I step through the code it appears to be running properly. The delegate is called and everything looks like it should be working. Graph simply does not update.

0 Kudos
Message 3 of 5
(3,362 Views)

BTW - This is the delegate code:

 

Private Sub UpdateMassPlot(ByVal seconds As Double, ByVal grams As Double)

Try

If ScatterGraph1.InvokeRequired Then
        ScatterGraph1.Invoke(Sub() UpdateMassPlot(seconds, grams))

Else
        splotMass.PlotXYAppend(seconds, grams)
End If

Catch ex As Exception

End Try

End Sub

0 Kudos
Message 4 of 5
(3,349 Views)

Hi Steverino,

 

I know you mentioned this occurs randomly, but have you noticed any patterns about when this problem occurs? Are you always able to at least plot a certain number of points?

 

Thanks,

ShaneK

0 Kudos
Message 5 of 5
(3,344 Views)