Note that the actual order of the plus and minus symbols within a calculation

3 + (+5) = 3 + 5 = 8

Positive + Negative


a + (-b) = a – b

3 + (-5) = 3 – 5 = -2

Negative – Positive


a – (+b) = a – b

3 – (+5) = 3 – 5 = -2

Negative – Negative


a – (-b) = a + b

3 – (-5) = 3 + 5 = 8

This sim pli fied method may be even eas ier to un der stand:

+ + = +

+ – = –

– + = –

– – = +

drilling Machine

Note that the actual order of the plus and minus symbols within a calculation, such as +- or -+

makes no dif fer ence to the re sult How ever, the stan dard math e mat i cal hi er ar chy of cal cu lat ing or der is and must al ways punch machine for Head be main tained

Copyright 2005, Industrial Press Inc, New York, NY –

FANUC CNC Custom Macros


Chapter 7

Syntax Errors

Mak ing er rors in any man u ally de vel oped pro gram is not un com mon, even if it is un de sir able

Macro pro grams are drilling steel not im mune to be ing written wrong, even by ex pe ri enced pro gram mers At

the same time, once a macro is ver i fied and fully func tion ing, there will be no more er rors

In CNC pro gram ming, there are two cat e go ries of er rors:


Syn tax er rors

control system will warn the user (alarm issued)


Log i cal er rors

control system will not warn the user (alarm not issued)

It is im por tant to elim i nate both cat e go ries, but it is much harder to elim i nate the log i cal er rors

than the syn tax er rors Briefly, syn tax er rors are er rors that are in con flict with the de signed for –

mat the con trol sys tem ex pects Log i cal er rors are those, where the pro gram Busway Press Clamp Machine mer in tended one ac –

tiv ity and pro vided an other ac tiv ity For ex am ple, -X1000 is a syn tax er ror, be cause a pro gram

word must al ways be gin with a let ter – cor rected ver sion is X-1000 An ex am ple of a log i cal er ror

is when the pro gram mer in tends to move to Y-po si tion of 750 mm, but pro grams Y750, in stead

of the cor rect in put of X7500

The sec tion on re stric tions is re ally a sec tion that cov ers some syn tax er rors but also in cludes

state ments and pref er enc

Overflow or underflow situation

ble cannot replace another

variable directly –

#[#7] is allowed

example 3 – correct

Overflow or underflow situation


= negative underflow

when 0 and 90 degrees are used in


= positive underflow

trigonometric calculation


= negative underflow


drilling Machine

= positive overflow

If variables #7 and #9 have been previously

Nesting in calculations is allowed

defined, the following nesting is correct:


More ex am ples could be added, but the list ing cov ers the most com mon con sid er ations

Copyright 2005, Industrial Press Inc, New York, NY – wwwindustrialpresscom

FANUC Busway Press Clamp Machine CNC Custom Macros


Chapter 7

Custom Machine Features

One of the most com mon rea sons for a CNC ma chine tool hav ing the macro fea tures avail able is

– the ma chine tool builder Ma chine man u fac tur ers of ten in cor po rate many unique fea tures into their ma chine tools, for ex am ple, ad vanced phys i cal equip ment, custom processing machine such as bro ken cut ter de tec tors,

gan try lines, pro gram ma ble guard con trols, etc These ‘hard ware’ fea tures must be con trolled by

the ‘soft ware’ The soft ware in such cases pro grammed in a PLC (Pro gram ma ble Logic Con trol)

but is fre quently sup ple mented by a spe cial macro, usu ally built into the con trol at the time of pur –

chase This macro may or may not be hid den from dis play, most likely will be pro tected, but it is

al ways very im por tant to be aware of its ex is tence

Re stric tions and min i mum or max i mum val ues spec i fied by the ma chine tool builder must al –

ways be hon ored in macro de vel op ment or modifications Pro gram mers should al ways know the

ma chine built-in ranges, for ex am ple, the work area, the min i mum and max i mum spin best mill drill dle speeds,

feedrate ranges, travel lim its, tool sizes, and so on

