LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending data to private server

Hello all,

I want to send test bench data to my customers private server through Internet after every test. And customer will able to access that data anytime through a web browser .
I gone through LabVIEW web service , but confused which tool should I use.From where should I start?
I gone through RESTful VI ,HTTP method (GET , POST,etc).
what is the process for sending data to private server or is it same as sending data to static website.

I checked the  LabVIEW example "C:\Program Files\National Instruments\LabVIEW 2011\examples\comm\webservices\address book" can i proceed

the same way for sending data to private server. 

I think first  i need to design a website in private server which will display this test bench data in arranged

form e.g. in terms of table . Is this correct.


I am using LabVIEW 2011 on 32 bit Windows 7 . Is it necessary to have knowledge of web design or any language such as HTML , JavaScript .

Please suggest.

0 Kudos
Message 1 of 11
(4,176 Views)

And customer will able to access that data anytime through a web browser .

 

IMO, there's your starting point.  Define how the user will see this data.

If he selects this file with a BROWSER, then you have to decide what he sees:

--- Plain text - just lists of numbers. For a few items, this is OK, but pretty limiting.

--- A single image - you could create a page in your LV program, capture the image as a .JPEG file, and post that. All he sees is a picture.

--- HTML. Here you can format it and put in graphs, tables, bold text for alarm values, whatever.  It's easy enough to write HTML pages from LabVIEW.

 

 

That has to be your first decision.

 

Either way, make your LV program create that page on the LV machine (local).  IOW, wherever the data is collected, you make the page for it in a file or folder.

 

Next, plan your storage strategy.  Are you going to dump all your data into one folder on the server?  If you produce one file a week, that might be OK.  If you produce 10 files a minute, you have a problem.  Maybe you need hourly / daily / weekly / monthly folders.  Sort that out.

 

Then you use the FTP toolkit to have LabVIEW copy that file/files to the server. It should have your FTP credentials (username / password).  It should create the hourly / daily / weekly / monthly folders if you go that way.

 

If you have hard (wired) access from the LV machine to the server, you might consider mounting the server as a networked drive and using the built-in Windows/Mac/Linux tools to handle the transfer - just write the files to drive Z: or something.  But FTP will work over the net.

 

Next, decide what you do with "old" data.  Do you leave it there forever?  Fine - you're done.  Do you destroy it after one week / month / year?  Then you need to implement that, sorting thru all the data files, and comparing file dates to target dates and using FTP delete to remove the ancient stuff.

 

Anyway, that's how I see it.

 

 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 11
(4,145 Views)
Here's a couple posts to check. The first:

http://www.notatamelion.com/2015/06/01/understanding-web-io/

is sort of an overview of how the various pieces of a web application fit together. The second:

http://www.notatamelion.com/2015/06/08/building-a-web-backend-in-labview/

shows one possible implementation of a LabVIEW based backend.

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 3 of 11
(4,126 Views)

Thank you coastalMaineBird .

Thank you MikePorter.

I am New to FTP server .

I will go through it. even i will go though link provided by MikePorter.

 

But  If  I create HTML page through LabVIEW to show my data in sorted form i.e. graph or table. And if my customer wants to see this data depends on how he request. i.e. If he wants to see only particular months data then i should  have to provide a drop down selection on web page .

So here I think only HTML will not work.

I need to program JavaSript.  Is it possible through LabVIEW 2011.

 

 

If i create web page locally and hosted it to server and I have already sent a data to a server using FTP.

In this case , Is it possible for my customer to see the web page if my machine is offline or shut off.

 

0 Kudos
Message 4 of 11
(4,099 Views)
This is where the first of the two posts will be helpful: highlighting what the various pieces do. JavaScript will not likely be helpful because it is primarily a client-side tool--and you already have LabVIEW filling that niche. PHP however will be very effective because it is a server-side tool and can access the database locally. Moreover you can run PHP scripts on the server from the client using LabVIEW's HTML client VIs. That is in the second post.

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 5 of 11
(4,086 Views)

If he wants to see only particular months data then i should  have to provide a drop down selection on web page .

 

