Code covered by the BSD License  

Highlights from
Motion Control Demo

image thumbnail

Motion Control Demo

by

 

30 Oct 2007 (Updated )

Model Based Design Demonstration Based on a Motion Control Case Study

togglescopes.m
%% Utility to toggle the visibility of the scopes
%---------------------------------------------
%|     The Digital Motion Control Demo       |
%---------------------------------------------
%| A practical lesson in Model-Based Design. |
%| Prepared by:                              |
%| Paul Lambrechts, March, 2007              |
%| Copyright 2007, The MathWorks, Inc.       |
%---------------------------------------------
%| Note: This demo is prepared with R2006b   |
%---------------------------------------------

blockpath=gcb; 
if strcmp(get_param([blockpath,'/pos. error'],'open'),'off')       
    set_param([blockpath,'/pos. error'],'open','on')                   
    set_param([blockpath,'/Torques'],'open','on')                      
    set_param(blockpath,'maskdisplay','disp(''Remove\nScopes'')') 
else                                                                           
    set_param([blockpath,'/pos. error'],'open','off')                  
    set_param([blockpath,'/Torques'],'open','off')                     
    set_param(blockpath,'maskdisplay','disp(''Display\nScopes'')')
end                                                                            

Contact us