Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

CWAO event fired

Highlighted
Hello
I use component work 2.0 and a PCI-MIO-16XE-10 card.

When I use the component CWAO I have a problem with the event
"Progress".
I just want the component return to me a evenement (progress) when all
the point AO will be out. However, the component return to me the event
in the beginning of the process.

This is my code, please help me:

Private Sub Command1_Click()
Dim donne() As Double
Dim i As Integer
Dim NbPtBuffer As Long
Dim Frequence As Integer

NbPtBuffer = 100

ReDim donne(NbPtBuffer - 1)

'Reconfigure les caneaux pour le test
CWAO1.Device = 1
CWAO1.Channels.RemoveAll
CWAO1.Channels.Add "0"
CWAO1.Channels(1).ChannelString = 0
CWAO1.Channels(1).ChannelType = cwaoVoltage

CWAO1.Channels(1).ReferenceSource = cwaoInternal


CWAO1.NIterations = 1
CWAO1.NUpdates = NbPtBuffer
CWAO1.ProgressEnabled = True
CWAO1.AutoSelectProgressInterval = False
CWAO1.ProgressInterval = NbPtBuffer
CWAO1.UpdateClock.Frequency = 25

CWAO1.Configure

For i = 0 To NbPtBuffer - 1
donne(i) = CDbl(i) / (NbPtBuffer / 10#)
Next i

CWAO1.Write (donne)
CWAO1.Start

End Sub

Private Sub CWAO1_Progress(UpdateCount As Variant)
MsgBox "AO finish"
End Sub

---------
Thanks for all, you can aswer it to french I'm from QUEBEC
0 Kudos
Message 1 of 1
(1,708 Views)