Target Language Compiler    

Signal Connections

The example shows a model and its corresponding BlockOuptuts record and the way SignalSrc and SignalOffset with Block records is used to access signals.

The relevant BlockOuptuts and Block records in the model.rtw file and the way the signal feeding the Scope block is accessed are shown below.

To access the block I/O signal feeding the Scope block, we use its DataInputPort records SignalSrc and SignalOffset. SignalSrc B2@4 refers to the BlockOutput index `2' and width of 4. BlockOutputs.BlockOutput[2]. Using SignalOffset[i], i going from 0 to 3, we access the 2nd to 5th element in the 10 element vector from Gain2.(rtB.Gain2[1] to rtB.Gain2[4]).

Prior to TLC version 4.1, this was done using SignalSrc[B11:B14] and this will map throughout the BlockOutputsMap to the absolute offset in the BlockOutput record.


  Block I/O Information Using BlockOutput[i].SigSrc