Intro to FANUC Background Logic

FANUC’s Background Logic feature is basically the ladder-logic you know
and love in TP Program form. These programs only consist of Mixed Logic
statements (e.g. F[1]=(DI[1] AND DI[2])), and the programs are
constantly scanned in the background while your robot is online,
ignoring all E-Stops, alarms, etc. Depending on the complexity of your
system, you may be able to skip the PLC and simply use BG Logic to
control everything.

How Complex Can My System Be?

Well, that depends on a few things:

How fast does your scan time need to be?

How comfortable are you with ladder logic?

How comfortable are you translating ladder logic to mixed logic?

Scan time

Each BG Logic program can run in one of two modes: Normal and
High-Level. A Normal mode BG Logic program’s scan time will vary with
the number of items to be scanned (no maximum). A High-Level mode BG Logic
program is guaranteed to scan up to 540 items every 8ms. An “item” is is
any instruction (e.g. assignment, if-statement), operator (e.g. AND,
OR, =, ‘(’, ‘)’, +) or piece of data (F[], R[], DI[], DO[]).

You can see that we have plenty of time to scan through this simple
program during one 8ms ITP, but you can also see how the total # of
items adds up pretty quickly.

How comfortable are you with ladder logic?

Even if you don’t come from a PLC background, hopefully the ladder logic
diagram above makes sense. Imagine current running from left to right to
the coil on the right side of the rung. If the contact is closed
(true or ON), current is allowed to continue on to the right. If current
reaches a regular coil, it gets energized.

How comfortable are you translating ladder logic to mixed logic?

The example above was pretty easy, but what about a more complicated
rung?

F[1]=((DI[1] AND ((DI[2] AND DI[3]) OR DI[5]) AND !DI[4]) OR (F[1] AND DI[1])) ;

It’s a lot easier to see what’s going in the diagram, but it’s possible
with Mixed Logic too.

Keep It Simple

Do you really need to add the complexity of an additional PLC to your
system? If you’re only controlling a couple of actuators and turning a
couple of conveyors on and off, maybe not. Combine Background Logic
with the iPendant as your HMI and you’ve saved yourself quite a bit of
money.