Error code: Mixed Logic / BG Logic / Macros · Category: Programming · Controllers: R-30iB, R-30iB Plus, CRX-10i
The customer asks for a “simple” change: turn on a vacuum output when the robot crosses a position, and only while the conveyor is running. You add a Mixed Logic line. It works on the bench. It breaks the moment the cell scales up to real production speed because Mixed Logic can only handle simple comparisons during motion. The fix is not more Mixed Logic, it is moving the behaviour into Background Logic or a Condition Monitor. At Probot Systems we see this misalignment between tool and use case on most cells where multiple integrators have touched the code over the years.
This post is written for technicians programming R-30iB, R-30iB Plus, and CRX-10i controllers who need parallel behaviour and are not sure which control structure to reach for. We will cover Mixed Logic, Background Logic, Macros, and Condition Monitor in the order you should evaluate them.
There is no single FANUC alarm called “Mixed Logic misuse”. The symptoms appear downstream as INTP-254 Parameter not found, PRIO-620 PNIO(C) station deactivated when a BG Logic task references an IO that vanished, or simply behaviour that does not match the program as written.
Per the FANUC error code manual on INTP-254: “Parameter not found. Cause: The specified parameter name cannot be found. Remedy: Check the parameter name.” It fires when a Mixed Logic line, a BG Logic task, or a Macro references a system variable or parameter that does not exist on the running firmware. The fix is reading the manual for that firmware, not patching the symptom.
Per the manual on PRIO-620: “The device whose Show error when deactivated setting is ON is deactivated. Remedy: Check the station specified the station number, and activate it.” This one bites when a BG Logic program is polling a fieldbus IO that loses comms, and the polling logic is not gated by the comms-OK signal.
The shop floor reality: each of Mixed Logic, BG Logic, Macros, and Condition Monitor has a job it is good at. Use the wrong one and you either get a downstream alarm or behaviour that drifts in production.
IF DI[3], DO[5]=ON). Stack three conditions and you get unpredictable timing. The Mixed Logic option manual is explicit about the constraint.Step 1. Identify what is supposed to run in parallel with motion. Is it a single IO comparison? Mixed Logic candidate. A continuous status update (alarm flag, conveyor running)? BG Logic candidate. A response to an IO change during motion? Condition Monitor candidate. An HMI button shortcut? Macro candidate.
Step 2. Open MENU > SETUP > BG Logic. Read the running task list. If it is empty, no BG Logic is executing. Bench tests of BG Logic that work in T1 but not in AUTO often fail because the BG task is not assigned to AUTO start.
Step 3. Read the alarm log if behaviour is wrong. INTP-254 means a parameter name in your code does not exist. INTP-258 means a weld port access error and is unrelated to logic structure (mentioned in the manual). PRIO-620 means an IO reference is offline.
Step 4. For Macros, check MENU > SETUP > Macro. Each macro is bound to a button or UI signal. Confirm the binding is what you expect.
Step 5. For Condition Monitor, open the relevant motion program and look for WHEN conditions inline with motion lines. Condition Monitor is part of the motion program, not a separate task.
For Mixed Logic that is too complex:
Move the complex part to BG Logic. Leave only a single comparison in the Mixed Logic line, or remove Mixed Logic entirely and let BG Logic drive the IO. A DIY Robotics community thread on “Starting a Robot by an output button” shows the right pattern: BG Logic maps UI signals to flags, and the main program reads flags (reference).
For BG Logic that is not running:
MENU > SETUP > BG Logic. Add the task. Set “AUTO start” so it runs on power-up, not just when manually launched. Save and cycle power. The task list should show your program as running.
For BG Logic that is doing too much:
Split it. BG Logic prefers small focused tasks. A monolithic 200-line BG program is harder to debug and more likely to trip on a restricted instruction. Multiple 20-line BG tasks are cleaner.
For a Macro driving a long motion:
Restructure. The macro should do nothing but CALL my_motion_program and return. The motion program runs in its own group with its own ownership. This avoids macro-thread timing problems and lets the motion program use the full TP feature set.
For a Condition Monitor not used:
Replace the Mixed Logic + motion combination with a Condition Monitor instruction. The syntax (CMR[n] and the WHEN keyword) is documented in the FANUC TP Programming manual. The benefit is that the IO response is independent of the motion line execution.
For digital output on alarm or UO state:
Use BG Logic. A clean pattern is documented in the DIY Robotics community: “You can make a BG logic program with DO XX = UO 6 Fault” (reference). One line of BG Logic and the panel light always reflects the alarm state.
Two situations are worth a service call:
You have inherited a cell where someone used Mixed Logic, BG Logic, and Macros interchangeably and the behaviour is hard to predict. Untangling that is a programming audit. We do this routinely and the deliverable is a documented map of who runs what and when.
You need to add a safety-critical IO response during motion (light curtain mute, force-sensor pause, vision-driven re-plan). That is Condition Monitor territory at minimum, often with a DCS Safe IO mapping behind it. Wiring it up without the safety design is how cells end up with intermittent behaviour the auditor will not certify.
contact us for a programming review, or schedule a maintenance preventive visit so the BG Logic and Macro inventory is documented alongside the mechanical maintenance.
Probot Systems is a FANUC integrator based in Lévis, Quebec serving Canada and the US. We design Mixed Logic, BG Logic, Macro, and Condition Monitor structures for every cell we deliver, and rework them on customer cells where the original integrator picked the wrong tool. If your parallel behaviour is unpredictable, that is a contact us conversation.
Remplissez le formulaire ci-dessous et nous vous contacterons dans les plus brefs délais.
Fill out the form below, and we will be in touch shortly.