IO134 Usage Notes
IO134 Usage Notes — Usage information about the
If DMA is enabled for analog input, then the model or the asynchronous subsystem
where the module is located must be triggered by the module's interrupt.
This is required so that the sample hits of the blocks are synchronous to the
module's DMA engine.
In DMA mode, the model must contain an
Interrupt Setup block that triggers a subsystem or the model. Refer to the block
documentation for more information.
For MATLAB releases prior to R2020b, please refer to the interrupt settings
described in the MathWorks web documentation.
The frame trigger starts the conversion of analog input data over DMA. The
advantage of operating with the frame trigger is that the data frame can be smaller
than the trigger signal.
Example: Input frames are the same size as the frame
In this example, the analog input frames have the same size as the frame trigger.
If the analog input frame size is 100 samples/channel, then the frame trigger clock
divider must be 100. This results in a frame trigger with 100 conversions/trigger.
With these settings, the IO134 module performs the analog conversions at an interval
defined with the chosen conversion clock.
The overall behavior is the same as if the frame trigger had been disabled.
Example: Input frames are smaller than the frame
In this example, the analog input frames are smaller than the frame trigger. The
analog input frame size could, for example, be 40 samples/channel and the frame
trigger clock divider could be 100. The result is a configuration where the system
starts converting the analog input samples after a frame trigger. After 40 samples,
the analog input frame is full, the ADC conversions are stopped and the data frame
is transferred over DMA to the model in Simulink. During the other 60 conversion
clocks, the module will not perform anymore conversions. The whole cycle will start
again after the next frame trigger.
Inter-module synchronization setup
With the help of inter-module synchronization, the IO132-IO135 range of modules
allows for DMA usage of more than one module. Some of the possible use cases are
To use inter-module synchronization, the conversion signals must meet certain
timing and voltage requirements. The requirements are listed below. Note that when
inter-module synchronization is used with a module from the IO132-IO135 range, these
requirements are taken care of automatically.
The conversion clock signal is an active-high pulse signal that determines the
basic frequency of data output or acquisition of the modules.
The frame trigger signal is a divider of the conversion clock signal. It indicates
the time when the DMA shifts the data in the desired direction. The first falling
edge of the frame trigger also makes up the starting interrupt signal of the
Conversion signal requirements
When using inter-module synchronization in Front I/O mode, Connect all the
concerned modules' DIO 1, DIO 3 and DIO 5 lines. In a case where only one
conversion clock is used, the other conversion clock line can be omitted.
The respective DIO line cannot be used for its original purpose, however.
If all dedicated modules shall be connected via Rear I/O connection, the
DIO ports can all be used for their intended purpose. If you wish to upgrade
your system to support Rear I/O configuration, please contact speedgoat to
check whether your system supports Rear I/O Configuration
Initiator and Target modules in the same real-time
When both initiator module and target module(s) are installed in the same
machine, Inter-module synchronization must be activated to use DMA on all
Initiator and Target modules in separate real-time
Another use case for Inter-module synchronization is the synchronous start
of several real-time target machines. For this purpose, we need to set the
concerned module on every target machine as model trigger. (works also with
triggered subsystems). We then need to start the real-time target machine
containing the target module first. The application will go to the “running”
state, but without the model execution time starting. This only happens when
the machine gets the Frame Trigger signal from the real-time target machine
containing the initiator module. All connected modules will then start to
sample and output synchronously, on different machines.
PWM Signal from an external source or a Speedgoat
configurable I/O module as synchronization signal
If the aforementioned conversion signal requirements are met, an external
source or another module present inside or outside the dedicated real-time
target machine can be used to trigger the IO132-IO135 modules set to target
mode. Note that the exact bus/slot number has to be specified at every
instance to use the IO132-IO135 as interrupt trigger of your model or