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.

OpCtrl OP7160EX1 Calib

Block


Mask

Parameters

Controller NameThis parameter enables the binding between this OpCtrl OP7160EX1 block and functionality blocks that must be associated with the same OP7160 card. This string must be unique among all OpCtrl blocks present in the same model.
Board IDThis parameter is the integer value represented by the board index dip-switch of the backplane adapter board to which the OP7160 is connected. The value is in the range of 0 to 31. If the OP7160 is not connected to an adapter board, the value is 0.
Bitstream FileNameThis is the name of the bitstream to be programmed on the OP7160 before the model is loaded. The bitstream must have been produced with RT-XSG and must be available in the model directory at load time.
Bitstream ConfigurationThis is the configuration of the bitstream to be programmed on the OP7160 before the model is loaded. This parameter allows the user to use the same bitstream for several purposes.
Synchronization modeThis popup allows the selection of the Master or Slave mode of hardware synchronization. Master mode must be used when the OP7160 is selected as the synchronization source of the model. Slave mode can be used when the synchronization source of the model is another Opal-RT card such as OP7160, OP5110, OP5130-XSG, etc.
External clockNot yet supported.
Enable calibration inputs/outputsThis checkbox enables calibration inputs and outputs when it is selected. To display this input, you have to execute the following command line:setenv('OP7160_INIT_CALIB','ON'). See the description of the inputs for more information and warnings regarding the use of the calibration commands.
Decimation factorThis parameter is available only when the Slave mode of synchronization is selected. Not yet supported.
Sample Time (s)

This parameter allows the user to specify the sample time for this block, in seconds. The default value is 0, which specifies a continuous sample time (note that the sample time is borrowed from the separated subsystem).

These synchronization rules must be respected in the model:

  • A controller block and its related functionality blocks must share the same sample time.
  • If an OpConfigSync block is used and does not specify the OP7160 card as the synchronization source, the sample time must be an integer multiple of the synchronization source sample time specified in the OpConfigSync block.
  • If an OpConfigSync block is used and specifies the OP7160 card as the synchronization source, its sample time must be the fastest rate in the model.

Inputs

This block has no input when Enable calibration inputs/outputs are deselected.

In the calibration mode, the block has the following four inputs:

  • Enable: This input is used to set latency time in the calibration processing. When this input is set to 0, the Command input is ignored. In the other case, the Calibration Command is normally processed.
  • CMD: This input is the command that will be executed that will be sent to the OP7160 board for calibration processing.



Warning: The Read and Write commands should be used with care since they can overwrite calibration data stored in the ADC and DAC EEPROMs. They should be used on an Opal-RT calibration setup only. Please contact Opal-RT engineers for more information.


CMDAction
0Enable the ADC calibration
1Enable the DAC Calibration
2Disable the ADC Calibration
3Disable the DAC Calibration
4Write the input DATA (specified by the input Data/Gain) at the address (specified by the input Add./Offset) of the EEPROM located on the slot and the side specified by the corresponding inputs.
5Read the data from the address (specified by the input Add./Offset) of the EEPROM located on the slot and the side specified by the corresponding inputs.
6Set the gain (specified by the input Data/Gain) and the offset (specified by the input Add./Offset) of the DAC channel specified by the 'Slot', 'Side' and 'Channel' inputs.
7Enable the DAC channel specified by the 'Slot', 'Side' and 'Channel' inputs.
8Disable the DAC channel specified by the 'Slot', 'Side' and 'Channel' inputs.
  • Data/Gain: This input is used for write commands. For the writing on the EEPROM( CMD = 4 ), it is considered as the data to be written on the EEPROM; its size is 8 bits. For the writing of gain and offset( CMD = 6 ), it is considered as the gain to be written for a specific channel; its size is 14 bits.
  • Add./Offset: For the command used the EEPROM( CMD = 4, CMD = 5), it is considered as the address of EEPROM where the Read or Write operation will be performed; its size is 8 bits. For the writing of gain and offset( CMD = 6 ), it is considered as the offset to be written on the EEPROM; its size is 10 bits.
  • Slot This input is used to specify the slot where the carrier board is connected. The slot number is an integer between 1 and 4.
  • Side This input is used to specify the section on the carrier board (A for the top section and B for the bottom section);for Section A, the side value is 1 and for section, it is 2.
  • Channel This input is used to specify the channel index of DAC. It is used (A for the top section and B for the bottom section);for Section A, the side value is 1 and for section, it is 2.

Outputs

This block has up to four outputs:

The Error outport returns the following error codes:

ValueDescription
0No error.
-1Card not detected.
-2Timeout waiting for a synchronization signal. If the block is in Slave mode, verify that the RTSI synchronization signal is properly connected.
-3Overrun detected.
-10This value can be added to the above codes. It signals a hardware mismatch error.

The IDs outport returns the 8 hardware identification codes of the conditioning modules connected to the OP7160 via the backplane adaptor board.

Two identification codes are returned for each slot of the carrier backplane, one for section A and one for section B of the carrier. For example, if an analog carrier OP5220 is installed in slot 1 of the carrier backplane connected to the OP7160, and if one OP5330 module installed in slot A of this carrier and one OP5340 module installed in slot B, the first two hardware IDs are 195 (or 'C3', in hexadecimal notation) and 193 (or 'C1'). Other typical IDs are 235 ('EB') for section A and 234 ('EA') for section B of an OP5251 digital I/O carrier. When no carrier is installed in one slot, both IDs are set to 255 ('FF').

The hardware mismatch error is set when the hardware installed in one slot does not match the hardware required by the OP7160-XSG bitstream for that slot.

The RdyD outport returns 1 if a valid data is present on the ReadData outport. It returns -1 when the functionality is not supported by the bitstream and -2 when the input is not in the valid range. This outport is only enabled in calibration mode.

The RData outport returns the data read from the EEPROM. This outport is only enabled in calibration mode.

Characteristics and Limitations

This block must be run in Hardware Synchronized mode.

Only XHP-mode is presently supported.

Please refer to the RT-XSG documentation for hardware setup.

Direct FeedthroughNo
Discrete sample timeNo
XHP supportYes
Work offlineNo

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