Clear Filters
Clear Filters

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

3 views (last 30 days)
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!

Answers (1)

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

Community Treasure Hunt

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

Start Hunting!