I am trying to send TCP messages from a simulink model that is running realtime on a target computer. Matlab says that TCP is supported in realtime simulink but I only see a TCP block in Instrument control box. Also when I try to use those blocks and build the model on the target computer, it gives the following error:
Error evaluating registered method 'Start' of MATLAB S-Function 'stcpipsb' in 'testing_TCP/TCP//IP Send'.
The block TCP/IP Send could not connect to the specified port. Please specify a different port or wait for the current port to become available.
I have configured the IP address of the TCP block to be that of the target computer and used different port numbers like 22222 (which is what I have configured in the simulink realtime explorer), 30000, 30, 10 all to no avail. Where is it going wrong and what is causing the error?