Тёмный

Understanding FANUC Macro B Variables 

Practical Machinist
Подписаться 89 тыс.
Просмотров 17 тыс.
50% 1

What exactly is a G-code variable? In this video tutorial by ‪@GCodeTutor‬, we are going to provide a simple explanation and show some examples of how to use them correctly.
When we are programming with G-code, many FANUC controls these days come with macro B programs enabled, and that allows us to use variables in our programming.
But what exactly is a variable? In a nutshell, a variable is a symbol for a number we don't know yet. They are the backbone of all programming languages. In the world of G-code, variables are expressed in the program by a hash symbol followed by a number, like in the example below
100 = 1
So we can give variables a number or a value, so if we state # 100 = 1, every variable # 100 in the program will equal 1.
Variables can also be used to do math within G-code. Variables math is often used to count cycles by adding a simple code like this "# 100 = # 110 + 1" at the bottom of every block of the program so that it adds 1 to the variable # 100 every time it gets to that point of the program.
By giving a value to a variable, we define the variable, and there are multiple ways to do that. We can add it manually into the register of the machine controls or we can change the value of the variables inside our NC program.
To learn more about FANUC macro B variables, visit Gcodetutor.com (rb.gy/7yzqfn).
Stay tuned for more machining videos!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Recommended CNC programming books:
Fanuc CNC Custom Macros - amzn.to/370yX0P
CNC Programming Handbook - amzn.to/2MPxT9g
CNC Programming Techniques - amzn.to/3aTS4el
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Practical Machinist is the largest and most engaged metalworking community across the web. With more than 160,000 registered members and 300,000+ social media followers, Practical Machinist is the easiest way to learn new techniques, get answers quickly, and discuss common challenges with your peers. Visit Practical Machinist today to join the community and start connecting with your peers.
Become a Practical Machinist member (www.practicalmachinist.com/)
Like us on Facebook ( / practicalmachinist )
Follow us on Instagram ( / practicalmachinist )
Follow us on Twitter ( / prac_machinist )
Connect with us on LinkedIn ( / practical-machinist )
#FANUC #Gcode #CNCprogramming

Наука

Опубликовано:

 

23 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 7   
@kuei12
@kuei12 3 года назад
#101+#102=#103? I think you mean #103=#101+#102
@terrymoorecnc2500
@terrymoorecnc2500 3 года назад
Variables are not just numbers we don't know yet, they can be a lot of things from input data, read values. temporary storage registers or macro behavior modifiers. You might consider going to a local Fanuc factory Class.
@elvirathon
@elvirathon 2 года назад
Great video
@corbettcorbett2688
@corbettcorbett2688 Год назад
Good stuff
@TheKnacklersWorkshop
@TheKnacklersWorkshop 3 года назад
Good explanation... Thank you...
@paulputnam2305
@paulputnam2305 6 месяцев назад
#100=1 #100=#110+1 “Danger, Danger, Will Robinson, #110 does not compute.” “Aliens are approaching!”
@hoanphan9358
@hoanphan9358 10 месяцев назад
This is not correct. A variable can have more than 8 digits. Please verify.
Далее
Cutter Compensation: when and how to use it
5:03
Просмотров 43 тыс.
How to Use Macro Variables to Cut a Corner Radius
15:56
Introduction to Canned Cycles
7:44
Просмотров 22 тыс.
Programming CNC Macros - Part 1
11:00
Просмотров 67 тыс.
CNC Macro Programming Tutorial: IF Statements
5:33
Просмотров 15 тыс.
Programming CNC Macros - Part 2
19:40
Просмотров 26 тыс.
Screw cutting on a CNC Lathe using G76 code
6:53
Просмотров 49 тыс.
PLC Basics: Ladder Logic
26:20
Просмотров 352 тыс.
Здесь упор в процессор
18:02
Просмотров 384 тыс.
$1 vs $100,000 Slow Motion Camera!
0:44
Просмотров 26 млн
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Просмотров 1,6 млн