If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
I work in CVI from National Instrument. From CVI i am calling to batch file "_1.bat", and from "1_bat" script start to run.
In the end of script i have command EXIT.
I want to read exit return in main CVI function
-----------------------------------------------------------------------------------------------------------------------------------------------------------
This is main program:
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0) return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "main.uir", PANEL)) < 0)
return -1;
DisplayPanel (panelHandle);
RunUserInterface ();
DiscardPanel (panelHandle);
return 0;
}
//func call BurnInTest
int CVICALLBACK CVI_Start (int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
{ int p_f=-3;
switch (event)
{
case EVENT_COMMIT:
p_f=system ("C:\\Program Files\\BurnInTest\\_1.bat"); //start script
break;
}
return 0;
}
---------------------------------------------------------------------------------------------------------------------------------------------------------
File _1.bat:
CD C:\Program Files\BurnInTest\
bit.exe -S "C:\Projects\Hyperpack\_example by VG_script rev 1.0.bits" -R -M
---------------------------------------------------------------------------------------------------------------------------------------------------------
Script file:
MESSAGE "START Test"
SETLOG LOG yes NAME "C:\Projects\Hyperpack\Log dir\Last-LOG.htm" TIME yes REPORT text REPORt html
SETLOG LOGLEVEL no TRACELEVEL no SUM no LINES 10000 PERIODIC 0 FILE append
STARTLOGGING
LOG "Start of Test
LOG "Set up the test environment"
LOAD "C:\Projects\Hyperpack\_config tst\_cnfg max operat CPU.bitcfg"
LOG "RUN CPU OPERATION TEST"
RUN CPU
################################################## ################
LOG "RUN 2D Graphic memory TEST"
LOAD "C:\Projects\Hyperpack\_config tst\_cnfg 2D_graph all_mem.bitcfg"
RUN 2D
LOG "RUN 2D Graphic display watch TEST"
LOAD "C:\Projects\Hyperpack\_config tst\_cnfg 2D_graph pic_run 50load.bitcfg"
RUN 2D
################################################## ################
LOG "RUN CPU OPERATION TEST"
LOAD "C:\Projects\Hyperpack\_config tst\_cnfg HD cyclic.bitcfg"
RUN DISK
################################################## ################
LOG "RUN NETWORK Loopback TEST"
LOAD "C:\Projects\Hyperpack\_config tst\_cnfg net loopback internal.bitcfg"
RUN NETWORK
################################################## ################
LOAD "C:\Projects\Hyperpack\_config tst\_cnfg max temperature CPU.bitcfg"
LOG "RUN Temperature CPU TEST"
RUN CPU
LOG "Testing complete"
MESSAGE "TEST FINISH"
#Exit coomand BIT and return 0=PASS 1=FAIL after test
EXIT
HI
I built a script and got it from Batch file. In addition, the Batch file is activated by the system command in CVI. I can not read the return value after EXIT in the script.
I am understanding that this is not exactly the problem of BurnInTest, but still hope for help
Leave a comment: