blockEncoderEvaluation

Partial evaluation of an incremental encoder

Information

Evaluates the input signals from an IncrementalEncoder:

  • 0-track y[1] = 1 pulse per revolution with a length of 2*pi/(4*pRev)
  • A-track y[2] = pRev pulses per revolution
  • B-track y[3] = pRev pulses per revolution, displaced by 2*pi/(4*pRev)

and determines mechanical angular velocity w and mechanical angle phi:

  • w = angular velocity
  • phi = angle = integral of w

Parameters

TypeNameDefaultDescription
IntegerpRevPulses per revolution
Modelica.Units.SI.Anglephi00Initial mechanical angle (zero position)

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.BooleanInput[3]uEncoder signals
Modelica.Blocks.Interfaces.RealOutputwMechanical angular velocity
Modelica.Blocks.Interfaces.RealOutputphiMechanical angle