필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
benn nguyen
benn nguyen 2013년 12월 19일
편집: benn nguyen 2013년 12월 22일
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.

채택된 답변

Suneesh
Suneesh 2013년 12월 19일
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

추가 답변 (2개)

benn nguyen
benn nguyen 2013년 12월 20일
Sounds like you can execute any model (Normal, Accelerator, SIL, or PIL) on any system (Real Time Windows Target, xPC)... But from a practical sense, how do you choose from all the possible combinations, and can they be mixed?
For example, can a model meant to target real-time Windows (on the development machine), use blocks from the xPC blockset.. I understand RT Target has blocks with equivalent functionality (Packet Input/Output, etc) but conceptually does everything work across all blocks and models?
Or, alternatively, does selecting any specific "system target file", such as xPC ERT, Embedded Coder, etc, automatically limit what blocks will work/compile for your given system file? I assume it can't be that easy, since selecting "Generic Real-Time Target" might conceivably allow you to use any block, no?
  댓글 수: 2
Rajiv Ghosh-Roy
Rajiv Ghosh-Roy 2013년 12월 20일
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:
  1. 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).
  2. 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.
  3. 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.
benn nguyen
benn nguyen 2013년 12월 22일
편집: benn nguyen 2013년 12월 22일
Thanks, sometime Simulink seems so very powerful, and other times, especially in regards to block incompatibilities, it's unclear why such limitations exist.
For example, even the simplest of embedded devices can do rs-232 yet a generic/embedded real-time target can't support external mode via a RS-232 transport layer... only xPC.
I can't imagine it's a technical reason why simulink couldn't generate a generic uart c-driver for the protocol, so is the reason philosophical? i.e. Simulink wants the designer to use a different/newer approach?

댓글을 달려면 로그인하십시오.


Guy Rouleau
Guy Rouleau 2013년 12월 21일

카테고리

Help CenterFile Exchange에서 Test Model Components에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by