LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass value from HTML to LabVIEW on VI launch?

I am launching a VI from an HTML hyperlink (works great). I would like to pass a value (str, num, whatever) to the VI. Can this be done with ActiveX or some other method from within the HTML?
 
Any help down the right path is appreciated.
 
Brian
0 Kudos
Message 1 of 3
(2,402 Views)
Hello,
 
You can pass command line arguments to an executable built in LabVIEW.  That is, if you build your VI into an executable, you can specify in the Application Builder to pass command line arguments (see the attached screenshot).
 
You can use a property node from the Applications Control palette, and choose the Application -> Command Line Arguments property.  It returns a string array; the value at index 0 is always "LabVIEW," but consecutive items in the array will be whatever command line arguments you pass to it.  Thus, if you can programmatically launch applications from your HTML program, all you have to do is
1. integrate the property node as indicated above to extract your command line arguments and use them in your VI
2. build your VI into an executable
3. launch that executable from your HTML code.
 
In case you are not aware, you can actually access VIs across the web using the web publishing tool.  It will actually create an html file which includes an embedded/linked front panel to a VI.  You can then, from anywhere in the world, access that web page, and control the corresponding VI.  Of course, you can modify the generated html to add whatever other code you would like to define that web page.  If this is of interest, you'll find some documentation at ni.com, or feel free to repost and I can be more specific about how to do this 🙂
 
Best Regards,
 
JLS
 
Best,
JLS
Sixclear
0 Kudos
Message 2 of 3
(2,383 Views)
Hello again,
 
Here's a screenshot of how to get the command line arguments property from a property node, in case that wasn't clear from the language above 🙂
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 3 of 3
(2,381 Views)