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: 

Using and communicated with a program written in JAVA

I am interested in using a program that has been written in JAVA (more details provided upon request). My goal is to try and embed this program in Labview using the web-browser (and the JAVA program would be run as an applet).  Is it possible to send information to this program and have it display back the desired information.

 

[The specific details are in reference to my post about the GPS program made on 1-19-2012]

Ultimately I want to send the JAVA program GPS coordinates and that program uses a pre-configured bitmap that is geo-referenced and defining boundaries using a shapefile, all of wihch is displayed to the user via the web-broswer.

0 Kudos
Message 1 of 6
(2,498 Views)

I have developed an labview application which is streaming XML data and an webpage receving that data using java script function. It seems you want to develop something similiar. please describe more about your application.

 

0 Kudos
Message 2 of 6
(2,494 Views)

Thank you for your response!

 

Below I am going to copy and paste the GPS posting I did.  The reason why I did two posts was because I have many different avenues to getting this task done.  The best way I believe is to use a java applet to do what I want.

Essentially going this route I would need to supply a GPS string (NMEA) from labview to this applet.  The applet takes this data as the current location and displays the map, shapefile, current location, and past locations.

 

Steaming XML data sounds like a good option, but I don't know the JAVA environment very well at all, and learning as much as I can.
___________________________________________________________________________________________________________________________________________________________

Objective::

I need to maintain in Labview the visual representation of the past and present location of the path a robot takes with regard to a bounded area (defined by a shapefile) and represented on a geo-referenced satellite image.  (The computer running the program will not be connected to the internet.)

 

Purpose::

Help aid a user with traversing a robot via tele-operation to new locations that lie within a specified boundary.

 

Problem Statement::

1.        I need to bring in externally compiled code written in JAVA that performs the intricate details of the above-defined objective.  (I would assume utilizing the web-tools of labview). 

2.       I need to perform the entire objective inside labview

 

Either which of these present their unique troubles in accomplishing the objective.  In number 1 I am uncertain how to bring in JAVA code or how to display the results.  For number 2 I have investigated several possible routes that are listed below in the “Background.”

 

Background::

a.        Shapefiles can be viewed by a multitude of third party software packages.  The one I would like to use (by problem method number 2) would be mapwindow.org.  The company who made this also created an active x component, of which does not directly import into labview (I would assume that I would have to pull in some DLL files and operate from here ~ of which I am not 100% certain to do).

b.      I was investigating the use of Google Earth to do most of the grunt work for this particular project.  The major drawback (which I need to double check) is that I don’t believe that I can “Save” a location in Google Earth, and carry that information over to another computer to be used entirely offline.   (A particular goal for this robot is to be run in very rough terrain, hence no internet connection.  Mobile Wifi and Satellite Internet is out of the question).  This still may be a viable option to do the work required.

c.       For problem statement number 1, I won’t be able to release that code since it is proprietary to another company.

 

Any help at all would be greatly appreciated!

Thanks!!

___________________________________________________________________________________________________________________________________________________________

0 Kudos
Message 3 of 6
(2,491 Views)

For accessing java methods from labview, you need an JNI - Java Native Interface. 

Have a look on the below link.

 

http://digital.ni.com/public.nsf/allkb/BEE812007BA2A9B486256BC80068A49A?OpenDocument

0 Kudos
Message 4 of 6
(2,477 Views)

Hi Dashiva,

 

In an effort to keep our forums organized, we try to keep issues limited to a single thread (ie, avoid having two threads open that are a duplicate of each other).

 

That being said, please direct future responses to the original post at http://forums.ni.com/t5/LabVIEW/GPS-location-in-labview-displaying-map-and-using-shapefile/m-p/18441...

 

And thank you for contributing answers to the forums puneet.kapoor, it's certainly appreciated!

 

Regards,

0 Kudos
Message 5 of 6
(2,465 Views)
I decided to make two threads because I didn't want the focus to be all about java. I was hoping there would be more information about some techniques that I could use in labview so I didn't have to use java.
Techniques such as using shape files, google earth (offline), etc.
The second thread for java was made because that method has been suggested, but I don't know that language that well.
0 Kudos
Message 6 of 6
(2,460 Views)