NOT Gate
Implement a logical NOT gate that inverts a boolean input.
beginner
Parameters
| Name | Type | Usage | Description |
|---|
| In_Input | BOOL | Input | The boolean value to be negated. |
| Out_NegatedOutput | BOOL | Output | The negated result of the input. |
Behavior
- During every scan, the AOI reads the value of In_Input.
- If In_Input is 0, the AOI sets Out_NegatedOutput to 1.
- If In_Input is 1, the AOI sets Out_NegatedOutput to 0.
Edge Cases
- The AOI correctly handles transitions of In_Input between 0 and 1.
Constraints
- Out_NegatedOutput must reflect the inversion of In_Input within a single PLC scan.
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.