In their mac ros, ma chine tool build ers also use spe cial G-codes or spe cial M-codes for their

equip ment, and they will use many vari ables in the mac ros In the next chap ter, we look at vari –

this is a negative value variable definition

sh di men sion of 123456 will be come 123456 in met ric units – def i nitely

not cor rect Pro vid ing the G20 or G21 units se lec tion com mand into the pro gram is al ways highly rec om mended What is def i nitely never rec om mended is to use both types of units in one pro –

gram, that is be tween the start of main pro gram and the M30 func tion for pro gram end

ALWAYS – pro vide units se lec tion in ev ery pro gram

NEVER – use both avail able units in any one program

Copyright 2005, Industrial Press Inc, New York, NY – wwwindustrialpresscom

FANUC CNC Custom Macros



drilling Machine

Positive and Negative Variables

A vari able def i ni tion that is not equal to zero is called a non-zero vari able Non-zero vari ables

may be ex pressed as ei ther pos i tive or neg drilling machine a tive vari able values For ex am ple,

#24 = 137

this is a positive value variable definition

#25 = -52

this is a negative value variable definition

Why is this very sim ple and com mon fact so im drilling steel por tant? The rea son is that in a macro, the call

of the vari able may also be pos i tive or neg a tive, which means tow signs are in effect When the

vari able is ref er enced in the macro, the sign can be intentionally re versed, in or der to achieve the

op po site ef fect of the def i ni tion, for ex am ple:

G00 X-#24

will be equivalent to G00 X-137

G00 Y-#25

will be equivalent to G00 Y52

G00 X#24

will be equivalent to G00 X137

G00 Y#25

will be equivalent to G00 Y-52

The sign in the dec la ra tion is al ways used to gether with the sign in the ac tual ex e cu tion – the

same dec la ra tion used as above Look at one of the above ex am ples:

G00 Y-#25

will be equivalent to G00 Y52

The rea son is strictly math e mat i cal and re lates to the use of a dou ble sign in a cal cu la tion In

many in stances, a neg a tive num ber will have to be added or sub tracted, and so on

The fol low ing ex am ples drilling tools show all four pos si bil i ties:

what is al lowed and what is not, what is le git i mate en try and what

es as to what is al lowed and what is not, what is le git i mate en try and what

is not – with explanations


Pro gramming in any lan guage has to ad here to a num ber of very strict rules and re stric tions im –

posed by the lan guage de vel op ers for many good rea sons Pro gram mers must fol low the rules,

con di tions and re stric tions that ap ply to the lan guage used Al though not strictly a lan guage,

Fanuc mac ros are no dif fer ent in this re spect In cor rect use of the macro tools can cause a sys tem

er ror (alarm) – it can also cause an un punch machine for Head wanted re sult, even dan ger ous sit u a tions

The fol low ing con di tions and re stric tions ap ply to all Fanuc cus tom macros, with some typ i cal

ex am ples shown for each item – the first col umn spec i fies the state ment, er ror or re stric tion, the

sec ond col umn pro vides con di tion or ex am ple:

Colon character


drilling Machine

Colon character is not allowed

Semicolon character


Semicolon character is not allowed

Zero value is neutral

(neither positive nor negative)

+0 or -0 cannot be identified

Leading zeros are ignored

#1 = 003 is the same as #1 = 3

Copyright 2005, Industrial Press Inc, New York, NY – FANUC CNC Custom Macros



Program number as an EIA identification

address O cannot be used with a variable

O#1 is not allowed

Program number as an ISO identification

address : cannot be used with a variable

:#1 is not allowed

Block number identification address N

cannot be used with a variable

N#1 is not allowed

Block skip identification address /

(slash symbol) cannot be used with a variable

/#1 is not allowed

Maximum value of an address


cannot be exceeded


then G#1 is not allowed

Brackets for a single variable

will be ignored

#[7] is the same as #7

One variable cannot replace another

variable directly Hydraulic punching machines – example 1 – incorrect

# #7 is drilling tools not allowed

One variable cannot replace another

variable directly – example 2 – incorrect

In the general in troduction to variables earlier, four groups of variables were iden tified

