펌 사이트 : https://gcodetutor.com/cnc-machine-training/cnc-g-codes.html

 

CNC G Codes

I explore a large list of CNC G Codes and look at both their function and uses on both CNC lathes and CNC milling machines

gcodetutor.com

 

o control CNC machines we use commands called CNC G Codes. Although Different manufactures of the machine tool may adopt their own use for certain G Codes there is a core group that is common on every machine tool. These standards are used on CNC Lathes, Milling machines, routers and more recently by 3D printers (in a very basic form). Today we are going to examine this group and how they are used to control the machines.

G00 - Rapid travel

It can be shortened to G0 as the older machines didn’t have much RAM and every bit counts.

This command is used when the tool is not touching the part to rapid move, normally used when going home for a tool change and returning with a new tool. Some machinists like to rapid as close to the part as possible but I advise giving yourself at least 1mm clearance. Keep your hand on the feed knob and come in slow for the first time run. It is in this mode you will do the most damage if you didn’t get your tool set up right.

G00 X-100;

In the example above I am moving the cutter 100mm to the left.

G00 is the rapid travel command in G Code. It is used when the cutter or tool is not removing material so that the time it takes to machine the part is as quick as can be. The top speed is set by the machine parameters and therefore is only controllable by the operator using a rapid override control.

When using a rapid move, be aware of any clamps, vices, and parts that may be in your path. If you are unsure it may be wise to move the X and Y axis first, then on a separate line, move down in Z. It will increase your machining time by a second or two but it will help avoid a 3 Axis crash.

 

The G00 command can be shortened to G0 as the older machines didn’t have much RAM and every bit counts.

- Marc

 

G01 - Linear Interpolation

A G01 command is used when you are cutting in a straight line. This command has to have a feed rate (F) active before it will run. A typical block would look like G01 X-100 F50.0; You don’t need to add this command on every line, as long as there is no other movement G-Code active, for example, you only need to add it after a G02, G03 or a G00 command. In much the same way, a feed rate (F50) is only needed once until you want to change the speed in which you are cutting.

G00 X101 Z1.0;
G01 X100 Z-20 F100;
X110 Y-40;
G00 Z300;

This command can be used with all axis cutting at the same time, or just one. It is not common to cut with the Z axis as well as X and Y but it is possible if needed.

When programming a profile it is easier to use cutter compensation G41 and G42 then you do not need to allow for the radius of the cutter when plotting your tool paths, you can simply use the dimensions on the drawing and the machine will offset the cutter to achieve the correct dimensions.

 

G02 and G03 - Circular Interpolation

G02 is used to machine an arc or radius in a clockwise direction and G03 is for anti clockwise.

Using an ‘R’ value to define the radius, the G02/G03 command moves the cutter in a straight line with the defined radius at the end of this move.

If a feed rate is already active there is no need to add it to this line unless you wish to change the feed rate for the machining of the arc.

G03 Y50.0 R10.0 F100.0;
G01 X50.0;

The centre point of the arc can also be defined using I, J, and K values. I (X) J(Y) and K(Z) defines the auxiliary axis.

using the drawing above, programming an arc using I and J values would look like this:

G03 Y50.0 I10.0 J40.0 F100.0;
G01 X50.0;

The K is seldom used but is available if an arc using the Z axis is needed.

When using G02 with G01 and G03 (Counter clockwise arc) any shape can be machined. These three G Codes are the foundation of G Code programming and are the three you will use when cutting material.

 

G04 - Dwell

Sometimes we need to pause the cutter for a brief moment, for that we add a dwell to the code to stop the machine from continuing reading the program for a specified amount of time.

Uses:
While drilling with a flat bottom drill and the surface of the bore has a chattered finish, we can stop moving the drill in Z-Axis with it still rotating for half a second to clean up the surface.

G01 Z-20.0 F50; G04 X500; G01 Z5.0;

The few blocks listed above looks like the tool will move 500mm while deep in the part. It won’t. The X value in ‘G04 X500’ forces the tool to dwell for 500 milliseconds before moving onto the next block. The feed rate does not need to be specified again after a dwell command as the machine still knows that one was defined before the dwell on the G01 block.

 

G20 and G21 - Measurement Systems

G20 and G21 Imperial and Metric systems G20 Define Inch units; G21 Define Metric units; CNC Machines can read measurements in both Imperial and Metric systems (inches and mm) this is defined by G20 and G21.

Although it is only needed once in the program it is good practice to add this information after every tool change. This makes it safer to run from any position in the program.

For example, you might want to repeat the finishing cutter pass to remove more material after measurement. To define the unit of measurement again will stop the machine from accidentally being in the wrong system and moving unexpectedly.

 

