User`s guide
Sample Driver Mask
At InitF cn time, no variables in the mask exist yet. You cannot pass them
into the
InitFcn. H ow ev er, in the function, you can get the string values
using the
get_param function. For ex ample:
function [baseDec, maskDisplay, maskDescription] = ...
maddiamondmm32(phase, configuration, firstChan, numChans, range, base) %#ok
vendorName = 'Diamond';
deviceName = 'MM-32';
description = 'Analog I nput';
maskType = 'addiamondmm32';
if phase ~= 2 % assume InitFcn unless phase 2
base = get_param( gcb, 'base' );
blocks = find_system(bdroot, 'FollowLinks', 'on', ...
'LookUnderMasks', 'all', 'MaskType', maskType, 'base', base);
if length(blocks) > 1
error('xPCTarget:DiamondMM32:Block',...
'Only one Diamond Systems MM-32 A/D block per ...
physical board allowed in a model - each block of ...
this type must have a distinct ISA address.');
end
return
end
4-11