LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with graphing data from DAQmx acquisition

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.

0 Kudos
Message 11 of 17
(1,091 Views)

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.

0 Kudos
Message 12 of 17
(1,089 Views)

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

Message 13 of 17
(1,070 Views)

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.

0 Kudos
Message 14 of 17
(1,062 Views)

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.

0 Kudos
Message 15 of 17
(1,056 Views)

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.

0 Kudos
Message 16 of 17
(1,031 Views)

Glad to hear you were able to track it down  Smiley Happy

 

NickB

National Instruments

0 Kudos
Message 17 of 17
(1,025 Views)