Copyright 2005, Industrial Press Inc, New York, NY –

FANUC CNC Custom Macros



In the general in troduction to variables earlier, four groups of variables were iden tified that are

used in macro pro grams:


Local variables


Common variables


System variables

drilling Machine


Null variables (same as empty or vacant variables)

It is very im cnc cutter por tant to un der stand these vari ables well, par tic u larly their dif fer ences This chap –

ter ex plains how to spec ify a value of a vari able – how to as sign a value to a vari able The first two

of the groups listed – the lo Busway Press Clamp Machine cal vari ables and the com mon vari ables are cov ered by this topic

Local Variables

Lo cal vari ables trans fer the user sup plied data to the macro body Up to 33 vari ables can be de –

fined as lo cal Nam ing this group of vari ables lo cal means their stored val ues are only ap pli ca ble

to the macro they have been de fined in, they are not trans fer able be tween mac ros In macro pro –

grams, each lo cal vari able is as so ci ated with an as signed let ter of the Eng lish al pha bet There are

two op tions avail able for the so called as sign ment lists, As sign ment List 1, which has 21 lo cal vari –

ables avail able, and As sign ment List 2, which has 33 lo cal vari ables avail able Both as sign ment

lists are de scribed here in de tail

Defining Variables

Vari ables that are de fined in the G65 macro call, can be within the range of #1 to #33 They

are called the lo cal vari ables, or ar gu ments They are avail able only to the macro that calls them and pro cesses them Once the pro cess ing of the macro is com pleted, each lo cal vari able is re set to

a null value, which means it be comes drilling tools empty and has no value – it be comes va cant

In prac ti cal terms, the lo cal vari ables are used to pass data def i ni tions from the source program

(such as a main pro gram) to a macro Once trans ferred, they have served their pur pose and are no

lon ger needed These vari ables were

Hydraulic system pollution control and filter selection considerations

Hydraulic system failure 80% of the above is caused by oil pollution, control oil pollution can extend the hydraulic components and hydraulic oil life, to ensure continuous and reliable operation of the system.
The hydraulic system of oil pollution control there are two main band saw measures: First, to prevent pollutants into the system, the second is the hydraulic system of oil filter purification.
One prevents contaminants from entering the system
Quite prevent disease from mouth. Design good sealed fuel tank, use good filter performance air filter, the installation of the system to pay attention to the removal of components cnc milling machine and pipeline impurities, the use of a good dust seal, the new oil into the system through rigorous filtering, which is to prevent contaminants into the system Measures.

CNC Drilling Machine for Sieve Plate











Two hydraulic system oil filtration purification
Suction filter, line filter and return oil filter to complete the oil filter purification, use filters to note the following:
1 suction port filter should be used to filter low precision, large flow capacity of the filter, poor flow capacity of the suction filter is easy to cause holes, suction filter for blocking large particles of CNC machine pollutants into the hydraulic pump., To prevent suspended in the oil Of the bubbles into the system. Plunger pump generally do not use the suction filter, the reasons omitted.
2 pipeline filter is generally installed in the more important upstream components, the filtration accuracy is higher than the friction with the gap with the components, the servo system pipe filter do not use bypass check valve, filter pressure to be high.
3 back to the oil filter pressure is low, in the piston rod thicker system, flow through the filter flow is greater than the pump flow, the choice of filter flow should be noted that the filter flow is greater than the pump flow and cylinder piston area ratio product.
4 filter flow selection: appropriate increase in filter flow will extend the filter life.
5 Selection of filter accuracy: In selecting the main filter of the system, such as the accuracy of the line filter, the filter should be able to clear the moving parts of the dynamic drilling machine film thickness of the oil particles, because this size of the particles once into the Gap, will cause the surface wear and tear, and the gap increases, so that the larger size of the particles into the gap, causing further wear, causing serious wear and tear of the “chain reaction”, “chain reaction” a bit like MLM , Can quickly lead to component failure.
Above description hydraulic system pollution control is mainly for solid particles, hydraulic system pollution sources also include water and air, the same can not be ignored. . . . . . In short, the hydraulic system design, manufacture, installation, use and maintenance of the entire process should pay attention to the control of hydraulic system pollution.
1 visual limit of the human eye is 40μm, and the resulting hydraulic components wear is generally less than 40μm particles, the naked eye can not see
2 Definition of filtration ratio: ß x = Number of particles larger than size x μm upstream / Number of particles larger than size x μm downstream
X: the size of particles, in μm
In the hydraulic servo system generally need to use filters than β3 ≥ 200 filters

