Running exec file with parameters
Posted: Wed Feb 03, 2021 9:54 am
Hi,
I used the megunolink as a GUI for checking hardware units (The megunolink connects via RS-232 to my custom hardware and control it).
This custum harware is also connected to another hardware which is UUT (Unit under test). my custom hardware sends test commands to the UUT and on the other side - sends the results to the PC (Megunolink)
**************** ************* ************
* pc * <--> * custom * <--> * UUT *
* meguno link * rs232 * hardware * * *
**************** ************* ************
This works very well !!!
However, Now I want to to add a feature - printing "labels" for my units when the UUT test succeeded !
I thought about writing a C# ".exe" program which will get some parameters and when the UUT test finished ok - the megunolink will call this ".exe" with some arguments.
F.E: "print_label.exe -c1234 -v10....."
I already saw that there is "open local document" which has ."filename" that on pressing on the button can be executed.
i thought of telling my "custom hardware" to send a command to the megunolink to change this "filename" to the name i need: F.E: {UI|SET|PRINT_LABEL.Filename=print_label.exe -c1234 -v10}
But i saw that the megunolink don't find the "print_label.exe" file (maybe it thinks that "print_label.exe -c1234 -v10" is the file name)
also I just don't know how can i tell the "PRINT_LABEL" to activate (run this command without a human pressing)
So,
Is there a way to run external ".exe" program with arguments from the megunolink ? and Is there a way this can be done automatically by a command from my "custom hardware" and not by physicals presseing ?
B.r
Yuval.
I used the megunolink as a GUI for checking hardware units (The megunolink connects via RS-232 to my custom hardware and control it).
This custum harware is also connected to another hardware which is UUT (Unit under test). my custom hardware sends test commands to the UUT and on the other side - sends the results to the PC (Megunolink)
**************** ************* ************
* pc * <--> * custom * <--> * UUT *
* meguno link * rs232 * hardware * * *
**************** ************* ************
This works very well !!!
However, Now I want to to add a feature - printing "labels" for my units when the UUT test succeeded !
I thought about writing a C# ".exe" program which will get some parameters and when the UUT test finished ok - the megunolink will call this ".exe" with some arguments.
F.E: "print_label.exe -c1234 -v10....."
I already saw that there is "open local document" which has ."filename" that on pressing on the button can be executed.
i thought of telling my "custom hardware" to send a command to the megunolink to change this "filename" to the name i need: F.E: {UI|SET|PRINT_LABEL.Filename=print_label.exe -c1234 -v10}
But i saw that the megunolink don't find the "print_label.exe" file (maybe it thinks that "print_label.exe -c1234 -v10" is the file name)
also I just don't know how can i tell the "PRINT_LABEL" to activate (run this command without a human pressing)
So,
Is there a way to run external ".exe" program with arguments from the megunolink ? and Is there a way this can be done automatically by a command from my "custom hardware" and not by physicals presseing ?
B.r
Yuval.