MATLAB: Terminology 101: XPC , Real-Time, ERT, SIL, PIL, External Mode

external modehilpilreal-time windows targetsilxpc

The number of toolboxes, options, and general flexibility of matlab, make for a very overwhelming experience to the un-initiated..
Can anyone explain, what would it be called if Simulink is running on a PC exchanging data with a simple external RS232 device/pc: SIL, PIL, or External Mode?
Since the system simulink model receiving external data runs on the development pc, what product(s) would it need to be configured for: Real-Time Windows Target, xPC Target, RT/xPC 'ERT', or other?
Finally, if a simulink model is to be built to generate generic c-code that runs on the external device or pc, what product(s) are needed: xpc target explorer, Simulink coder, Embedded coder, Real-Time Workshop?
Also, is there a terminology or implementation difference between simple host/target data exchange, and 'real-time' closed loop control system where a simulink model running on a pc is closing the control loop but the actuators/sensors are external.

Best Answer

Can anyone explain, what would it be called if Simulink is running on a PC exchanging data with a simple external RS232 device/pc: SIL, PIL, or External Mode?
Here what matters is how the Simulink model is running. Data can be exchanged in all of these modes depending on how you have configured the model.
Since the system simulink model receiving external data runs on the development pc, what product(s) would it need to be configured for: Real-Time Windows Target, xPC Target, RT/xPC 'ERT', or other? You are assuming the model runs on the dev PC. This is one possibility that you are running the model in Simulink itself. You could generate code for the model and run it i) On the host target as an EXE ii) On the host target in real time using Real-Time Windows Target ii) On a separate machine (target) using xPC Target. Note that ERT (Embedded Real-Time) is MathWorks' name for code generation for (optimized) embedded platforms. This doesnt necessarily have to run in real-time. For example if you generate code using ERT and create an EXE then this EXE would run way faster than realtime on a Windows 7 host, for example.
Finally, if a simulink model is to be built to generate generic c-code that runs on the external device or pc, what product(s) are needed: xpc target explorer, Simulink coder, Embedded coder, Real-Time Workshop?
To run a Simulink model on an external PC the solution is to use xPC Target. xPC Target requires other products as can be seen here : http://www.mathworks.com/support/product/sys_requirements.html?product=XP
Also, is there a terminology or implementation difference between simple host/target data exchange, and 'real-time' closed loop control system where a simulink model running on a pc is closing the control loop but the actuators/sensors are external . The data exchange implementation differs depending on where the model is running. The difference is in the use of different blocks for data exchange between a Simulink model running on a dev PC Vs the model running in real time on a separate PC running xPC Target