Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I plot real-time data(slowly fill screen) along with 2 "limit" traces whcih are always fully displayed?

I currently use an array: "Pressures(0 To 10, 0 To 0)" to hold the current samples for 10 channels and call "frmmain.CWGraph1.ChartY Pressures, 1" to update the plot( I do this at a 50 ms rate for 200 sets of samples). I do not "scroll" the display...once I have 200 sets I stop. This all works great. However I would liike to add "hi and low" limit traces that are visible across the entire plot area at the start, rather than just have them creap across the screen along with the data. Is this possibe?(and how would one add this capability?) Thanks...bartj
0 Kudos
Message 1 of 4
(3,293 Views)
Annotations were added in Measurement Studio 6.0 for exactly this purpose. If you don't have 6.0 and can't upgrade, you should be able to use cursors as a workaround.

David Rohacek
National Instruments
0 Kudos
Message 2 of 4
(3,293 Views)
Dave,

I do not have 6.0. Unable to uses cursors as the "limits" as I wish to display are not horizontal lines, they resemble a stair step. Will the anotation function in 6.0 allow this stair-step sort of display?

I have the "base" version of CW with UI 3.0.1.

Will look into upgrade costs.

Thanks for your comments,
Bartj
0 Kudos
Message 3 of 4
(3,293 Views)
You can create an annotation that resembles a stair step. For example, you can try this code with the Measurement Studio 6.0 upgrade or the Measurement Studio 6.0 evaluation:

Private Sub Form_Load()
Dim annotation As CWAnnotation
Set annotation = CWGraph1.Annotations.Add
annotation.SetBuiltinStyle (cwAnnotationStyleLine)
annotation.CoordinateType = cwAxesCoordinates

Dim xPoints(6) As Double
Dim yPoints(6) As Double

Dim i As Integer
Dim x As Integer
Dim y As Integer

x = 2
y = 2

For i = 0 To 6
xPoints(i) = x

yPoints(i) = y

If (i Mod 2) = 0 Then
y = y + 2
Else
x = x + 2
End If
Next

annotation.Shape.LineColor = RGB(255, 0, 0)
annotation.Shape.SetCoordinates xPoints, yPoints
End Sub

See the attachment for a screenshot of what this example looks like.

- Elton
0 Kudos
Message 4 of 4
(3,293 Views)