MATLAB XPC TARGET 4 - DEVICE DRIVERS Guide de l'utilisateur Page 47

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 111
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 110 111

Commentaires sur ces manuels

Pas de commentaire