09-07-2010 02:52 PM
Second problem, same program.Using LabWindows 8.1, Windows XP
I have a program that acquires data from a PCIe-6361 and displays it on an "o'scope" type display using a graph panel control.
The graph indicator (VSCOPE_SCREEN) is set up in the routine "VOSCOPE_Display_VOScope", which mostly sets up the various knobs and other controls.It is set up with Control Mode = "indicator, Data Mode = "Retain", and "Smooth Update" set,
Most importantly, the data is graphed to the indicator in the routine "VOSCOPE_ReceiverDataHandler" at the end of the file:
DeleteGraphPlot(iHandle_VOscope,VSCOPE_SCREEN,g_iPlotHandle,VAL_DELAYED_DRAW);
g_iPlotHandle = PlotWaveform (iHandle_VOscope, VSCOPE_SCREEN, DataBuffer_p,
BufferCount, VAL_DOUBLE, 1.0, 0.0, 0.0,
d_Xinc, VAL_THIN_LINE,
VAL_NO_POINT, VAL_SOLID, 1, VAL_RED);
RefreshGraph (iHandle_VOscope, VSCOPE_SCREEN);
The problem is that the graph is never drawn when VOSCOPE_ReceiverDataHandler is called unless I change one of the time axis knobs and cause a call to SetScopeTimeAxis() (via "CB_UpdateDelayMsec" or "CB_UpdateTB". Adding or subtracting the "RefreshGraph" call does nothing.
Thanks.
09-07-2010 02:58 PM
Further on the last: SetScopeTimeAxis ends up calling "SetAxisScalingMode" to change the max and min for the horizontal axis. As this is also called when the program is initialized, I see no reason for why this should suddenly cause the graph to display data, but it does.
09-08-2010 09:46 AM
Hello,
Does the call to RefreshGraph return an error (a negative integer)?
09-08-2010 01:45 PM
Nope, returns '0'.
09-09-2010 09:25 AM
Hello,
Would it be possible to create a simple, "software only" CVI project that demonstrates the issue? If so, feel free to attach your workspace, project and source/header/UIR files in a ZIP. That way I can take a look at the issue on my end.
09-29-2010 02:53 PM
Sorry for taking so long. I isolated just the graphics stuff (but left the calls in, for reference), emulating the DAQmx calls. Run the VOscope_Test program and push the "Open VOscope Panel" button . The O'scope panel will display. (Move the O'scope panel, which always ends up on top of the other one) Press the "Test" button and it will generate some synthetic data and call the VOSCOPE_ReceiverDataHandler function that displays the data. Note that nothing displays until you move a knob, then the data displays.
Thanks
Paul
09-30-2010 04:32 PM
Hi Paul,
Thanks for creating this. What versions of which drivers would be necessary on a test machine to build and run this code?
10-04-2010 08:37 AM
LabWindows/CVI 8.1.0
MAX 4.6.2
NI-DAQmx 9.1
Running on Windows XP Professional SP 3
10-04-2010 02:56 PM
When the time-base knob is turned and the routine "SetScopeTimeAxis(...)" is called, it is the call to the User Interface Library routine "SetAxisScalingMode(...)" that causes the graph to show up properly. Why, and how to get it to show up before that point, I don't know yet.
10-05-2010 01:38 PM
Hey Paul -
I took a look at your example, and have a quick question. When the graph is first displayed, the range shown on the X-Axis is 495-505. When the knob is turned (resulting in the call to SetAxisScalingMode), the range resets to 6-16. Looking at the code, it appears you are beginning the plot at an x value of 0, with an x-increment of .2, and you are plotting 1024 values. This would mean the valid x range for viewing data would only be from 0 to ~205. It's difficult to verify this because the code you posted is too incomplete to build, but is it possible that before you turn the knob you're just viewing an x range that lies outside the data?
If this is not the case, is there any way you could post the complete code so that I can build and debug the program with you? If you'd rather not post the code to the forum, you can always place it on our write only ftp site ( ftp://ftp.ni.com/incoming ).
NickB
National Instruments