LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

web based application

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!  Smiley Happy 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

0 Kudos
Message 11 of 29
(1,237 Views)

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.

0 Kudos
Message 12 of 29
(1,193 Views)
What do you mean when you say it doesn't work? Error messages? No data/wrong data returned?

If it is all running on the same computer -- and you have the right ADO drivers -- you should in theory be able to access mySQL directly.

I have seen problems in the past (LV 2011-2012 time frame) where accessing a database directly from a web service caused problems. In this case it was, for lack of a better term, a CPU leak. To verify the problem I created a very simple service that performed a very simple query. What I observed was that over time the query took larger and larger chunks of CPU load while never actually returning any more data, or using any more memory.

I was able to demonstrate the problem to NI but was told that there was nothing that could be done to track the problem because, "...you can't debug VIs in a web service."

Which is but one more reason why I don't use or recommend web services.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 13 of 29
(1,190 Views)

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.

Download All
0 Kudos
Message 14 of 29
(1,180 Views)
I hear what you are saying about not having time to rewrite to use PHP, but the fact that you are using the DCT might actually help you. Consider this: Because you are using the DCT the interface you have to your DB right now is already highly parameterized. By that I mean you don't use SQL to perform queries but instead specify as separate parameters the table name, the desired columns and any conditionals (the stuff for the WHERE clause).

You could write a parameterized PHP script that could handle any query based on these same parameters and return the data as a json string. JSON because it is very easy (perhaps even automatic) to parse into a native LV data structures.

You would then create a VI to call that script that would be a dropin replacement for the DCT query VI.

The result would be to significantly reduce the number of modifications to the existing code. You do have all your DB access logic encapsulated in subVIs, right?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 15 of 29
(1,168 Views)

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 o