MM1,
The best solution is to generate code using AutoCode. You can then add the code for doing tcp communication to the sa_utils.c file in the external_input and external_output functions. The code generated by AutoCode is better suited for real-time simulation.
Communication can also be included in the model through the use of UserCodeBlocks. However the simulation is an elapsed time simulation. There is no direct relation to the time the simulation takes to run and the time in the model.
Carl L
National Instruments