# DIN Rail Logic Gate

I'm not an expert in electronics and need a bit of guidance. At work, we want to implement an alarm that sound when a process is running (or starting) but the air for cooling is not on. The alarm does not need to sound if both are off, only air is on or both are on. I have the logic figured out in a circuit diagram. I need help finding / sourcing a DIN Rail AND gate with one input being inverted. There is a relay module that I keep coming across but I cannot decipher the diagram or know how to hook it up correctly if this is indeed a relay that would work. It is a Phoenix Contact PLC-RSC- 24DC/21/MS 2909649. I'd appreciate any help and advice.

Table 1.

|Run  |Cooling  |Alarm |
+-----+---------+------+
| 0   | 0       | 0    |
| 1   | 0       | 1    |
| 0   | 1       | 0    |
| 1   | 1       | 0    |


This can be achieved with a relay.

simulate this circuit – Schematic created using CircuitLab

Figure 1. Alarm circuit.

This arrangement has the advantage that if, for any reason, RLY1 fails to energise (V1 fails, flow switch fails open, wire break) the alarm sounds. Potential failure points include welding of SW1, RLY1 in the energised position and failure of the alarm or its wiring.

• Good answer. +1 Commented Aug 15 at 16:30

Others have answered the question, but I want to give a little more background on how to think about logic with relays.

Relays are a bit different to design with than electronic logic gates.

Relays normally only have one input coil, however you can.

• Take an existing signal and run it through a relay contact to "and" it with the signal from the relay coil.
• Wire the contacts of multiple relays in parallel to produce an "or" function
• Use a normally closed contact instead of a normally open one to invert the signal from the coil.

In this situation we need to invert the signal from the flow sensor, so we take that signal to the coil and we choose the normally closed contact.

Then we need to "and" that signal with the "process run" signal, so we run the process run signal through the contact of the relay.

From a logic standpoint your function can be implemented by any normally closed relay. Connect the coil to the air input, and the process to the relay pole, and the output will be driven by the process input only under the conditions specified.