07-02-2014 11:09 AM
Hi meysam_b
"I'm so sad for it because I love Labview and I hoped that labvew help me stand alone in web based application."
Don't be sad! I developed the LabSocket system for situations just like yours. LabSocket automatically creates a web page from a LabVIEW front panel and then synchronizes the controls and indicators in the front panel and browser. Since the system does not require browser plug-ins or client-side run-time engine, LabVIEW applications can be accessed from any modern browser, including those on mobile devices.
A nice example of the ease-of-use of the system is a Home Automation system developed by 4th year engineering students at the British University in Egypt. Details of their project (Final Report, video, etc) are posted in the LabSocket User Group forum on LinkedIn: http://lnkd.in/bnHxWzi
To get started with the system, I'd recommend trying out the fully functional downloadable demo package. The demo and user guide for the system are available at: http://labsocket.com/download.html.
You're welcome to contact me directly at jbergmans <at> bergmans <dot> com if you have any questions about the system.
Regards,
John Bergmans
See you NIWeek 2014
07-25-2014 04:05 AM
Hi!
Sorry to post my question here, but I'm having a similar issue developing a web version of my labview application in HTML.
I want my web version to be the interface layer that shows some of the most important stuff that my labview application does. And for that I'm trying to use the labview's web services. My problem is that my application also uses a MySQL database, and if I make a simple query on a labview's web method VI, it doesn't work. I know that I can access the database with PHP in a HTML page, but I really don't have enough time to implement again in PHP everything I have on my labview application that accesses the database.
Is database connectivity not possible in labview's web method VIs? I was trying a simple query in the web method VI to test it and it didn't work. I've also tried putting the query in a subVI that the web method VI calls, but it didn't work either...
I'm using Labview 2013 with Database Connectivity Toolkit.
07-25-2014 04:22 AM
07-25-2014 04:43 AM
It doesn't return any data or returns 0. Shared variables or simple stuff works fine on the web method VI. I only noticed that database queries don't work correctly. But on normal VIs in my labview application I dont't have any kind of issues accessing the database.
I've attached screenshots of the web method VI and the result. With that query it should've returned 323.
07-25-2014 05:40 AM
07-25-2014 06:39 AM
I'm not sure I understand correctly what you are suggesting.
Are you saying that I could use the same query parameters I use on my VIs for accessing the DB on a PHP script that I would call on labview, returning the data in JSON and then parsing it to labview data structures? And then my web application would call a web method that accesses that data?
That's very interesting, but since I haven't done anything like it and this is the first time I'm trying to develop a web application based on labview, I don't know if I could do what I want on time...
But the problem I'm having with database connectivity not working with web methods VIs it's a limitation on labview? Or could it be something I don't have properly configured?
07-25-2014 07:12 PM
Frankly, I don't know what the most likely problem would be and as far as I know, you still can't debug a web service.
But, yes you seemed to grasp my idea exactly.
Mike...
07-25-2014 10:52 PM - edited 07-25-2014 10:58 PM
You've always been able to debug web services, it was just previously in a separate context, making it like debugging an exe... which was no fun. Now you can launch the web service in a debug context, making it debuggable as if it is a normal VI.
The CPU usage issue was fixed in 2012 I think, and it was with any open reference item - shared variable , TCP, whatever.
Back to the original question. It sounds like it would be easy to just run the Vi as-is and see what data comes back. Can you post a picture of that same Vi with the front panel showing your expected value?
If you still get 0, it is something in your code. If you get data but it still doesn't work in the web service, wire up your errors and figure out what is being thrown, because undoubtedly something is but you just don't know it.
07-28-2014 03:57 AM
My VI is a simple query. Nothing special about it. I've attached screen shots of the VI and front panel with the expected result and the web method VI with the xml output in the browser. It doesn't show any errors.
My doubt is if there's something I should do differently when using the Database Connectivity Toolkit in web method VIs. Or if it isn't supported in web method VIs.
07-28-2014 08:20 AM
@dems wrote:
You've always been able to debug web services, it was just previously in a separate context, making it like debugging an exe... which was no fun. Now you can launch the web service in a debug context, making it debuggable as if it is a normal VI.
The CPU usage issue was fixed in 2012 I think, and it was with any open reference item - shared variable , TCP, whatever.
Gee I wish I had talked to you when I ran into the problem. Not knowing any better I thought NI's Premier Support and LV development team would know what was going on. Guess not...
Mike...