Page 1 of 1

Turning on and off bin lights using php

Posted: Tue Sep 16, 2008 11:14 am
by TipPro
I am working on an order picking system and I would like my php program to interact somehow with our holding bins. The holding bins (yet to be built) will be a grid of shelves. I would like my php program to be able to change the lights that are on each bin. For example if an order held in bin B4 is ready to be packed the php program will change its light to green, but if the order held in bin B4 needs to be reviewed the php program will change its light to red.

Can someone give me some pointers on how to create such a system or where to start researching?

Thanks,
Paul

Re: Turning on and off bin lights using php

Posted: Tue Sep 16, 2008 11:37 am
by Christopher
If there is a program on your system that can control the lights, then PHP can run that program using the exec() function. PHP could also communicate with an external controller on some port of your system using I/O functions. Find out how you can control the lights first.

Re: Turning on and off bin lights using php

Posted: Tue Sep 16, 2008 12:23 pm
by TipPro
Thanks for the reply.

I have not built the bins with the lights yet, so I am looking for ideas for that too. I have never done anything like this, so I am looking for some ideas on how to accomplish lights that I can control using PHP.

Re: Turning on and off bin lights using php

Posted: Tue Sep 16, 2008 12:48 pm
by Christopher
It's not the lights or PHP you need to worry about. It is the computer controlled light switches that you need to define. Maybe X11 or some other such thing?

Re: Turning on and off bin lights using php

Posted: Tue Sep 16, 2008 1:06 pm
by panic!
I think you'd be better off using something that can communitcate with the com ports better such as VisualBasic (if on Windows) or RealBasic (on Mac, Linux) both are really easy and simple to get working with com ports :)

Re: Turning on and off bin lights using php

Posted: Tue Sep 16, 2008 1:10 pm
by VladSun
Google for "PC relay board".
You may wish to use LPT connected relay boards - they are cheap and writing code to manage them will be easy.