MATLAB App Designer: Debugging Epos4 Motor Controller Integration

6 ビュー (過去 30 日間)
Swapneel Deepak
Swapneel Deepak 2024 年 12 月 18 日
回答済み: Divyanshu 2024 年 12 月 19 日
I am encountering errors while running code in MATLAB 2024 tfor App Designer. The app is designed to interface with Epos4, a motor controller from Maxon, to manage motor operations. Below are the errors and the corresponding code snippets. I suspect the issue might be related to the Epos4 library or path configuration. What steps can I take to resolve these errors?
Code Snippets for Reference
line 456 error
Error using line
Unrecognized property 456 for class Line.
%% MAXON
app.Motor1 = Epos4(2,1);
app.Motor1.ClearErrorState;
app.Motor1.EnableNode;
app.Motor1.SetOperationMode( OperationModes.ProfileVelocityMode );
app.Motor1.WaitUntilDone(1000);
app.Motor2 = Epos4(1,0);
app.Motor2.ClearErrorState;
app.Motor2.EnableNode;
app.Motor2.SetOperationMode( OperationModes.ProfileVelocityMode );
app.Motor2.WaitUntilDone(1000);
app.TachoTimer = timer('TimerFcn',@app.SetTachoValues,'Period',0.01,'ExecutionMode','fixedRate','TasksToExecute',inf);
start(app.TachoTimer);
function runStartupFcn(app, startfcn)
ams = appdesigner.internal.service.AppManagementService.instance();
ams.runStartupFcn(app, startfcn); %%%% line 68
end
% Construct app
function app = GUI_MA_Quintus
% Create UIFigure and components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
% Execute the startup function
runStartupFcn(app, @startupFcn) %%%%%%% line 1534
if nargout == 0
clear app
end
end

回答 (1 件)

Divyanshu
Divyanshu 2024 年 12 月 19 日
The error indicates that 'Epos4' is not recognised by MATLAB when executing the startup function of the app either because the definition is missing or it is not on path of MATLAB.
Some general troubleshooting steps which you can try are:
  • You can check if there is a library or a package to be installed when integrating the Epos4 Motor controller with MATLAB App designer.
  • If it is already installed then maybe try adding 'Epos4' to the path of MATLAB. You can add a file/folder to the path of MATLAB by: Right click on desired folder > Add to path > Selected Folder and Subfolders.

カテゴリ

Help Center および File ExchangeDebugging and Analysis についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by