From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-24-2008 05:20 AM
Hi,
I'm trying to create exe file that would accept data, make some calculations and then return results. The input is not a problem but I do have some troubles with getting the output working. I am currently exploring two options:
1. echo command + system exec
In this case the echo works but it goes completely new window. Is it possible to configure it to return the data to the same window from which the program was called?
2. printf + CIN
Here I'm trying to use printf from msvcrt.dll, but in this case I get no result at all. The function prototype looks like int32_t printf(const CStr str, int32_t arg);, and I'm calling it with "F temp val:%d" as str and int value. The return value from printf is 15 so it seems that they have been written somewhere. But where? The stdo should be the terminal from which I run the program, but there is nothing there. Shoud I redirect the output somehow?
Any ideas? Maybe there are other ways to solve the problem of retrieving data?
Best regards
Mikolaj
Solved! Go to Solution.
10-24-2008 09:50 AM
Any reason you can't use a dll?
Where you return your data to?
George Zou
10-24-2008 09:55 AM
Hi Mikolaj,
are you trying to a create LabVIEW Application using stdin and stdout?
Why are you calling printf from the msvcrt.dll. In LabVIEW this is done with the Format into String function from the string palette.
Are you in the right board or schould this go to LabWindows/CVI?
10-27-2008 03:22 AM
Hi,
Thank you for your answers. The reason for this is that I have LV code that I would like to run online. The project is quite big so I thought that I will create exe and call it from ASP. I have not tried to call dll from script code, I'm not sure if that's possible. And as far as the LV/CVI is concerned, moving the whole project would be extremely time consuming and, in this case, unnecessary since I am able to use exe created in LV.
I solved getting data back by using temporary file. I write to it in LV and read it with VBScript
Regards
Mikolaj