User`s guide

Cross-Block Checking
Cross-Block Checking
Cross-block checking determines if multiple blocks are trying to access the
same hardware. You should include cross-block checking in your d river
to prevent such conflicts. You can perform cross -block checking by calling
find_system from the block mask in a number of ways. Use the following
guidelines when performing cross-block checking:
Therecommendedwayistocallthe
find_system function from the block
InitFcn callback function. There are two phases of MATLAB file execution
during an update system operation. If you call the
find_system function
from a block
InitFcn callback function, defined in the Block Parameters
dialog of the block, no additional updates are triggered.
Decide on the level of cross-block checking for your hardware. For exam ple,
boards that use the 8255 chip for digital I/O need to check if two different
blocks are requesting opposing directions (for example, input and output)
for the same group of 8 bits. On this chip, there are three groups of 8 bits.
You can configure each group for input or output. The associated xPC
Target driver generates an error in
InitFcn if find_system detects that
two blocks are trying to use the same group of 8 bits for input and output.
See
matlabroot\toolbox\rtw\targets\xpc\target\build\xpcblocks\mpci8255.m
which is called as mpci8255(1) for the Measurement Computing P CI-DAS
1200 digital input and output blocks. During an update diag ram sequence,
Simulink calls the
InitFcn callback function once for each block. Simulink
might call the initialization comm ands in the mask m ultiple times.
4-5