Examples
13.11 Sample program 5 "MultiModules"
FM 352 electronic cam controller
Operating Instructions, 05/2011, A5E01071724-03
163
User program (FB PROG)
The objective and sequence of the user program are as in sample program 4 "Interrupts"
and sample program 3 "One Module".
The user program is designed for the operation of more than one module, since it accesses
the module-specific data blocks: channel DB, diagnostic DB, and parameter DB. The DB
number specified during call up is used in the user program to select the instance DB. With
this type of programming, you cannot use symbolic names for the data in the data blocks
because of the "Open global data block" instruction used in the user program.
Diagnostic interrupt (OB 82)
Depending on the address of the module that triggered the interrupt (OB82_MDL_ADDR),
the error identifier in the corresponding instance DB of the user program is entered in the
diagnostic interrupt.