MATLAB XPC TARGET 4 - DEVICE DRIVERS Uživatelská příručka Strana 47

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 111
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 46
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
Zobrazit stránku 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 110 111

Komentáře k této Příručce

Žádné komentáře