Time measurement

The NC-command #TIMER offers the option of time measurement in the NC-program. The time recorded is represented in the unit milliseconds (ms).

#TIMER  <action>  [<mode>] [ID<counter_nr>] (non-modal)

<action> Determines the action with the designated counter (ID).

Action

Significance

START

Start of the designated counter (ID).

STOP

Stop of the designated counter (ID).

READ

Read-out of the designated counter (ID).

The count is latched and saved in the assigned V.G.TIMER[ID] variable in milliseconds (ms).

CLEAR

Reset of the designated counter (ID).

The assigned V.G.TIMER variable is not deleted but is retained until another READ action of the related counter.

CAUTION

With the timer function a maximum of 1193 hours can be recorded.

<mode> Synchronization mode:

Valid
modes

Significance

---

Time measurement asynchronously with respect to the interpolator on decoding level (basic setting). The time measurement starts directly after decoding.

SYN

Time measurement on interpolator level. The designated counter is set synchronous with the machining operations of the NC-machine. In the case of syn-chronous reading (<SYN>) in the interpolator, decoding is interrupted until the count on decoding level has been accepted in the timer variable.

Time measurement 1:

For the measurement of execution of program operations, it is advisable to use the timers always with the keyword SYN.

ID<counter_nr> Counter number:

Valid values

Significance

0...127

A maximum of 128 counters can be programmed.

However, only one counter (ID) can be programmed per timer command.

Programming example

: 
#FILENAME[ MSG="C:\timer.txt" ] File name for time recording
:
#TIMER START [ID=10] Timer 10 is started (Decoding level)
#TIMER START SYN [ID11] Timer 11 is started (IPO-level)
:
:
#TIMER READ [ID10] Timer value is stored in V.G.TIMER[10]
#TIMER READ SYN [ID11] Timer value is stored in V.G.TIMER[11]
#MSG SAVE["T10 = %d",V.G.TIMER[10]] Recording of timer value in file
#MSG SAVE["T11 = %d",V.G.TIMER[11]] Recording of timer value in file
#TIMER STOP [ID10] Timer 10 is stopped
#TIMER CLEAR [ID10] Timer 10 is reseted
:
:
#TIMER READ SYN [ID11] Timer value is stored in V.G.TIMER[11]
#MSG SAVE["T11 = %d",V.G.TIMER[11]] Recording of timer value in file
:
:
#TIMER READ SYN [ID11] Timer value is stored in V.G.TIMER[11]
#MSG SAVE["T11 = %d",V.G.TIMER[11]] Recording of timer value in file
:
:
#TIMER READ SYN [ID11] Timer value is stored in V.G.TIMER[11]
#MSG SAVE["T11 = %d",V.G.TIMER[11]] Recording of timer value in file
#TIMER STOP SYN [ID11] Timer 11 is stopped
#TIMER CLEAR SYN [ID11] Timer 11 is reseted
:
:
:
#TIMER START [ID=10, ID11] Error, only one counter per timer command
permissible!

:
: