Documentation Home Page RT-XSG Toolbox Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Creating CONF File for an RT-XSG Design

An RT-XSG model can be accessed with application-specific RT-LAB blocks from the OPAL-RT I/O library.

These blocks perform all the required data scaling and packaging to control the different analog and digital interface blocks in the RT-XSG model. The CONF file is a text-based file giving the I/O type, count and location related to each DataIn and DataOut port accessed by the RT-LAB blocks (the figure below presents a sample file). The CONF file must be supplied to the RT-LAB model along with the FPGA configuration file (BIN file), with the same file name except for the extension.

Example of a CONF File

When is a CONF File Required?

The CONF file is required only if the developer wants to access the signals using the application-specific blocks from the OPAL-RT I/O library. It is not required if the signals are interfaced through the lower-level DataIN Send and DataOUT Recv blocks, for which data scaling and packaging are designed manually by the developer.

Supported Reconfigurable Hardware


The use of application-specific OPAL-RT I/O blocks through a CONF file is compatible with all FPGAs supported by RT-XSG.

Analog and Digital Signal Types Supported in the CONF File

The signal types described below can be referenced by the CONF file so that the OPAL-RT I/O blocks are able to scale and package the communication signals correctly. It is also possible to design custom I/O blocks that would use additional custom reserved signal names referenced by the CONF file.

CONF File supported signal types

I/O typeDirectionReserved nameDescription
AnalogInInputAIStandard static analog input, inside the range [-16V, 16V], one value per channel per time step

AnalogOut

OutputAOStandard static analog output, inside the range [-16V, 16V], one value per channel, per time step
DigitalInInputDIStandard static digital input (0 or 1). One value per channel, per time step
Digital OutOutputDOStandard static digital output (0 or 1). One value per channel, per time step
EventDetectorInputTSDIA vector of states and times, giving precise information on all events that occurred on each channel during the last time step (in the RT-Events format)
Event GeneratorOutputTSDOA vector of states and times, giving precise information on all events that are requested on each
channel during the next time step (in the RTEvents format)
PMW InInputPWMIDuty and Frequency are retrieved from the Pulse Width Modulated signals connected to the digital input during the last time step
PMW OutOutputPWMOPulse Width modulated signals produced using the carrier frequency and the duty cycle during the next time step
EncoderInInputQEIAngle and speed (frequency) of a quadrature encoded digital input triplet (A,B, Z)
EncoderOutOutputQEORequested speed (frequency) of a quadrature encoded digital output triplet (A, B,Z)
Resolver InInputRIBasic resolver, two poles, retrieve angle and speed from the resolved signal
Resolver OutOutputROSingle-Ended or Differential resolver signals
TSB InInputTOMTime-stamped bridge input signal, giving equivalent RT-Events signals used by the TSB block
DataIn Send/DataOut RecvInput/outputAny other nameAny other type name is permitted but can only be used with the low-level DataIN send or DataOut Recv blocks
LoadIn/LoadOutInput/outputAny other nameTo send or receive raw data to/from the FPGA at a specific time when enable signal is sent

Groups, Sections, and Subsections

In order to facilitate identification, I/O lines of OPAL-RT TECHNOLOGIES hardware are organized in groups, sections, and subsections.

A group (also named slot on some platforms) corresponds to a specific position of digital or analog hardware interface inside the OPAL-RT TECHNOLOGIES chassis. Each group consists typically of two I/O mezzanine cards, sometimes referred to as sections, and labeled A and B. Each section is broken down into subsections of eight channels each.

The number of available groups depends on the chassis type, and the number of subsections composing each section of the group depends on the hardware that is installed in the section. A 32-channel interface card will be referred to as 4 subsections of eight channels.

As a standard, one RT-LAB interface block from the OPAL-RT I/O Blockset targets one subsection of hardware, and each block is associated with one DataIn or DataOut port in the RT-XSG model.

The different subsections referenced by a CONF file can be accessed independently from any number of subsystems of the real-time model, provided that each subsystem contains the corresponding OpCtrl or OpLnk block (refer to the help of these blocks for more information). However, each DataIn or DataOut port can be used only by one block in the RT-LAB design.



