LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

passing type var in labview to Javascript

In labview 8.2 I'm outputing two XY numbers as type VAR. I need to read these in another Javascript program I have written. I am looking for the easiest way to read these number as efficiently as possible. I know it is possible to output these numbers to a txt file in labview, but I wanted to know if there was a way to directly read the numbers into javascript. By the way, sorry for the wonderful name.


0 Kudos
Message 1 of 4
(3,516 Views)

Hi CF,


In labview 8.2 I'm outputing two XY numbers as type VAR. I need to read these in another Javascript program I have written.

I've passed data from LabVIEW to Java via a tcp/ip connection - that would be a  bit better than the temporary text-file!  Not sure about passing the VAR type, though.  If VARiants have some universal representation, then maybe it can be unpacked on the Java side, otherwise, I'd consider serializing/passing simple numeric types.
 
Cheers!
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 4
(3,504 Views)
... sorry, you said javascript - different animal, that.
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 3 of 4
(3,501 Views)

Hi,

Check out this thread. Calling a VI as an ActiveX Object is an option for you. Try this command:

response = vi.GetControlvalue("Output")

Happy coding!

Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 4 of 4
(3,446 Views)