I am using FANUC's palletize instruction (software option J500) in a machine tending program for picking blank parts to load into a machine. I would like to extract the position register elements and copy it to a register (to display to the operator the current pick row, column, layer). However I cannot find a simple way to do this, what I would like is an instruction like: "R[x] = PL[x,i]" or "PR[x,1-3] = PL[x]" but this doesn't seem to exist. Right now my solution is to use if statements, as they are the only way to monitor individual elements (that I have found so far), which looks as follows:
IF PL[1:BLANK] = [1,*,*], JMP LBL[1]
IF PL[1:BLANK] = [2,*,*], JMP LBL[2]
...
IF PL[1:BLANK] = [n,*,*], JMP LBL[n]
LBL[1]
R[1:ROW] = 1
JMP LBL[i]
LBL[2]
R[1:ROW] = 2
JMP LBL[i]
...
LBL[n]
R[1:ROW] = n
JMP LBL[i]
LBL[i]
[END]
This works, but it seems like there should be a much simpler method for just copying 3 integer values.
Any advise it appreciated, thank you in advance!