Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect to GMS stripchart in VB?

Has anyone connected the Global Majic stripchart ActiveX component to their componentWorks application under VB? I cannot figure out how to pass the data from the DAQ to the stripchart component. Any help, suggestions, or sample code would be appreciated.
0 Kudos
Message 1 of 2
(4,271 Views)
I have not used the GMS strip chart with the DAQ, but I have used it for Real Time Trending from our own comms components.

If it's the use of the GMS Strip chart control that your having trouble with I might be able to help. You need to decide on whether the X Axis has a fixed or variable value from the DAQ, and how many samples you'll need to write at one time.

If you're writing individual values on a fixed x axis use the AddY method ( you'll need to set the LastX property to the same value as the VariableLastX property first).

If you're writing an array onto a fixed x axis use the AddYArray method (I've not used this but I think you'll need to set the VariableDeltaX property first).

If you've got a variable X axis you'll need to use AddXY and AddXYArray
respectively.

Having looked at the sample code in the CWAI control, I would think that you can use the AcquiredData event and use the AddYArray method to write to the Strip chart (P.S. This is just a hunch and I've not tried it as I don't have any DAQ compatible devices.)

E.g.

Private Sub Form_Load()
Strip1.XSpan = 0.000694 '1 minute
Strip1.Tracks = 1
Strip1.Variables = 1
Strip1.TrackDisplayMin =
Strip1.TrackDisplayMax =
Strip1.VariableDeltaX =
End Sub

Private Sub Acquire_Click()

CWAI1.Configure
CWAI1.Start

End Sub

Private Sub CWAI1_AcquiredData(Voltages As Variant, BinaryCodes As Variant)
'Graph the acquired data
Strip1.AddYArray(1, Voltages)

End Sub

Private Sub Stop_Click()
CWAI1.Stop
CWAI1.Reset
End Sub

Hope this helps, if you need anything else get back to me.
0 Kudos
Message 2 of 2
(4,271 Views)