The following are a couple snippets of one of our programs. It allows for the operator to make a variety of choices.
As indicated by the example from the manual shared by Xerim, the Proccall is not written out, it is merely the name of the routine followed by the semicolon, as are most rapid instructions and declarations.
LOCAL CONST listitem SprayDistance{4}:=[[“”,“330_MM”],[“”,“380_MM”],[“”,“410_MM”],[“”,“350 mm”]];
LOCAL CONST listitem Shift{3}:=[[“”,“3”],[“”,“5”],[stEmpty,“Stop”]];
LOCAL CONST listitem Speed{4}:=[[“”,“400”],[“”,“550”],[“”,“700”],[“”,“Stop”]];
LOCAL VAR num nSpeed:=0;
LOCAL VAR num nShift;
! allow operator to choose spray distance
itemSelected:=UIListView(\Result:=buttonAnswer,\Header:=“Tool Standoff”,SprayDistance,\Buttons:=btnOKCancel,\Icon:=iconInfo,\DefaultIndex:=1);
IF buttonAnswer=resOK THEN
IF itemSelected=1 THEN
currentTool:=HVOF_330;
ELSEIF itemSelected=2 THEN
currentTool:=HVOF_380;
ELSEIF itemSelected=3 THEN
currentTool:=HVOF_410;
ELSEIF itemSelected=4 THEN
currentTool:=HVOF_350;
ELSE
GOTO SKIP;
ENDIF
ELSE
! if user selects cancel then stop cycle
GOTO SKIP;
ENDIF
! allow operator to choose spray shift
itemSelected:=UIListView(\Result:=buttonAnswer,\Header:=“Spray Shift”,Shift,\Buttons:=btnOKCancel,\Icon:=iconInfo,\DefaultIndex:=1);
IF buttonAnswer=resOK THEN
IF itemSelected=1 THEN
nShift:=3;
ELSEIF itemSelected=2 THEN
nShift:=5;
ELSE
GOTO SKIP;
ENDIF
ELSE
! if user selects cancel then stop cycle
GOTO SKIP;
ENDIF
! allow operator to choose spray speed
itemSelected:=UIListView(\Result:=buttonAnswer,\Header:=“Robot Speed”,Speed,\Buttons:=btnOKCancel,\Icon:=iconInfo,\DefaultIndex:=1);
IF buttonAnswer=resOK THEN
IF itemSelected=1 THEN
nSpeed:=400;
ELSEIF itemSelected=2 THEN
nSpeed:=550;
ELSEIF itemSelected=3 THEN
nSpeed:=700;
ELSE
GOTO SKIP;
ENDIF
ELSE
! if user selects cancel then stop cycle
GOTO SKIP;
ENDIF