Difference between revisions of "HANcoder/STM32/Blocks/Quadrature Encoder Get"

From OpenMBD
< HANcoder‎ | STM32‎ | Blocks
Jump to: navigation, search
(Created page with "{{HANcoder/block |info = This block reads the counter of the quadrature encoder module. '''Outport''' The output is a 32-bit signed counter. The counter starts at zero...")
 
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
This block reads the counter of the quadrature encoder module.  
 
This block reads the counter of the quadrature encoder module.  
 
 
 
'''Outport'''
 
 
The output is a 32-bit signed counter. The counter starts at zero and counts up or down depending on the direction of the sensor shaft.
 
  
 
|blockImage = QuadratureEncoderGet.png
 
|blockImage = QuadratureEncoderGet.png
Line 15: Line 9:
 
|maskImage = QuadratureEncoderGetMask.png
 
|maskImage = QuadratureEncoderGetMask.png
  
|QuadratureEncoderModule = Selects the quadrature encoder module. The channel A and B signals of the encoder should be connected to the 2 input pins that belong to the module.
+
}}
|Configuration = Determines if the input is floating or is connected to an internal pull-up or pull-down resistor.
 
|ShowCounterResetInput = Configures if the input port for the counter reset should be shown.
 
|SampleTime = Default
 
  
|SeeAlso = [[HANcoder/Timer_Input_Get|Timer Input Get]], [[HANcoder/Timer_Input_IRQ|Timer Input IRQ]]
+
== Inputs (inports) ==
 +
reset input (optional) if the value goes from 0 to 1 the counter output will be reset.
  
}}
+
== Outport ==
 +
The output is a 32-bit signed counter. The counter starts at zero and counts up or down depending on the direction of the sensor shaft.[int32]
 +
 
 +
== Block parameters ==
 +
{| class="wikitable"
 +
|-
 +
! style="width:150px" | Parameter
 +
! Description
 +
|-
 +
| Quad encoder module
 +
| Select the output pin where the PWM signal should be generated.
 +
|-
 +
| Configuration
 +
| Select the pin electrical configuration.
 +
|-
 +
| Show counter reset input
 +
| When this checkbox is ticked an input appears.
 +
|-
 +
| Sample time
 +
| Sample time of the block. The Sample time (in seconds) defines the rate at which the block is visited by the real-time scheduler of the target. The value of the Sample time has to be an integer multiple of the base sample time of the model.
 +
|}

Latest revision as of 11:32, 5 May 2017

Supported Targets: Olimexino, E407, P405

General information about Quadrature Encoder Get

This block reads the counter of the quadrature encoder module.

Block

QuadratureEncoderGet.png

Mask

QuadratureEncoderGetMask.png

Inputs (inports)

reset input (optional) if the value goes from 0 to 1 the counter output will be reset.

Outport

The output is a 32-bit signed counter. The counter starts at zero and counts up or down depending on the direction of the sensor shaft.[int32]

Block parameters

Parameter Description
Quad encoder module Select the output pin where the PWM signal should be generated.
Configuration Select the pin electrical configuration.
Show counter reset input When this checkbox is ticked an input appears.
Sample time Sample time of the block. The Sample time (in seconds) defines the rate at which the block is visited by the real-time scheduler of the target. The value of the Sample time has to be an integer multiple of the base sample time of the model.