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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open a labview Vi file using Python Scrpit(Tinker)

Solved!
Go to solution

Actually i am doing a project and basically i have completed that project by intefacing python script using ardrino But what i want to do is .... i want to interface python with labview and after taht labview will communicate with ardrino ...soo that mine project will be a labview based good project as i am a CLAD certified soo trying a lot of stuffs and coding about these things but not actually getting how to connect Python with labview .....I got some kind of code that uses labview debugging development and open only labview but i want a code which will open labview .VI file and atleast run it once ...

Can any one Suggest or help me about this issue?

0 Kudos
Message 1 of 5
(4,464 Views)
Solution
Accepted by topic author ankit1063


want a code which will open labview .VI file and atleast run it once ...

Command line? Put the VI on run when opened, and from the CL run it:

c:\program files (x86)\Nati.....\LabVIEW.exe "path to VI"

Message 2 of 5
(4,402 Views)
Solution
Accepted by topic author ankit1063

build vi to .exe or whatever the equivalent on linux/macos will be,

use python subprocess module (e.g. subprocess.call(["my", "cmd", "with", "arguments"] ) for the commandline execution.

done.

[1] https://docs.python.org/3/library/subprocess.html


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Message 3 of 5
(4,396 Views)

can you tell me this in a bit more detail.like 

0 Kudos
Message 4 of 5
(4,382 Views)
Solution
Accepted by topic author ankit1063

you need a runtime on the machine you will be running on http://zone.ni.com/reference/en-XX/help/371361N-01/lvconcepts/using_the_lv_run_time_eng/

 

you need an executable, by either defining a build specification for a project,

or for a standalone vi, you can go to "Tools -> Build Application (.exe)" which will then create a project and open the Build Specification Dialog.

 

i assume you know python

 

i don't know whether you can run on / build for arduino,

i just assumed you would be doing something from a windows machine with the arduino.


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