int DPlot_AddData(int DocNum, int DataType, int NumPts, int Curve, float *array1, float *array2);
int DPlot_AddData8(int DocNum, int DataType, int NumPts, int Curve, double *array1, double *array2);
Parameters
Return Values
Remarks This function, like DPlot_Command with [XY()], [XYXY()], or [XYZ()] commands, may be used in real-time applications. For best results with real-time applications:
Notes for version 2.2.2.6 and later New to version 2.2.2.6 and later versions of DPLOTLIB.DLL: As with most other DPLOTLIB functions, DPlot_AddData initializes the DDE management library (DDEML) and establishes a DDE conversation with DPlot. In previous versions DPlot_AddData terminated the conversation and "uninitialized" the DDEML on exit. In general this works fine on non-.NET apps on Windows XP and previous versions of Windows. But on Vista and with .NET apps on any version of Windows, the calls to DDEML functions take far too long and serve as bottlenecks, possibly resulting in "busy" messages. The problem was particularly severe on Vista. In version 2.2.2.6, the DDEML is initialized once and a DDE conversation is established, but not closed. This change removes the bottlenecks experienced with .NET apps and all DPLOTLIB programs on Windows Vista. However, it also forces the calling application to eventually close the DDE conversation. This is accomplished with a call to the new DPlot_Disconnect function. Failure to call DPlot_Disconnect when your program is done with DPlot_AddData will lead to consuming resources unnecessarily, and possibly to a failure to connect with DPlot in a later call. If your real-time program produces data at a fairly fast rate (e.g. faster than 10 points per second and your program will be producing a plot with 10's of thousands of points or more, you should consider using the DeferMinMaxCheck command. By default, DPlot will recalculate minimum values, maximum values, means, and standard deviations after every call to DPlot_AddData. In a plot with many thousands of points this calculation is enough of a bottleneck that it might interfere with the next call to DPlot_AddData. The downside to using [DeferMinMaxCheck(1)] is that any text placeholders will not be updated until a [DeferMinMaxCheck(0)] command is sent.
|
Page url: http://www.dplot.com/lib/index.htm?dplot_adddata.htm