Terminology 101: XPC , Real-Time, ERT, SIL, PIL, External Mode
2 views (last 30 days)
Show older comments
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.
0 Comments
Accepted Answer
Suneesh
on 19 Dec 2013
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
0 Comments
More Answers (2)
benn nguyen
on 20 Dec 2013
2 Comments
Rajiv Ghosh-Roy
on 20 Dec 2013
When running on a target, the Normal and Accelerator modes are meaningless: they are applicable to "simulation" only.
For SIL/PIL, you can think of them as alternative targets to xPC Target or Real Time Windows targets, as is the Generic Real-Time Target. As Suneesh explains above, the GRT will generate a standalone executable with real-time compatible code.
As far as the blocks go, it is a little more tricky:
- Blocks made for one target (say xPC Target) are typically made to access hardware features (e.g. and A/D device) and are written to leverage the execution environment/OS of that target. These blocks will not work across targets (e.g. a Real-Time Windows Target block cannot be used with xPC Target code generation).
- There are other blocks which can be used more generally; for instance, the bit- and byte-packing blocks in xPC Target which only shuffle variables in memory and do not access specialized hardware. These can in theory work across targets, but may not in practice because of paths in makefiles, etc.
- The GRT target has similar considerations: it cannot run blocks from any target which accesses hardware; it may be able to run the "generic" blocks but this will depend on the paths.
Guy Rouleau
on 21 Dec 2013
I like this page for HIL:
This section of the doc will help for SIL and PIL:
0 Comments
See Also
Categories
Find more on Test Model Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!