Simulink Desktop Real-time external mode doesn't support real-time UDP communication block
11 次查看(过去 30 天)
显示 更早的评论
Hi,
I try to use real-time UDP communicaition block in Simulink Desktop Real-time. My program runs well in Normal mode. But when I try to run it in External mode, it reports that
C:/MATALB~1/toolbox/sldrt/clang/win64/clang -emit-llvm -c -m64 -O4 -DINT64_T="long long" -DUINT64_T="unsigned long long" -fno-ms-compatibility -U_MSC_VER -U__STDC_HOSTED__ -Wno-switch-enum -Wno-empty-body -IC:/MATALB~1/toolbox/sldrt/lib/include -I. -I.. -IC:/MATALB~1/simulink/include -IC:/MATALB~1/extern/include -IC:/MATALB~1/rtw/c/src -IC:/MATALB~1/rtw/c/src/ext_mode/common -IC:/MATALB~1/toolbox/shared/can/src/scanutil -IC:/MATALB~1/toolbox/sldrt/src -IC:/Users/qzlab -IC:/Users/qzlab/Deskrealtime_sldrt_win64 -IC:/MATALB~1/extern/include -IC:/MATALB~1/simulink/include -IC:/MATALB~1/rtw/c/src -IC:/MATALB~1/rtw/c/src/ext_mode/common -IC:/MATALB~1/toolbox/coder/rtiostream/src -DTGTCONN -DEXT_MODE -DON_TARGET_WAIT_FOR_START=1 -DEXT_MODE -DUSE_RTMODEL -DMODEL=Deskrealtime -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DMT=0 -o "slrtIPConfig.obj" "C:/MATALB~1/toolbox/slrt/blocks/UDP/slrtIPConfig.c" C:/MATALB~1/toolbox/slrt/blocks/UDP/slrtIPConfig.c:13:10: fatal error: 'socketfuncs.h' file not found #include "socketfuncs.h" ^ 1 error generated. gmake: *** [slrtIPConfig.obj] Error 1
Can anyone give me some suggestions?
Thanks,
zezhou
1 个评论
Thomas Marullo
2020-11-18
Did you ever figure out how to run UDP code in the Simulink Desktop Real-Time environment?
回答(1 个)
Sai Sri Pathuri
2019-10-31
You may refer the following answer to resolve the error
Hope this helps!
2 个评论
Stefanie Schwarz
2021-9-15
编辑:Stefanie Schwarz
2021-9-15
You cannot use driver blocks from libraries such as Embedded Coder or DSP Toolbox with Simulink Desktop Real-Time (SLDRT). These driver blocks are simply not compatible with SLDRT. You need to use dedicated blocks from the SLDRT library:
>> sldrtlib
If your UDP packets contain ASCII encoded data, you can use the Stream Input/Output blocks. Here is practical example on how to use the Stream Input/Output blocks:
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Development Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!