Highlights from
Simulink Support Package for LEGO MINDSTORMS NXT hardware (R2012a)

image thumbnail

Simulink Support Package for LEGO MINDSTORMS NXT hardware (R2012a)

by

 

23 Feb 2012 (Updated )

Simulink block library for creating models that run directly on yourLEGO MINDSTORMS NXT robot

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

slblocks
function blkStruct = slblocks
% SLBLOCKS Defines the block library for RTT-LEGO MINDSTORMS NXT

%   Copyright 2011 The MathWorks, Inc.

blkStruct.Name = sprintf('LEGO MINDSTORMS NXT');
blkStruct.OpenFcn = 'legonxtlib';
blkStruct.MaskInitialization = '';
blkStruct.MaskDisplay = 'disp(''LEGO MINDSTORMS NXT'')';

Browser(1).Library = 'legonxtlib';
Browser(1).Name    = sprintf('Target for Use with LEGO MINDSTORMS NXT Hardware');
Browser(1).IsFlat  = 0; % Is this library "flat" (i.e. no subsystems)?

blkStruct.Browser = Browser;  

% Define information for model updater
blkStruct.ModelUpdaterMethods.fhSeparatedChecks = @ecblksUpdateModel;
 

Contact us