advertisement
from the None department...
RS-232 to Web page
Communications systems and equipment. topic
Posted by Raychon on 16 April, 2002 - 5:15 pm
As a school project, I have a system that measures water in a remote tank and displays the
information on a webpage on the internet. I want to display the information coming from a RS-232 cable to the webpage. I know that RS-232 cable is plug to the back of the computer. But how do I transfer the information over to display the contents coming from the cable?


Posted by Bruno Tijink on 17 April, 2002 - 2:58 pm
Hi,
Please give some more info(or mail me directly esp the way you measure.
time: every minute/hour
signal: what signal does come in, you only can use digital programming language

btijink@cs.com


Posted by Peter on 18 April, 2002 - 9:55 am
you have to find out what format/protocol is the data coming in to your computer. Find out how does the senor work and how you get the data to the computer. (it may have software that dumps the data into a text file if so you have 1/2 the battle done) if no software was available with the sensor, you have to find out the format and then build a protocol that will take the data and pass it off to your webserver, probably the least expensive way would be to download a demo version of OmniServer.

That's a software that enables you to read data from different sensors and then pass them off to other software, or store them in a file. Best way would be to ask the OmniServer people to help you to write the protocol. It is fairly easy but takes some getting used to, so get the guys at OmniServer to help you out.

Once you have the data coming in to your computer as text (being written into a text file) you can make a webpage that takes the input from this text file and refreshes every (say) 20 seconds. That way you will have always displayed the most recent data.

What sensor are you using to read in the RS232 data?

Download OmniServer from "www.omnidssi.com":http://www.omnidssi.com

Good luck
Peter


Posted by Raymond van der Tas on 18 April, 2002 - 11:25 am
<P>In order to publish RS232 data on a web page there are at least two ways:</P>

<P>1) Write an ASP (active server page) script which instantiates the MS-Comm Control. ASP is supported after installing Microsoft IIS web services. A few lines of example code to get you started:</P>

<PRE>
<html>
<%
Dim mycomm
Dim myString

Set mycomm = Server.CreateObject("MSCOMMLib.MSComm.1")
myString = mycomm.Settings
response.write "Comm Settings" & myString
%>
</html>
</PRE>

<P>You should enhance the code a bit to call methods in the comm control and read/write the serial data stream. To try this, you could probably best code in Visual Basic (the online help will guide you through the use of the Comm control). Afterwards you can port your code to ASP (VB Script/Java Script).</P>

<P>2) A less time consuming method which requires no programming at all, would be to use ICONICS GENESIS/WebHMI SCADA/HMI you would first install an OPC Server that talks to the devices. You will create a little process display and place the OPC Tag on it:
\\IP_Address\OPCServerName\OPCItemName
An "Export HTML" button would automatically post the display to the Web Server.
Remote web clients IE /Netscape are now able to browse your web site and see the live data. To try this you should ask for the free SCADA/WebhMI Development CD at <a href="http://www.iconics.com">www.iconics.com</a>&l t;/P>


Posted by Israel Cabrera G. on 24 April, 2002 - 9:55 am
All you guys are complexing things too much.

First of all,, Get a LINUX PC!!!

I suggest SuSE 7.3 or higher, 8.0 is coming
=)

With a linux machine you can write your own code to communicate with the rs-232 port, and if a protocol exist, use it, write it down to communicate with the device.

As your info is very incomplete, I'm imagining
that you have a uController to obtain data from the water tank connected to the PC.

Secondly, Install the "Apache Server with PHP support" it will allow you to write some nice code to display your data via a Web page almost instantly (real time?)!!
GREAT!.

if you need more HELP!???

write me at: iscabrera@netscape.net

Israel C.

Saludos!


Posted by Joe Jansen on 23 April, 2002 - 5:06 pm
Write one application that will read the data from the serial port and log it into a small data base, or similar. Use scripting on your webpage to pull the data back out.

OR

Write a jave applet that reads the port, and embed it into your webpage.

--Joe Jansen

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2014 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
A nuclear war can ruin your whole day.
Advertise here
Advertisement
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive