IMDHMIControls LibraryShop main store

Troubleshooting

Why MELSEC-L has no single PID function block

PLC programming Published 8 min read By IMDHMI controls team

Short answer

MELSEC-L has no single PID function block because the L series implements PID as dedicated instructions such as PIDRUN and PIDINT, documented in the separate PID control instructions manual. Locate that manual, port the loop interface from your iQ-R or iQ-F block onto those instructions, and call the run instruction on the interval its sampling time entry assumes; success is a clean compile and a stable, verified interval.

On this page
  1. Why can't I find a PID function block for MELSEC-L?
  2. Which manual documents PID on the L series?
  3. Why does e-Manual Viewer keep returning PIDRUN and PIDINT?
  4. How do I test what my L project actually supports?
  5. How do I port an iQ-R or iQ-F PID loop onto the L-series instructions?
  6. What interval should the run instruction execute at?
  7. How do I verify the ported loop before it closes on the process?
  8. So is there any PID function block an L CPU can use?
  9. Questions asked

MELSEC-L has no single PID function block. The L series implements PID as a set of dedicated instructions — PIDRUN, PIDINT and their companions — documented in a separate programming manual, while the monolithic PID block you used on iQ-R and iQ-F belongs to those families' function block library. Nothing is wrong with your software and nothing is hidden: the object you are searching for does not exist for the L target. The working path is documentation and a port. Read the MELSEC-Q/L/QnA Programming Manual (PID Control Instructions), map your loop's interface, rebuild it on the L-series instructions, and call the run instruction on the interval its sampling time entry assumes. The port is measurable: a project that compiles with zero unresolved references and a loop that executes at a stated, stable interval.

Why can't I find a PID function block for MELSEC-L? #

Because the L series documents PID as a set of instructions, not as one block: an L CPU exposes PIDRUN, PIDINT and companion instructions with separate operands, while the single PID block you remember belongs to the iQ-R and iQ-F function block library approach.

Nothing is missing from your installation and you are not overlooking a page. The iQ-R family ships PID as a library of function blocks with its own library reference manual; the L series follows the Q/L/QnA design, in which initialization, parameter handling, execution and termination are split across separate instructions. The name PID resolves to no vendor object on an L target, so the editor, the compiler and the documentation search all come back empty for it. That empty result is the correct answer, and it is the search to stop making.

Which manual documents PID on the L series? #

The MELSEC-Q/L/QnA Programming Manual (PID Control Instructions), manual code SH-080807ENG, is the reference for L-series PID instructions, and Mitsubishi lists it among the manuals for L-series CPUs such as the L06CPU-P on the CPU download page.

The common instruction programming manual, SH-080809ENG, also carries the chapter describing the PID control instructions. One title covers Q, L and QnA together because the instruction set is shared across those CPU lines, so the manual a Q colleague already has is the same document. Read it for what a block-style reference would otherwise give you: each instruction's execution conditions, the parameter and working-data layout of a loop, and how status is returned.

Why does e-Manual Viewer keep returning PIDRUN and PIDINT? #

Because e-Manual Viewer indexes instruction names and manual titles, and on the L series the instruction names are the PID documentation; a search for a block called PID cannot find a definition that does not exist for this target.

Search the way the L series organizes the subject instead: by the manual category for PID control instructions and by the individual instruction names the editor offers for the configured CPU. A viewer hit is a pointer into a PDF, not proof that an object is supported; the compiler for the exact L CPU is the only support authority. Re-running the same block-name search will keep returning the same instructions and other families' manuals — that is the expected result, not a broken index.

How do I test what my L project actually supports? #

Configure a project for the exact L CPU in GX Works2, insert the PID objects the editor offers into a test network, and compile; the compiler for that target decides what exists, and every guess about a block's origin feeds this test.

Classify each PID-looking object before you rely on it, because a graphical call can resolve to any of three sources:

  • a native instruction recognized for the selected CPU, with its own instruction help and operand definitions;
  • a function block supplied by an installed library, where the project shows the library name and its compatibility list;
  • a user-defined function block stored inside the source project, which opens to editable code.

The definition tells you which one you have. If it opens as editable source, the block is user-written; if it resolves to a library, record the library name and check whether it declares L compatibility. If the project came from an upload instead of source, there may be no definition to open at all, for the same reasons covered in why uploading a PLC program is not full source recovery. Four symptom patterns map cleanly onto causes:

  • PIDRUN and PIDINT are offered but no PID block: the L toolchain is working as designed — use the instructions.
  • PID appears in one project only: a user-defined block or a library carried inside that project.
  • PID appears but fails to compile for the L CPU: the implementation or its target compatibility is absent.
  • No PID-related object appears anywhere: the configured CPU type is wrong or the installation is incomplete.

How do I port an iQ-R or iQ-F PID loop onto the L-series instructions? #

Map the old block's complete interface first, then rebuild that interface on the L-series instructions, taking operand order, data types and working-data sizes from the manual rather than from the names; renaming or pasting the iQ block into the L project cannot carry CPU-family support with it.

Put the map in writing before the ladder work, item by item:

  • process variable and setpoint, with their engineering ranges;
  • controller output and the range the actuator expects;
  • the proportional, integral and derivative settings the application actually uses;
  • automatic/manual selection, run permission and the initialization request;
  • working data, completion state and diagnostic status;
  • output limits and the program condition that applies them.

Then read the manual's execution conditions before writing networks: initialization belongs on a controlled startup or reset path, the run calculation belongs in the loop's scheduled path, and status is read before the output reaches the actuator. Never size a working-data area from the instruction names — an undersized or misplaced area can corrupt neighboring devices while the network still looks valid. Do not copy the iQ project wholesale either, because retained data, scheduling, numeric representation and status handling do not survive the move. The method is the same map-then-rebuild discipline as migrating a Standard PID Control PID_CP block to an S7-1500: different platform, same sequence.

What interval should the run instruction execute at? #

The run instruction executes on the interval its loop's sampling time entry assumes: with tuning derived at 100 ms updates but executed on a 12 ms scan, integral action runs 8.3 times faster than intended (100 / 12 = 8.3), so match schedule to entry or retune.

Worked example, with example numbers: a temperature loop ported from iQ-R ran its library block in a program scheduled every 100 ms, and the tuning was derived at that rate. On the L CPU you call the run instruction every scan, and the diagnostics screen reads an average scan of 12 ms. Executions per minute are 60,000 ms / 12 ms = 5,000 on the new project against 60,000 ms / 100 ms = 600 on the old one — a factor of 5,000 / 600 = 8.3. Every execution adds the integral step sized for the stored sampling time, so the ported loop integrates that factor faster in real time and will overshoot where the old project held steady.

The decision those numbers force: put the run call on a fixed-interval schedule equal to the stored sampling time — a scheduled program, or a timed gate in the scan that fires only when the accumulated time reaches the entry — or enter an interval you can actually hold into the parameter data and retune. Leaving the schedule and the entry mismatched is the one mistake that quietly changes loop behavior with no error raised. Pinning PID execution to a fixed cyclic interval is standard practice elsewhere too; calling FB41 and FB42 PID loops in OB35 with one DB per bank shows the same pattern on a different controller.

How do I verify the ported loop before it closes on the process? #

Compile offline for the exact L CPU until zero unresolved references remain, which proves the project holds every object the target needs; then verify interval, status and limits live with the output held in manual, because a clean compile proves nothing about tuning or actuator behavior.

Work the checks in this order:

  • compile clean for the configured CPU type — zero unresolved references;
  • measure or schedule the executed interval and set it against the sampling time entry, scan after scan;
  • read the status the run instruction returns before the output is used, exactly as the manual defines it;
  • exercise manual selection, restart and invalid process data, and decide what each leaves in the loop's stored state;
  • keep output clamps, permissives and shutdown logic in series with the PID result, so the calculated output can never bypass them.

One safety note: keep the final output disconnected or in manual until its direction and range are proven on the real loop — a loop left mismatched by the factor computed above can drive a valve or a heater to its limit within seconds.

So is there any PID function block an L CPU can use? #

No vendor block exists, and that is the finding, not a gap in your search: on MELSEC-L you build PID from the documented instructions, and the port is finished when the project compiles with zero unresolved references and the loop holds its stated interval with the output in manual.

The decision, case by case:

  • You arrived from iQ-R or iQ-F expecting the library block: stop searching for it on L, and port the loop onto the instruction set in the PID control instructions manual.
  • A PID block appears in one project only: it is user-written or carried by that project's own definitions; vet it with the compile test before any reuse.
  • No PID-related object compiles on the target: re-check the configured CPU type and the installed documentation set before touching application logic.
  • Someone hands you the block as a file: a matching block name cannot carry CPU-family support with it, so run the same compile test on your exact L CPU before trusting it.

Run the compile test, hold the executed interval to the sampling time entry, and keep the output in manual until the first closed-loop check — the loop you could not find a block for is running on instructions that have had their own manual all along.

Questions asked

Does the Q series use the same PID instructions as the L series?

Yes. The instructions are documented in a single manual whose title covers the Q, L and QnA families, because the instruction set is shared across those CPU lines. A loop moved between a Q and an L CPU still needs the same scheduling and parameter checks as any port, but the reference a Q project already uses applies to an L target too.

How do I measure the L CPU scan time before scheduling the run call?

Read it from the running system rather than estimating it. The engineering software and the CPU diagnostics screens report current and maximum scan time while you are connected, so take the reading with the machine running its normal load. Scan time grows with active I/O and communication traffic; the measured figure, not a guess from an empty program, is what you set the timed gate or the scheduled program against.

A PID block exists in one project only. Can I reuse it on the L CPU?

Treat it as user-written or project-carried, never as a native vendor object, and open its definition before reusing anything. Check every instruction and data type inside it against the L instruction set, including retained data and initialization behavior, then run the compile test on the L target. If it fails, port the interface onto the documented instructions instead of editing the block until it barely passes.

Can two PID loops on one L CPU run at different intervals?

Yes. Each loop carries its own sampling time with its own parameter data, so the interval is a per-loop decision rather than a CPU-wide setting. One loop can run on a fast schedule while another runs on a slower gate, provided each loop's executed interval matches what its own parameters assume. Verify each loop's interval separately, because a schedule that is right for one loop tells you nothing about the other.

Keep reading

  • Explainer

    Unity Pro system bits %S0 and %S1 for Grafcet startup initialization

    Unity Pro has no OB100: the hooks are the %S0 cold-restart and %S1 warm-restart system bits. Wire both in parallel on one rung, SET the initial Grafcet step bit and RESET every other step bit; for a native Grafcet chart call INITCHART from the same condition instead.

    PLC programming

  • Explainer

    Why a PLC tank simulation needs a plant model block

    A PLC simulator runs your logic without hardware, so nothing converts the valve outputs back into level inputs and the feedback loop stays open. Add a plant-model code block that reads the output image, integrates the tank level with the real scan time, and writes the input image every scan, then prove it against a hand-computed fill time before connecting SCADA.

    PLC programming

  • How-to

    How to build ladder logic practice projects in STEP 7

    Get STEP 7 ladder practice projects from the vendor's own support portal and from the samples the installer already placed on your PC, not from a copy of a book's bundled disk. Then rebuild three circuits yourself: a start/stop latch with overload interlock, an on-delay timer sequence, and an up/down counter.

    PLC programming