Jump to content

How to call labview by DOS or command prompt


Recommended Posts

I use LabView7.1 and 6.1,I want to run LabView from command prompt but I don't know how to do?

I found this webpage from ni

http://digital.ni.com/public.nsf/websearch...64?OpenDocument

I know it for LabView 8 but this page say about older version,too

but when I try with this page procedure,I can't send agrument to Labview

Could you tell me how to send agrument and recieve answer from Labview with command prompt?

and/or how to know sequence of agrument? and/or what is API that webpage say and how to use it?

or LabView7.1 can not call by command prompt by send agrument to it anyway?

Thank you very much for your help

Link to comment

Actually both of the categories you posted didn't match the question. The correct category would have been LabVIEW general or LabVIEW development environment (but not both).

I don't know the answer. However in the help of LabVIEW 8.x LabVIEW command line options are explained. Did you search LabVIEW help for 'command line' before posting?

Link to comment

QUOTE(Karissap @ Aug 21 2007, 02:43 PM)

Thank you very much,You have a thorough knowledge for Labview.

I will try to test with your comment if another problem will ask you again,

but you are first people that know how to do.

now I know only LabView call perl,Labview call VB but can not use VB call LabView and Perl Call LabView because

I don't know how to send agrument to LabView.

I think many member and some of profession member are not know this topic very mech.

if it possible we can use all of program call Labview and use Labview call another program.

Link to comment

<pre_coffee>

QUOTE(tum @ Aug 21 2007, 02:19 AM)

I think many member and some of profession member are not know this topic very mech.

I have no idea why you would think that... receiving command line arguments from within LabVIEW has been common knowledge in the LabVIEW community for a long time, since the help (and the first link in the "related" section on the web site you provided) is pretty clear on how to do this. It may benefit you to take a little time to get more familiar with the help inside of LabVIEW, it's very good. :book:

Sorry, but if not many people respond to your post it doesn't necessarily mean that no one knows the answer. They may just not understand the question (or don't have the time at the moment to answer).

</pre_coffee>

Link to comment

QUOTE(orko @ Aug 21 2007, 02:43 PM)

I know what you mean but I found I do same as website but it not work.

I tell on webboard and share exp

if someone read it and do it and it work I need exp but if not not work same me I think I will response to ni.

my point is when you compile program to dll or exe you will found "Pass all commandline arguments to application" but

if my program name work.vi and it has 3 inputs <IP> <PORT> <PAGE>

What is true command line?anybody know?

LabView {PATH of LabView FILE}/work.vi -- <IP> <PORT> <PAGE> or

LabView {PATH of LabView FILE}/work.vi -- <PAGE> <IP> <PORT> or anything?

someone could you tell me what is true?and how to do?

but I found when I test with myself anyanswer is wrong,any agrument can not pass to my .vi if I call by command line,

even if I compile and check "pass all agrument" but my work.exe still not recieve agruments that I send to it.

if anybody want to call LabView by another program etc. .BAT VB VC or Perl,I think this topic will help you if someone answer or member share exp(only share exp) because if it not work also by command line we just think to solve by another way.

QUOTE(Tom Limerkens @ Aug 22 2007, 06:47 PM)

When building an application, remember to enable 'Pass all commandline arguments to application'

in the 'Application Settings' Tab of the application builder.

Otherwise no arguments will be accessible in the EXE.

Tom

Thank you very much for your response but I still not work coz before I post this topic I found and check it before

this my first thinking, LabView 7.1 is not support command line.

but I think I'm wrong and then I try many time it still not work too.

my program can not recieve any agrument.

before try it I think it easy and common sense same as orko and any member that complain me but no answer for help,too

but for anybody try to help me,I really thank you anyway you answer can help me or not but now it still not work.

Link to comment

QUOTE(tum @ Aug 22 2007, 07:08 PM)

I know what you mean but I found I do same as website but it not work.

Please post an example VI to this board as an attachment so we can see what you are trying to do. Without the code to look at I really can't see where your problem lies.

Thanks! I'm sure we can get this solved if we are all on the same page.

Link to comment

QUOTE(tum @ Aug 22 2007, 09:46 PM)

How to return value to DOS again?

I want to use it as function it mean we can insert agrument and recieve answer from program.

Do you mean that you're trying to write a console app in LabVIEW? (I.e. a program you run from the command line (with arguments) that returns its output to stdout.)

That's an issue I've been meaning to look into for a while, but have never found the time to do so.

Link to comment

I'm not aware of a straight forward way to write to stdout from a labview exe.

I got some information from this thread though on the ni forums.

You could use windows system dll calls to write to stdout:

QUOTE

For the output...

Use GetStdHandle, kernel32 to get a handle, (handle GetStdHandle(long

param), use -11 for parameter);

Use WriteFile, kernel32 to write a string (long WriteFile(long handle, CStr

message, long length, long *written, long overlapped));

This is pretty advanced to do this though if you haven't had much experience calling dlls from LabVIEW.

If you are able to create files somewhere I suggest the method described at the beginning of the thread:

QUOTE

Have the VI save its output to a file and then use the DOS command type to put the data on the command line. The command to call the VI and retreive the results could be put in a *.bat file.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.