LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data from Text file and accessing Lines


Naqvi_hassan wrote:

Hi , my code is this , so i just put the example data in the array and want to plot but  this code is not plotting the Negative Values. 

 

 

int CVICALLBACK Get (int panel, int control, int event,
  void *callbackData, int eventData1, int eventData2)
{
 unsigned int f[8];
 f[0]=10;
 f[1]=0;
 f[2]=20;
 f[3]=0;
 f[4]=0;
 f[5]=-10;
 f[6]=0;
 f[7]=10;
 switch (event)
 {
  case EVENT_COMMIT:
   
    PlotY (panelHandle, PANEL_GRAPH, f, 8, VAL_UNSIGNED_INTEGER, VAL_THIN_LINE, VAL_EMPTY_SQUARE, VAL_SOLID, 1, VAL_RED);
     SetAxisScalingMode (panelHandle, PANEL_GRAPH, VAL_LEFT_YAXIS, VAL_MANUAL, -60.0, 60.0);

   break;
  case EVENT_RIGHT_CLICK:

   break;
 }
 return 0;
}


An unsigned array cannot hold negative values!



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 11 of 12
(1,103 Views)
oh   mannnnnnnnnnnn (uffffffff) , thank you very much  ,  waste your time bcoz of this stupid mistake.
0 Kudos
Message 12 of 12
(1,095 Views)