10-05-2010 02:50 PM
I'll take a look at the axis again; one of the things done when the o'scope display panel first opens is to call the call-back functions for the knobs, which should set the graph to the proper axes scaling.
10-05-2010 02:51 PM
What do you mean by the "complete code"? The .zip file posted about 5 posts up shows all of the symptoms for the graphing problem. The code from which it is taken is rather hardware dependent.
10-06-2010 09:06 AM
Hey Paul -
I just meant that I was unable to build the exe from the code you provided. Many header and source files were missing, and the main panel that hosts the graph and knobs wasn't included (or I missed it...).
Were you able to verify that there should/shouldn't be data displaying in the range that first displays?
NickB
National Instruments
10-06-2010 02:13 PM
The main panel is in VOscope_Test.c and VOscope_Test.uir; the O'Scope panel proper is in V_Oscope_Panels.uir
The data is NOT in that range. I don't know why it's coming up in that range, though. Obviously there's some problem with my scaling routines that is fixed the first time that a knob is touched. The interesting thing is that when the panel is initially opened, the callback functions for theknobs are all called.
10-06-2010 03:58 PM
Ok, I see what's going on. When the panel opens, I'm using default settings for the data max and min to determine the axis scaling. Combined with the default knob settings, the initial data is off the left side of the screen - this stays because I don't call the routine that rescales the graph X axis everytime that I get a new data set - even though VOSCOPE_ReceiverDataHandler does calculate a max and min for the data. When I touch the knob, the program uses the existing max/min data to reset the axis.
I need to keep the VOSCOPE_ReceiverDataHandler routine as short as possible, so, I have to figure out how to either do the axis scaling only once after the first set of data, or calculate a better set of default values.
10-07-2010 01:41 PM
Actually, the problem was that I had code in there that was supposed to center the trace on the display. This was messed up.
Just goes to show, you look at code long enough, you see what's supposed to be there instead of what actually is there.
Thanks for the help.
10-07-2010 03:13 PM
Glad to hear you were able to track it down ![]()
NickB
National Instruments