G90 and G91 - Absolute or Incremental

G90 = Absolute positioning
G91 = Incremental positioning

A positioning system must be defined before any movements are made, below is an explaination of both positioning systems

G90 selects the absolute positioning system. In this mode, all movements of the spindle are taken from the datum position. For example, if X100.0 is read by the control then the tool will move to 100mm in the plus direction from the datum. If X150.0 was the next positional movement it would move the tool another 50mm in that direction.

G91 selects the incremental positioning system. When G91 is active all movements of the spindle are taken from its last known position. For example, If X100.0 is read then the tool will move 100mm in the plus direction of the position that the tool is already in. If X150.0 was read after this move, The tool will move another 150mm in the plus direction.

You can read more about Absolute and Incremental positioning here

 

G40, G41 and G42 - Cutter Compensation

G40 = Cancels cutter compensation
G41 = Left cutter compensation
G42 = Right cutter compensation

Without using cutter compensation when programming we would have to allow for the diameter of the tool when writing the cutting paths. We can program to the dimensions of the component by using cutter compensation.

This offsets the cutter by its radius depending on the direction of cut.

For more information, check out this article on cutter compensation

 

Multiple Repetitive Cycles (Lathe)

G70 = Finishing Cycle
G71 = OD/ID Roughing Cycle
G72 = Rough facing cycle
G73 = Pattern repeating cycle
G74 = Face grooving cycle
G75 = Grooving cycle
G76 = Screw thread cutting cycle

Multiple repetitive cycles enable the programmer to remove a lot of material with just a few lines of g-code, often reusing the profile as a subroutine. These repetitive cycles allow the machine to take care of the tool paths which speeds up the programming process. To learn more about each individual multiple repetitive cycle, check out this article

 

Canned Cycles

G80 = Cycle
G81 = Drilling Cycle
G82 = Counter Bore Cycle
G83 = Peck Drilling Cycle
G84 = Rigid Tapping Cycle
G85 = Boring Cycle (bore in, bore out)
G86 = Boring Cycle (bore in, rapid out)

Canned cycles enable us to write g-code to drill and bore many holes with minimum lines of g-code. They allow us to give all the information on a single line, then the following lines are positional.

Read more on what a canned cycle is here and how we program with them here

 

While this article covers only the most basic of G-Codes, below is a more complete list.

 

CNC G Codes list

Below is a full list of common G Codes most of which we will discuss in future articles

 

 

 

인터넷을 찾아보면 여러가지 방법이 나온다.

 

그 중에는 터미널을 열어서 커멘드를 쳐서 파일을 열어서 수정해서 하라고 나오는데,

 

쳇지피티까지도 그모양으로 가르쳐 준다.

 

stack overflow까지도 그렇게 나오는데

 

참조:https://kegui.medium.com/change-jupyter-notebook-startup-folder-windows-608dfcfdc104

 

Change Jupyter Notebook Startup Folder

TL;NR:

kegui.medium.com

 

여기를 찾아보니 아주 쉽게 나온다.

 

시작 메뉴에서 Jupyter Notebook 아이콘을 복사해서 바탕화면에 복사해서 붙여 놓고  속성에 들어가서 수정하라고 나온다.

 

내가 win10 이용자라 win10에서만 설명하겠다.

 

jupyter notebook icon은 아래 그림과 같이 마우스 오른쪽으로 클리하여 자세히를 클리하여 파일위치 열기를 한다.

 

 

 

아래와 같이 파일열기로 아이콘들이 보이면 jupyter notebook 아이콘을 복사하여 바탕화면에 놓는다.

바탕화면에서 해당 아이콘을 오른쪽 클릭하여 속성을 클릭하면 아래와 같은 그림이 나온다.

 

 그림에서 대상이 나오고 대상안에  "%USERPROFILE%/" 이부분에 원하는 폴더 경로를 입력하고 실행하면 바로

 

그곳을 root로 하는 jupyter notebook이 열린다.

 

 

우리나라 시급은 1만원이 안된다. 

 

만일 시급 1만원이라고 계산해도 시급 1만원이면 하루 8만원을 번다고 봐야 한다.

 

노가다 일당이 하루 13 ~ 14만원인데 연장 2시간을 하면 1.5공수 연장에 야간 2시간을 더하면 2공수

즉 26 ~ 28만원을 하루에 벌게 된다.

 

기본만 일을 해도 일반 사무직이나 공장 노동자보다 형편이 낫다.

 

반도체 공장이나 조선업이나 건설 현장이나 다니면 생활이 많이 불편함이 있지만 오히려 노가다가 허접한 직업보다는 낫다.

 

