Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I synchronize multiple plot updates

Using the CWGraph object in Visual Basic 2005 (.NET), I run through a loop updating all plots based on a timer.  I would like to force the object to NOT redraw until I've update the plot values for ALL plots.  Otherwise, what seems to happen is that during the loop, one or more plots will be updated on the screen showing a time shift while other plots have not yet updated.  It makes things look a little screwed up.  In other graphics packages, I have seen a "redraw" property which, when set to false, would not update the plots.  Then, once all desired properties had been changed, the redraw could be set back to true, allowing all the changes to take place at the same time!!  So I guess my question is whether this is doable with the CWGraph and if so, how.  If it is NOT doable, is there a standard work-around?
0 Kudos
Message 1 of 5
(4,296 Views)
The CWGraph object has an ImmediateUpdates property. Setting this to False should get the behavior you are looking for. Let us know if this works for your application.
0 Kudos
Message 2 of 5
(4,291 Views)
This sounds very similar to what I described above, however it does not seem to resolve the issue.  I have also tried setting each plot visible property to false first, updating the plots, then setting the visible back to true.  This also does not seem to work.  Having said that ... the ImmediateUpdates DOES seem to help quite a bit ... however anytime my system gets slowed down (there are a few other apps running) I tend to still see the issue.
0 Kudos
Message 3 of 5
(4,285 Views)
So are you saying that because your processor is tied up with other programs that one graph will update before the other graph gets updated.  For instance, one graph updates, then the processor works on something else and then the other graph updates?  If so you might want to somehow give all processor priority to your MStudio app.  Like you could set the priority level to the highest, update the graphs, and then set it back to what it was.  That way the processor won't work on the other apps until it takes care of the high priority tasks.
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(4,256 Views)
I'm using C# and VS.NET 2003 and can accomplish the behaviour your mentioned by, prior to plotting, calling the .BeginUpdate() method of the graph, and after I have made all my plot calls, .EndUpdate()

I assume that since .BeginUpdate() and .EndUpdate() are features of WindowsForms and not specific to C#, VB2005 should have an equivalent?
0 Kudos
Message 5 of 5
(4,140 Views)