Programs: Difference between revisions

114 bytes added ,  5 years ago
no edit summary
No edit summary
Line 1:
Teach pendant programs are generally simplistic, following much of the same structure as other programming languages.
Program structure for Fanuc robots is top down. That is, the instructions will run in order. Jumps will continue right after their destination LBL, CALLs will run from top to bottom and continue once they reach the called program's END with the line after the original CALL.
 
It's a good idea to break your program into sections as listed below, to help organize your code.
 
 
 
Line 76 ⟶ 79:
 
'''C P[8] 222mm/s Fine OFFSET PR[10] ...P[6] R[11] Fine OFFSET PR[10]'''
 
 
==== Notes ====
The program listed above could have been done much more simply with a group input and a SELECT instruction. It was left as IF statements for simplicity.