SET & RESET Command for Latching or Unlatching in Siemens TIA Portal V16 with PLC Sim

 SET & RESET Command for Latching or Unlatching in Siemens TIA Portal V16 with PLC Sim

A computer screen shot of a computer

AI-generated content may be incorrect.

Behaviour of Set and Reset

Here’s how outputs behave under different input conditions:

  1. Both Set and Reset inputs are OFF → Output holds its last state (ON or OFF).
  2. Set is ON, Reset is OFF → Output is turned ON.
  3. Set is OFF, Reset is ON → Output is turned OFF.
  4. Both Set and Reset are ON → Output is OFF (Reset has higher priority than Set).

This priority behavior ensures that if both instructions are triggered at the same time, the output is forced to a safe OFF condition.

 Using PLC SIM to provide user inputs

Setting Up PLC SIM

A screenshot of a computer

AI-generated content may be incorrect.

PLC SIM SIM Table

A screenshot of a computer

AI-generated content may be incorrect. 

Imagine you want to control two indicator lights (Q0.0 and Q0.1) using two push buttons:

  • Button A (I0.0) → Latches both outputs ON.

A computer screen with text and images

AI-generated content may be incorrect.

  • Button B (I0.1) → Unlatches (resets) both outputs OFF.

A screenshot of a computer

AI-generated content may be incorrect.

Ladder Logic with Set/Reset

  • Input I0.0 (A) → Set Q0.0 and Q0.1
  • Input I0.1 (B) → Reset Q0.0 and Q0.1

How it works:

  • Pressing A once will turn ON both lights, and they will stay ON even after releasing the button.

A screenshot of a computer

AI-generated content may be incorrect.

  • Pressing B will reset them back to OFF.

This is a common and clean way to implement a Start/Stop lamp logic with simple push buttons.

Alternate Approach Without Set/Reset: The same functionality can be built using normal and inverted contacts (NO/NC).

Example logic:

A screenshot of a computer

AI-generated content may be incorrect.

  • Use a self-holding contact of the output in parallel with the push-button input (creating a latch).
  • Use a second input (NC contact) to break the latch when needed.

Functionally, the result is the same:

  • A pulse on A latches the outputs ON.

  • Pressing A once will turn ON both lights, and they will stay ON even after releasing the button.

A screenshot of a computer

AI-generated content may be incorrect.

  • A pulse on B breaks the latch, turning the outputs OFF.

A screenshot of a computer

AI-generated content may be incorrect.

  • Pulse on both A and B breaks the latch, turning the outputs OFF.

A screenshot of a computer

AI-generated content may be incorrect.

This approach offers flexibility and sometimes makes debugging easier for those used to traditional coil/contact logic.

Set/Reset in FBD (Function Block Diagram)

The same principle applies in FBD programming. Siemens provides dedicated blocks:

  • S (Set block)
  • R (Reset block)

The logic is identical to ladder, just represented visually with blocks and signal lines:

  • An input signal to S sets the output ON.
  • An input signal to R resets the output OFF.
  • If both are active, Reset dominate

 

 

Comments

Popular posts from this blog

Simple Latch Circuit in Siemens TIA Portal V16

SOC Estimation and modelling of Electric Vehicle EV in MATLAB