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.

Arinc 429 DIL Driver

This driver implements the most common features of the Arinc 429 protocol based on PCI-400 Max Technology carrier boards and Max Technology IPM-429 modules.

What is the Arinc 429 Protocol?

Arinc 429 (also referred to as Mark 33 Digital Information Transfer System) is the most commonly used databus for commercial and transport aircraft. This specification defines the medium and data protocol used for communication between avionics equipment and systems. Arinc 429 uses a twisted, shielded pair of wires as its medium. The data flow is unidirectional in a peer to peer fashion, although up to 20 receivers can be connected on the same line. The specification also defines in details the voltage levels (differential signalling), words size and transfer rate. Messages are transmitted at a bit rate of either 12.5 or 100 kilobits per second to the receiving systems.

Arinc 429 data words are typically 32 bits and use the format shown below, which includes five primary fields, namely Parity, SSM, Data, SDI, and Label. The ARINC specification numbers the bits from 1 (LSB) to 32 (MSB). Sometimes data words have 25 bits which include 8 bits label, 16 data bits, and one parity bit.

Glossary

NameDescription
DILData Interchange Layer (It is the RT-LAB data-exchanger framework.)
BNRBinary Number Representation encoding mode
BCDBinary Coded Digits encoding mode
DISDiscrete encoding mode
SDISource/Destination Identifier
SSMSign/Status Matrix
LSBLeast Significant Bit
MSBMost Significant Bit

Supported Features

CategoryFeature
TransmissionScheduled Mode (scheduling the send time and update interval of each message) / Asynchronous Mode (Send messages upon request)

Field Detailed Mode (ability to set the fields of data words independently) / Raw Data Mode (sending the Arinc 429 word as it is)

Arinc 429 encoders for converting engineering values to raw data fields (i.e. BNR, BCD, and DIS)

Up to 8 transmission channels per IPM-429 module (For each Arinc.config file one channel can be used)

Supports MAX_PCI_400_2 and MAX_PCI_400_4 Max Technology boards

12.5 Kbps (low) and 100 Kbps (high) speed

Even / Odd parity

Ability to change the inter-word gap (from 0 to 15.75 bits time)

Ability to change field values in real-time

32 words per channel per minor frame (this is the size of FIFO buffer on the carrier board)
ReceptionLabel and SDI filters on the receiving side

Up to 8 reception channels per IPM-429 module (For each Arinc.config file one channel can be used)

Channel Mute option

Arinc 429 decoders for converting raw data fields to engineering values (i.e. BNR, BCD, and DIS)

Internal Loopback option

Configuring the Driver through the .config File

In the .config file, the configuration of the Arinc 429 driver as well as the specifications of each Arinc 429 word is determined for one transmission channel and one reception channel. The model should be accompanied by this file in RT-LAB when loading it. Therefore, the correct file has to be added in the model's File list window in RT-LAB as shown below in order to load the model successfully:

A simple example of .config file is given below:

