LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

return Argument to CMD

Solved!
Go to solution

     I can get the Arguments when I use the CMD call exe(which is build by Labview). but I can't find any method to get a Arguments from EXE to CMD.

      anybody can give some help?

    

0 Kudos
Message 1 of 13
(5,215 Views)

hi there,

your question is just a guessing game for me.

would you mind using LabVIEW terms/names?

 

what i may have gathered is, that you know how to use "System Exec.vi",

but you want to know how to get arguments for your own LabVIEW executable?

and then call "System Exec.vi" with the same arguments?

 

EDIT:

is this what you were looking for? https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P80FSAS


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 13
(5,186 Views)

Have you read the Help for the Systemexec.vi?

 

Really I am not sure I understand your question.

Do you want to add arguments to a command line?

Do you want to know what arguments a command HAD BEEN ran with?  

Do you want to capture the output of a command ran through the systemexec (cmd window)?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 13
(5,170 Views)

thank you for your reply.

I build a EXE with labview and I can get the Arguments when I use the property of Aplication Arguments. but when the EXE is finished the excution and I want return a value(successful or fail) to CMD(third party App).

     I have asked to NI service and they tell me that I can't return a value to CMD

0 Kudos
Message 4 of 13
(5,151 Views)

I want to capture the output of a command ran through the systemexec (cmd window) when I use CMD to start a EXE which is build by labview.

0 Kudos
Message 5 of 13
(5,147 Views)

so the System Exec VI returns you the stdout, stderr and the return code.

what is it that you are missing?

 

edit:

i think i start to get it, you want the labview executable to exit with a return code, or output to stdout/stderr,

that i don't konw


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 7 of 13
(5,138 Views)

jwscs ha scritto:

so the System Exec VI returns you the stdout, stderr and the return code.

what is it that you are missing?

 


He wants to return a code to the OS when closing his own LabVIEW program.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 8 of 13
(5,134 Views)
Solution
Accepted by topic author Aric_liao

an option would be to write the info you want to a file (e.g. return code),

and use this file from any other tool in your commandline chain


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 9 of 13
(5,131 Views)

LabVIEW is not a command line application. It's possible, but much much much more difficult that you'd might expect.

 

Named pipes can help. You can create them from the command line, and LabVIEW can write to them (and then quit). That's not really "return argument to CMD", but it servers the same purpose.

0 Kudos
Message 10 of 13
(5,112 Views)