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
Behaviour of Set and Reset
Here’s how outputs behave under different input
conditions:
- Both
Set and Reset inputs are OFF → Output holds its last state (ON
or OFF).
- Set
is ON, Reset is OFF → Output is turned ON.
- Set
is OFF, Reset is ON → Output is turned OFF.
- 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.
Setting Up PLC SIM
PLC SIM SIM Table
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.
- Button
B (I0.1) → Unlatches (resets) both outputs OFF.
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.
- 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:
- 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
pulse on B breaks the latch, turning the outputs OFF.
- Pulse
on both A and B breaks the latch, turning the
outputs OFF.
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
Post a Comment