| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → xPC Target |
| Contents | Index |
| Learn more about xPC Target |
Cross-block checking determines if multiple blocks are trying to access the same hardware. You should include cross-block checking in your driver 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:
The recommended way is to call the 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 example, 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 PCI-DAS 1200 digital input and output blocks. During an update diagram sequence, Simulink calls the InitFcn callback function once for each block. Simulink might call the initialization commands in the mask multiple times.
![]() | Driver Mask Guidelines | When You Are Done | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |