|
|
| (10 intermediate revisions by 2 users not shown) |
| Line 22: |
Line 22: |
|
| |
|
| ==Detailed description== | | ==Detailed description== |
| | |
| | |
|
| |
|
|
| |
|
| Line 50: |
Line 52: |
|
| |
|
| ==Examples== | | ==Examples== |
| | |
| | |
|
| |
|
|
| |
|
| Line 80: |
Line 84: |
|
| |
|
| {{Fcfile|TimerExample.fcfx|Timer Example}} | | {{Fcfile|TimerExample.fcfx|Timer Example}} |
|
| |
| ==Macro reference==
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountSeconds'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a number of whole seconds, rounded down to the nearest second
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StartCounter'''
| |
| |-
| |
| | colspan="2" | Starts the timer counting.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ResetCounters
| |
| |-
| |
| | colspan="2" | Range: 0-1 where 0=Do Not Reset and 1=Reset
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountString'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a floating point string in seconds.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Precision
| |
| |-
| |
| | colspan="2" | Number of decimal places to display in string
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountMicroSeconds'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a number of whole microseconds, rounded down to the nearest microsecond
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountMilliseconds'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a number of whole milliseconds, rounded down to the nearest millisecond
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StopCounter'''
| |
| |-
| |
| | colspan="2" | Stops the timer counting.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetCounter'''
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountReal'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a floating point value in seconds.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRawCount'''
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| | ==Macro reference== |
|
| |
|
| | | ===GetCountMicroSeconds=== |
| ==Property reference== | | {| class="mtx-class-macrotable wikitable" |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| | | width="90%" class="mtx-class-macrohead" | '''GetCountMicroSeconds''' |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Timer
| |
| |-
| |
| | colspan="2" | Timer Peripheral to use to monitor the passage of time.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Bit Depth
| |
| |-
| |
| | colspan="2" | Number of bits in the timer peripheral. 8-bit timers can count from 0-255 before overflowing. 16-bit timers can count from 0 to 65535 before overflowing.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Instruction Rate
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Rollover Frequency
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Rollover Time
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Max Time Measurement
| |
| |-
| |
| | colspan="2" | Max time in seconds that we can measure before rolling over and starting again.
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Timer Delay (ms)
| |
| |-
| |
| | colspan="2" | 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.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Decimal Points
| |
| |-
| |
| | colspan="2" |
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountSeconds'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a number of whole seconds, rounded down to the nearest second
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StartCounter''' | |
| |-
| |
| | colspan="2" | Starts the timer counting.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ResetCounters
| |
| |-
| |
| | colspan="2" | Range: 0-1 where 0=Do Not Reset and 1=Reset
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountString'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a floating point string in seconds.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Precision
| |
| |-
| |
| | colspan="2" | Number of decimal places to display in string
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountMicroSeconds'''
| |
| |- | | |- |
| | colspan="2" | Returns the count value as a number of whole microseconds, rounded down to the nearest microsecond | | | colspan="2" | Returns the count value as a number of whole microseconds, rounded down to the nearest microsecond |
| Line 327: |
Line 111: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetCountMilliseconds=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountMilliseconds''' | | | width="90%" class="mtx-class-macrohead" | '''GetCountMilliseconds''' |
| |- | | |- |
| | colspan="2" | Returns the count value as a number of whole milliseconds, rounded down to the nearest millisecond | | | colspan="2" | Returns the count value as a number of whole milliseconds, rounded down to the nearest millisecond |
| Line 340: |
Line 125: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===GetCountReal=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StopCounter'''
| |
| |-
| |
| | colspan="2" | Stops the timer counting.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetCounter'''
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountReal''' | | | width="90%" class="mtx-class-macrohead" | '''GetCountReal''' |
| |- | | |- |
| | colspan="2" | Returns the count value as a floating point value in seconds. | | | colspan="2" | Returns the count value as a floating point value in seconds. |
| Line 379: |
Line 139: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===GetCountSeconds=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRawCount'''
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| | |
| | |
| ==Property reference== | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Timer
| |
| |-
| |
| | colspan="2" | Timer Peripheral to use to monitor the passage of time.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Bit Depth
| |
| |-
| |
| | colspan="2" | Number of bits in the timer peripheral. 8-bit timers can count from 0-255 before overflowing. 16-bit timers can count from 0 to 65535 before overflowing.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Instruction Rate
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Rollover Frequency
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Rollover Time
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Max Time Measurement
| |
| |-
| |
| | colspan="2" | Max time in seconds that we can measure before rolling over and starting again.
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Timer Delay (ms)
| |
| |-
| |
| | colspan="2" | 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.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Decimal Points
| |
| |-
| |
| | colspan="2" |
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountSeconds''' | | | width="90%" class="mtx-class-macrohead" | '''GetCountSeconds''' |
| |- | | |- |
| | colspan="2" | Returns the count value as a number of whole seconds, rounded down to the nearest second | | | colspan="2" | Returns the count value as a number of whole seconds, rounded down to the nearest second |
| Line 460: |
Line 153: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetCountString=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StartCounter''' | | | width="90%" class="mtx-class-macrohead" | '''GetCountString''' |
| |-
| |
| | colspan="2" | Starts the timer counting.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ResetCounters
| |
| |-
| |
| | colspan="2" | Range: 0-1 where 0=Do Not Reset and 1=Reset
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountString'''
| |
| |- | | |- |
| | colspan="2" | Returns the count value as a floating point string in seconds. | | | colspan="2" | Returns the count value as a floating point string in seconds. |
| Line 496: |
Line 172: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===GetRawCount=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountMicroSeconds''' | | | width="90%" class="mtx-class-macrohead" | '''GetRawCount''' |
| |- | | |- |
| | colspan="2" | Returns the count value as a number of whole microseconds, rounded down to the nearest microsecond | | | colspan="2" | |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountMilliseconds'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a number of whole milliseconds, rounded down to the nearest millisecond
| |
| |- | | |- |
| |- | | |- |
| Line 522: |
Line 186: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===ResetCounter=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StopCounter''' | |
| |-
| |
| | colspan="2" | Stops the timer counting.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetCounter''' | | | width="90%" class="mtx-class-macrohead" | '''ResetCounter''' |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | |
| Line 548: |
Line 200: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===StartCounter=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountReal''' | |
| |-
| |
| | colspan="2" | Returns the count value as a floating point value in seconds.
| |
| |- | | |- |
| |-
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | | | width="90%" class="mtx-class-macrohead" | '''StartCounter''' |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRawCount''' | |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| | |
| | |
| ==Property reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Timer
| |
| |-
| |
| | colspan="2" | Timer Peripheral to use to monitor the passage of time.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Bit Depth
| |
| |-
| |
| | colspan="2" | Number of bits in the timer peripheral. 8-bit timers can count from 0-255 before overflowing. 16-bit timers can count from 0 to 65535 before overflowing.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Instruction Rate
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Rollover Frequency
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Rollover Time
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Max Time Measurement
| |
| |-
| |
| | colspan="2" | Max time in seconds that we can measure before rolling over and starting again.
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Timer Delay (ms)
| |
| |-
| |
| | colspan="2" | 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.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Decimal Points
| |
| |-
| |
| | colspan="2" |
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountSeconds'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a number of whole seconds, rounded down to the nearest second
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StartCounter'''
| |
| |- | | |- |
| | colspan="2" | Starts the timer counting. | | | colspan="2" | Starts the timer counting. |
| Line 660: |
Line 219: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===StopCounter=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountString'''
| | | width="90%" class="mtx-class-macrohead" | '''StopCounter''' |
| |-
| |
| | colspan="2" | Returns the count value as a floating point string in seconds.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Precision
| |
| |-
| |
| | colspan="2" | Number of decimal places to display in string
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountMicroSeconds''' | |
| |-
| |
| | colspan="2" | Returns the count value as a number of whole microseconds, rounded down to the nearest microsecond
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountMilliseconds'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a number of whole milliseconds, rounded down to the nearest millisecond
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StopCounter'''
| |
| |- | | |- |
| | colspan="2" | Stops the timer counting. | | | colspan="2" | Stops the timer counting. |
| Line 715: |
Line 231: |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetCounter'''
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetCountReal'''
| |
| |-
| |
| | colspan="2" | Returns the count value as a floating point value in seconds.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRawCount'''
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
|
| |
|
|
| |
|
| ==Property reference== | | ==Property reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | | width="90%" class="mtx-class-macrohead" | '''Properties''' |
| |- | | |- |
| |- | | |- |
| Line 796: |
Line 271: |
| | colspan="2" | Max time in seconds that we can measure before rolling over and starting again. | | | colspan="2" | Max time in seconds that we can measure before rolling over and starting again. |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation | | | width="90%" class="mtx-class-propfolder" | Simulation |
| |- | | |- |
| |- | | |- |