Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with client side I/O requests

Status
Not open for further replies.

agaudreau

Programmer
Jul 23, 2006
4
US
Using Perl I would like to:

1: log into a website(hosted from a 3rd party) from 2 locations (sender and reciever)
2: using that website I want to send a command to turn on or off a device on the other side
3: that command should be taken real time and send an I/O command to the parellel port

Can I even do this? I should be able to.. can anyone point me in the right direction?
 
Would the action of switching the device need to be immediate?
If so a permanent connection would be needed.

If a delay is acceptable
You could set the contents of a file to contain a flag.
On a windows box you could get the required status via a sceduled task operating at set intervals.

Keith
 
A delay is ok.. but no more than 15 sec.

I would like to make it like a portable system. Meaning:
Having my main computer always connected to the site

1: be able to take the device to a coffee shop and plug it into the port so that after you log into the site, I can manipulate the divice from my home.

I guess I know how I can do it.. the main question is:

How do I send a signal to the Parallel port using perl in an XP environment via the webbrowser?

If I have to.. I will make it a program checking a online database insted.. but I am really trying to keep it just device and web based to be more compatible.
 
SEND - User initiates the operation of the device
=================================================
The perl prog resident on the web sets the contents of a text file to the appropriate value.

RECEIVE
=======
A scheduled task runs a every 15 seconds and runs a local program to check the value in the web based text file.
A local text file copied to LPT1 reflects this value on the parallel port.
You would of course need to put a switching device onto the parallel port to control any external device(s).

Keith
 
Thank you so much peoples.. I will post when I get it all working.

Btw this (out of the all the ones I went to for help) was the best forum for responces. ^^v
 
one question..

"A local text file copied to LPT1 reflects this value on the parallel port."

does this keep a constant signal to it or just 1 signal that stops?

Looking for constant signal, with out that I would have to work on the electronic side of it more and to tell you the truth.. im less of an electrician than a programmer >.>;
 
The parallel port module works on both Linux and Win32, have a look at the documentation specifics.
--Paul

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
In a normal print, the code only appears at the output for a short time. If the electronics is a problem for you, you can buy an interface for the parallel port containing (usually 8) relays which change state depending on the address it receives. These can be bought either as kits or a completed unit.
I know of a supplier in the UK but you should be able to get one in most countries.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top