Question: Part 5 : ( Garage Door Opener ) - Create the following variables in Variables & FB Instances table o PB _ Open ( EBOOL

Part 5: (Garage Door Opener)- Create the following variables in Variables & FB Instances table o PB_Open (EBOOL), PB_Close (EBOOL), Limit_Switch_Up (EBOOL), Limit_Switch_Down (EBOOL initial value 1), Motor_UP (EBOOL @ %Q0.5.0), Motor_DOWN (EBOOL @ %Q0.6.0), int_DoorOpenCount (INT)- Create a LAD code named (lad_part5) under Tasks/MAST/Logic and code the following functionality o If Door is fully closed (i.e. Limit_Switch_Down =1) then Pressing PB_Open momentarily will Start opening the door (Motor_UP = True) Make Limit_Switch_Down = False Door will open until fully open (fully open when Limit_Switch_Up = TRUE) When door is fully open, motor will stop (Motor_UP = False) When door is fully open, increment int_DoorOpenCount by 1(Use CTU) o If Door is fully opened (Limit_Switch_Up =1) then Pressing PB_Close momentarily will Start closing the door (Motor_DOWN = True) Make Limit_Switch_Up = False Door will close until fully closed (fully closed when Limit_Switch_Down = TRUE) When door is fully closed, motor will stop (Motor_DOWN = False) o If both PB_Open and PB_Close are pressed at the same time, then int_DoorOpenCount is set to 0(Reset CTU)- Create an Animation Table called Part5_test and add all your variables to this table. Use it to simulate your code akla

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!