[Challenge - Easy] Holding Circuit

You will need this file Challenge01.bog (690 Bytes) :warning:

Objective:
Your task is to design a holding circuit using Niagara 4 (N4) that simulates the behavior of a latching circuit. You will use two oneShot blocks, simulating buttons, “Activate” and “Reset,” along with a boolean output, and implement the logic using only the components from the KitControl palette.

Instructions:

  1. Setup:
  • You are provided with two boolean buttons: Activate and Reset.
  • You also have a boolean output that will represent the state of the circuit (ON/OFF).
  1. Logic Requirements:
  • When the Activate button is pressed, the boolean output should change to true (ON).
  • When the Reset button is pressed, the boolean output should change to false (OFF).
  • The boolean output should remain false (OFF) until the Activate button is pressed again.
  1. Tools:
  • You must implement this logic using only the components from the KitControl palette in Niagara 4.
  • Use appropriate logic blocks (e.g., OR, AND, Latch, etc.) to achieve the desired behavior.
  1. Testing:
  • Once you’ve built your circuit, test it by simulating the pressing of the Activate and Reset buttons to ensure the boolean output behaves as required.
  • Make sure the output holds its state as expected when switching between the buttons.
  1. Submission:
  • Save your work and submit the completed Niagara 4 file (.bog) as a reply to this post.
  • Include a brief explanation of the logic you implemented and why you chose the specific components.
1 Like

This is great! I’m interested in seeing the different solutions to the same problem. I’ll have a go at this for sure!

@Rosenthaler This is my solution.

image

activeReset

1 Like

Posted my solution in Niagara Support…before I saw the entire scenario. I’ll rework this with the OneShots as the inputs instead of the Boolean Writable inputs and repost here! Love the challenge.

2 Likes

For me the easiest way is to use a ExprLogic block with the expression

inA and not inB or inB and not inC as ‘out’

Quite used to doing this type of logic to create simple latches when working with other systems that don’t have a natural ‘latch’ module.

Challenge01.bog (966 Bytes)

3 Likes

Nice one @TJ087, wouldn’t have thought this one up myself :smiley:. Nice thinking outside the box!

Challenge01.bog (6.4 KB)
As the output of the OneShot turns from True and back to false I found just using the Activate One shot as the status for the Latch IN and then using an OR block between the out puts of the Activate and the Reset OneShots provide me with the trigger (clock) to the Latch.

2 Likes


Okay I think I got this challenge down! I can’t add the .bog file because I am a new user. Please let me know if this correct! Thanks so much!