Scientists have developed the first can be indirectly compatible silicon chip germanium tin semiconductor lasers

Swiss scientists have successfully developed the first group consisting only of carbon (Group IV) composed of ‘germanium and tin semiconductor lasers’, which means that it can be compatible with other elements of the family, such as silicon and lead. To put it more generally, this study is equivalent to turning on the chip in the use of laser communication gate (not only faster than the copper wiring rate, and also more energy-efficient). Although the use of germanium laser technology has been demonstrated before the chip, but the study of the core of this program is more easy to implement – because it can be embedded directly into the chip. Scientists from PGI-9 and Paul Scherrer Institute of Eurex have tried to use germanium and tin as an accessory, and in silicon wafers long taking the test welding of steel pipe. It was found that the germanium tin compounds were capable of simultaneously generating and amplifying the laser signal and that the tin element appeared to be the main optical function of the new facility. PGI-9 doctoral student StephenWirths to make up: ‘The high tin content determines its optical function, this is the first time we doped in the lattice of more than 10% of tin without loss of its optical quality notching machine.’


At present, the semiconductor lasers used in electronic systems are mainly composed of elements of the third or fifth group in the periodic table, such as gallium arsenide. Because of this, the laser made from these materials is not compatible with other silicon-based semiconductor installations (not only difficult, but also difficult). In addition, because of its adjacent data with different coefficients, the installation of life will be reduced. PGI-9 Dr. DanBuca said: ‘This laser installation to the lowest temperature in the history of things (minus 183 degrees Celsius / minus 297.4 degrees Fahrenheit).’ Believe that this test system in the optimization, will bring even more excellent performance drill hole in angle iron. In addition, the synchronous circuit clock signal can use up to 30% of the energy, so that in the light transmission process to throttle a lot of energy. The full text of the study, to move to the ‘Nature Photonics’ (NaturePhotonics) magazine on the sidelines.

Punch safe production, the key to the correct operation Standard punch

Punch safe production, the key to the correct operation Standard punch press operating procedures and methods to ensure personal safety, equipment safety and product quality and stability. Punch is a great risk of machine tools, we must firmly establish the idea of ​​safety first, we must strictly operational procedures to prevent accidents. Punching the right punching all the safety steps: In this case, 1, check whether the normal power supply connected, circuit, electronic components for damage or insecurity, the power indicator is lit, turn on the power to confirm correct. In this case, 2, check whether the smooth flow of oil equipment, tubing, joints at the oil spill, check tubing and fuel tank is sufficient, and on time refueling. In this case, 3, check the infrared emergency stop sensor is normal, and hand to do back and forth between the sensors or up and down action, pay attention to view the sensor and the left sensing device display the results, if any abnormal report and request processing 3D CNC Drilling Machine.

In this case, 4, check whether there is no work related to stamping the workpiece metal saw, debris. Check the upper and lower mold clearance, whether the loose screw, mold loose mold must be re-combination. In this case, 5, check the equipment guide column / track, mode-locked Aberdeen, mechanical interface components, both hands start / foot switch and other parts are normal and start hands or foot switch, the equipment running empty to determine whether normal. In this case, 6, to confirm that everything is normal, the product in accordance with the direction of the mold into the cavity, the stamping operation, by the shift management or quality control personnel to confirm the production of the first pieces to confirm the mass production began. 7, items must be placed in strict accordance with the requirements, not free to display. Get off work, such as the upper and lower molds have more bits or unfinished work should be linked to prohibit the use of warning signs. Turn off the main power supply, turn off the power supply box H-beam Steel Processing Machine. Advisory IPM punch, Dongguan IPM punch how much money please contact IPM punch manufacturer  Mobile: +86 15165021418 In this case, Original article, reproduced, please indicate the source:

