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

OPC UA Timestamps: Source, Server, Gateway, and the One to Store

A single time axis in milliseconds with four numbered points on it and four labelled boxes above: source at 0 milliseconds in the controller image, the OPC UA SourceTimestamp at 180 from a 250 millisecond poll, the gateway publish at 225, and the database arrival at 885 from a one second write batch, with a red double arrow spanning the whole 885 millisecond spread

Belt1_Current crossed 30 A at 11:42:13.412 UTC. The OPC UA server stamped that value 11:42:13.592, the gateway published it at 11:42:13.637, and the row reached the table at 11:42:14.297. One event, four times, 885 ms apart on a day when nothing at all was wrong. Store the second one. The OPC UA SourceTimestamp is the … 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

A Historian for PLC Data: What to Log, How Often, and What Compression Costs

A six-row table of 1200 tags grouped by class, with the tag count, data type, collector rate, raw events per day and the logging policy each class earns, from 180 analogue process tags through counters and state words to 660 bools and 60 batch-record tags at a fixed one second

1200 tags collected once a second is 160,704,000 values a day, and at the 12 bytes a historian typically spends on a timestamp, a value and a status that is 1.93 GB a day and 704 GB a year. The same 1200 tags, with a deadband at the collector and a compression test at the … Read more

Advertisement