다만 노가다를 하더라도 매일 매일 바뀌는 용역 보다는 한달이라도 고정으로 일할 수 있는 곳에서 일하는 것

 

을 추천한다.

 

노가다를 하더라도 나중에 팀장이 되어 팀을 꾸리게 되면 대기업 임원 부럽지않은 소득을 얻게 되니 공부

 

잘했다고 성공하고 잘사는 것이 아니라는 것을 느끼게 된다.

 

공장에서 주야 교대로 일을 해도 한달에 280 ~ 320 정도를 벌게되는데 노가다는 8시간 20일 근무해도

 

280을 벌게되니 왜 ?? 굳이 공장에서 일을 하겠는가??

 

 

힘들게 학원다니고 공부해서 대학가봐야 월급도 적고 미래도 보이지않는데 굳이 힘들게 공부할 이유가

 

무엇인가??  

 

결혼하지않고 애 않낳고 그냥 살면 굳이 직업에 연연하고 힘들게 살지않고 편하게 살수 있고

 

하고 싶은 것이나 하면서 지내면 된다.

 

 

한국은 대툥령부터 사기꾼 협잡꾼 부패 검사 아닌가??

 

 

미래가 없다.

머신러닝(Machine Learning)은 컴퓨터가 데이터를 학습하여 인간의 개입 없이 스스로 문제를 해결할 수 있는 알고리즘을 개발하는 분야입니다. 머신러닝은 데이터를 분석하고 패턴을 발견하여 예측, 분류, 군집화 등 다양한 작업을 수행할 수 있습니다.

머신러닝은 크게 지도학습(Supervised Learning), 비지도학습(Unsupervised Learning), 강화학습(Reinforcement Learning)으로 구분됩니다.

지도학습은 레이블이 있는 데이터를 사용하여 학습하는 방법으로, 입력 데이터와 정답 데이터가 주어지면 알고리즘이 입력 데이터를 분류하거나 예측하는 모델을 학습합니다. 이를 통해 새로운 입력 데이터가 주어졌을 때 정확한 결과를 출력할 수 있습니다. 예를 들어, 스팸 메일 필터링, 이미지 분류, 음성 인식 등의 작업에 적용됩니다.

비지도학습은 레이블이 없는 데이터를 사용하여 학습하는 방법으로, 입력 데이터의 패턴이나 구조를 파악하거나 유사한 데이터끼리 군집화하는 등의 작업을 수행합니다. 예를 들어, 데이터 압축, 이상 탐지, 추천 시스템 등에 적용됩니다.

강화학습은 환경과 상호작용하며 최적의 행동을 학습하는 방법으로, 보상 함수를 통해 양성 보상을 받으면서 행동을 개선합니다. 예를 들어, 로봇 제어, 게임 AI 등에 적용됩니다.

머신러닝은 다양한 분야에서 응용되고 있으며, 인공지능의 발전과 함께 더욱 중요한 역할을 하게 될 것입니다.

 

지도학습(Supervised Learning)은 입력 데이터와 그에 대한 레이블(정답) 데이터가 함께 제공되는 상황에서 학습하는 방법입니다. 이 방법은 입력 데이터와 정답 데이터 사이의 관계를 모델링하여 새로운 입력 데이터에 대한 정확한 출력을 예측하는 모델을 만듭니다.

예를 들어, 이미지 분류 문제를 생각해보면, 입력 데이터는 이미지이고, 레이블 데이터는 해당 이미지에 대한 분류 정보(예: 고양이, 개, 자동차 등)입니다. 이 경우 모델은 입력 이미지와 그에 해당하는 레이블 정보 사이의 관계를 학습하고, 새로운 이미지가 입력되면 해당 이미지가 어떤 분류 정보에 해당하는지를 예측합니다.

지도학습은 분류(Classification)와 회귀(Regression) 문제로 나뉩니다.

분류 문제는 미리 정해진 여러 개의 클래스 중 하나에 해당하는 값을 예측하는 문제입니다. 이진 분류(Binary Classification)는 두 개의 클래스 중 하나를 예측하는 문제이고, 다중 분류(Multi-class Classification)는 세 개 이상의 클래스 중 하나를 예측하는 문제입니다. 이러한 분류 문제는 스팸 필터링, 이미지 분류, 언어 감지 등 다양한 분야에서 사용됩니다.

회귀 문제는 입력 데이터와 연속적인 값을 예측하는 문제입니다. 예를 들어, 주택 가격 예측, 날씨 예측 등이 있습니다.

