Troubleshooting
Fixing IRC5 IPC queue full errors from trap interrupts
Short answer
The queue fills because transitions on the interrupt's signal arrive faster than the controller can run the trap. Arm the interrupt with \Single or call ISleep first in the trap, and set an input filter longer than the chatter but shorter than the shortest real pulse; a restart only drains the queue.
On this page
- What does the IRC5 IPC queue full error mean?
- Is restarting the controller enough to fix it?
- Why does the error appear when the program is stopped and the motors are off?
- How do I find which input is flooding the trap queue?
- Should the trap call ISleep, or should the interrupt use \Single?
- What input filter time stops a flickering signal?
- How long can the trap routine take before the queue fills?
- How do I verify the fix before returning the cell to production?
- Questions asked
On an IRC5, IPC queue full reported against a trap routine means the interrupt queue feeding that trap overflowed: the signal's qualifying transitions arrived faster than the controller could dispatch and execute the handler. The listed action, restart the system, drains the queue but leaves the arrival rate untouched, so the durable fix has three parts. Find the signal's real transition rate, arm the interrupt so events cannot stack behind a running handler (\Single at connect time, ISleep first in the trap, or IDelete when the need ends), and filter the input to a stable-state time between the chatter width and the shortest legitimate pulse.
What does the IRC5 IPC queue full error mean? #
The message means the controller's interprocess communication queue that feeds trap routines overflowed: qualifying transitions on the interrupt's signal arrived faster than the system could dispatch and run the trap, so pending events accumulated until the queue had no room. The event log words it as one sentence: "The interprocess communication (IPC) queue was full, when sending to trap routine."
The queue is the holding area between the interrupt source and the trap, and overflow says arrivals outran service. Nothing in the message names the signal or the reason, so read it as a rate symptom pointing at one input and one handler, not as a verdict of failed hardware. If your symptom is the opposite, RAPID tasks exchanging messages that silently stop arriving, read Fixing RAPID IPC messaging when queues go silent, because that failure lives on a different path.
Is restarting the controller enough to fix it? #
Restart clears the queue and restores operation, and it is the action the error text itself lists, but it changes nothing about the event rate: if the input still chatters or the trap still runs long, the queue refills under the same conditions. Use the restart to recover the cell, and treat every recurrence as a measurement.
Before restarting, note the time stamp, whether the program was running, stopped or paused, and whether the motors were on. An error that returns only in the stopped state is telling you the interrupt stays armed and the input stays live while nothing consumes it, and that is the thread to pull first.
Why does the error appear when the program is stopped and the motors are off? #
Because connecting a signal to a trap with IsignalDI arms the interrupt independently of program execution, a flickering input keeps generating queued events while the program is stopped, and the motors being off does not change the electrical state of that field wire. Reports of this exact error describe it appearing after the program had been stopped a while with a digital-input trap still connected, and one reported trap did nothing but set a flag.
Two things follow from that. First, motor power off does not de-energize the 24 V input circuit, so a noisy or chattering sensor keeps producing edges the system still qualifies. Second, a flag that ends up ON proves the trap ran, not how many transitions the input made, so count the signal, not the flag. The cure in the stopped state is the same as in running: filter the input, and suspend or delete the interrupt for the period it is not needed.
How do I find which input is flooding the trap queue? #
Match the trap to its signal in the program, since the IsignalDI instruction names it, then watch that input live in the I/O configuration under the exact conditions that produce the error, where flicker shows up as rapid alternating states within seconds. Work through these checks before changing anything:
- Read the instruction that connects the digital input to the trap, and write down the signal name it names.
- Open that signal's entry in the I/O configuration and monitor it live through the fault window; note rapid toggling, noise, or bursts near the trip point.
- Count the transition rate you see, in transitions per second, at the worst moment.
- Read the trap body and list what it executes; note any instruction that waits, moves bulk data, or communicates with another task.
- Check whether an active or passive filter is already configured on the signal, and what time it uses.
- Compare the error's time stamp in the event log against the input's worst activity, including stopped-program periods.
The pattern decides the direction: if the input is clean and slow but the trap is heavy, the fault is the handler; if the input chatters, the fault is the signal no matter how light the trap is.
Should the trap call ISleep, or should the interrupt use \Single? #
Put ISleep as the first instruction of the trap so the interrupt cannot retrigger while the handler runs; alternatively connect the signal with \Single so each connection arms exactly one execution, or IDelete the interrupt once its job is done. A trap that leaves its interrupt enabled while it executes gives a chattering input an open path to stack events behind the running handler.
ISleep suspends the interrupt the moment the handler starts, and the program re-enables it through its normal interrupt handling when it is ready for the next event. \Single connects the signal so one event arms one execution and the program reconnects it afterwards, which is the right shape when each occurrence matters once, such as latching a fault. IDelete removes the interrupt entirely, which suits an interrupt that is only needed for part of the cycle, including the motors-off dwell where this error is reported. For a chattering input, ISleep first is the default; move to \Single when every event must be counted exactly once, and IDelete when the need is periodic.
What input filter time stops a flickering signal? #
Set an active or passive filter on the signal in the I/O configuration with a stable-state time longer than the longest spurious glitch and shorter than the shortest legitimate pulse; in the example below, 1 ms of chatter against a 30 ms real pulse puts 10 ms in the middle. The filter works by withholding acceptance: the signal must hold high or low for the configured time before the controller acts on the change, so bursts shorter than that time never become events.
Choose only from the values your I/O configuration actually offers for that channel; supported times depend on the I/O hardware and system version, and no numeric range is documented for this fault, so read the offered values rather than guessing one. One limit is absolute: the filter time must stay below the shortest legitimate pulse your process produces, or you trade an overflow for a missed part. Filtering shapes response and is never a safety function; anything that protects people stays on safety-rated I/O with its own logic.
How long can the trap routine take before the queue fills? #
The trap must finish in less than the shortest interval between real events: service capacity is 1 divided by execution time, so a 2 ms handler clears 500 events per second and only drowns when arrivals exceed that. Worked example with illustrative values, measured the way you would measure yours: a part-present sensor feeds the trap, the handler measures 2 ms per execution with the controller's routine timing, real parts arrive no faster than 10 per second, and the shortest legitimate pulse is 30 ms. The sensor chatters at its trip point, toggling every 1 ms.
- Service capacity: 1 ÷ 0.002 s = 500 events per second.
- Legitimate demand: 10 events per second, so 500 ÷ 10 = 50× headroom when only real pulses qualify.
- Chatter arrivals: 1 ÷ 0.001 s = 1000 events per second, a surplus of 1000 − 500 = 500 events per second; a 0.5 s burst stacks 500 × 0.5 = 250 events, and a burst that lasts fills any queue depth.
- Filter decision: 10 ms, which is ten times the 1 ms glitch (10 ÷ 1 = 10) and one third of the 30 ms pulse (30 ÷ 10 = 3). Filtered arrivals fall back to the legitimate 10 per second, inside capacity with margin.
Move anything that can wait out of the trap: set a flag and let the main cycle do the work, so the 2 ms class of handler is the norm rather than the goal. The same arithmetic fills any bounded queue on a controller, and how bounded LabVIEW RT queues are preallocated shows the identical producer-versus-consumer behavior on a PC-based target.
How do I verify the fix before returning the cell to production? #
Repeat the exact condition that produced the error, including the stopped-program and motors-off dwell if that is when it appeared, and confirm three things: the input holds a clean state, the shortest real pulse is still recognized, and the queue-full event does not return. Change one variable at a time and repeat the fault condition between changes, or you will not know which measure worked.
If the error still returns, re-measure the arrival rate and the handler time before touching the filter again; lengthening a filter without measuring is how real pulses get missed. Then match the fix to the case you measured:
- Chattering input, light trap: filter at a time between the glitch width and the shortest real pulse, 10 ms in the example.
- Clean input, heavy trap: shorten the handler and move non-urgent work to the main cycle until capacity exceeds demand with margin.
- Error only while stopped or motors off: ISleep or IDelete for that period, plus the filter if the input itself is noisy.
Questions asked
Is there a setting that increases the interrupt queue depth on an IRC5?
No queue-length setting is offered by this error's listed actions, which name only a restart, and none appears in the material describing this fault. Treat the queue as fixed and work the two variables you control: the rate at which the signal qualifies transitions, and the time each trap execution takes. Every fix described for this error reduces the arrival rate, shortens the service path, or changes when the interrupt is armed; none enlarges the queue.
How is this different from event 40208, Error event queue full?
Event 40208 belongs to the error-event path, not trap interrupts: its description says the task was already executing one error event when the next arrived, which points at an error routine that runs long or re-triggers while it is still handling. The discipline is identical, because arrivals must not outrun the handler, but you debug the error routine and whatever raises errors there, not an IsignalDI trap or a digital input filter.
Can a trap that only sets a flag still overflow the queue?
Yes. Handler length sets only the service time per event; dispatch also takes system time, and the arrival rate is set by the input, not by how little the trap does. A one-instruction trap on an input toggling every millisecond still stacks events behind it, which is why the motors-off case floods too. With ISleep first or \Single at connect time, the handler cannot be re-entered while it runs.
How much does the input filter delay a real signal?
By at most the filter time: a transition is accepted only after the signal holds the new state that long, so recognition of a legitimate pulse arrives no later than the configured stable-state time after the edge. In the worked example, 10 ms of filtering on a 30 ms pulse still leaves 20 ms of pulse width in which the event is caught, which is the margin to check on your own numbers.