开发者

PHP and Labview - grabing a value from labview and displaying the value on a webpage - two different computers on the same network

I am by no means considered a programmer. The only programming language I some what know is HTML - so be gentle :)

My boss came up to me the other day and asked me if I wanted to learn PHP, so i said sure. He threw me some text books and said here's what I want you to do:

There's a computer running labview that monitors various sensors. He wants me to take the data from the sensors and display it on a webserver on the same network. The format he wants it in: you punch in a command in a text entry box on the newly created website such as "chamber pressure" and then it takes the data that is displayed on the computer running labview and reads the value in another box that is under the first text box on the website.

Let me know where开发者_Go百科 I should start. Any bit of help would be awesome.


I would start by using LabVIEW to store the data from the sensors to a database. A simple database with sensor name, value and possibly last reading time would do. MySQL databases are relatively easy to setup and work well with php I have found.

Next would be to use php on the webserver to fetch the data depending on the input and display it on the web page.


The first thing to try is the Remote Panel support built into LabView. This allows you to view or control a LabView application from a web browser on another machine. Remote Panels have many limitations (there is a restriction on max number of connected clients and the LabView runtime is required on the client) but it will only take 20 minutes to get them set up. See "Viewing an Application or Front Panel Remotely Using a Browser" in the LV help.

Remote panels are particularly good if you want to have e.g. a pull-down list of sensors and some plots that update in real time. Dynamically updating plots are something that takes real work to implement in a web-standards way.

Use this prototype to figure out what your boss really wants to do. If his goal is to be able to peek at the chamber pressure down on the production line once in a while, you're done. If his goal is to share realtime updates on chamber pressure with 100,000 of his Facebook friends, half of whom want to view it with an iPhone or a Blackberry, then there's more work to do. Either of the approaches discussed above (using the LabView web server/web service platform, or writing everything to a database and pulling it out using php etc) will work; the latter is more scalable.


This may not be helpful, but what you've been asked to do is advanced. This should not be your first PHP project.

Start by creating a web page where you can type in a command code and a hard-coded value will be displayed based on what code was typed in.


If you know how to access a Webservice from within PHP, you could build your LabVIEW app as a webservice and access that from PHP. But without any proper training (LabVIEW and PHP) that will take you quite some time.

Ton

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