Jump to content

Component: STM32 Timer (Timing): Difference between revisions

From Flowcode Help
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
m Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder""
Line 222: Line 222:
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-

Revision as of 14:36, 13 July 2026

Author Matrix TSL
Version 1.1
Category Timing


STM32 Timer component

Allows you to measure the passage of time via the use of the STM hardware timer. Works like a stopwatch with macros to start, stop and reset the timer counter. Returns time as integer Seconds, Milliseconds and also Floating Point and String.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_TimerComponentSTM32.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_TimerComponentSTM32.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

GetCountMilliseconds

GetCountMilliseconds
Returns the count value as a number of milliseconds 
- ULONG Return


GetCountReal

GetCountReal
Returns the count value as a floating point value in seconds. 
- FLOAT Return


GetCountSeconds

GetCountSeconds
Returns the count value as a number of whole seconds, rounded down to the nearest second 
- ULONG Return


GetCountString

GetCountString
Returns the count value as a floating point string in seconds. 
- BYTE Precision
Number of decimal places to display in string 
- STRING Return


GetRawCount

GetRawCount
Returns the number of milliseconds elapsed since the timer was started. 
- ULONG Return


ResetCounter

ResetCounter
 
- VOID Return


StartCounter

StartCounter
Starts the timer counting. 
- BOOL ResetCounters
Range: 0-1 where 0=Do Not Reset and 1=Reset 
- VOID Return


StopCounter

StopCounter
Stops the timer counting. 
- VOID Return


Property reference

Properties
Simulation
Timer Delay (ms)
Number of milliseconds between timer events which increment the simulated timer counter variable. 10ms will yield the highest resolution. Values less than this will likely just increase the error and making the timer run slow. Higher delays will yield greater accuracy. 
Decimal Points