09-10-2008 02:30 AM
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!
09-10-2008 06:12 AM