2. Programming 3. Description <br> a total of 250 calculated parameters are available. The address assigned to the other through a further NC <br> address allocation calculating parameter or expression, can increase the versatility of the NC program. Values, arithmetic expressions, or R parameters can be assigned to any NC address. However, there are exceptions to the addresses N, G, and L. <br> 6. calculated parameters in the calculation of the parameters follows the usual mathematical notation. The operation in the original parentheses takes precedence. In addition, multiplication and division operations take precedence over addition and subtraction operations. Second tag - program jump target Absolute jump 2. Programming Four conditional jumps 1. <br> function represented by a conditional jump statement IF- conditions. If the jump condition (value not equal to zero), the jump Jump destination can be a block tag. The program Segment must be within this procedure. 2. Programming GOTOF Jump forward (jump to the end of the program) GOTOB Jump backwards (jump to the beginning of the program) Lable Selected tag IF Jump condition importer condition As a conditional calculation parameter, an evaluation expression 3. Comparison operations = = equal <> Ranging from > more than the < Less than > = greater than or equal to < = less than or equal to The above comparison operation is used to represent the jump condition. The calculation expression can also be used for comparison operations. 4. Comparison operation programming example Five program jump example code show as below: G54X0Y0Z10F100M03S100 The subroutine L1 code is as follows: Six subroutines 1. Apply <br> In principle there is no difference between the main program and subprogram. As the main structure and the structure 2. Structure <br> subprogram in the subprogram also type in a block M2 final end subroutines run run. Return to the main program after the subroutine ends. 3. End of program <br> The M2 instruction, but can also be used RET instruction subroutine ends. 4. For convenience <br> subroutine program name to select a subprogram, a program name to be taken to the subroutine. The program name can be freely selected, but must comply with the following provisions: 5. <br> subroutine can call a subroutine in a program (main program or subroutine) directly with the program name. Subroutine calls require an independent program segment. 6. If the procedure is repeated several times in succession <br> call to a subroutine is performed, the number of calls must be written in the program name of the subroutine call address when the program P, the maximum number may be 9999 (P1. ..P9999) 7. <br> subroutine nesting depth can only be called from the main program can also be called from other programs, this process is called a nested subroutines. The nesting depth of a subroutine can be three levels, that is, a four-level program interface (including a main program interface). 8. DESCRIPTION <br> may vary subroutine modal G functions, such as G90 to G91 conversion. When returning to the calling program, ensure that all modal functions are set and adjusted as required. Excavator Hydraulic Crushing Pliers Excavator Hydraulic Crushing Pliers,Hydraulic Crushing Pliers,Excavator Crushing Pliers,Excavator Crusher CHANGZHOU LVSONG INTERNATIONAL TRADING CO.LTD , https://www.yhyuanhang.com
1. Function
To make an NC program not only suitable for one machining at a specific value, but also to calculate the value,
The calculation parameters can be used in both cases. You can calculate or set the required value when the program is running.
The parameter value can be set via the operation panel. If the parameters have been assigned, they can be assigned to the address determined by the variable in the program.
R0=...
To
R249=...
R0...R99 - Free to use
R100...R249 - Machining cycle transfer parameters If you do not use a machining cycle, this part of the calculation parameters can also be used freely.
4. Assignment
Example one :
R0=3.5678 R1=-37.3 R2=2 R3=-7 R4=-45678.1234
With the exponential notation you can assign a larger range of values:
(10-300...10+300).
The index value is written after the EX symbol; the maximum number of symbols: 10 (including symbols and decimal points).
EX value range: -300 to +300
Example two:
R0=-0.1EX-5; Meaning: R0=-0.000 0001
R1=1.874EX8; Meaning: R1=187 400 000
Note: There can be more than one assignment statement in a block; it can also be assigned using a calculation expression.
Write the symbol "=" after the address character at the time of assignment
Assignment statements can also be assigned - negative signs.
When assigning values ​​to axis addresses (running instructions), a separate block is required.
For example:
N10 G0 X=R2 ; Assignment to the X axis
1. Function
1) The tag is used to mark the target program segment that is jumped in the program. The branch function can be used to implement branching of the program.
2) The tag can be chosen freely, but must consist of 2 letters or numbers, where the beginning of the two symbols must be a letter or an underscore.
3) The colon in the jump destination block must be followed by a colon. The tag is located at the beginning of the program segment. If the program segment has a segment number, the tag is followed by the segment number.
4) In a block, the tag cannot have any other meaning.
2. Examples of programs
N10 MARKE1: G1 X20 ; Marke1 is a marker, jump target block
...
TR789: G0 X10 Z20 ; TR789 is a tag, jump target segment does not have a segment number
1. Function
The NC program executes blocks in the order in which it was written.
When the program is running, it can change the execution order by inserting a program jump instruction.
The jump target can only be a block with a tag. This program segment must be within this program.
Absolute jump instructions must occupy a separate block.
GOTOF Lable ; previous jump
GOTOB Lable ; Jump Back
AWL instructions
GOTOF forward jump (jump to the end of the program)
GOTOB jumps backwards (jumps to the beginning of the program)
Lable selected tag
A conditional jump instruction requires a separate program section. There can be many conditional jump instructions in a program section.
Using a conditional jump can sometimes make the program significantly easier.
IF condition GOTOF Lable ; previous jump
IF condition GOTOB Lable ; Jump back
There are two kinds of comparison operations, one is "satisfaction" and the other is "satisfaction." When "Not satisfied", the result of the operation is zero.
R1>1; R1 is greater than 1
1<R1 ;1 is less than R1
R1<R2+R3; R1 is less than R2 plus R3
R6>=SIN(R7*R7) ; R6 is greater than or equal to SIN(R7)2
R10=-15 R11=-9.06
L1
R10=15 R11=-9.06
L1
R10=0
L2
G0 X=R10+12.5-4 Y=R11
G1 Z-6 F100
G3 I=4-12.5
G1 X=R10+8 Y=R11
G41 D1 X=R10+4 Y=R11
G2 I-4
G0 Z5
R1=4
R2=90
AAA:
R3=R1*COS(R2)+4+R10
R4=R1*SIN(R2)-R1
G0 X=R3 Y=R11
G1 Z=R4 F300
G2 I=R10-R3
G0 Z1
R2=R2-1
IF R2>=0 GOTOB AAA
G0 Z10
M17
The subroutine L2 code is as follows:
R1=35
R2=15
R3=0
G0 X=R1+R10 Y=R11
G1 Z-5 F100
AAA:
R4=R1*COS(R3)+R10
R5=R2*SIN(R3)+R11
G1 X=R4 Y=R5 F100
R3=R3+1
IF R3<=360 GOTOB AAA
G0 Z5
M17
Use subroutines to write frequently repeated machining, such as a certain contour shape. A type of subroutine located in the main program is the machining cycle. The machining cycle contains general machining procedures such as thread cutting, cutting, and so on. By assigning the specified calculation parameters, various concrete processes can be realized.
RET requires a separate program section.
Using the RET instruction to end the subroutine and returning to the main program will not interrupt the G64 continuous path operation mode. Using the M2 instruction will interrupt the G64 operation mode and enter the stop state.
- The beginning of the two symbols must be alphabetic - the other symbols are letters, numbers or underscores - up to 8 characters - no delimiters are the same as the program names in the main program.
For example:
N10 L785 P3 ; Call subroutine L785
N20 WELLE7 ; Calls subroutine WHEE7
For example:
N10 L785 P3 ; Call subroutine L785 3 times
Note: When machining with a machining cycle, it should be noted that the machining cycle program also belongs to the level one of the four-level program interface.
The same applies to the R parameter. Do not unconsciously use the calculation parameters used in the higher-level program interface to modify the calculation parameters of the lower-level program interface.
SINUMERIK system parameter programming
A calculation parameter R