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.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Block

Mask

Description

The ML605EX1 Encoder In block is used to retrieve Angle and Rate values from quadrature signals (A, B, and the index signal Z) connected to digital input lines of an OP525x carrier connected to an ML605 card.

The angle value is transferred from the bitstream to the RT-LAB model through the DataOut port allocated to the ML605EX1 Encoder In, via the PCIe bus of the target computer; the rate is processed by the ML605EX1 Encoder In block through differentiation.

Each ML605 bitstream using digital input channels comes with a configuration file; this file lists the Data port number and their corresponding OP525x location in the system. The configuration file name is the same as the bitstream file name entered in the OpCtrl ML605EX1 block, with the extension .conf instead of .bin.

This configuration file uses three parameters to describe the selection of the OP525x channels:

  • the Slot number (in the range 1 to 4) is the slot of the backplane connected to the ML605 in which the OP525x is installed,
  • the Section A or B is a subset of 32 lines of the OP525x carrier. For example, with the 32 In/32Out OP5251 carriers, section A refers to the 32 input lines and section B to the 32 output lines,
  • the Sub-Section, 1 to 4, is a subset of 8 data values connected to the port: subset 1 returns values for the 8 first channels of one section of the OP5251, subset 2 returns values for the 8 next channels, etc.

The user must refer to the configuration file for selecting the port number for the desired digital input channels. The ML605EX1 Encoder In block then parses the configuration file and displays the Slot, Section and Sub-section values corresponding to the port number in the 'Slot info' parameter.

The DataOut ports connected to Quadrature Encoder input signals are identified by the acronym 'QEI' in the configuration file.

The maximum number of digital input channels controlled by one ML605EX1 Encoder In is limited by the size of the subset of channels in one sub-section, which is fixed to 2 in the current implementation.

Parameters

ControllerNameBind this block to an OpCtrl ML605EX1 block by entering the same 'Controller Name' as specified in the OpCtrl ML605EX1 block The OpCtrl ML605EX1 block controls initialization of the settings of one specific ML605 card in the system.
DataOut port numberSet the number of the DataOut port to be controlled by this block, in the range [1:32].
Slot infoThis non-editable parameter displays the physical location of the digital input channels related to the selected DataOut port, as obtained from the parsing of the configuration file.
Available channelsThis non-editable parameter specifies the maximum number of quadrature encoder input values returned by the DataOut port as defined in the RT-XSG bitstream. Each quadrature encoder input value comes from the decoding of a set of A, B and Z input signals.
Number of Encoder SignalsSet the number of quadrature encoder input values to be returned by the block. The value must be less than or equal to the value of the 'Available channels' parameter.
Auxiliary Output typeSelect the type of the second output. Raw stands for raw data received from FPGA and Angle for the current angle value.
Rate UnitSelect between Hz and RPM (Revolution per Minute).
Angle Unit When the 'Auxiliary output' parameter is set to 'Angle', this parameter is editable. Three units are available for angle: degree, radian and revolution.
Sample time (s)This parameter allows the user to specify the block sample time in seconds. The default value is 0, which specifies a continuous sample time (note that the sample time is borrowed from the separated subsystem) while -1 specifies an inherited sample time. A functionality block and its associated controller block must execute at the same sample time.
ResolutionThis parameter stands for the number of cycles of the A and B signals per revolution. It is necessary to set this parameter to the right value to get a good estimation of rate.
Minimal rateThis parameter is used to detect the null rate. Under this value, Rate is assumed to be null. This parameter uses the unit specified by 'Rate Unit'.

Inputs

This block has no inputs.

Outputs

The block has three (3) outports.

RateThis outport returns the rate of the quadrature input signals decoded by the RT-XSG bitstream. The unit (Hz or RPM) is determined by the setting of the 'Rate unit' parameter.
DataThis outport is the 'Auxiliary Output' mentioned in the parameters list. It returns either the raw 16bit data which is the result of the decoding of the quadrature input signals in the RT-XSG bitstream, or the Angle values derived from these raw data. The Angle unit is determined by the setting of the 'Angle Unit' parameter.
StatusThe Status output returns the following values:
DirectionThe Direction output returns 0 for null rate, +1 for positive rate and -1 for negative rate.


ValueDescription
0No error.
-1

Block could not be matched with an OpCtrl ML605EX1 block (check the 'controller Name' value), or ML605 card initialization problem.

-2Internal memory initialization problem.

Characteristics and Limitations

Rate precision: The rate precision depends on the version of RT-XSG used to generate the bitstream. With a bitstream generated with a version before 2.2.0, the precision of the Rate values returned by the block is limited by the sampling rate of the model. This is due to the fact that the RT-XSG bitstream returns one Angle value per calculation step, and the Rate calculation is derived from the variation of the Angle value between consecutive steps.

Since RT-XSG 2.2.0, the speed is calculated as a number of events on signals A and B, between two consecutive timestamps. From with bitstreams generated with the version of RT-XSG 2.2.0 or later versions, the rate precision is 10 nanoseconds.

The version of RT-XSG used to generate the bitstream is part of the bitstream name.

Direct FeedthroughNo
Discrete sample timeYes
XHP supportYes
Work offlineNo
  • No labels