Regardless, that is the place you must start..

 

You have to define (in conjunction with your customer) what he can and cannot do.

 

Before worrying about FTP or HTML or anything, figure out what has to happen.

 

If he wants to create his own views of the data, then you have to set boundaries.

 

Can he ask for all data where the Battery voltage went below 11.5 V on a Tuesday?

 

You need a database of some sort for that sort of thing.

 

Or maybe he just needs to ask for one day at a time.

 

Can you run LabVIEW on the server?  Unless it's a high-traffic (millions of requests / minute), that's feasible.  That opens up a whole slew of possibilities.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 11
(4,077 Views)

@kManaa wrote:

Hello all,

I want to send test bench data to my customers private server through Internet after every test. And customer will able to access that data anytime through a web browser .


Sounds like you should be using a database. Create a database (e.g. MySQL / MSSQL etc.) and tables which your LabVIEW code can put the test bench data into (either directly using a database toolkit, or indirectly using a RESTful API) and then write a web-based front-end (e.g. PHP / node.js / .NET) to allow the customer to access / view / sort / filter the data. You could use LabVIEW on the server...but it's really not designed as a web-server (using a screwdriver to hit a nail etc.).


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 7 of 11
(4,044 Views)

Hello ,

"If he wants to create his own views of the data, then you have to set boundaries."

This is fine. I will keep the boundaries no matter.
But still i am confused .
Because my customer dont want  labview application to run to see the data on his computer.
Here is the issue i am confusing.

For example ,My machine is installed with LabVIEW 2011 professional developement system.
If my machine tests some part on saturday and sent data to a customer's private server using FTP or any desired
protocol .
Now all data is with server.
On sunday my machine will be kept off.Then how my cusotmer will be able
to see the saturdays testing data on sunday which i had sent to server without running Labview Run time engine on his pc.
Beacuse to run "LabVIEW's HTTP client VIs" there should be Labview run time engine on clients computer .
Which my customer  dont want.Because my customer is totally unknown to labview.

Server data should be able to acessible on internet without using any labview VIs or tool or application .
Even it should be acessible when my machine is not connected to internet or server.


Again i am confused with the comment

"Can you run LabVIEW on the server?"
There is no matter to run labview on server , (I dont know, is it possible or how)
With referring to this comment , can i run a php script which will use labview on server (not on clients computer)
and will retrieve data to my customer to see the data.

0 Kudos
Message 8 of 11
(4,025 Views)

As I said - you need a database and a web-server that is on the internet. A web hosting provider will be able to provide you with both (for a fee) - or maybe your customer has a server you can use.

 

Your LabVIEW application will write the data to the database (and be stored in tables on the database server) after each test has completed. You will write some web-page (with HTML and server-side scripting e.g. PHP) that allows the customer to view/browse the data from the database in a web-browser. The customer does not need anything to do with LabVIEW on their computer to view the webpage/data.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 9 of 11
(4,004 Views)

You have to do some basic engineering here, and it would help to tell us those results, so that we may help you.

 

I understand that you want the DAQ machine to be offline without interfering with viewing of the results.

 

Question 1 - is the server A) a commercial hosting service, or B) just a dedicated computer in a back room somewhere?

 

If It's B, then you COULD write a LabVIEW server app that:

--- Runs on the B computer.

--- Runs 24/7/365 without your test rig being on.

--- Accepts data from your test rig

--- Stores data in whatever file/folder structure makes sense.

--- Accepts Web connections on port 80

--- Delivers a web page of your design, graphs, tables, whatever you can do in LabVIEW to the web browser of his choice.

--- Responds to data choices made on this web page.

--- There's no limit to what you can do.  You could open up a week's worth of data files and plot the speed from each one, or find the max speed of all last week, whatever.

 

 

If it's A, then you have to live with whatever facilities that service provides.  Usually PHP and Database services.  Not LabVIEW.

In that case, you have to either:

--- Create files on your test rig and send them to the server, where the user can fetch them, or

--- Send data values directly into some database, and write some PHP scripts that run on the server, and deliver the web interface you want.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 10 of 11
(3,994 Views)