PLCs and controllers
Controller programming, faults, communication setup and migration.
Latest articles
How-to
Initializing a packed GRAFCET integer with one MOV instruction
Write 0x1 to the whole integer variable in one MOV block: the write replaces every bit, so all step bits clear and bit zero — the initial step — sets. 0x00000001 and 0x1 are the same stored value; the editor only masks leading zeros. Evaluate transitions against a previous-scan copy so the sequence advances one step per scan.
Troubleshooting
HMI display fault with PLC outputs off and I/O LED dark
An HMI showing no live data, every digital-output LED dark and no I/O LED activity on the controller has one likely shared cause: the processor is stopped or faulted and no logic is executing. Read the controller mode and fault code first, prove the network with a ping test, then check the output module; download a backup only after the program itself is proven damaged.
Troubleshooting
Why an HMI counter display jumps from 9 to 16
The counter stores each count in BCD and the HMI tags are typed as integers, so the word for 10 reads as 16 and a preset of 25 arms the counter at 19. Set both the preset-entry tag and the accumulator-display tag to BCD int 16, keep the addresses, and use BIN only when ladder logic needs binary.
How-to
How to Display Text Labels From a Sensor Range in CODESYS
Classify the reading in the controller with an IF/ELSIF chain that assigns a STRING label to each sensor range, then point the textbox's text variable at that string instead of the numeric tag. The number becomes a category in the PLC, not on the screen.
Troubleshooting
Why an HMI Numeric Entry Writes Zero to a Counter Preset
A numeric entry that shows the value for a split second and then reads zero is writing to the register, but the register is not retaining it. Check entry acceptance, limits, and BCD format first, then check whether an installed option module claims the preset word. In the reported case a stepper module in slot 2 cleared V2000, and removing it restored the entry.
Troubleshooting
How to Keep HMI-Entered Timer Presets in PLC Memory
The presets return to zero because the V-memory word they are written to falls outside the PLC's configured retentive range. Open the retentive ranges setup in the programming software, extend the V register range to cover the preset addresses, download the change to the PLC, and save the project.
How-to
How to Back Up a PLC Program the Right Way
A PLC program is backed up by uploading: reading the program out of the controller to a computer with the controller's own programming software over a supported connection. An HMI's USB port handles the panel's project, not the PLC's executable, so it is not a backup path. Prove the backup by reopening the saved file before you rely on it.