usernameinvalid
Plastic
- Joined
- Feb 15, 2021
I'm not that well versed in macros, but by popular demand, I'm finding myself using them more and more lately.
I recently had someone ask me if I could write a macro that would prevent his fanuc 0i-MF controlled router from going to a negative Z value.
How would one accomplish this?
Bonus: Can the post be edited to include this Z-negative check?
Here's my rough idea so far:
-------------------------------------------
O1234
IF [#5003 LE 0] GOTO 100
(program body)
M99
N100 #3000 = 1 (NEGATIVE Z VALUE DETECTED)
-------------------------------------------
**I believe #5003 is the variable for programmed Z, but I will have to double check that**
Is it as simple as that? Criticism welcome!
I recently had someone ask me if I could write a macro that would prevent his fanuc 0i-MF controlled router from going to a negative Z value.
How would one accomplish this?
Bonus: Can the post be edited to include this Z-negative check?
Here's my rough idea so far:
-------------------------------------------
O1234
IF [#5003 LE 0] GOTO 100
(program body)
M99
N100 #3000 = 1 (NEGATIVE Z VALUE DETECTED)
-------------------------------------------
**I believe #5003 is the variable for programmed Z, but I will have to double check that**
Is it as simple as that? Criticism welcome!