07-13-2009 09:32 AM
Hi,
I found this VI: http://lavag.org/topic/10304-discuss-calling-external-javascript/, which I believe can be really helpful for my work. The problem is I can't get it to run based on the following problem:
- Apparently the "ScriptControl" cannot be loaded
I am using LabView 8.6, and this vi has been produced in a 8.0 version. Do you think this is the problem? If not, what could cause this problem running this VI?
Thanks,
Diogo
07-13-2009 09:43 AM
Hi Diogo,
i don't think this is the problem. I can run it with LabVIEW 8.5 without any problems. Maybe there are some ActiveX functions missing on your pc.
Mike
07-15-2009 03:14 AM
Hello,
Can you find the Script Control Object when inserting an ActiveX Control ?
Regards,
07-15-2009 09:28 AM
Hi,
Yes I can find the ScriptControl Object when inserting an ActiveX control. I openned a blank VI, created an activeX container and found it when searching activex objects. However when I choose to insert I get an error, something like (it's in portuguese so i'm going to try an translate as accurate as I can): " Error inserting ActiveX or .NET object: Error loading library/DLL of types".
Is it possible I need to install some library to be able to use this object?
Thanks for your support.
Diogo
07-16-2009 01:36 AM
Hello,
Can you post a screenshot of this error ?
Regards,
07-16-2009 08:33 AM
Hi,
here are two printsreens of the problem.
This is the error I get when I try to run it.
However, in the next image, when it is not running, you can see in the front panel the ScriptControl, where it says "Control could not be loaded".
I think that the this message is the real problem... Hope you can help me and many thanks once again.
Diogo
07-20-2009 10:20 AM - edited 07-20-2009 10:21 AM
Hello,
After some investigations, it seems that this issue is related to the ActiveX and nothing can be done to help with this VI. Maybe you could get in touch with the developper ?
Moreover, can you tell me what you want to do exactly ? I think that using JavaScript to write data to an xml file is a bit complicated, maybe we could find another way to do what you are expecting.
Have a nice day !
Regards,
07-20-2009 10:33 AM
Hi,
First of all thank you for your effort in trying to help me solve this problem. I am going to try and explain what it is I want to do. I am developing an UAV ground station, in which I receive data from the GPS and other sensors via serial communication.
What I want to do is plot my gps data in google maps, positioning the center of the map always in the coordinates I get from the GPS NMEA data that I parse in Labview. I have seen examples even in this forum where static maps are used. I tried this but it is not a good solution because the URL as to be constantly changed with the latitude and longitude data and the page reloaded. It causes extreme flickering. So I want to use the Google Maps API in my labview application. The problem is that I have to call the API's javascript functions, with arguments like the lat and longitude data I get from the GPS.
I tried embedding an webbrowser and putting all the javascript code in a html file. That way when I load the html file in the URL of the browser the map api is loaded. The problem is this strategy prevents me from calling the javascript funtions (for example "mapcenter" function) for sending my coordinates information and other. So my real problem is interacting between the labview environment and the javascript code. If I can do this, I do not need to be constantly reloading the map, and the map movement is smooth and dynamic.
I hope you can help me go a little further in this issue. Thank you very much.
Diogo
07-20-2009 10:36 AM
Hi again !
Is it possible for you to send us the API ? Or just the main part ?
Regards,
07-20-2009 10:45 AM
Hi,
To start I am using this examplo from the google code page.
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
It loads a basic map, and is saved in a html file created for example in Notepad. Basically as I said the VI is very simple, see next image.
But like I said, this strategy does not allow labview to interface dinamically with the javasscript code in the html file. Doing it this way, I would have to constantly update the code in the file with new coordinates and loading the map again. This causes the mentioned flickering problem that I also had with static maps.
Diogo