Serving web pages direct from a PAC Controller - old forum post


Joined on 05-18-2007
Posts 2
Web pages and Opto

I have been looking around to see how I can display Opto data on a web page. There are a few tools/programs around, but they usually require a dedicated PC running IIS or similar. I have created two charts that run on a PAC controller that uses basic HTML and simple Javascript to render a simple web page. You can access variables and I/O points in either direction.
You can also create dynamic web pages using simple embedded tags in a web page to have data update live.
If you are interested in putting together a simple web page for your Iphone, Blackberry or PC, please email me at and we can discuss if what I have will work for you.

For a simple demo of things in action, click here

If anyone has information on how to do this, I would love to be doing it for the simple reason that I don’t like having to run a program just to see what my PAC controller is doing. Creating the HTML pages inside PAC control is easy. It’s rendering JavaScript to make the values dynamic is what’s difficult without a web server.

I assumed writing code in PAC control to serve up HTML to a browser would be a complicated task requiring knowledge of things like http request/response formats. If there is any example code available I would love to have a look at it.


Email Nick at, he can get you going.

And check out the sample pages he has on his web demo… pretty neat stuff.

Opto is working on a different solution, its going to be very powerful.
Exciting times ahead for web based Opto.

Any update on where things are at with this? I have customers chomping at the bit for a web-based solution!!

if your customers are chomping badly, drop me an email and see if what i have suits.


As well as emailing Nick, be sure and check out we have a ‘Concepts’ section there showing another method of getting your PAC Controller data onto a web page…
We have had a few people get back to us stating they took what was there and got it working in a matter of an hour or so (depending on your experience on what is covered there).

Bottom line, there is more than one way to get some web action happening.

Ben, I checked out the internetio page and am interested in the possibilities of doing something through Opto Datalink…

Basically I’m looking to provide my customer with a simple HMI that can be viewed on any mobile device (ex. Blackberry, iPhone) with a web browser. I’ll admit I’m pretty green when it comes to OPC Datalink and designing web HMI’s. After viewing the webinar on OPC Datalink I think I can get my mind around it but I’m struggling with the whole web HMI end of things. I’ve looked at a few different web HMI design programs and everything seems way too complex or beyond me. Any recommendations for software for designing web HMI’s?

All I’m looking to do is monitor I/O points in realtime (as well as a few variables). No real need for data logging or anything of that sort. Am I on the right track with this or would something PHP-driven be a much simpler way to do things? I’m touching base with Nick on this as well to see if there’s anything he can come up with.

Hi Arlin,

Challenging question.
Lets break it down.

If you have a PC that can run OptoDataLink, it sure will work. We have a lot of customers that are getting data into a database and onto a web page using just this method.
You have done the right thing reviewing the webinar, lots of practical help there.

The web side, as you say, is the challenge.
My method is to sneak up on it… its a big ask to just jump right in and try and get the whole site up and running in one hit.
A static page is where I suggest you start. Get the data into the database, then get it out onto a web page.
Ok, sure, you have to hit refresh on the device to get the data to update, but at least you have crossed a few bridges to get there and you have a solid foundation for what comes next…
I think you will find the next step different from what your expecting… the live data is not next… getting a web page to show the data on different devices, if this really is important to you, is a challenge.
The iphone is different from the Android, which is different from the Blackberry. Everything is different from the Blackberry.
Once you get your page showing on all three devices, [I]then[/I] it comes time to make it live.

Again, all three devices will use different code (unless you go for some ultra simple layout, or have some development software I am not aware of, you will need three different ‘sites’ to display the data) to show live data from a ‘poller’ that is getting the data from the database.
We used Ajax for
We also gave up on getting it to work with a Blackberry.
In a nut shell, you are going to make a section of the page (ie, one data tag or point) update without having to update the whole screen.
I do not use anything more fancy than Notepad ++, its a text editor. Granted, most of my pages are very simple, so far we have got away with it.
You have the web page (php, not html), some java to update the elements and some more java/php to get the data out of the database.
At this stage, I don’t feel ‘comfortable’ releasing the code, but it is something that we have in mind.
Certainly, Google can guide you and thats pretty much how we got it working, just looking at snippets and getting it working bit by bit from a static page.
FireFox and Firebug were a big help, as was the error console, also in firebug.
We used Safari to emulate the iphone/itouch (enable developer tools and then set the user agent accordingly) so that we did not need to have one of the actual devices on hand to get the web page going. (The [I]whole[/I] Android SDK is needed for just the browser, which is just silly, so we had to use a real device for that one… it was much simpler! No idea what you might use for Blackberry).

Just chip away it and you will get there.

FYI, for some info on an upcoming version of OptoDataLink, click here.