In the following do-loop, I don't understand why the graph (CWGraph1) is not updated. The lines are processed (debugging showed that the values are update at each loop), but the the graph is not updated online, it's just the last graph that is shown onthe screen. It's the same if I use a simple textbox: it's not updated at each loop, just the last value comes up. I even tried with wait functions to give the program more time to update, nothing helps. Any idea anybody...
I used to work with traditional nidaq and used the CWAI_acquired event to do that kind of job and it worked perfectly, anybody knows if such event is available with NIDAQmx in VB6??
Thanks,
Do While ProcessedData.Value < 10
DAQmxErrChk DAQmxStartTask(taskHandle)
DAQmxErrChk DAQmxReadAnalogF64(taskHandle, CWnumSampsPerChannel.Value, 10#, DAQmx_Val_GroupByScanNumber, data(0), CWnumSampsPerChannel.Value, sampsPerChanRead, ByVal 0&)
DAQmxErrChk DAQmxStopTask(taskHandle)
ProcessedData.Value = ProcessedData.Value + 1
If SaveDataCheck.Value = 1 Then
ReDim Preserve PulseEnergy(ProcessedData.Value) As Variant
PulseEnergy(ProcessedData.Value) = CWArray1.SumArray(data)
Else
CWGraph1.ClearData
CWGraph1.PlotY data
End If
Loop