Code covered by the BSD License  

Highlights from
MPC555 Motor Control Function Blockset

MPC555 Motor Control Function Blockset

by

 

20 Mar 2006 (Updated )

Additional I/O blocks for MPC555 target - specifically targetting TPU functionality

mpc555_mtrctrl_tpu_halld(block, action, varargin)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FUNCTION [VARARGOUT] = MPC555_MTRCTRL_TPU_HALLD(BLOCK, ACTION, VARARGIN)
%
% Callback function for block mask and block initialisation for
% Hall Effect Decode block
%
function [varargout] = mpc555_mtrctrl_tpu_halld(block, action, varargin)
switch lower(action)
    case 'specifylinkby'
        i_callback_specifylinkby(block);
    case 'model_initialisation'
        % note: no set_params are allowed in block initialisation callback
        % varargout{1} = i_model_initialisation(block, varargin{1}, varargin{2});
    otherwise
        error(['Action ' action ' not found!']);
end
end

function i_callback_specifylinkby(block)


enable_conds(1).param_names = {'specifylinkby'};
enable_conds(1).param_conditions = {'Parameter Alias'};
enable_conds(1).to_enable = {'alias_link'};
enable_conds(1).to_disable = {'link_channel', 'link_param'};
enable_conds(1).to_hide = {'link_channel', 'link_param'};
enable_conds(1).reciprocal = 0;

enable_conds(2).param_names = {'specifylinkby'};
enable_conds(2).param_conditions = {'Channel and Parameter Index'};
enable_conds(2).to_enable = {'link_channel', 'link_param'};
enable_conds(2).to_disable = {'alias_link'};
enable_conds(2).to_hide = {'alias_link'};
enable_conds(2).reciprocal = 0;

enable_conds(3).param_names = {'specifylinkby'};
enable_conds(3).param_conditions = {'Self Link to Parameter 0 of Channel A'};
enable_conds(3).to_enable = {};
enable_conds(3).to_disable = {'alias_link', 'link_channel', 'link_param'};
enable_conds(3).to_hide = {'alias_link', 'link_channel', 'link_param'};
enable_conds(3).reciprocal = 0;

mpc555_mtrctrl_maskparam(enable_conds);

end

Contact us