PLC programming
Earlier articles
Troubleshooting
Why an FSoE connection is not established on a safety PLC
The controller stays in RunIntern and the drive holds EMERGENCY STOP because the FSoE master-slave connection never reaches the established state, so the command bits in the 2Byte Bit-Coded SMM (780-784) function are never transmitted. Match the FSoE addresses, put the correct module in the FSoE master slot, copy the master slot data to the slave slot and back, and in ctrlX SAFETY Engineering 1.7.1.8239 replace the ctrlX DRIVEplus slave object with the IndraDrive MPx20/21 FSoE slave.
Troubleshooting
Why a CODESYS TON output stays on after its rung goes false
A false EN does not reset a CODESYS TON — it stops the block from executing at all, so Q holds the value from the last executed call. Route the process condition to IN, keep the enable permanently true, and the timer resets itself the way the standard intends.
How-to
S7-300 PID control for a modulating burner motor
Run one FB41 CONT_C loop on the hottest hood's PT100, scale all five probes to °C, and turn the 0-100% output into open/close pulses that follow the M941B's 0-10 V pot feedback to a 2% deadband, through 24 VAC interposing relays. The gas management system keeps the burner start sequence and its permissives; the PID never touches them.
Troubleshooting
Resolve a ladder logic mismatch in Concept on a 984
The not-equal notice in Concept 2.6 means the working file and the program in the 984 processor differ; the PLC is not faulted. Upload the processor program into a saved copy of the project to preserve the reported online input change, and download only a verified offline project, never as a test.
Troubleshooting
Reading IO-Link ISDU parameters over PROFINET acyclic record data
If cyclic IO-Link process data exchanges normally, leave out the connect section of IOL_CALL and address the identification and ISDU calls with the hardware ID of the proxy submodule for the target port, read straight from the PROFINET device configuration. A valid connect result such as 8 proves only that a lookup succeeded, not that it selected your port's submodule.
How-to
Map physical I/O channels in CODESYS V3.5
Add the device description for the controller and every I/O module, insert each module under the bus interface it physically hangs on, and bind channel to variable in the device's I/O Mapping tab. Match the variable's type to the channel's exposed type, convert raw values in code, and treat a successful login as proof of nothing about the I/O.
Selection guide
Is MicroWin32 suitable for complex S7-200 PLC programs
MicroWin32, the S7-200 environment sold as STEP 7 Micro/WIN, carries a complex program when the logic is built as named, parameterized subroutines over a documented memory map. It is the wrong tool when the design needs compile-time constants, code macros, whole-project source export, or many small interrupt routines. Build one representative sequence, one reused function, and the real interrupt count first; the prototype, not the I/O count, decides.
How-to
How to migrate derived function blocks to Machine Expert
No tool converts Control Expert derived function blocks into Machine Expert. Migrate them as a manual code port: copy the Structured Text body, rebuild every declaration and dependency by hand, resolve the two environments' differences, and test each block; blocks written in other languages are recreated. IEC 61131-3 keeps the language portable, not the project or the libraries.
Comparison
How ControlLogix and S7-400 PLC architectures differ
A ControlLogix application maps onto an S7-400 only at the requirements level. ControlLogix runs tasks that contain programs and routines on symbolic tags; the S7-400 runs organization blocks that call FBs and FCs against data blocks, mixing symbolic and absolute addressing. Match execution behavior, data ownership and I/O timing — never translate instruction names.
How-to
Write an S7-1200 heartbeat in ladder logic in TIA Portal
Tie the light to a detector, not to the heartbeat level: time the on half with one TON and the off half with a second TON, both at three times the measured state time, and OR the two done bits into one communication-fault coil. With a PC heartbeat that changes once per second, PT is 3 s and the fault trips 3 s after the last change; add TCON and TDIAG supervision when the PLC owns the TCP connection.
Troubleshooting
Why only Studio 5000 programs a ControlLogix 5571
A ControlLogix 5571 is programmed only with Studio 5000 Logix Designer (RSLogix 5000 in older releases) over an RSLinx or FactoryTalk Linx driver path. The USB port feeds that driver, not a terminal: PuTTY, minicom or picocom never reach a prompt on this VxWorks-based runtime. A controller missing from a device list means you check installed Studio 5000 revisions and the communications path first, and you flash firmware only to match an installed release's major revision — never to cure a browse fault.
Troubleshooting
When a CODESYS TON works in structured text but not ladder
The structured text routine counts because its four statements run in sequence inside one scan; the ladder version fails when the reset network clears Timer.Q before the addition samples it, or an unconditional reset restarts the timer every cycle. Put the call, the Q test, the addition and the reset of the same TON instance in one ladder network, left to right in that order, and it counts exactly one B per interval.