Quadrature - Encoder v1
Quadrature - Encoder v1 — The QAE driver block
provides simulation of a quadrature encoder.
Library
Simulink Real-Time - Speedgoat

Description
The QAE driver block provides simulation of a quadrature encoder.
Ports
The width of all the inputs and all the outputs are equal to the channel count as
defined in the channel vector parameter.
Inputs
-
position cmd
This port allows the QAE position to be set. This port is
enabled/disabled using the 'Show position input port' parameter.
-
speed cmd
This port allows the QAE speed to be set. This port is
enabled/disabled using the 'Show speed input port' parameter.
Outputs
-
position
This port allows the position of the encoder to be read back. This
port is enabled/disabled using the 'Show position output port'
parameter.
Parameters
Tab: Module setup
-
Configurable I/O Module ID
This parameter associates a code module block with a configurable I/O module setup
block. Set this value to match the Module ID defined in the setup block of the
required configurable I/O module.
-
Channel Vector
A vector of channels this driver block entity will access. You can specify
channels in the range 1-N (N = the number of channels implemented in your specific
configuration file defined in the Setup block). The width of this vector also
defines the subsequent size of some of the following parameters if scalar expansion
applies. With a single block, all the channels of the block are synchronized.
-
Sample Time
Defines the base sample time at which this driver block gets its sample hit. This
parameter can also be set to -1 for inherited
sample time. The units are in seconds.
Tab: Quadrature Encoder
-
Resolution vector
The number of segments the encoder emulates (expressed in a power of
two)
-
Initial speed vector (rpm)
Encoder speed at model startup.
-
Initial position vector
The segment the QAE is at at model startup.
-
Free wheel
When this parameter is checked, there is no position control.
-
Reset current position and speed to init values when model starts
When this parameter is checked, the QAE code module is cleared with
the initial speed and position values, otherwise, it keeps its value
from the previous runtime.
Tab: Input and output configuration
-
Show speed input port
Enables/disables the Index found output port. See Input and output
ports section for more information. When this parameter is checked, an
additional input is shown and allows you to modify the QAE speed
constraint.
-
Show position input port
When this parameter is checked, an additional input is shown and
allows you to modify the QAE position constraint.
-
Show position output port
When this parameter is checked, an additional output is shown and the
current QAE position is available as a readback information.