8-51
8
ROBOT LANGUAGE
8-5 Sample Programs
8-5-15
Specifying a position on a pallet from I/O
With this sample program the robot moves to a position on a 1×26 pallet. The position is specified
from I/O. (This program can be applied to more than 256 conditional jumps which are not possible
with the JMPF statement.)
■ Pallet work positions should be specified with general-purpose inputs DI8 to DI0. (in binary
digits)
DI8 to DI0 should be set before executing the program and retained until movement
starts.
■ Teaching each point of P251 to P254 should be completed beforehand in PNT (point) mode.
(Matrix is defined as pallet number 0 in this example.)
Program Comment
[NO0]
001: MAT 10, 26, 0 ; Defines 10×26 matrix as pallet number 0
002: C 0 ; Sets counter variable to 0
003: JMPB 1, 0, 0 ; Jumps to L1 when DI0=0
004: C+ 1 ; Adds 1 to counter variable
005: L 1 ; Label definition
006: JMPB 2, 1, 0 ; Jumps to L2 when DI1=0
007: C+ 2 ; Adds 2 to counter variable
008: L 2 ; Label definition
009: JMPB 3, 2, 0 ; Jumps to L3 when DI2=0
010: C+ 4 ; Adds 4 to counter variable
011: L 3 ; Label definition
012: JMPB 4, 3, 0 ; Jumps to L4 when DI3=0
013: C+ 8 ; Adds 8 to counter variable
014: L 4 ; Label definition
015: JMPB 5, 4, 0 ; Jumps to L5 when DI4=0
016: C+ 16 ; Adds 16 to counter variable
017: L 5 ; Label definition
018: JMPB 6, 5, 0 ; Jumps to L6 when DI5=0
019: C+ 32 ; Adds 32 to counter variable
020: L 6 ; Label definition
021: JMPB 7, 6, 0 ; Jumps to L7 when DI6=0
022: C+ 64 ; Adds 64 to counter variable
023: L 7 ; Label definition
024: JMPB 8, 7, 0 ; Jumps to L8 when DI7=0
025: C+ 128 ; Adds 128 to counter variable
026: L 8 ; Label definition
027: JMPB 9, 8, 0 ; Jumps to L9 when DI8=0
028: C+ 256 ; Adds 256 to counter variable
029: L 9 ; Label definition
030: MSEL 0 ; Specifies movement matrix
031: MOVM C, 100 ; Moves to pallet at speed 100
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com