Documentation

Condor Decode ARINC 429 Words from Receive

Decode ARINC 429 Words from Receive block

Library

Simulink® Real-Time™ Library for Arinc-429

Note

The input port of a Decode block is a signal of type double. Because the Decode block interprets the data on this port in a nonstandard way, you can send the data to this port from one of the following:

The output port of a Decode block is in standard double format.

The input to this block should be a CEI-520A, RCEI-530, or CEI-830 Receive block. The Decode block input port width will automatically adapt to that of the source block.

Block Parameters

Label

Enter a three digit octal number. If the label of an input word does not match this label, the block completely ignores the word and does not apply the Sync mask and Sync value parameters.

Data type vector

Enter a vector consisting of values between 0 and 3. These values specify the data type. The length of this vector determines how many ARINC words the block will attempt to decode and output each sample time.

The elements of the vector determine how the input double 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) vector scale factor 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.

The elements of the data type vector determine how the input ARINC value is converted to a corresponding double output. The following describes how this block performs the conversion. For the purposes of this description, n denotes the length of the data type vector.

  • The output width is one of the following, depending on your time tag selection

    • 2n + 1 — This is the output width if you select the Provide time tags check box. The width consists of a count element, followed by n data elements, followed by n time tag elements.

    • n + 1 — This is the output width if you do not select the Provide time tags check box. The width consists of a count element followed by n data elements.

    The count element indicates how many valid messages the block has decoded during the current sample time. The count element has a nonzero value if at least one message on the data element is currently valid, and zero otherwise. If the count element has a value greater than one, the block asserts only the most recent valid message on the output port.

  • The Decode block buffers its input internally. It updates its output port only during sample times when it has assembled at least one complete message of length n without detecting an error.

    More than one complete message might be assembled during one sample time. The Decode block overwrites these messages such that only the most recent message is on the output port.

Resolution (BCD) or Scale (BNR) vector

Enter a vector or scalar value as the resolution vector. This value must be a vector of the same length as the data type vector. 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 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 .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 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. (A sync bit lets you specify, using other parameters, when a message should begin.) The Decode block will examine these bits to look for the start of the next message. A message might be a string of one or more words. For example, a sync mask value of 0x300 equals 1100000000 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 0x0, sync logic is not used. The next word begins a new message.

Sync value(s)

This parameter specifies the sync logic for the block. 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 an 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 = 0x100

    When looking for the beginning of a new message, the block ANDs each input word with the sync mask 0x300 and 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 = 0x100 0x200

    When looking for the beginning of a new message, the block ANDs each input word with 0x300 and compares the result to 0x100 and 0x300. When the block finds a match, and when the next input word, when ANDed with 0x300, 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 sync logic until it is time to begin the assembly of a new message.

Provide time tags

Select this check box to enable an output port of width 2n + 1, with time tag data in the last n elements.

Was this topic helpful?