TCP/IP Connection with Smart Meter on xPC Target in Simulink Real Time 2016a and s-function

조회 수: 2 (최근 30일)
Hello. I want to communicate with a Smart Meter in Realtime over TCP/IP. I use Matlab/Simulink R2016a and Simulink Real Time 2016a on the xPC Target. I wrote a s-function to generate a socket, send and receive datas over TCP. On my host PC in Simulink my model is running well and ich get the correct message from the Smart Meter. But I cannot build this s-function block in Simulink Real Time. I get the following error message:
The call to slrt_make_rtw_hook, during the exit hook generated the following error: Invalid Simulink object name: loader
The build process will terminate as a result. Caused by: Invalid Simulink object name: loader No block diagram 'loader' is loaded.
I attached my s-function. Are the headers (f.e. winsock.h) missing on the Target? How can I solve the problem?
Thank you for any support!

답변 (1개)

Suneesh
Suneesh 2017년 2월 28일
TCP specific socket functions (for example CONNECT) were not avaialble in R2016a. We have TCP blocks in 17a - try the pre-release:

카테고리

Help CenterFile Exchange에서 Development Computer Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by