LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send a file from vi to web browser

Hi,

 

I need to have a web page that gets a value from the user (in a simple form). Then I read this value in a vi and use it to access a database. I generate a file and send it back to the web browser, and the user should be able to download the file on his/her local computer.

 

To do this, I downloaded the HTML_Form_Example.zip and executed it in labview. Everything is working fine and as expected. I modified it a little as following:

I used the "Labview Database connectivity toolkit" to access a database and fetch some records. I will write the fetched data to a file (I have not done it yet, but I know how to do it).

My question is this: Having generated the file, how can I send it back to the user's we-browser?

Should I use the POST VI to do this.

11-23-2012 4-08-46 PM.jpg

0 Kudos
Message 1 of 7
(2,344 Views)

Why do you need a web browser form to get a value from a user?

You can easily do that with a front panel control. This is what LabVIEW programmers do all the time.

 

 

0 Kudos
Message 2 of 7
(2,334 Views)

The project requiremnet is to use a web base interface that lots of users can access it, and download their data.

As far as I remember, for the remote panel, only one user can access the vi at a time. right ?

0 Kudos
Message 3 of 7
(2,332 Views)

@ManiAm wrote:

The project requiremnet is to use a web base interface that lots of users can access it, and download their data.

As far as I remember, for the remote panel, only one user can access the vi at a time. right ?


Then why write it in LabVIEW at all?

VB.NET is much easier for working with getting data from databases based on user inputs.

 

 

0 Kudos
Message 4 of 7
(2,329 Views)

I have lots of control algorithms that I have implemented them in labview. Then I write the results into the database using the "Labview database connectivity toolkit", thus my database is ready. In the next step, the users should access the database and get their desired data from database. Obviously, it would be perfect if this can be done also in labview. I searched the labview help files to see if there is a way to setup a webserver, and hopefully Labview can do this as well. Now I am in the last phase. I need to send the generated file back to the user (and I am stuck here). I am working in the Automatic Control Laboraory, and they insist to do all the work in Labview.

So you are saying that its not possible to do this in Labview? 

0 Kudos
Message 5 of 7
(2,327 Views)

Typically a web based interface doesn't send files, it rather provides a download link. So you would generate the link in your page and save the file to the place on your webspace the link points to.

 

Cheers

Edgar

0 Kudos
Message 6 of 7
(2,323 Views)

Thank you ejkaiser. Thats a good idea. I can generate the file and save it into the web server folder. Then I can display the link of the file in the page, and user can click on it to download the file. The problem is that where is the folder that stores all my files for the web server?

Is it, C:\ProgramData\National Instruments\WebServices\aws ?

0 Kudos
Message 7 of 7
(2,321 Views)