IMDHMI Controls Library
Build the logic. Keep the line running.
Practical answers for the engineers who program, wire and troubleshoot PLCs, I/O, industrial networks and drives.
Read the latest articlesLatest articles
Troubleshooting
LatestWhy MB_MASTER on an S7-1200 returns an error status but no data
If the slave answers your PC master but MB_MASTER returns an error STATUS with no data, the PLC never handed the port over or mis-sized the buffer. Run MB_COMM_LOAD once on a first-scan edge, wire its instance DB into every MB_MASTER call through MB_DB, tie both EN inputs to the rail, and size DATA_PTR in bytes while DATA_LEN counts registers.
Troubleshooting
Why ping succeeds but the PROFINET device is not found
A successful ping tests IP reachability only. The controller identifies a PROFINET device by the device name stored in it, matched over PN-DCP, so an adapter with a valid IP but an empty or mismatched name stays "not found". Read the stored name, assign the configured name, verify the subnet and slot layout, then compile and download again.
Troubleshooting
Wire a 4-wire 4-20 mA signal into a DL205 F2-04AD-1
Land the readout's analog negative on the channel's CH- terminal, not on the module's 0 VDC supply terminal: the F2-04AD-1 senses current between CH+ and CH-, so an unwired CH- passes no current and the channel stays dark. Bond the two supply 0 V rails only where the wiring diagrams call for it, then bring the data in with IBox 460 and scale it with IBox 423 for BCD or IBox 403 for binary.
How-to
Map CODESYS I/O for ladder and structured text use
Map every physical channel once, in the I/O mapping dialog of the device in the project tree, to a named global variable. Ladder and structured text then reference the same variables, because the mapping belongs to the device, not to either language. Prove the link with one input and one output through the full field-device-to-program path before mapping the rest.
Troubleshooting
SLC 500 multiple outputs on one ladder rung
An SLC 500 output instruction must terminate its branch at the right-hand side of the rung, so multiple outputs are added as parallel branches off the same upstream logic. The branches are OR paths; one rung can carry as many as readability allows, and a self-resetting TON drives all six lamps together.
Explainer
S7-300 front connector coding key on analog I/O modules
That position is not a selector. It is the front connector coding key: the first time a connector meets a module, the housing presses a coding element into it at a position unique to that module type, so the connector can never enter a different type afterward. Nothing about it depends on the modules beside it; fit the connector, let the module code it, and never trim or force a coding element to make a mismatched pair fit.
How-to
How to run CiA402 axes in structured text without NC
You can move EtherCAT servo axes from a PLC without a motion-control license by writing the CiA 402 state machine and the move profiles in plain structured text that maps the drive PDOs directly: one function block per axis, one command owner per axis, every transition gated on the returned status word. Commission the five hops from application to drive with a gate check each, and prove task timing under full load before enabling torque.
How-to
Connect an S7-300 to a DCM drive over PROFIBUS or PROFINET
Yes: an S7-300 controls a DCM over PROFIBUS or PROFINET by installing the drive's GSD or GSDML description, selecting the same supported telegram on both sides — standard telegram 1 (PZD-2/2) is the safe first choice — exchanging the 4-byte records with SFC14 and SFC15, and trusting the link only once cyclic exchange runs fault-free. A clean link still will not move the motor while the drive's command source is local or an enable is missing.
How-to
Exchange data between an S7-300 and S7-200 over MPI
No ladder program is ever transferred between an S7-300 and an S7-200: each CPU is programmed and downloaded in its own tool, STEP 7 and Micro/WIN. Over MPI the S7-300 does all the communication work, calling X_GET to read and X_PUT to write bytes in the S7-200's V memory, which it addresses as DB1. Match the segment baud rate and station addresses, map the bytes identically on both sides, then prove the exchange with a status chart before trusting it.
Troubleshooting
Fix missing setpoint and control word writes to a PROFIBUS drive
A working transmit path proves the bus is fine; the receive half is unfinished. Verify the PLC writes the configured output words, the words arrive in the receive buffer with a matching PZD length, the free-BICO receive connections exist, and control-word bit 10 is 1. Check the boundaries in order so an address fault is not mistaken for a BICO or authority fault.
Explainer
CODESYS IO-Link SL target support limits on ctrlX CORE
No, CODESYS IO-Link SL (article no. 2303000008) is a single-device target license, and the ctrlX CORE does not currently provide it, so its scan-to-project, configurator and IODD.xml workflow cannot run on that controller. Add the IO-Link master over EtherCAT or PROFINET, read and write parameters acyclically, and manage the rest outside the project.
Explainer
Will an S7-200 starter kit teach you S7-300 and S7-400
Yes for fundamentals, no for the toolchain: an S7-200 starter kit teaches scan-based ladder logic, timers and counters that transfer to S7-300/400 work, but Micro/WIN and STEP 7 are separate tools and no project converts between them. Budget the larger share of practice hours for STEP 7, and buy any S7-200 kit as used training hardware, since new supply ended 1 October 2014.