TCPを使ってmファ​イルからSimuli​nkに値を送りたい

1 visualización (últimos 30 días)
tomoki takeuchi
tomoki takeuchi el 17 de En. de 2020
mファイルでtcpip()を用いてサーバを建てて,fwrite()を用いて書き出した値を
simulinkで受信使用としたのですが上手くいきませんでした.
simulinkのTCP/IP Receiveブロックを用いて受け取ろうとしたのですがサーバに繋がりません
また,コマンドウィンドウでしらべたところポートはLISTENになってたため受信する状態にはなっていたと思います.
何か良い方法があれば教えていただきたいです.
サーバのプログラムを添付します.
clear
t = tcpip('192.168.11.26',8000,'NetworkRole','server')
fopen(t);
while 1
data = [1:100]
fwrite(t,data)
pause(0.05)
end

Respuestas (0)

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!