Note: Each line of the CONF file corresponds to one DataIN or DataOUT port number, and manages the signals of only one signal subsection. In the case of FPGA configurations that implement multiplexing of more signal types on the same subsections, more than one DataIN channel can provide packaged data that relates to the same subsection, the signal type selection being managed by a dedicated port from the DataIn or LoadIn block.


Manual CONF File Creation

The following template can be used, adding one row per DataIn and DataOut channel, as required. It is not mandatory to include all ports in the CONF file: only the ports that will be used by application-specific blocks from the OPAL-RT I/O library are required.


DescriptionSlotSectionSubsectionCountSize
DataIn1AO1A1816
DataIn2DO2A181
DataIn3TSDO2A2-132
DataIn4PWMO2A3864
(. . . )(. . . )(. . . )(. . . )(. . . )(. . . )(. . . )
DataOut1DI2B181
DataOut2TSDI2B2-132
(. . . )(. . . )(. . . )(. . . )(. . . )(. . . )(. . . )







(. . . )(. . . )(. . . )(. . . )(. . . )(. . . )(. . . )

Column Description

  • PortName: The port number from either the DataIn or DataOut block;
  • Description: Signal type (either one of the reserved names or any other name if the signal is to be used with the DataIn Send or DataOut Recv block);
  • Slot: Location of the I/O interface hardware in the chassis;
  • Section: Section of the I/O interface hardware (A or B);
  • Subsection: 8-channel signal subsection of the corresponding slot/section pair;
  • Count: Number of items to send per time step. A value of -1 is written for signal types for which the data count is not known a priori in RT-XSG (e.g. TSDI and TSDO signal types, as the number of events per time step, is set in the OPAL-RT I/O block itself);
  • Size: Size in bits of each item to be sent. If Size < 17 bits and Count > 1, many items are concatenated into 32-bit packets for optimal communication between the RT-LAB and RT-XSG models.

Typical count and size for the OPAL-RT I/O blocks

The typical data word count and size of the different OPAL-RT I/O blocks are indicated in the table below

Signal reserved name

Typical
Count
Typical
Size
Description
AI8168 analog channels, each with one 16-bit data to receive per time step.
AO8168 analog channels, each with one 16-bit data to send per time step.
DI818 digital channels, each with one 1-bit data to receive per time step
DO818 digital channels, each with one 1-bit data to send per time step
TSDI-132

32-bit time-stamped values of 8 digital channels' status.

The number of values is defined in the real-time simulation model definition (Simulink block or OPAL-RT Board GUI)

TSDO-132

32-bit time-stamped values of 8 digital channels' status.

The number of values is defined in the real-time simulation model definition (Simulink block or OPAL-RT Board GUI)

PWMI8648 digital channels, each with one 64-bit data to receive per time step
PWMO8648 digital channels, each with one 64-bit data to receive per time step
QEI216

The signal exchanged between RT-XSG and RT-LAB is the angle and rate values, expressed in a16-bit data.

Six (6) digital channels are used in the subsection (two A, B, Z triplets)

QEO216

The signal exchanged between RT-LAB and RT-XSG is the frequency values and other parameters, expressed in 16-bit data.

Six (6) digital channels are used in the subsection (two A, B, Z triplets)

RI296Angle and speed is retrieved in 96-bit data, 3 analog input channels are used to receive the external carrier, sine, and cosine and 1 analog out channel might be used to output the carrier
RO2160Parameters to generate the resolver signal are expressed in 160bit data, 1 analog input channel might be used to receive the external carrier and 3 analog-out channels for carrier, sine, and cosine
TOM8168 digital channels, each with one 16-bit data to receive per time step

OPAL-RT I/O blocks that require LoadIn

For some of the IO blocks, a LoadIn block is required and it must be specified in the conf file. 

Signal reserved nameTypical CountTypical Size
PWMO864
QEI232
QEO232
RI2256
RO232




OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323