I am trying to get a NI example to work using the ActiveX control API instead of the native CNi controls. The example I am referring to is 'FetchForever', which is found in the following directory:
c:/VXIpnp/WINNT/NISCOPE/EXAMPLES/C/MSTUDIOC++/
Basically, I don't have access to the CNiNumEdit and CNiGraph controls because I don't have CW++ installed. So I changed the example to work with CCWNumEdit and CCWGraph (VB ActiveX controls). I am programming in Visual C++.
My version of the example runs. The NiScope 5112 is continuously fetching data, and you can see "Total points fetched" on the dialog continually increase, and the graph displays the correct waveform. Probl
em is the waveform displayed is ONLY the first one collected, and it nevers updates! So if you change the waveform while the NiScope 5112 is collecting data, this change will not show on the graph. It's not being continuously updated.
I think my problem has to do with my "PlotWfms" function in the FetchForeverDlg.c source file. I have included an exert of my version of the code below. I have also included the source file "FetchForeverDlg.c"
Any help in this matter would be greatly appreciated.
COleSafeArray variantArray;
/* Copy the waveform data over to a VARIANT array for the graph */
variantArray.CreateOneDim( VT_R8, wfmInfoPtr->actualSamples, waveformPtr, 0);
/* Plot the data using the NI ComponentWorks CWGraph object */
m_acquisitionGraph.PlotY(variantArray, COleVariant(0.0), COleVariant(1.0), COleVariant(1.0));