From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I access Historical Data in a Citadel Database with a Browser via the Internet (not Intranet)

I use Labview 6.1, DSC, Measurement Studio.
I want to make Data accessible from outside the Intranet (from all over the world) just with a Browser on the client.
I don't want to use Remote Panel.
Any suggestions would be welcome.
Thank you.
0 Kudos
Message 1 of 6
(3,162 Views)


Hi,

I guess the easiest way you can do this is by using the CGI VIs and the HTTP Server from LabVIEW's Internet Developer's Toolkit.

The CGI VIs allow us to process the data passed from a HTML page (a form). You would then query the Citadel database based on user's input and pass the results back as a HTML page (using again the HTML VIs from the toolkit).

Running the HTTP Server on your machine (which has DSC and the database) will turn it into a web server. You need to take care of the static IP address for your machine, the security, firewalls, etc.

I wrote a simple working example which does this (attached). Obviously you will need the Internet Toolkit for the VI to work. But this will give yo
u the general idea of how things would work. I am also attaching the Query Web page (cit5.htm) and the sample results page (results.htm).

There's much more you can do with this -- display data on a graph and then publish its image on the web page, etc. See the product page of Internet Developer's Toolkit for more.

The other approach, if you do not wish to go the Internet Toolkit route, would be to use PHP and the ODBC interface of Citadel. You could simply use any Web Server out there, like the Windows IIS, Apache, etc. I have not tired this though. Theoretically, I don't see why it would not work. PHP4 has functionality to connect to ODBC databases (the odbc_connect function). The difficult part here could be the setting up of the ODBC interface for Citadel. Following page describes the odbc_connect function and has some useful posts from users who have done something similar:


ref=http://us4.php.net/manual/en/function.odbc-connect.php>http://us4.php.net/manual/en/function.odb...


Hope this helps,

Khalid 🙂


Download All
Message 2 of 6
(3,162 Views)
Khalid, if I could give you 5 stars I would have done so.
The interessting question for the LabVIEW Development group would be - why would remote panel not fit for solar56, which would be btw much easier.
Message 3 of 6
(3,162 Views)
Hi Khalid,
I am back from holidays.
Thank you for your answer, I think this could be the way I can go.
But the VI Version of your example is 7.0.
I work with LabVIEW 6.1, so I can't read it. Any chance to convert it?
Thank you
Thomas
0 Kudos
Message 4 of 6
(3,162 Views)
Hi Thomas,

I have tried saving the VI as a 6.1 VI (attached) -- it's broken because the Timestamp-to-double primitive is missing but you should get a good idea what's going on.

I have also attachjed the diagram as a BMP just in case you are unable to open the VI at all.

Again, out of curiosity, why can't yopu use Remote Panels? That's a much cleaner way of doing this.

Regards,

Khalid


Download All
0 Kudos
Message 5 of 6
(3,162 Views)
Hi Khalid,
thanks a lot for your help.
I agree that Remote Panel would be much more elegant, but I have two problems.

First, I always get the message "Requested VI is not loaded into memory on the Server Computer" if I try to access from a Remote Computer via the Internet.
It works fine, when I access from the Intranet.

Second, I don't have a licence for more than one connention.

Do you see a reason for my first problem?
Thank you
Thomas
0 Kudos
Message 6 of 6
(3,162 Views)