Red Pitaya is not connecting to MATLAB
9 ビュー (過去 30 日間)
古いコメントを表示
I am trying to connect my Red Pitaya to the online version of MATLAB (matlab.mathworks.com). I am using the following code below:
%% Define Red Pitaya as TCP/IP object
IP= '169.254.222.68'; % Input IP of your Red Pitaya...
port = 5000;
tcpipObj=tcpip(IP, port);
%% Open connection with your Red Pitaya
fopen(tcpipObj);
tcpipObj.Terminator = 'CR/LF';
%% Send SCPI command to Red Pitaya to turn ON LED1
fprintf(tcpipObj,'DIG:PIN LED1,1');
pause(5) % Set time of LED ON
%% Send SCPI command to Red Pitaya to turn OFF LED1
fprintf(tcpipObj,'DIG:PIN LED1,0');
%% Close connection with Red Pitaya
fclose(tcpipObj);
I get this following error:
Error using icinterface/fopen (line 83)
Unsuccessful open: Connection timed out (Connection timed out)
I am able to connect to the red pitaya browser interface but I am not able to connect my Red Pitaya Board to MATLAB.
0 件のコメント
回答 (1 件)
Vandit
2024 年 1 月 24 日
Hi Nathan,
I understand that you are encountering an error while trying to connect Red Pitaya board to the online version of MATLAB.
The error message indicates a failure to establish a connection between MATLAB and Red Pitaya board. A workaround to resolve this error is to start the “SCPI server” on Red Pitaya board before running the MATLAB script.
Please refer to the following link which may help you to start the “SCPI server” :
Hope this resolves your query,
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!