Why doesn't serial object work in compiled application with MATLAB 2015a?
Mostrar comentarios más antiguos
I compiled succesfully a standlone application with the MCR included, but when I install and run the application in other computer, the application throw an error: undefinedVarOrClass
This is the code:
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
try
com='COM6';
delete(instrfind({'Port'},{com}));
f=serial('COM6','BaudRate',9600);
fopen(f);
pause(2);
fprintf(f,'%s','F');
fclose(f);
catch ME
warndlg(ME.identifier);
end
Note: I used GUI of matlab.
Respuestas (0)
Categorías
Más información sobre C Shared Library Integration en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!