Simulink Desktop Real-time external mode doesn't support real-time UDP communication block
10 views (last 30 days)
Show older comments
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 Comment
Thomas Marullo
on 18 Nov 2020
Did you ever figure out how to run UDP code in the Simulink Desktop Real-Time environment?
Answers (1)
Sai Sri Pathuri
on 31 Oct 2019
You may refer the following answer to resolve the error
Hope this helps!
2 Comments
Stefanie Schwarz
on 15 Sep 2021
Edited: Stefanie Schwarz
on 15 Sep 2021
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:
See Also
Categories
Find more on Development Computer Setup in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!