# G-code read from txt file

**URL:** <https://tech-community.robotics.abb.com/t/g-code-read-from-txt-file/9447>\
**Category:** RAPID Programming\
**Tags:** g-code, gcode, robot-studio, rapid, training\
**Created:** [April 21, 2020, 10:08am UTC](https://tech-community.robotics.abb.com/t/g-code-read-from-txt-file/9447 "2020-04-21T10:08:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danijel](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@danijel](https://tech-community.robotics.abb.com/u/danijel)\
**Post date:** [April 21, 2020, 10:08am UTC](https://tech-community.robotics.abb.com/t/g-code-read-from-txt-file/9447/1 "2020-04-21T10:08:00Z")

</div>

Hi,  
i tried write my own code for read G-code and result is very good  
[https://www.youtube.com/watch?v=TnEYeys7Kds&feature=youtu.be](https://www.youtube.com/watch?v=TnEYeys7Kds&feature=youtu.be)

and here is txt file  
[sc.txt](https://tech-community.robotics.abb.com/uploads/short-url/kMPMLq0lGB6MAFQSXlDxeapxMtc.txt) (12.3 KB)

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [April 21, 2020, 11:54am UTC](https://tech-community.robotics.abb.com/t/g-code-read-from-txt-file/9447/2 "2020-04-21T11:54:44Z")

</div>

I do not know G code. What is it that you have done? Convert robtargets to G Code?

---

<div class="post-metadata">

**Author:** ![DenisFR](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@DenisFR](https://tech-community.robotics.abb.com/u/DenisFR)\
**Post date:** [April 22, 2020, 9:47am UTC](https://tech-community.robotics.abb.com/t/g-code-read-from-txt-file/9447/3 "2020-04-22T09:47:03Z")

</div>

@danijel : Are you going to run it on a real robot afterwards?  
I want to warn you that the manipulator, by default, is not precise.  
If you ask them to move 100mm, they can move 101mm.  
They are only reproducible. When you teach a position, they come back to it.  
To be precise, you must buy the Absolute Accuracy option.

---

<div class="post-metadata">

**Author:** ![danijel](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@danijel](https://tech-community.robotics.abb.com/u/danijel)\
**Post date:** [April 23, 2020, 9:59am UTC](https://tech-community.robotics.abb.com/t/g-code-read-from-txt-file/9447/4 "2020-04-23T09:59:34Z")

</div>

> [@DenisFR](#):
>
> @danijel : Are you going to run it on a real robot afterwards?  
> I want to warn you that the manipulator, by default, is not precise.  
> If you ask them to move 100mm, they can move 101mm.  
> They are only reproducible. When you teach a position, they come back to it.  
> To be precise, you must buy the Absolute Accuracy option.

Thank you very much i now learn something new 🙂
