NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with echo in teststand

Hi,
I have a function writen in C (Labwindows CVI). In this function  i try to send an echo to  another Programm. When i run the function in CVI , it walks without any Problem. But when i try to call the function from Teststand 3.5 , it doesn't walk properly. Teststand marks the step as Passed although  the command were not executed. I don't understand what is wrong. Is it possible that Teststand doesn't allowed the use of "echo" ?? if not, how can i solve the problem ??
here is my code:
sprintf(cmd,"command.com /C echo %s| prog --command1 \"%s\"", ECHOTEXT, SAVE);
LaunchExecutableEx(cmd,LE_SHOWNORMAL, &hdl);
 
prog is the name of the programm i am sending the echo to.
 
I hope somebody can have an answer.
Regards,
Noubissi
Teststand 3.5
Visual Studio 2005
0 Kudos
Message 1 of 4
(3,012 Views)
hello Noubissi,

i tested with the windows DOS editor on the commandline and it worked.i open the file "test.txt". i attached a screenshot of my configuration.

i hope this helps,
regards,

robert h
NI germany
0 Kudos
Message 2 of 4
(2,969 Views)

Hello Robert,

Thanks for your answer, but the solution you proposed don't solve my problem, since i am not calling the programm from Teststand directly  like you did.

 I am using Teststand to call a function written in CVI, and the job of that function is  to call a programm and pass arguments using echo.

This is the function i am  calling from TestStand: 

int TestFunction()

{

char cmd[300]={0};
int hdl;
char * ECHOTEXT= "echotext";
char *SAVE ="C:\\Develop";
 
sprintf(cmd,"command.com /C echo %s| prog --command1 \"%s\"", ECHOTEXT, SAVE);
LaunchExecutableEx(cmd,LE_SHOWNORMAL, &hdl); 
 
return(0);
}
 
Regards,
Noubissi
Teststand 3.5
Visual Studio 2005
0 Kudos
Message 3 of 4
(2,946 Views)
hello Noubissi,

ich created a testproject in CVI and it worked. i attached the project. basically i tried again with the dos editor.
could you check the project?

regards,

robert
0 Kudos
Message 4 of 4
(2,914 Views)