#502: radius r;
#503: starting angle α;
#504: the number of holes n, when n >; 0, according to the counterclockwise processing, when n
#505: Z coordinate value of hole bottom;
# 506: Z coordinate value of r plane;
# 507: F feed.
Use the following variables to operate:
# 100: the counter indicates the i-th hole drilled in step i;
# 10 1: the final value of the counter (absolute value of n);
# 102: the value of the angular position θi of the ith hole;
# 103: the x coordinate value of the ith hole;
# 104: y coordinate value of the ith hole;
Extended data
macroprogram
User macro function is a special function to improve the performance of CNC machine tools. In use, a series of instructions that can complete a certain function are usually stored in memory like subroutines, and then represented by a general instruction. When in use, it is only necessary to give this general instruction to perform its functions.
The main body of user macro function is a series of instructions, which is equivalent to subroutine body. It can be provided by machine tool manufacturers or compiled by machine tool users themselves.
Macro instruction is a general instruction representing a series of instructions, which is equivalent to subroutine call instruction.
The biggest feature of user macro function is that it can calculate variables, which makes the application of the program more flexible and convenient.
There are two types of user macro functions: A and B.
In conventional main programs and subroutines, a specific value is always assigned to an address. In order to make the program more universal and flexible, variables are set in the macro program, that is, variables are assigned to an address.
system variables
A system variable is defined as a variable with a fixed purpose, and its value determines the state of the system. System variables include tool offset variables, interface input/output signal variables, position information variables, etc.
The serial number of system variables has a strict correspondence with a certain state of the system. For example, the serial number of the tool offset variable is # 0 1 ~ # 99, and these values can be changed by variable replacement. In the serial number 1 ~ 99, variables that are not offset by the tool can be used as holding variables # 500 ~ # 53 1.
Interface input signals #1000 ~ #10/5, # 1032. By reading these system variables, we can know the situation of each input port. When the variable value is "1", the contact is closed; When the variable value is "0", it means that the contact is broken. The values of these variables cannot be replaced. The variable # 1032 is read, and all input signals are read in at one time.
References:
Baidu encyclopedia -FANUC system