Time measurement (#TIMER)
The NC command #TIMER offers the option of time measurement in the NC program. The time recorded is represented in the unit milliseconds (ms).
Notice | |
Time counters are provided cross-channel (global). For example, this permits the measurement of signal propagation times between channels. For parallel independent time measurements in different channels, make sure that different counter numbers (IDs) are used. Otherwise, the measurements will influence each other. |
Syntax: |
#TIMER <action> [<mode>] [ID=..] |
<action> | Determines the action with the designated counter (ID). START: Starts the designated counter (ID). STOP: Stops the designated counter (ID). READ: Reads out the designated counter (ID). The timer count is latched and saved to the assigned V.G.TIMER[ID] variable in milliseconds (ms). CLEAR: Resets and stops the counter (ID). The assigned V.G.TIMER variable is not deleted but is retained until the next READ action of the related counter. |
Notice | |
The timer function records a maximum of 1193 hours. |
<mode> | Synchronisation mode: ---: Time measurement asynchronous relative to the interpolator at decoding level (initial state). Time measurement starts directly after decoding. SYN: Time measurement at interpolator level. The designated counter is set synchronous to the machining operations of the NC machine. The synchronous read function (<SYN>) in the interpolator interrupts decoding until the timer count at decoder level is adopted in the timer variable. |
![]() | In order to measure program run-times, timers must always use the keyword SYN. |
ID=.. | Counter number: 0...127: A maximum of 128 channel global counters can be programmed. However, only one counter (ID) can be programmed per timer command. |
Programming Example
Time measurement