History of Punch – From Induction Synchronizer to Digital Display Technology

In our country is the use of induction synchronizer and grating sensor, initially as an angle encoder, and then developed into a linear displacement sensor. The initial use of the field is on the military, and then measuring instruments, not to have a digital display only a few punch, and then have the job response of the CNC system. In 2003, Japan Mitutoyo (Mitutoyo) the company will be used for the screen grating digital display. Digital punch is 70 years of the 20th century to the transformation of micro-electronic technology to restore the traditional home of the revival of things bevel machine. After adopting the digital display device, the punching machine has advanced the machining precision and ergonomics, and reduced the reject rate. Punch digital display is widely used in the mid-1970s, the development of microelectronics to the field of integrated circuits appear to create a number of enterprises have raster digital appear.

The development of digital punching technology established as a punch response to the sensor, but also to promote the development of CNC technology and CNC punch. As the sensors and digital form the production of the old decline in the number of devices to achieve universal access to the original punch digital display device production is an emerging industry angle iron machine. China’s digital display technology to transform the traditional home punch is in the mid-1980s tapping machine, the government under the promotion of the provinces, municipalities and built a number of significant skills to the core, with a lot of money to subsidize enterprises to install the punch digital display device , The original domestic sensor is more mature product induction synchronizer, so the majority of the digital core is advertised in the majority of induction synchronous digital display device.

punch press of the thermal processing Practice has confirmed

Hot Pressing Machine 1, punch press of the thermal processing Practice has confirmed that the quality of the hot mold processing and service life of the mold a great impact. Die from the failure analysis of the reasons we can see, due to improper heat treatment caused mold failure ‘accident’ about 40% or more. Punch die parts quenching deformation and cracking, the early use of the process of fracture, with the touch with the thermal processing technology. (1) press the quenching and tempering press. This is the mold heat treatment in the hub. If the quenching heat generated overheating, not only will cause greater brittleness of the workpiece, but also in the cooling caused by deformation and cracking, seriously affect the life of the mold beam fabrication. Die quenching heating should pay special attention to prevent oxidation and decarburization, should strictly control the heat treatment process specifications, the premise of the case, can be vacuum heat treatment. Quenching should be promptly tempered, and in accordance with technical requirements using different punch tempering process. (2) stress relief annealing. Punch press mold parts in the rough after the stress should be carried out annealing treatment, with the purpose of eliminating the roughing caused by internal stress, so as not to produce excessive quenching deformation and cracks milling machine for sale. For high precision molds, after grinding or electric processing needed by the elimination of stress tempering treatment is conducive to the accuracy of the mold is not chaotic, and improve service life. (3) punch casting process, which is part of the mold manufacturing process an important part. For high-alloy tool steel mold, the material is usually carbide distribution and other microstructure technical requirements.

In addition, should also strictly control the casting temperature range, to develop accurate heating specifications, the use of accurate casting force method, and slow cooling after forging or timely annealing. (4) Preparation of heat treatment. Should be depending on the mold work parts of the different materials and requirements were used annealing cnc shearing machine, normalizing or quenching and other preparation heat treatment process to improve the organization, to eliminate casting defects in the organization to improve the processing technology. High-carbon alloy die steel through the appropriate preparation of heat treatment can eliminate the reticulation of secondary cementite or chain carbide, the carbide ball, refinement, and promote the distribution of carbide uniformity. This is conducive to ensuring quenching, tempering quality, improve die life. 2, punch press surface quality Die parts with the surface quality of the pros and cons of mold wear resistance, fracture resistance and anti-adhesion ability has a very close relationship, a direct impact on the service life of the mold. Especially the value of surface roughness on the life of a great impact on the mold, if the surface roughness value is too large, the work will produce stress concentration phenomenon, and in its peak, the valley between the cracks easily affect the cost-resistant die, but also Will affect the workpiece surface corrosion resistance, a direct impact on the die life and accuracy.