JMP, LBL and MCR on a ControlLogix: Skipping Rungs, and Why MCR Is Not a Stop

A routine listing showing rungs 8 to 17: a JMP on rung 8 skipping forward to the LBL on rung 11, an MCR zone opened on rung 12 by Line_Enable and Guard_Closed, an OTE, an OTL and a TON inside it, the unconditional closing MCR on rung 16, and an unaffected OTE on rung 17

JMP, LBL and MCR on a ControlLogix: Skipping Rungs, and Why MCR Is Not a Stop Rung 14 of a filling machine carries OTL Glue_Pot_On and it sits between two MCR instructions. Open the guard, the zone goes false, every OTE inside it clears to 0 — and the glue pot stays hot, because a … Read more

FBC and DDT: Comparing an Array Against a Reference, and Which One Reports What

FBC and DDT operand blocks with Source InputState element 0, Reference GoodState element 0, Result Mismatch element 0, compare control CmpCtrl with Length 128, and result control ResCtrl with Length 32

One sentence in 1756-RM018A separates these two instructions: each time the DDT instruction finds a mismatch, the DDT instruction changes the reference bit to match the source bit, and the FBC instruction does not. Everything else about them — the operands, the two control structures, the result array, the fault codes, the 0.16 µs per … Read more

SRT: Sorting an Array in Place When the Scan Has to Keep Running

SRT operand block with Array SortBuf element 0, Dim to vary 0, Control SortCtrl, Length 51, Position 0, beside the CONTROL structure showing EN, DN and ER

The Array operand on an SRT accepts SINT, INT, DINT and REAL, and 1756-RM018A prints no fifth entry. No structures, no strings, no array of a user-defined type — so on a 1756-L83E or a 5069-L330ERM alike, the instruction that sorts an array cannot sort records, and every design built on it deals with that … Read more

BSL and BSR: A Shift Register That Tracks Product, One Bit Per Position

BSL and BSR operand blocks with Array ZoneMap element 0, Control ZoneShift, Source Bit PhotoEye, Length 240, and the CONTROL bits EN, DN, UL and ER shown with their states

Type 8 into the Length of a BSL whose array is DINT[8] and you have built a shift register eight positions long, not eight elements long, and the other 248 bits of that array will sit there untouched for the life of the machine. 1756-RM018A prints the reason in one line under Operands: Length is … Read more

Writing PLC Data to SQL: From the Gateway, Never From the Controller

A four-stage chain from controller through gateway and IDMZ broker to SQL Server, showing the controller setting DataReady, the gateway polling at one second into a SQLite queue, the broker carrying two sessions on TCP 8883, and a batched INSERT of 200 rows in 84 milliseconds, with three numbered break points on the arrows

A ControlLogix has no SQL client in it. What it has is a socket object on the Ethernet module, a WriteSocket service that carries 484 bytes at a time on a standard connection, and a MSG instruction whose default timeout is 30 seconds — which is 2500 scans of a 12 ms program. So a … Read more

Advertisement