Menu
CoddyTech

The R_TRIG Block

Part of the Latches, Edges and Interlocks section of Coddy's PLC Programming journey. Lesson 10 of 20.

The edge contacts have a box form too. R_TRIG (rising trigger) gives a one-scan pulse on its Q output when the power on its left goes from FALSE to TRUE. F_TRIG (falling trigger) does the same when that power goes away.

Like every box, each one has an instance name, here E1, that holds its memory. A box takes the power of everything to its left, not just one tag, and it is how edges are written in Structured Text later.

One trap: an F_TRIG whose input starts FALSE gives a pulse on the very first scan.

challenge icon

Challenge

Easy

Rung 2 toggles Blue from Pulse. On rung 1, make PB3 write Pulse through an R_TRIG box.

Try it yourself

{"v":1,"lang":"ld","tags":[{"name":"Pulse","type":"BOOL"}],"rungs":[{"els":[]},{"els":[{"t":"par","branches":[[{"t":"no","tag":"Pulse"},{"t":"nc","tag":"Blue"}],[{"t":"nc","tag":"Pulse"},{"t":"no","tag":"Blue"}]]},{"t":"coil","tag":"Blue"}]}]}
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Latches, Edges and Interlocks

Practice on your own: PLC playground