Does anyone know of a variable that contains the points for creating a Frame using the 3 point method? I want to load the Origin, X, and Y point directly based on some calculations. I found the variable that contains the Frame data once it is calculated. I could not find the variable for the actual points that define that frame, if it exists.
Variable for Frame 3 point method
-
DaveP -
April 20, 2016 at 10:29 PM -
Thread is Resolved
-
-
Instead of trying to flush out the system variables, which are very likely there.. somewhere, what about using direct entry?
MENU, Setup, Frames
F3 OTHER, Tool Frames
F2 METHOD, Direct entryManually type in your calculated values for X,Y, and Z, and leave wpr at 0
Will that achieve what you want to accomplish?
-
That is the method I am using now. I am manually probing a fixture with my gripper and teaching some Position Registers with the Edges. I have a program that sets Registers equal to the values of the PR that correspond to the X, Y, & Z for the Direct Entry points of the User Frame. I would like to automate the Direct Entry if possible, but I have not found the Variables for the Direct Entry points.
-
Hello,
If this may help, you can use Karel FRAME function to generate a frame and override the '$CB_GRP[1].$FRM_OFFSET' variable with your newly created frame.
-
Quote
Hello,
If this may help, you can use Karel FRAME function to generate a frame and override the '$CB_GRP[1].$FRM_OFFSET' variable with your newly created frame.
I meant the '$MNUFRAME[1,*]' variable
-
Here is an example for this program :
QuotePROGRAM FRM_OVD_XMPL
VAR
origin:POSITION
point1:POSITION
point2:POSITION
newframe:POSITION
STATUS:INTEGER
entry:INTEGER
BEGIN
origin = GET_POS_REG(1,STATUS) -- retrieve coordinates values from position register
point1 = GET_POS_REG(2,STATUS)
point2 = GET_POS_REG(3,STATUS)newframe = FRAME(origin,point1,point2) -- Calculate frame
SET_VAR(entry, '*SYSTEM*','$MNUFRAME[1,1]',newframe,STATUS) -- Assign newframe value to UFRAME[1]
END FRM_OVD_XMPL
-
Here is a way to do it without Karel, just using a TP program. But you will have to define it more like direct entry than a 3 point method.
Calculate your new user frame position and orientation, then store it into a single position register.
Then set the user frame equal to that Position Register
: UFRAME[1]=PR[1] ;
-
Thanks for all the suggestions. The Karel program looks like it will work for actually defining the frame, which is what I need. I am not using Karel on that robot, but I might now just to implement this feature.
-
Hi all,
I assume that the skalactiks program shown above does not write the three positions (Orient Origin Point, X Direction Point and Y Direction Point at setup screen. origin, point1 and point2 in the example) to the associated variables, does it? However, does anyone know in which variables the three positions are to be found? I would like to store them in the program as well (if not done automatically), to have the possibility to maybe check them later.
I'd guess they are stored in FRAMEVAR.VA. I found lots of positions there, but none of them has such an obvious name that you could tell it corresponds to these three positions. Unfortunately, the setup page only shows used for the three positions, but not the position itself. Otherwise I could search for it myself.
Thanks in advance.
-
In skalactik's program, he writes the values from PR 1, 2, and 3 into the position variables that are declared at the beginning of the program.
Those positions are local Karel variables, if you want to view those positions, you would just select the program, press the DATA key, then F1 for TYPE to select and view the Karel positions.
The only thing stored in FRAMEVAR.VA would be the resulting UFrame[1].
-
Looking through my FRAMEVAR.VA, I found this. The highlighted positions are the three points defining my origin, x, and y (positions are world 0). I don't know how to make use of this information, but it's definitely there.
edit: posting this removed the highlighting. COMP_POS1.NODEDATA[13].NODE_POS, COMP_POS1.NODEDATA[14].NODE_POS, and COMP_POS1.NODEDATA[15].NODE_POS are origin, x, and y, respectively.
edit #2: I looked at another robot and on that one, it's 7, 8, and 9 instead of 13, 14 and 15.
Code
Display More[TPFDEF]COMP_POS1 Storage: CMOS Access: RW : PATH = Field: COMP_POS1.NODEDATA ARRAY[72] OF PATH1_NODE_T Field: COMP_POS1.NODEDATA[1].NODE_POS Access: RW: XYZWPREXT = Uninitialized Field: COMP_POS1.NODEDATA[2].NODE_POS Access: RW: XYZWPREXT = Uninitialized Field: COMP_POS1.NODEDATA[3].NODE_POS Access: RW: XYZWPREXT = Uninitialized Field: COMP_POS1.NODEDATA[4].NODE_POS Access: RW: XYZWPREXT = Uninitialized Field: COMP_POS1.NODEDATA[5].NODE_POS Access: RW: XYZWPREXT = Uninitialized Field: COMP_POS1.NODEDATA[6].NODE_POS Access: RW: XYZWPREXT = Uninitialized Field: COMP_POS1.NODEDATA[7].NODE_POS Access: RW: XYZWPREXT = Group: 1 Config: N U T, 0, 0, 0 X: 970.456 Y: -1038.993 Z: -667.294 W: 179.165 P: -.390 R: 25.433 Field: COMP_POS1.NODEDATA[8].NODE_POS Access: RW: XYZWPREXT = Group: 1 Config: N U T, 0, 0, 0 X: 2455.328 Y: -1021.317 Z: -679.000 W: 179.166 P: -.389 R: 25.433 Field: COMP_POS1.NODEDATA[9].NODE_POS Access: RW: XYZWPREXT = Group: 1 Config: N U T, 0, 0, 0 X: 2470.603 Y: 1067.160 Z: -681.771 W: 179.296 P: -.095 R: 71.475 Field: COMP_POS1.NODEDATA[10].NODE_POS Access: RW: XYZWPREXT = Uninitialized Field: COMP_POS1.NODEDATA[11].NODE_POS Access: RW: XYZWPREXT = Uninitialized Field: COMP_POS1.NODEDATA[12].NODE_POS Access: RW: XYZWPREXT = Uninitialized Field: COMP_POS1.NODEDATA[13].NODE_POS Access: RW: XYZWPREXT = Group: 1 Config: N U T, 0, 0, 0 X: 1513.966 Y: -883.466 Z: 13.721 W: -179.757 P: -.470 R: 92.472 Field: COMP_POS1.NODEDATA[14].NODE_POS Access: RW: XYZWPREXT = Group: 1 Config: N U T, 0, 0, 0 X: 2330.211 Y: -862.026 Z: 16.359 W: -179.757 P: -.470 R: 50.829 Field: COMP_POS1.NODEDATA[15].NODE_POS Access: RW: XYZWPREXT = Group: 1 Config: N U T, 0, 0, 0 X: 1456.289 Y: 638.774 Z: 30.119 W: -179.757 P: -.470 R: 50.829
-
Yep, that was it. I also found my frames in FRAMEVAR.VA. Unfortunately, the corresponding points don't seem to be arranged logically or in strict sequence. At least I have not yet found out which system is used to assign them.
The points of UFRAME(3) are stored from COMP_POS1.NODEDATA[57] onwards
The points of UFRAME(4) are stored from COMP_POS1.NODEDATA[11] onwards
SETUP_DATA[1,1,...] contain tool frames
SETUP_DATA[1,2,...] contain nothing (Jog-frames?)
SETUP_DATA[1,3,...] contain user frames
SETUP_DATA[...].$METHOD is the method used:
= 0 is 3 point
= 3 is direct entry
SETUP_DATA[...].ALLOC_NODES is the number of allocated bytes(?)
= 8, if $METHOD is 3 point
= 255, if $METHOD is direct entry
SETUP_DATA[...].START_NODE is from where the points of the $METHOD are stored in COMP_POS.