| xPC Target | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
Decode ARINC 429 Words from Receive block
xPC Target Library for Arinc-429
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:
Condor CEI-520A Receive block — The Condor CEI-520A Receive block outputs its data into standard double output. This is the block from which you will most likely send data to the ARINC Decode block.
ARINC Encode block — The output port of an Encode block is a signal of type double.
The output port of a Decode block is in standard double format.
The input to this block should be a CEI-x20 Receive block. The Decode block input port width will automatically adapt to that of the source block. The connected width of the input port of the block adjusts to the block it is connected to.
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.
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 double. |
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 a 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 successfully assembled at least one complete message of length n.
Note that more than one complete message might be assembled during one sample time. The Decode block successively overwrites these messages such that only the most recent message is on the output port.
Enter a vector or scalar value as the resolution vector. This 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 block works with the data types as follows
Type | Effect |
|---|---|
Raw | The block ignores any resolution value. However, you must still include an associated value in the resolution vector. |
BNR, BCD | The resolution value specifies, in output port units, the value of the least significant bit of the data field. For example, if the resolution is 10 and the input data contains the value 100, the output signal will contain the number 1000. |
Discretes | The block ignores any resolution value. However, you must still include an associated value in the resolution vector. |
Enter a value, in hexadecimal, to specify which bits (if any) 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 in conjunction with the Sync value parameter.
If the sync mask is 0x0, no sync logic is used. In this case, the next word always begins a new message.
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 with the appropriate 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.
Select this check box to enable an output port of width 2n + 1, with time tag data in the last n elements.
| Condor Encode ARINC 429 Words for Send | MIL-STD-1553 Support | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments