PLC controlled lighting system with PIR's

Discussion in 'The Projects Forum' started by leeboy87, Apr 12, 2012.

  1. leeboy87

    Thread Starter New Member

    Jan 18, 2012

    I am designing a lighting circuit whereby a PIR is activated to turn the lights on, the PLC will be programmed to keep lights on for 45 minutes then turn off, another timer set at 30 minutes will control a warning buzzer that sounds to alert the person to reactivate the PIR which resets the timers. I have designed and tested the programme for this (attached).

    But I am now having trouble designing the programme so that after the 30minute timer has ended and the warning buzzer sounded, that if movement is detected the buzzer will sound for 1 second to inform the person in the room that their prscence has been detected and therefore the timer reset.
    This buzzer can only be activated after timer T2 has finished its cycle. I have tried a few things to get it to work and nothing seems to do the job.

    If someone could design or recommend how to do this i would be most grateful. I am sorry the ladder is done in paint, I'm afraid that I dont have the tools on my personal laptop.

    If you design I can recieve in proper format.

    Any help appreciated.

    Thank you.
  2. panic mode

    Senior Member

    Oct 10, 2011
    You don't have to use paint. There are plenty of free products out there to edit relay ladder logic. For example you can download (for free) programming software for Zelio. It has both ladder and function block, plus allows you to simulate and test code without having actual plc. This can be quite useful.

    I used RSLogix500 to create sample code but tried to avoid proprietary instructions. For example one shot instructions are not quite standardized so i made DIY version that will work on any PLC. I couldn't change appearance of timers but you can replace them with your style (seem to be Mitsubishi) by placing coils T0 K27000, T1 K18000, T2 K5. Note that when it comes to timers Mitsubishi instruction set uses same label such as T0 for bit (timer complete) and register (timer accumulator). You will notice that in RSLogix there is distinction - timer done bit has sufix ".DN". There are other differences but as mentioned, I tried to make code as transparent as possible so I avoided use of other bits like ".EN", ".TT" etc.