Are there limitations with regard to executing modules in real-time?
Not all access operations that are possible in Simulink® under non-real-time conditions can be performed in the TwinCAT real-time environment. Known limitations are described below.
- Direct file access:: No direct access to the file system of the IPC can be realized from the TwinCAT runtime. An exception is the Simulink® sink function block "To File". As described under Using the ToFile block, the TcExtendedFileWriter module that realizes the file access can be instantiated in TwinCAT.
- Direct hardware access: Direct access to devices/interfaces requires a corresponding driver, e.g. RS232, USB, network card, ... It is not possible to access the device drivers of the operating system from the real-time context. At present it is therefore not easily possible to establish an RS232 communication for non-real-time operation with the Instrument Controller ToolboxTM and then use this directly in the TwinCAT runtime. However, TwinCAT offers a wide range of communication options for linking external devices, see TwinCAT 3 Connectivity TF6xxx.
- Access to the operating system API: The API of the operating system cannot be used directly from the TwinCAT runtime. An example is the integration of windows.h in C/C++ code. This is integrated by the Simulink Coder® if the FFTW implementation of the FFT block from the DSP Systems ToolboxTM is used (but not with the Radix 2 implementation), for example.