Introduction: HOME I/O- Automatic Open/Close of Entrance Gate

About: I'm a Mechatronics Engineer & a passionate teacher. As an engineer i'm involved in Control circuit designing. flexible education training designing & research work in various elements of Automation like Arduin…



The Gate should open completely on rising edge of Sensor 1 & Gate should close completely by falling edge of Sensor 2

Connect I/O.
Download Software here
Programming Platform:
FBD (Inbuilt Connect I/O)
Environment: Home I/ODownload Software here

Starting Conditions: The Gate is Closed

I/O Signals


  • Entrance Gate Infrared 1
  • Entrance Gate Infrared 2
  • Entrance Gate Opened
  • Entrance Gate Closed


  • Entrance Gate Open
  • Entrance gate Close

Connect I/O Functions to be used

  • SR
  • RS

Step 1: Latching the Opening of Door Using Rising Edge of Sensor 1

We have used the rising edge of Infrared Sensor 1 to latch the output via SR Block. When Sensor sensed the object/person, it will give signal to FTRIG. FTRIG will give 1 Pulse to SR which will latch the Bit 193 & starts opening the gate even if the object in front of the Infrared Sensor 1 is removed

Step 2: Unlatching the Output Bit When Door Is Fully Opened.

Bit 260 Entrance gate Opened is used to unlatch
the Gate Open bit, when the gate is 100% opened. The signal from BIT 260 goes to Reset1 terminal of RS Block which has reset the BIT 193 i.e. opening bit of Gate

Step 3: Latching the Close Operation Using Infrared 2

Similar to Step 1, Infrared Sensor 2 (Bit 263)
is used to close the Entrance gate. Unlike the opening operation, here we have used Falling Edge of Infrared Sensor 2 because, the gate should get command to close when the object/person passed across the Infrared Sensor 2 to avoid collision if the object is in front of Infrared Sensor 2

Step 4: Unlatching the Output Bit Using Gate Closed Bit

Similar to Step 2, Entrance gate Closed Bit 261 is used to reset the Close operation of the gate.
This cycle can be repeat again & again.

Check out theVideo Demonstration

Want to learn PLC? Get E-Leanring offers at