지도학습은 다양한 알고리즘을 사용하여 문제를 해결할 수 있습니다. 대표적인 알고리즘으로는 선형 회귀(Linear Regression), 로지스틱 회귀(Logistic Regression), 결정 트리(Decision Tree), 랜덤 포레스트(Random Forest), 신경망(Neural Network) 등이 있습니다.

한국 사회는 언제부터인지는 모르겠으나 나만 돈 벌면 된다는 의식과 서구사회의 LGBQT같은 비도덕적인

 

사상을 퍼트리며 공동체를 무너뜨리고 있다.

 

개인간에 이런 도덕성이 중요하게 보이지않을 수도 있으나 조직으로 확대하여 본다면 조직이 무너지고

 

약회되고 발전하지 못하고 주저않게되는 것이 이 도덕성의 문제이다.

 

내가 보기에 이명박 시절에서부터 이런 가치관 생각이 급속이 더욱 강회된 것 같다.

 

물론 이런 것이 한국만의 문제가 아니며 전세계적으로 보여지는 현상이다.

 

이제 이런 것이 심회되면 한국과 세계의 미래는 더욱 어두워질 것이라는 것을 모두 알아야 한다.

모두들 알다시피 미국은 국채 발행을 매우 많이 하고 있고 멈출 기미를 보이고 있지않다.

 

미국은 내가 듣기로 부자들에게서 세금을 걷는 대신 국채를 발행해서 운영하는 것으로 알고 있다.

 

과거에는 이런 미국의 채권을 중국 대만 한국 일본 사우디 러시아등이 다 받아주었지만

 

2008년 리만 브라더스 사태 이후로 분위기가 바뀌었고 최근에  러우전이 발생하고 러시아에 대한 

 

경제제재를 시작으로 글로벌 사우스는 미국을 포함한 서방에 자신들의 자산을 보관하는 것에

 

불안함을 느끼고 그 자산을 축소하기 시작했다는 것을 여러 매체를 통해 알게 되었다.

 

 

금리인상에 대해서 보면 겉으로는 인플레이션때문에 금리를 올린다고 하지만  과연 미국이 채권을 계속해서

 

발행해야하는데 팔리지도 않는 채권을 그냥 팔수 있느냐 하는 문제가 있고 팔리지않으니 금리를 올려야만

 

하는데 금리를 올리면 은행들이 망한다는 문제가 있다는 것..

 

그럼, 금리인상을 하지않고 그냥 미국 연준에서 돈을 마구 찍어서 채권을 사주면 미국 달러가치 하락으로

 

인하여 인플레이션이 발생하여 다시금 금리인상에 나설수 밖에 없는 상황이 되는 것이고 

 

특별히 경기 침체가 발생하는 상황이 되어 금리를 올리지않고 미국이 연준의 머니 프린팅 기능을 쓰려고

 

하는데 러시아와 사우디가 석유 감산을 함으로써 다시금 세계 경제는 강력한 인플레이션 압박을 받게되고

 

이는 결국 미국이 인플레이션을 잡기 위해 연준이 금리를 올려야하는 상황에 빠진다는 것이다.

 

과거 폴보커가 엄청난 금리인상을 단행했을때 오팩의 석유가격 담합으로 유가가 천정부지로 치솟아

 

인플레가 한없이 지속될 때였다는 것을 생각하면 경기 침체에도 불구하고 유가 담합 감산으로 인한

 

인플레이션은 금리인상을 부를 수 밖에 없는 것이다.

 

더욱이 유가인상은 경기침체를 부르는 것인만큼 아마도 미국 연준이 당장 추가 금리인상을 하지않아도 

 

경기 침체와 인플레이션이 동시에 다가 오면서 어쩔수없이 금리인상을 해야하는 상황에 직면하게 될 것이다.

 

한국은 러시아 중국과 좋은 관계를 맺지못하면 아마 한국뿐 아니라 다른 어느 나라도 이제 러시아와 중국과

 

좋은 관계를 맺지못하면 국제 시장에서 도퇴되고 망하는 구조로 갈 가능성이 매우 높다.

 

 

이번 러우전은 미국의 자승자박이라고 봐야하겠다.

 

그리고, 이런 상황에서 국내 주식 차트를 보면서 주가가 올라주기만 바라는 많은 분들은

 

참 안타까운 분들이라고 생각된다.  적당히 이익봤으면 빨리 빠지고 적당히 손절할 수 있으면 빠지는 것이

 

낫지않을까??

 

국내 기관이 많이 받아주었지만 한국은 이상태로 1년만 지속하면 제2의 IMF를 맞이하게 된다. 

 

그러면 주가가 어찌될 것인가 참 암울하다고 봐야한다.

 

+ Recent posts