I want to use the current BG Logic, basically a simple interference zone....
PR[i] = LPOS doesn't work. So maybe a sys var that has world tcp coordinates.
I want to use the current BG Logic, basically a simple interference zone....
PR[i] = LPOS doesn't work. So maybe a sys var that has world tcp coordinates.
Look at using a ref(erence) position to turn on a digital output when near or at this position. BG logic is used for things that are in either an on or off state like inputs and outputs. It's not for checking positions.
Just want to look at the X position.
'I don't know' would have been fine.
I am sorry if you think i was being snotty answering your questions. I tried to help you by telling you that BG logic is for logic only. You left a general question about something that is against its design. Be more specific please.
Good Luck-
I want to use the current BG Logic, basically a simple interference zone....PR[i] = LPOS doesn't work. So maybe a sys var that has world tcp coordinates.
I've done joint positions like this in BGlogic before: R[160:Joint 1]=($SCR_GRP[1].$MCH_ANG[1]) ;
But I think R[160]=($SCR_GRP[1].$MCH_POS_X); would work for x-position in world, you have to test it though.
Edit: I just used it for visualization, not interference zones. I'm not sure how quickly the position values updates.
The problem is not how fast the $SCR_GRP[1].$MCH_POS_X updates.
The real problem is that it updates only during motion by program execution.
It does not reflect the robot jogging.
Jogging may be detected programmatically, in order to know the reading is invalid since,
but I've never heard about a way to read the position while jogging.
The problem is not how fast the $SCR_GRP[1].$MCH_POS_X updates.
The real problem is that it updates only during motion by program execution.
It does not reflect the robot jogging.
Jogging may be detected programmatically, in order to know the reading is invalid since,
but I've never heard about a way to read the position while jogging.
Weird, I didn't know that. When looking at the angle variables it updates just fine even in jog mode
If you want a very good interference zone in both Auto and Jogging I would recommend the Fanuc Space check function. It works very very well.
Yes, it works well, when it works at all (it is not functional as long as a tracking program is running).
This has nothing, however, with reading world coordinates in background logic, which was the initial question.
You are correct on the tracking, although he didn't say he was tracking.
And I must have misunderstood the second half of his question, "basically a simple interference zone...."
Some new controllers are loaded with DCS to replace hard wired safety curcuit. It is nice to use in this case if you have it.
I know this is a late response, but I have done this with BG Logic, and it's very simple:
R[120:Xpos]=$SCR_GRP[1].$MCH_POS_X ;
R[121:Ypos]=$SCR_GRP[1].$MCH_POS_Y ;
R[122:Zpos]=$SCR_GRP[1].$MCH_POS_Z ;
;
!At Machine ;
F[2:AtMach]=(R[121:Ypos]<R[124:AtMachYBnd]) ;
;
!Inside Machine ;
F[1:InMach]=(R[121:Ypos]<R[123:InMachYBnd]) ;
R[123] & R[124] are set to the Y value of the boundary you want to define. F[1] & F[2] will turn on when the TCP crosses that boundary. You can be as complex or simple as you like. Such as:
F[1]=(R[120:Xpos]<R[100:XHigh] AND R[120:Xpos]>R[101:XLow] AND R[121:Ypos]<R[102:YHigh] AND R[121:Ypos]>R[103:YLow] AND R[122:Zpos]<R[104:ZHigh] AND R[122:Zpos]>R[105:ZLow])
... which will set a flag if the TCP is within a defined box in space. However I try to keep each line down to only one or two boundaries if possible.
As others have stated, it only works during program execution and not jogging. It is very helpful with recovery though. One word of advice: If you plan to use this for recovery, also include this as one of the first lines in your recovery routine:
This will just move the robot to it's current position. That way if somebody has jogged the robot since the last time it was run, the MCH_POS variables will update.