Debugging Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Debugging - Commands >

Debugging Commands

GRI. - Get Run Information

Previous Top Next


MiniRobotLanguage (MRL)

 

GRI. Command

Get Run Information

 

 

Intention

 

Get internal Information on how long a single line needed to be processed by the CPU.

 

 

' GRI - Example 1 using Label-Reference

:Label

: $$TXA=12345678

GRI.:Label|1

PRT.Following Run-Informations for Line No. 3 (=Label+1)

PRT.$$000

MBX.!

END.

 

' This Example uses a Variable for the GRI.-Result

:Label

: $$TXA=12345678

GRI.:Label|1|$$RES

PRT.Following Run-Informations for Line No. 3 (=Label+1)

PRT.$$RES

MBX.!

END.

 

 

GRI-Sample

 

 

Syntax

 

GRI.[P1][|P2][|P3]

 

 

Parameter Explanation

 

P1 - Line-Number or Label (can be inside a variable, too).

P2 - (optional) NUM - Increment, is added to the Line-Number/Label P1.

P3 - (optional) VAR - Variable for Result, if omitted the Result goes to the TOS.

 

P1 or P2 can be inside a variable.

 

 

 

Example

 

'----------------------------------------------------------

' GRI - Example

'----------------------------------------------------------

: $$TXA=12345678

: $$TXB=2

VAR.$$TXA=12345678

VAR.$$TXA=12345678

VAR.$$TXB=2

GRI.4

PRT.The following Line shows Run-Informations for Line No. 4

PRT.$$000

GRI.5

PRT.The following Line shows Run-Informations for Line No. 5

PRT.$$000

GRI.6

PRT.The following Line shows Run-Informations for Line No. 6

PRT.$$000

END.

 

'----------------------------------------------------------

' GRI - Example 2 using Label-Reference

'----------------------------------------------------------

:Label

PAU.0.5

: $$TXA=12345678

GRI.:Label|1|$$RES

PRT.Following Run-Informations for Line No. 3 (=Label+1)

SBD.$$RES|$sp$|2|$$TIA

CAL.$$TIM=$$TIA/1656527/10/3

PRT.$$TIM

MBX.!

END.

 

####################################################

 

' Macro - Converts GRI-Result into Seconds

:Label

PAU.0.5

: $$TXA=12345678

GRI.:Label|1|$$RES

PRT.Following Run-Informations for Line No. 3 (=Label+1)

%GRI_to_Time $$RES|$$TIX

PRT.$$TIX

MBX.!

ENR.

'-----------------------------------------------------------

' Here is the Needed Macro-Definition

'-----------------------------------------------------------

: %GRI_to_Time 1

#IF PARAMS=0

MBX.Need 1 Parameter here!

END.

#EIF

#IF PARAMS=1

GSB.GRI_to_Time|§§§01

#EIF

#IF PARAMS=2

GSB.GRI_to_Time|§§§01|§§§02

#EIF

#IF PARAMS>2

MBX.Need 1 Parameter here!

END.

#EIF

END%

'-----------------------------------------------------------

' Here is the Needed Subroutine

'-----------------------------------------------------------

' Wandelt die Rückgabe von GRI in eine Zeit um

:GRI_to_Time

SAV.Save|$$P01|$$P02|$$P03

VAR.$$P01=§§_01

SBD.$$P01|$sp$|2|$$P02

CAL.$$P03=$$P02/1656527/10

IVV.§§_00>1

  VAI.§§_02=$$P03

ELS.

  PUV.$$P03

EIF.

SAV.Restore

RET.

 

#######################################################

 

' GRI - Example 4 Macro Nesting Sample

 

:Label

PAU.0.5

: $$TXA=12345678

%T_GetLinetime Label|$$RES

PRT.Following Run-Informations for Line No. 3 (=Label+1)

PRT.$$RES

MBX.!

END.

 

ENR.

'===========================================================

' P1 - Label - Zeile darunter wird gemessen

' P2 - Variable for Result

'

: %T_GetLinetime 2

#IF PARAMS=2

GSB.T_GetLinetime|§§§01|§§§02

#ELSE

MBX.Need 2 Params here!

#EIF

END%

 

:T_GetLinetime

SAV.Save|$$P04|$$P05

VAO.$$P05=

GRI.§§_01|1|$$P04

%GRI_to_Time $$P04|§§_02

SAV.Restore

RET.

 

'-----------------------------------------------------------

' Here is the Needed Macro-Definition

'-----------------------------------------------------------

: %GRI_to_Time 1

#IF PARAMS=0

MBX.Need 1 Parameter here!

END.

#EIF

#IF PARAMS=1

GSB.GRI_to_Time|§§§01

#EIF

#IF PARAMS=2

GSB.GRI_to_Time|§§§01|§§§02

#EIF

#IF PARAMS>2

MBX.Need 1 Parameter here!

END.

#EIF

END%

'-----------------------------------------------------------

' Here is the Needed Subroutine

'-----------------------------------------------------------

' Wandelt die Rückgabe von GRI in eine Zeit um

:GRI_to_Time

SAV.Save|$$P01|$$P02|$$P03

VAR.$$P01=§§_01

SBD.$$P01|$sp$|2|$$P02

CAL.$$P03=$$P02/1656527/10

IVV.§§_00>1

  VAI.§§_02=$$P03

ELS.

  PUV.$$P03

EIF.

SAV.Restore

RET.

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

 

See also:

 

    DMP. - Dump internat Informations

    DBV. - Debug Print Variable