Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Using HTML codes as commands for a machine (PLC)

Posted by: rayner oliveiro Sep 7 2009, 12:49 AM

Hi there! I am BRAND NEW to the world of HTML and I need HELP!

I'm currently doing my project and somehow it involves HTML. Now My problem is that I need to use HTML to program a machine.

EXAMPLE: Toggle Switch 1 to turn on Lamp 1 or Activate sensor 1 to turn on pump 1.

Can you guys give me some tips/advice/help?

Rayner

Posted by: Christian J Sep 7 2009, 07:00 AM

You mean a physical machine?

Posted by: pandy Sep 7 2009, 08:44 AM

HTML isn't a programming language.

Posted by: rayner oliveiro Sep 7 2009, 08:41 PM

Yes, I'm trying to use HTML on a physical machine. Currently I can only turn on and off small indicator lights on the machine when I click "ON" or "OFF" on the computer screen. Is there a way to convert that clicking on the screen input to an actual switch where I can click on and off?

I understand it is not a programming language but I think I have a device that allows the machine to so call.. "Understand" html as commands.

http://www.panasonic-electric-works.com/peweu/en/html/640.php <---- this is the device.


<td VALIGN=TOP>
<ul>
<li>
<font face="Arial"><font size=+0>Lamp Y0:&nbsp;&nbsp; <a href="plc?dt200&Y8=1">On</a>
/ <a href="plc?dt200&Y8=0">Off</a></font></font></li>
</ul>
</td>

This is part of the source code and it shows how the light is switched on and off.

Posted by: pandy Sep 7 2009, 08:51 PM

Since HTML isn't a programming language, there are no commands either...


QUOTE
<td VALIGN=TOP>
<ul>
<li>
<font face="Arial"><font size=+0>Lamp Y0:&nbsp;&nbsp; <a href="plc?dt200&Y8=1">On</a>
/ <a href="plc?dt200&Y8=0">Off</a></font></font></li>
</ul>
</td>

This is part of the source code and it shows how the light is switched on and off.


Not really. The URL you link to has a query string. That could be used by a programming language to determine if the lamp should be on or off, but HTML itself does nothing, merely makes the query string available. So what uses the query string? What argument does it need to turn the lamp off?

Posted by: rayner oliveiro Sep 7 2009, 09:08 PM

I'm sorry. I don't quite understand what you are trying to say. Can you explain further? "So what uses the query string? What argument does it need to turn the lamp off?"

Posted by: pandy Sep 7 2009, 10:20 PM

The bit after the question mark, 'dt200&Y8=1', is a query string. It's used to pass an argument to a program/script. What it "does", how it's used, isn't defined in HTML, it's defined in the script it's intended for. If nothing is there to use it, nothing happens.

You can tag a query string on any URL. It means nothing by itself. This will take you to your post above because the forum software reads and acts upon the queary string.
http://forums.htmlhelp.com/index.php?s=&showtopic=9752&view=findpost&p=40779
Seding the same query string to another page where the forum soft isn't running doesn't accomplish anything at all.
http://htmlhelp.com?s=&showtopic=9752&view=findpost&p=40779

How did you come up with the string you are using to turn the lamp on? Look for the off switch in the same place. You could take a chance and try ''dt200&Y8=0' though.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)