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 - Decode v2

IO682 - Decode v2 — Decode ARINC 429 words from the Receive block

Library

Simulink® Real-Time™ - Speedgoat

Description

This block decodes the ARINC 429 protocol depending on the selected data type.

[Note]Note

The input port of a Decode block is a signal of type double. The Decode block input port width automatically adapts to that of the source block.

As the Decode block interprets the data on this port in a non-standard way, you send data to this port from the IO682 Receive block.

Ports

Inputs
ARINC 429 Message

ARINC 429 encoded message.

Outputs
Data

Vector with n decoded values.

If the same ARINC 429 word is decoded multiple times during one sample time, the Decode block overwrites these values. Consequently, only the most recent decoded value is available on the output port.

Count

Depending on the selected Mode the count indicates the amount of decoded ARINC 429 words as follows:

  • Standard — Not avilable in this mode.

  • Message Sequence — For every completely decoded message sequence the count gets increased by one. The Decode block buffers its input internally. It updates its output port data only during sample times when it has assembled at least one complete message sequence of length n without detecting an error. Otherwise count is zero. If the count element has a value greater than one, the block asserts only the most recent valid message sequence on the output port.

  • Bit Oriented — Count is increased for every successfully decoded ARINC 429 word. If syncing is used, the Decode block buffers its input internally. It updates its output port data only during sample times when syncing has completed. Otherwise data is written to the output port at the end of each sample step.

  • Custom Data Type — Not avilable in this mode.

Time Tags

Vector with the time tags of each decoded data value.

If the same ARINC 429 word is decoded multiple times during one sample time, the Decode block overwrites these values. Consequently, only the most recent decoded value is available on the output port.

Status

For every specified label the status output shows, if it was received during the current sample time.

X (Bit Position)

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

Parameters

Mode

Select one of the following operation modes:

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

  • Message Sequence — Decode a sequence of ARINC 429 words with the same label. The output port width adapts to the number of defined Data Type elements. The beginning of a sequence can be synced by using Sync Mask and Sync Value(s).

  • Bit Oriented — Decode multiple ARINC 429 words with the same label, data type and resolution. The beginning and the end of a data block can be synced by using Sync Mask and Sync Value(s). The size of the data block is limited to 256 ARINC 429 words.

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

Label

Enter a three digit octal number or vector. If the label of an input word does not match this label, the Decode block completely ignores the ARINC 429 word.

[Note]Note

The Label bit order is reversed automatically by the receive logic after the reception of the ARINC 429 word.

Data Type

Enter a scalar or vector 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 elements of the vector determine how the input value is converted to a corresponding double output value as follows:

Type

Interpretation

0

Raw — Convert the entire (unsigned) 32–bit input word to double.

1

BNR — For each word, convert bits 10–28 from signed binary format to a double output in the range [-Scale, Scale] using the Resolution (BCD) or Scale (BNR) specified for this value.

2

BCD — For each word, convert bits 10–28 from BCD format to double, using the sign data in the SSM.

3

Discretes — For each word, extract bits 10–28 and return them as a double.

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.

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 converts the binary value in bits 10–28 back to a double in the range [-1,1]. The block then multiplies that value by the scale value to recover the original value.

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 clamps it to be 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 limits it to within the range.

Discretes

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

Sync Mask

Enter a value, in hexadecimal, to specify which bits of the input words are the sync bits. The Decode block will examine these bits to look for the start or end of the next message depending on the selected mode. A message might be a series of one or more words. For example, a sync mask value of 0x300 equals 11'0000'0000 in binary. This value selects the SDI bits (bits 9 and 10) as the sync bits. This functionality works with the Sync value parameter.

If the sync mask is 0, sync logic is not used. The next word begins a new message.

Sync Value(s)

The size of this parameter specifies the sync logic for the block. If Message Sequence mode is used, enter one hex value to specify oneSync, two hex values separated by a space for twoSync logic. For example, the sync value

0x100

selects oneSync logic. The sync value

0x100 0x200

selects twoSync logic. You can enter a 32-bit value.

The sync value takes into account the value of the sync mask, as follows:

  • Assume the following:

    • Sync mask = 0x300

    • Sync value(s) = 0x100

    When looking for the beginning of a new message, the block ANDs each input word with the Sync mask value 0x300. It compares the result with 0x100 and 0x300. When it finds a match, the block stops this search and begins a new search, looking for the next message. The block decodes the next n words starting at this point.

  • Assume the following:

    • Sync mask = 0x300

    • Sync value(s) = 0x100 0x200

    When looking for the beginning of a new message, the block ANDs each input word with the Sync mask value 0x300. It compares the result to 0x100 and 0x300. When the block finds a match, it ANDs the next input word with 0x300. If the result equals 0x200 and 0x300, this second word begins a new message.

Once the block locates the beginning of a message, it uses the next n input words and the required label to assemble the next output message. The block does not use synchronization logic until it is time to begin the assembly of a new message.

If Bit Orienteed mode is selected, the first element of the Sync Value is used to find the beginning of a new data block. The second element can be used to find the end of the data block. After a data block is complete (synced), the data is written to the output port. If the second Sync Value is not used or Sync Mask is disabled, data is written to the output port at the end of each sample step.

Output Data Type

Select the type of custom data decoding 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 outputs.

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.

Provide Time Tags

Select if time tags should be provied for each decoded ARINC 429 word.

Hold last Value

In case no new data is received, the output can hold the last value or output 0, if checkbox is deselected.

Enable Status Output

Select if the status should be provied for each specified label.