omron — CALL

PMAC Product Guide C{data} Function : C-axis move Type : Motion program (PROG and ROT) Syntax : C{data} where {data} is a floating-point constant or expression representing the position or distance in user units for the U-axis. This command causes a move of the C-axis. (See {axis}{data} description in this section.) Program commands {axis}{data} , A , B , U , V , W , X , Y , Z , CALL , READ CALL Function : Jump to subprogram with return Type : Motion program (PROG and ROT) Syntax :

CALL{data} [{letter}{data}...] where the first {data} is a floating-point constant or expression from 1.00000 to 32767.99999, with the integer part representing the motion program number to be called and the fractional part representing the line label ( N or O ) within the program to be called (the line label number is equal to the fractional part multiplied by 100,000; every motion program has an implicit N0 at the top). {letter} is any letter of the English alphabet, except N or O, representing the variable into which the value following it will be placed (Q101 to Q126 for A to Z respectively).

following {data} is a floating-point constant or expression representing the value to be put into the variable. This command allows the program to execute a subprogram and then return execution to the next line in the program. A subprogram is entered into PMAC the same as a program, and is labeled as PROGn (so one program can call another as a subprogram). The number n of the PROG heading is the one to which the value after CALL refers: CALL7 would execute PROG7 and return. Commanding execution of a non- existent subprogram will cause program execution to stop in an error condition. The value immediately following CALL can take fractional values.

If there is no fractional component, the called program starts at the beginning. If there is a fractional component, the called program is entered at a line label specified by the fractional component (if this label does not exist, PMAC will generate an error and stop execution). PMAC works with five fractional digits to specify the line label; if fewer are used, it fills out the rest with zeros automatically. For instance, CALL 35.1 is interpreted as CALL 35.10000 which causes a jump to label N10000 of program 35. CALL 47.123 causes a jump to label N12300 of program 47. If letters and data (e.g. X1000 ) follow the CALL{data} , these can be arguments to be passed to the subprogram.

If arguments are to be passed, the first line executed in the subroutine should be a READ statement. This statement will take the values associated with the specified letters and place them in the appropriate Q-Variable. For instance, the data following A is placed in variable Q101 for the coordinate system executing the program; that following B is placed in Q102; and so on, to the data following Z being placed in Q126. Then the subprogram can use these variables. If the subprogram calls another subprogram with arguments, the same Q-variables are used. Refer to the READ section for more details. Buffer Commands 205