Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

OpFcn SPI Send




The OpFcn SPI Send transmits data on a SPI link.

At each calculation step, this block takes the specified values on its inputs and places them into the transmission FIFO of an SPI port. The user selects the data size in bits.


Controller NameEach functionality block such as the OpFcnSPISend block must refer to an SPI controller block that will manage the data transfer with the bitstream generated with SPI. The binding between OpFcn and OpCtrl blocks is performed via the use of the Controller name that each OpCtrl block uniquely defines. This binding is checked during the initialization phase of the model. If no OpCtrl block is found that defines the same Controller Name as this OpFcnSPISend block, the OpFcnSPISend block is simply disabled and returns 0s.
Function NumberCurrently unused.
Data sizeSpecifies the size in bits of the transmitted data. Must be an integer ranging from 1 to 32.
Maximum data countSpecifies the maximum number of values that can be transmitted at each calculation step. This value will determine the width of the Tx Data input.


Tx CountNumber of data units produced on the data outport. Possible values range from0 to Maximum data count. This count will be saturated internally if the FIFO does not have enough space to accommodate all values.
Tx DataData to be transmitted. The width of this output is determined by the Maximum data count parameter. Each signal corresponds value to Data size bits converted back into a floating point numerical value.


Tx FIFO levelProduces the FIFO level after the insertion of data by this block.
StatusA negative value indicates an error occurred. The most likely error is a FIFO overrun.

Characteristics and Limitations

This block has no special characteristics.

Direct FeedthroughNo
Discrete sample timeYes
XHP supportYes
Work offlineNo

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | | +1 514-935-2323