opal-1.0 object
ARINC::Settings {
  ArincConf {
    channel_mute=1
    label_filter=1
    sdi_filter=1
    tx_data_format=1
    rx_data_format=1
    rx_channel=1
    tx_channel=1
    speed=1
    loopback=1
    parity=0
    parity_mode=1
    word_size=32 
    send_type=1
    interword_gap=0
    gap_selection=1
    pci_index=0
    board_type=0
    slot_id=1
    displayOnOrder=1
    encoding=0
    latched=0
    minorFrame=0
  }
  ios{
    inputs{
      ARINC::ArincPinIn{
        name=in1
        offset=0
        updateInterval=150
        startFrame=0
        label=50
        sdi=0
        labelFormat=1
        encoder{
          Arinc::arincEncoder{
            lsb=11
            msb=28
            resolution=0.100000
            min=-2000.000000
            max=12000.000000
            coding=0
            digits=0
          }
        }
      }
      ARINC::ArincPinIn{
        name=in2
        offset=1
        updateInterval=300
        startFrame=150
        label=60
        sdi=2
        labelFormat=1
        encoder{
          Arinc::arincEncoder{
            lsb=11
            msb=28
            resolution=0.005000
            min=0.000000
            max=100.000000
            coding=0
            digits=0
          }
      }	  
    }
    outputs{
      ARINC::ArincPinOut{
        name=out1
        label=51
        sdi=0
        labelFormat=1	
        decoder{
          Arinc::arincDecoder{
            lsb=11
            msb=28
            resolution=0.005000
            min=0.000000
            max=100.000000
            coding=0
            digits=0
          }
        }		
      }
      ARINC::ArincPinOut{
        name=out2
        label=61
        sdi=1
        labelFormat=1	
        decoder{
          Arinc::arincDecoder{
            lsb=11
            msb=28
            resolution=0.005000
            min=0.000000
            max=100.000000
            coding=0
            digits=0
          }
        }		
      }	  
    }
  }
}


The above-mentioned .config file can be used to send two 32 bits Arinc 429 words with labels 50 and 60 and SDIs 0 and 2 in Field-Detailed, Scheduled mode on channel one. On the receiving side, the driver awaits two 32 bits Arinc 429 words with labels 51 (sdi 0) and 61 (sdi 1).



Warning: Please note that the DIL parser is currently quite sensitive and does not accept blank lines or comments. Also, it might seem like it is not that easy to correctly write the .config file since it consists mostly of digital values and not words, which would be more user-friendly. However, the .config file does not have to be written manually, as highlighted in the following section.



CreateArinc.m Script File

To ease the creation of the .config file, the driver comes with a Matlab script that takes as input a Microsoft Excel datasheet. The script can be run from the Matlab command prompt by using the following command: CreateArinc('yourdata.xlsx') where yourdata.xlsx is to be replaced by the path and name of your data file (keep the single quotes). When execution is completed, the script outputs the .config file as Arinc.config and it also outputs the connections.opal file (see the Connections section for the second file). The easiest way to write your own Excel data file is to start from one of the data files that come with the example models of this driver.

The data file, unlike the .config file, can hold text instead of digital values. This makes the configuration of the driver much easier and less error-prone. The script replaces all enable, enabled, true, yes, high, in, scheduled and even by the digital value 1. So you can either use one of these keywords or simply use number 1. Similarly, the script replaces disable, disabled, false, no, low, request, out and odd by 0. So you can either use one of these keywords or simply use number 0.

The data file can be divided into two sections: a list of global parameters for the driver and details about each data words (transmitting or receiving). The global parameters can be given in any order (one per line), but if one of them is missing, Matlab will pop an error message. The following table gives a list of all the global parameters that has to be provided to the CreateArinc script:

ParameterDescriptionAccepted Values
Channel MuteWhen enabled, the driver processes the "out_chMute" input signal.disabled / enabled
Label FilterWhen enabled, the driver processes the "out_labelFilter" input signal.disabled / enabled
SDI FilterWhen enabled, the driver processes the "out_sdiFilter" input signal.disabled / enabled
TX Data FormatWhen enabled, the driver treats the Arinc 429 words by their fields in the transmission side. This means that the driver will expect to receive the "out_ssm" input signal (if 32 bits words is selected) and also will use the SDI and Label fields given in the .config file. Otherwise, the driver treats the values of the "out_data" input signal as raw Arinc words.disabled / enabled
RX Data FormatWhen enabled, the driver treats the Arinc 429 words by their fields in the reception side. In other words, the driver decomposes the Arinc 429 words in the usual fields (Data, SSM, SDI and Label) and sends them back to the simulation model using "in_data","in_label", "in_sdi", and "in_ssm" (the last two fields are used for 32 bits words case only). Otherwise, the driver treats the received words as raw data, which is transferred to the simulation model in the "in_data" signal (without any field decomposition).disabled / enabled
RX ChannelThis parameter indicates the channel number that will be used for Arinc words reception.0 - 7
TX ChannelThis parameter indicates the channel number that will be used for Arinc words transmission.0 - 7
SpeedIf set high, the driver transmits data at a 100 kbps rate. If set low, the speed is reduced to 12.5 kbps.low / high
LoopbackIf set, the internal loopback of the board is activated. This is useful for testing a simulation model without actual hardware connected to the board.disabled / enabled
ParityIf set, the Parity Mode parameter is used to compute the correct value of the parity bit of each transmitting word.no / yes
Parity ModeOnly used when the Parity parameter is activated. This parameter defines which parity value is used for the parity bit.odd / even
Word SizeIf 25 is selected, the Arinc 429 words are 25 bits long, otherwise they are 32 bits long.25 / 32
Send TypeWhen set to scheduled, the scheduled mode of the driver is activated. In scheduled mode, we schedule the transmission time of each Arinc 429 word using an update interval and an offset. On the other hand, if the Send Type is set to request, then the Arinc 429 words are sent once per simulation time step and only if the transmission is requested using the "out_sendSignal" input signal.request / scheduled
Interword GapIf set, the interword gap can be changed through the value given in the Gap Selection parameter, otherwise the default gap size (4 bits time) is used.no / yes
Gap SelectionIf the Interword Gap parameter is activated, this parameter gives the interword gap size. The interword gap size parameter must be given in bit time with the resolution of a quarter of a bit. For example, 3.25 is ok, but not 3.40.0 - 15.75
PCI IndexThis parameter is used to distinguish between multiple MAX Technologies A429 Carriers. Valid values range from 0 (default) to 15, meaning that a maximum number of 16 Arinc 429 carrier boards are supported.0 - 15
Board TypeThis parameter defines the carrier type used in the simulator. A value of 0 corresponds to the MAX-PCI-400-4 carrier (4 slots). A value of 1 corresponds to the MAX_PCI_400_2 (2 slots).0 / 1
Slot IDThis parameter is used to distinguish between multiple IP modules installed on the same carrier board. Possible values are from 0 to 3 for the 4 IP modules carrier and 0 or 1 for the 2 IP modules carrier.0 - 3
Display On OrderIf set, the received Arinc 429 words are displayed in the output of the driver in a order determined by the Label and SDI fields of the data section (works only if 32 bits word size is selected). In other word, using this option, an Arinc 429 word with a specific Label and SDI fields would be displayed in the "in_data" array signal at an index corresponding to the position of the label in the .config file (and Excel data file).no / yes
EncodingThis option is meaningful only when TX Data Format and RX Data Format parameters are activated. When selected, data encoding and decoding is processed by the driver. The data file must then provide, inside the data section and for each word, the following data columns: Encoding, LSB, MSB, Min, Max and Resolution. Optionally the Digits column can be provided as well (used only for BCD encoding).no / yes
LatchedIf this option is set, the driver uses a latch mechanism on the data. In other words, the various data fields for a given word will not change to zero in the case that word was not received by the carrier board. This option is especially helpful when the update rate is very fast and we cannot track the changes easily.no / yes
Automatic Start FrameThis parameter is meaningful only when the Send Type is scheduled. When activated, the CreateArinc script computes a valid Start Frame parameter for each data word. In this case, filling the Start Frame column is not required (although the column itself must be present).no / yes
Automatic OffsetThis parameter is meaningful only when the Send Type is scheduled. Its functionality is not implemented yet, but the parameter itself must appear in the data file nonetheless. This parameter should remain deactivated at this moment. If activated, all data word will have a value of 0 in the Offset column. The offset of each label must be specified manually.no / yes
Minor FrameThis parameter is meaningful only when Send Type is scheduled. If its value is zero, then the minor frame is computed using the greatest common divisor of Update Intervals of all the data words. If its value is not zero, then the given value, in milliseconds, represents the duration of a minor frame and this duration must be either equal to the greatest common divisor, or be itself a divisor of the greatest common divisor.0 - 4294967295

The second section of the data file is to specify the details of each data word. The data words must be placed between the "Data{" and "Data}" lines. The line that follows "Data{" must contain the header of each data column. The columns can be in any order, but there must be no empty column between two valid columns. The headers are listed and described in the following table:

ParameterDescriptionAccepted Values
LabelContains the label field of the Arinc 429 word.0 - 255 (decimal format)
0 - 377 (octal format)
EncodingContains the encoding scheme of the Arinc 429 word.0 = BNR
1 = BCD
2 = DIS
LSBIndicates the position of the LSB within the data field.9 - 29
MSBIndicates the position of the MSB within the data field.9 - 29
MaxGives the maximum value the data field can hold. Even if a greater value is passed to the driver when transmitting some data, the data gets truncated to that value.-
MinGives the minimum value the data field can hold. Even if a lower value is passed to the driver when transmitting some data, the data gets truncated to that value.-
SDIProcessed only if TX Data Format and RX Data Format parameters are set and the Word Size is 32 bits. It contains the SDI field of Arinc 429 words.0 - 3
Update IntervalProcessed only if the Send Type is scheduled. It indicates the time interval in milliseconds between two transmissions of this data word. The value must be greater than or equal to the model time step.-
Start FrameProcessed only if Send Type is scheduled. It indicates at which minor frame the Arinc 429 word must be transmitted. This parameter is given in milliseconds and must be a multiple of the minor frame period.-
OffsetProcessed only if Send Type is scheduled. It indicates the time in milliseconds within the minor frame when the driver begins transmission. It must be less than the minor frame period duration.-
ResolutionIndicates the resolution factor used by the BNR and BCD encoding schemes to process the data field. The resolution represents the weight of the LSB in the data field.-
DirectionIndicates the direction of the defined data word. It is given form the point of view of the driver, which means that in is actually an output from the simulator to the connected hardware device. Conversely, out is an input from the connected hardware device to the simulator.in / out
DigitsOptional and it is used to specify the number of digits to encode when BCD encoding is used. The script double-checks that the number of digits specified match with the Min, Max and Resolution parameters. In any case, the limit is 5 digits on 19 bits (the size of the data field when 32 bits words size is used).0 - 5
Label FormatOptional and it is processed only if TX Data Format and RX Data Format parameters are set. If its value is 1 (default value), then the numbers given in the Label column are in octal format. If its value is 0, then the Label format is decimal.0 / 1

Minor/Major Frames Definition

In scheduled mode, we specify for each transmitting word three parameters for scheduling the Arinc 429 messages. These parameters are Update Interval, Offset and Start Frame. All values are in milliseconds. The minor and major frames are constructed using these parameters as well as the Minor Frame global parameter if specified by the user. If the minor frame period is not given, then it is computed using the greatest common divisor of all update intervals. The major frame is a concatenation of minor frames and represents the overall cycle of transmission. Its duration is equal to the least common multiple of the update intervals.

The Start Frame parameter determines the start “time” that a message is going to be sent inside a major frame. This “time” must be a multiple of the minor frame period. In other words, it indicates the index of the minor frame containing the message within a major frame. The Offset parameter represents the corresponding sending time offset of a message within a minor frame and it must be less than the period of the minor frame. A schematic of minor/major frame example is given below:



Warning: While using Arinc 429 in Scheduled mode, make sure that in this mode:

  • The number of messages being sent at each minor frame per channel is no more than 32 words. This limit corresponds to the size of the transmission and reception FIFO buffer. If more than 32 words are scheduled within a single minor frame, the driver raises an error. This limit will also be flagged by the CreateArinc script.
  • The model time step should be about the same as one minor frame period. This way we avoid unnecessarily updating the model state and hence decrease the load of data acquisition system that transfer data between the host running the SC_Console subsystem and the target simulator running the real-time simulation.
  • The number of words sent per channel per minor frame must fit with the speed of the data bus. For instance, with the (high) speed of 100 kbps each Arinc 429 word takes about 0.332 ms (plus the interword gap). If one wants to transmit N words per minor frame, the minor frame period should be at least (N*0.332). Using 12.5 kbps (low) speed, each word takes about 2.812 ms to be transferred.



Connections in a .opal File

The Arinc 429 driver takes advantage of the new DIL framework. To bind Simulink signals (represented as OpInput and OpOutput blocks) to driver signals, we must define the connections in a text file named connections.opal and transfer this file with the model when loading (graphical editor will be available in a later release of RT-LAB). Below is an example of a connections.opal file:


OPAL-1.0 Object
List {
  item {
    id {
      ARINC
      Arinc.config
    }
    inputs {
      item {
        dataInExchanger=in_data[0:1]
        dataInProcess=OpInput:in_data[0:1]
        modifier=
      }
      item {
        dataInExchanger=in_label[0:1]
        dataInProcess=OpInput:in_label[0:1]
        modifier=
      }
      item {
        dataInExchanger=in_sdi[0:1]
        dataInProcess=OpInput:in_sdi[0:1]
        modifier=
      }
      item {
        dataInExchanger=in_ssm[0:1]
        dataInProcess=OpInput:in_ssm[0:1]
        modifier=
      }
      item {
        dataInExchanger=in_timeStamp[0:1]
        dataInProcess=OpInput:in_timeStamp[0:1]
        modifier=
      }		  
      item {
        dataInExchanger=in_error[0]
        dataInProcess=OpInput:in_error[0]
        modifier=
      }
    }
    outputs {
      item {
        dataInExchanger=out_chMute[0]
        dataInProcess=OpOutput:out_chMute[0]
        modifier=
      }
      item {
        dataInExchanger=out_labelFilter[0:255]
        dataInProcess=OpOutput:out_labelFilter[0:255]
        modifier=
      }
      item {
        dataInExchanger=out_sdiFilter[0:3]
        dataInProcess=OpOutput:out_sdiFilter[0:3]
        modifier=
      }
      item {
        dataInExchanger=out_data[0:1]
        dataInProcess=OpOutput:out_data[0:1]
        modifier=
      }
      item {
        dataInExchanger=out_ssm[0:1]
        dataInProcess=OpOutput:out_ssm[0:1]
        modifier=
      }
    }
  }
}


Warning: Note that the DIL parser is currently sensitive and does not accept blank lines or comments.



The connections.opal file presented above matches the Arinc.config file is shown before (2 data words in each direction). As for the .config file, the connections.opal file is generated from the Excel data file and CreateArinc Matlab script. It does not have to be written down manually. The same sets of global parameters and data columns are used to populate the connections.opal file as required. The description of each connection is as follows:

ConnectionDescription
inputs/in_dataThe data received by the driver is sent to this connection. The signal "in_data" is an array of size equal to the number of messages.
inputs/in_labelIf RX Data Format is set, this connection contains the label field of Arinc 429 messages. The signal "in_label" is an array of size equal to the number of messages.
inputs/in_sdiIf RX Data Format is set and Word Size is 32 bit, this connection contains the SDI field of Arinc 429 messages. The signal "in_sdi" is an array of size equal to the number of messages.
inputs/in_ssmIf RX Data Format is set and Word Size is 32 bit, this connection contains the SSM field of Arinc 429 messages. The signal "in_ssm" is an array of size equal to the number of messages.
inputs/in_timeStampThis connection contains the reception time of Arinc 429 messages. The signal "in_timeStamp" is an array of size equal to the number of messages.
inputs/in_error

This connection of size one contains an error code returned by the driver. The error code values are:

  • 0: no error
  • -1: not all messages are received because driver is in scheduled mode
  • 1: channel mute
  • 2: some messages have filtered SDIs
  • 3: some messages have filtered Labels
  • 4: parity is wrong
outputs/out_chMuteThis connection of size one contains a signal that activates channel muting. If this signal is not zero, the channel is muted.
outputs/out_labelFilterThis connection of size 256 contains the list of all accepted labels (in decimal format only). If one would like to mute a specific label, that label number should be replaced by "-1" in the "out_labelFilter" array. For example, to mute the label 10 only, the array must be [0 1 2 ... 8 9 -1 11 12 13 ... 253 254 255].
outputs/out_sdiFilterIf the Word Size parameter is 32, this connection of size 4 contains the list of all accepted SDIs. If one would like to mute a specific SDI, that SDI should be replaced by "-1" in the "out_sdiFilter" array. For example, to mute SDI 2, the array must be [0 1 -1 3].
outputs/out_dataData is sent to the driver through this connection. The signal "out_data" is an array of size equal to the number of messages to transmit.
outputs/out_ssmIf TX Data Format is set and Word Size is 32, this connection holds the SSM field of transmitting Arinc 429 messages. The signal "out_ssm" is an array of size equal to the number of Arinc 429 messages.
outputs/out_sendSignalIf Send Type is set to Request, this connection passes the user transmission request to the driver. In other words, the transmission and reception of messages will start once this signal is not zero.

The Simulink Model

For the above example of Arinc.config and connections.opal, the Simulink model master subsystem would look like the following:



Warning: Note that the default values of input connections should be determined in the mask of each OpInput block. This can be done simply by inserting the value of ones(1,n), where "n" matches the size of that connection (as indicated in the connections.opal file).



Making a Simulation Model with More than 1 TX and/or More than 1 RX Channel

In the case that one wants to use more than 1 TX or RX channel, then more than one Arinc.config file must be transferred to the target computer. The user shall define one Excel data file per TX/RX pair. Moreover, the global parameters, like the bus speed, must fit both TX and RX. If this is not the case, then the TX and RX channels must be split into two Arinc.config files. This is currently a limitation of the driver.

Once all the Excel data files are written, the CreateArinc script can be called on each of them successively. The script will automatically copy the output files and append a "_#", where # is a number, to the file names. For the .config files, those can be used as is in the simulation (remember to correctly fill the "Files" tab in RT-LAB). However, for the connections.opal files, the set of generated files must be merged manually into a single connections.opal file. This is because the DIL can only take one connections.opal file within a simulation execution.








OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter