필터 지우기
필터 지우기

TCPIP connection won't open in compiled project

조회 수: 3 (최근 30일)
Steven Brace
Steven Brace 2019년 3월 22일
답변: Steven Brace 2019년 4월 1일
I have the following file PICOLOGGER.m
Which connects to local host and sends and receives a message. This works fine when run from the matlab environment, however I cannot compile the script to a standalone exe and get it to work.
t = tcpip('127.0.0.1', 1024)
fopen(t)
t.Status
fprintf(t, 'CMODE;R;')
data=fscanf(t);
fprintf(t, 'ARCRV?')
data=fscanf(t)
results(1)=string(datetime('now'));
results(2)=string(data(2:7));
results(3)=string(data(10:15));
fclose(t);
delete(t);
clear t
echotcpip('off');
When compiled to standalone exe I get this eorror output in the command window:
error.png
Here is the successful running that I see when I run the original uncompiled version in the matlab environment:
success.png
What gives! Had quite a lot of issues trying to get things working in the matlab compiler.
Thanks!!!
Steve

채택된 답변

Steven Brace
Steven Brace 2019년 4월 1일
I managed to solve this problem with the help of the support team.
I was trying to run the project from a network drive, once I moved the project to a local drive everything worked fine!
Cheers!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Application Deployment에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by