04-24-2010 07:10 AM
Hello,
I want to be able to run a LabView vi from Java and found that the best way to do this is to create a DLL in LabView and then call it in Java using JNI. I did a dummy program in LabView to test, but the problem is that the instructions I found don't seem to exist! For example, one tutorial I was following said to: "Open a new VI and select Tools»Build Application or Shared Library (DLL).". But I don't have that under tools, just Build Application (EXE) from vi, which gives a project file. In another place it said to "Expand My Computer. Right-click Build Specifications and select New»Shared Library from the shortcut menu to display the Shared Library Properties dialog box" but I have no idea what that means.
I have the LabView 2009 trial version, could that possibly be making a difference? If not, what am I doing wrong? Or is there a better way to run a LabView program from Java?
Thanks a lot!
Hugh
04-24-2010 08:27 AM
04-24-2010 03:04 PM
Actually, the second one is from LabView help. I tried looking up Application Builder like you said but again it begins with the instructions "Expand My Computer. Right-click Build Specifications and select New»Application from the shortcut menu to display the Application Properties dialog box" and I have no idea what this means:S What do they mean by My Computer? And Build Specifications? I don't have any of that... I'm sorry but I'm new to all of this, I've never worked with DLLs before in any language, and all I want to do is run my LabView program when I press a button on my Java interface!! If there is a better way to do it, that would be great!
Thanks at any rate,
Hugh
04-24-2010 04:21 PM
You have a "My Computer" when you create a LabVIEW project.
I wasn't very clear in my answer. The first thing under 'Application Builder' is a linkk to 'stand-alone applications'. There is a tutorial there. Once you have created the project with your VI in it, follow the instructions about creating a dll that is in the original help topic.
A dll is probably the simplest method of calling LabVIEW code from another application. Note that you must also install the LabVIEW run-time.
04-24-2010 11:20 PM