Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

CWGraph and SSTab ctrl

Hi,
 
I'm using several CWGraph controls and a SSTab ctrl on 1 form.  The graphs are updated by timers every 5 seconds.   There is an intermittent problem.   When I click on a tab, then click back on a tab containing a chart or charts, the data is not plotted and the chart doesn't update until the 5 second timer interval has elapsed.
 
Does anyody know what's going on?
 
Thanks
 
Curt
0 Kudos
Message 1 of 3
(6,120 Views)
Curt,

I was unable to replicate your issue on my machine.  How many tabs do you have?  How many charts are on each Tab?  I created a simple application with an SSTab Control with a Graph on the first two tabs.  When I start the execution, the Charts are updated every 5 seconds from a timer.  When I click between tabs, each chart properly displays the data.  I have attached my project below.  As a workaround, you can try to call a refresh for the currently displayed tab.  Try inserting code like this:

Private Sub SSTab1_Click(PreviousTab As Integer)
    If SSTab1.Tab = 1 Then
        CWGraph1.Refresh
    ElseIf SSTab1.Tab = 2 Then
        CWGraph2.Refresh
    Else
        CWGraph3.Refresh
    End If
End Sub

If this does not work, try to replicate the issue with as small of a project as possible and post it here.  I can take a look at the code to see what may be going on.

Good Luck

Tyler T.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(6,106 Views)

Hi Tyler,

Thanks for the reply.  I found a solution to my problem.  The data was being plotted but was being displayed as a veritcal line on the

left side of the chart(s).  The X axis on each chart is set to autoscale in the properties page.

I added 'Graph(j).Axes(1).AutoScaleNow' to the tab click event and things seem to be working fine

Thanks

Curt

0 Kudos
Message 3 of 3
(6,090 Views)