Timer Input Get

From OpenMBD
Jump to: navigation, search
Supported Targets: Olimexino, E407, P405

General information about Timer Input Get

Reads the information from a timer input pin.

Block

TimerInputGet.png

Mask

TimerInputGetMask.png

Inputs (inports)

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

Outputs(Outports)

Output 1:Frequency: The last measured frequency on the pin in Hz. Output 2:Duty cycle: The last measured duty cycle on the pin as a % with a scaling factor of 100 for improved resolution. So 5000 = 50% for example. Output 3:Edge count: The number of edges that were detected on the input pin since startup. Output 4:Edge timestamp: A 32-bit timestamp value of the last edge. The timestamp is derived from an internal 32-bit free running counter that runs at 24 Mhz. Output 5:0 Hz detected: A boolean flag that will go high if no edges were detected for the time specified as the zero Hz detection time. Upon the next edge the flag will go low again.

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.

Examples

Workshop

See Also

PWM Init