LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView Program in command prompt

Solved!
Go to solution

Hi all!

 

First of all, here is my config:

- Dev PC: Win 7 - 32 bits

- Target PC: WinXP - 32 bits

- LabView 2009 - 32 bits

 

I need to design a program which one will be interfaced with an ERP. So this one should not have an HMI and should be controlled by sending to it commands (START / STOP / ABORT...) and sending back some status info (10 or 15 data). For the moment, I'm only able to launch my program from command prompt and passing some arguments to it. But I'm not able to send commands after that and disable the HMI.

 

Is it possible to do that with LabView? If yes how? If no, How could I interface my LabView devices and program handling these devices to another kind of program allowing to do that?

 

Best regards,

 

Harold.

0 Kudos
Message 1 of 6
(3,904 Views)

What options do you have for communicating? Only via the Windows command-line? It is not easy (or not possible at all) to have a LabVIEW application run as a console application and read/write to a command-line terminal, but you can pass command-line arguments to a LabVIEW application when it launches.

 

You could, for example, have a small LabVIEW executable which simply launches another executable if it isn't running (START), sends commands to the executable (STOP / ABORT etc.). You could use this to launch/shutdown and send commands to your main LabVIEW application but I'm not sure that you could pass any data back (except perhaps by writing to a file).

 

If you have more communications options (e.g. TCP/IP, UDP then it opens things up) but with just a command-line, it's going to be pretty limited.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 6
(3,875 Views)
Solution
Accepted by topic author haroldducept

About the only way I know of for two programs to reliably talk with each other is using TCP.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 6
(3,871 Views)

Thank you all!

 

Sam_Sharp: Yes I although thought to this solution but it seems tricky to implement such commands like "STOP" and should be messy!

crossrulz: A colleague also proposed this solution. I will try this and will mark the subject as solved if it works!

 

Regards,

 

Harold.

0 Kudos
Message 4 of 6
(3,842 Views)

Hi Harold.

 

Actually I got the exact topic which I was searching for, Can you tell in detail about the procedure of how you made the communication between your Instrument and personnel Computer possible.. 

 

 

Thanks

SPD

0 Kudos
Message 5 of 6
(2,941 Views)

@PriyadarsiniS wrote:

Actually I got the exact topic which I was searching for, Can you tell in detail about the procedure of how you made the communication between your Instrument and personnel Computer possible..


What instrument are you talking about?  If another PC, then using TCP/IP or Network Streams is the way to go.  Just make sure you use a good messaging protocol such as what is done in the STM library.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(2,936 Views)