Compare Boxes
Part of the Counters and Numbers section of Coddy's PLC Programming journey. Lesson 6 of 17.
A contact asks about a BOOL: is it TRUE? To ask about a number you use a compare box. It passes power when its test holds, like a contact.
The tests are = (equal), <> (not equal), >, >=, < and <=. Either side can be a tag or a number.
Here Amber warns that the batch is nearly done: from the third press on, before Green says it is done at five. Mind the difference between > and >=: one press too late is a common bug.
Challenge
EasyAdd a rung that lights Amber while C1.CV is 3 or more. Keep rung 1 as it is.
Try it yourself
{"v":1,"lang":"ld","tags":[{"name":"C1","type":"CTU"}],"rungs":[{"els":[{"t":"no","tag":"PB1"},{"t":"CTU","inst":"C1","pv":5,"r":"PB2"},{"t":"coil","tag":"Green"}]},{"els":[]}]}All lessons in Counters and Numbers
Practice on your own: PLC playground