LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Fillbytes Issue

Program is crashing during the execution of this function. When tried in debug mode found that its crashing during the Fillbytes function.

 

( FillBytes(readback, 0, 2, 0x00); )

 

int test_1_041_av850(tData *data)
{
char readback[2];
TestComplete[1][5]=1;
if (TEST_RUN_MODE == PARTIAL_TEST)
{
if (TestComplete[1][4] == 0) test_1_040_av850 (&dummy);
}
// SetCtrlVal(MainPanelHandle,MainPanel_RunTimeMessagesText,"Readback created");


FillBytes(readback, 0, 2, 0x00);

RTIU_Change_Page ("N");

Delay(1.0);


/*if (ConfirmPopup ("",
"Is EMRG MIC RET on video monitor is LOW?"))
data->iMeasurement = 1;
else
data->iMeasurement = 0;*/
SetCtrlVal(MainPanelHandle,MainPanel_RunTimeMessagesText,"Reached RTIU Loc 1_041");

if (RTIU_Read_Loc (36, 9, 1, 1.0, readback) < 0)
return (-1);

SetCtrlVal(MainPanelHandle,MainPanel_RunTimeMessagesText," RTIU Loc Completed 1_041");

if (CompareStrings (readback, 0, "L", 0, 0) == 0)
data->iMeasurement = 1;
else
data->iMeasurement = 0;

return (0);
}

 

 

 

Mature Cams , Asian Cams , FreeLiveSexCams - check this awesome live sex cams
0 Kudos
Message 1 of 2
(1,029 Views)

It's hard to say why the program i crashing with no additional info: you could probably find some detail more in the Event Viewer and try understanding what's happening.

 

But in the line of simpler-is-better, why don't you define

char readback[2] = { 0, 0 };

 

or set

readback[0] = 0;

readback[1] = 0;

 

?



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 2 of 2
(983 Views)