Documentation search search close
CONTENTS
https://www.speedgoat.com/help/slrt/page/icon_documentation.jpg
v10.0.1.x for R2026a
View other versions

IO682 - Encode v2

IO682 - Encode v2 — Encode ARINC 429 words for the Send block

Library

Simulink® Real-Time™ - Speedgoat

Description

This block encodes the input values in the ARINC 429 protocol.

[Note]Note

The output port of an Encode block is a signal of type double. As, the encode block encodes the data on this port in a non-standard way, you must send this data to one of the following:

  • ARINC 429 Send block — The ARINC Send block accepts data as a double

  • Simulink Mux block — The Mux block does not interpret the data. After the Mux block, you can send it to the ARINC Send block

Ports

Inputs
Data

A single value or a vector that should be encoded.

X (Bit Position)

If custom data type mode and input data type discrete is selected, one input per selected bit is avilable.

Outputs
ARINC 429 Message

ARINC 429 encoded message.

Parameters

Mode

Select one of the following operation modes:

  • Standard — Allows to encode multiple labels. The input port width adapts to the number of defined Label elements.

  • Message Sequence — Encode a sequence of ARINC 429 words with the same label. The input port width adapts to the number of defined Data Type elements.

  • Bit Oriented — Encode multiple ARINC 429 words with the same label, data type, resolution, bits, SDI and SSM values. The input port width automatically adapts to that of the source block. Input port width is limited to 256 values.

  • Custom Data Type — Allows to encode custom data types.

Label

Enter a three digit octal number or vector as the label. The label field of each ARINC word sent over the output port will contain this values except Raw is selected as Data Type.

[Note]Note

The Label bit order is reversed automatically by the transmit logic prior to the transmission for all Data Type options.

Data Type

Enter a vector or scalar consisting of values between 0 and 3. These values specify the data type. If a scalar value is applied in standard mode, it uses the same value for all defined labels.

The data type determines how the input double value is converted to a corresponding ARINC value as follows:

Type

Interpretation

0

Raw — Cast the input to an unsigned 32-bit integer and output it as an ARINC word without further processing.

1

BNR (two's complement binary notation) — Scale the input by dividing it by the scale vector in the Resolution (BCD) or Scale (BNR) parameter. This input value is restricted to the range [-Scale, Scale], resulting in a scaled value in the range [-1, 1].

The block performs the following on the scaled value:

  1. Multiplies the scaled value by 2^18.

  2. Truncates the value to a 19-bit fixed-point integer, then masks it to the number of high-order bits specified by the Bits to Send parameter.

  3. Shifts the result up 10 bits and inserts it into the 32-bit integer along with the SSM, SDI, and Label parameter values.

To place discrete bits into unused positions, construct the 32-bit word and use it with RAW mode instead of the BNR mode.

2

BCD (binary coded decimal) — Cast the input as a signed integer, limit it to the range representable by an ARINC five-character BCD value, and pack it into an ARINC word. Set the required SSM, SDI, and Label parameter values.

3

Discretes — Cast the input as an unsigned 32-bit integer, pack the low order 19 bits of the result into an ARINC word, and set the required SSM, SDI and Label parameters.

Resolution (BCD) or Scale (BNR)

Enter a vector or scalar value as the resolution vector. This value must be a vector of the same length as the Data Type. Otherwise, the scalar value is applied to the length of the Data Type vector.

The interpretation of this value depends on the data type. The block works with the data types as follows:

Type

Effect

Raw

The block ignores the resolution value. However, you must still include an associated value in the resolution vector.

BNR

The block uses this value as a scale factor. The block divides the input value by the scale. Doing so limits the valid input range to [-Scale, Scale]. Values outside this range will be limited to ±Scale.

A 19-bit signed ARINC binary can represent a range from -262,144 to 262,143. If the combination of input signal and resolution produces a value outside this range, the block keeps it within the range.

BCD

The resolution vector specifies, in the same units as the input signal, the value of the least significant digit of the BCD data field to be encoded and sent. For example, if the associated resolution is 0.01 and the input signal contains the value 3.1415, the output ARINC word will contain the number 314 in its data field, encoded in BCD. Use the same resolution on the receive side to reconstruct 3.14. Resolution is typically a power of 10, but this is not a restriction.

The range representable as an ARINC BCD value is -79,999 to 79,999. If the combination of input signal and resolution produces a value outside this range, the block keeps it within the range.

Discretes

The block ignores the resolution value. However, you must still include an associated value in the resolution vector.

Bits to Send (BNR)

Specifies the number of high order bits of the 19-bit scaled input to keep when the value is inserted into the encoded word. The block uses this value for a BNR format input; other formats ignore it. You must include a place in the Bits to Send parameter for each entry in the Data Type vector; however, the block only uses the value for BNR.

SDI

Enter a vector or scalar value as the SDI data. This must be a vector of the same length as the Data Type. Otherwise, the scalar value is applied to the length of the Data Type vector.

Depending on the Data Type this block interprets the SDI values as follows:

Type

Effect

Raw

The block ignores the SDI value. However, you must still include an associated value in the resolution vector.

BNR, BCD, Discretes

If the SDI element is in the range 0 to 3, the block sets the SDI field of the corresponding output word to that value. If an SDI element has a value of -1, the block does not perform SDI processing on the corresponding output word.

SSM

Enter a vector or scalar value as the SSM data. This vector must be the same length as the Data Type. Otherwise, the scalar value is applied to the length of the Data Type vector.

Depending on the Data Type this block interprets the SSM values as follows:

Type

Effect

Raw

The block ignores the SSM value. However, you must still include an associated value in the resolution vector.

BNR, BCD, Discretes

If the SSM element is in the range 0 to 3, the block sets the SSM field of the corresponding output word to that value. If an SSM element has a value of -1, the block does not perform SSM processing on the corresponding output word.

Input Data Type

Select the type of custom data encoding for the ARINC 429 word. Available types:

  • Raw

  • Discrete

  • BNR

  • Float

Data LSB

Specifiy the LSB bit of your data within the ARINC 429 word.

Data MSB

Specifiy the MSB bit of your data within the ARINC 429 word.

Bit Position

Select which bits of the ARINC 429 word are used as inputs.

Scale

Specify the scale factor for BNR data.

Bits Exponent

Specify the amount of bits for the exponent of your floating-point data.

Bits Mantissa

Specify the amount of bits for the mantissa of your floating-point data.

Enable SSM Input

Select whether the SSM input should be active.