Turning on and off bin lights using php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
TipPro
Forum Commoner
Posts: 35
Joined: Wed Mar 15, 2006 6:39 pm

Turning on and off bin lights using php

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Turning on and off bin lights using php

Post 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.
(#10850)
TipPro
Forum Commoner
Posts: 35
Joined: Wed Mar 15, 2006 6:39 pm

Re: Turning on and off bin lights using php

Post 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.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Turning on and off bin lights using php

Post 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?
(#10850)
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: Turning on and off bin lights using php

Post 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 :)
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Turning on and off bin lights using php

Post 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.
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply