All exercises

LED Control

Control an LED output in rungs.dev based on the logical combination of two push-button BOOL inputs — set the LED on when In_Pb1 is 1 and In_Pb2 is 0.

beginner

Parameters

NameTypeUsageDescription
In_Pb1BOOLInputInput push-button 1
In_Pb2BOOLInputInput push-button 2
Out_LedBOOLOutputLED light output

Behavior

  1. The AOI evaluates In_Pb1 and In_Pb2 every scan.
  2. Set Out_Led to 1 if In_Pb1 is 1 AND In_Pb2 is 0.
  3. Set Out_Led to 0 in all other conditions.

Ready to start?

Open this exercise in Rungs Studio, write your solution, then click Test in the toolbar to verify your work against the built-in test cases.