I am trying to call parallel functions within my Matlab-GUI by pushing a startbutton.
For the beginning I tried to call one single function ("ReadTwinCAT") but I'm always getting the following error-message:
"Warning: Unable to save App Designer app object. Save not supported for matlab.apps.AppBase objects."
As I thought I already used parallel functions like this within a GUI, I don't know what I am doing wrong...
Matlab-App-Designer Code:
properties (Access = private)
running_state = 0; % Description
tcClient;
db_conn;
end
methods (Access = private)
function ReadTwinCAT(app)
while app.running_state == 1
disp('running')
pause(0.1)
end
disp('stopped')
end
end
% Callbacks that handle component events
methods (Access = private)
function StartButtonPushed(app, event)
app.running_state = 1;
pool = gcp(); %Initialize pool of workers
parfeval(pool, @ReadTwinCAT, 0, app); %Call parallel function
end
end