Hello,
Someone know if it's possible to record the actual robot position in a local E6POS var using the inline form and script of the UserTech option.
Hello,
Someone know if it's possible to record the actual robot position in a local E6POS var using the inline form and script of the UserTech option.
Thats... a little vague. I mean, that's what the Modify button does already. What exactly are you trying to accomplish, here?
I'm trying to do my own motion inline form.
I succed to create a form and a "ONTOUCHUP" script but i want to record the actual position in my new point instead of a fixed position as in me example script below:
DECL PARAM PtName = {SHORTNAME[] "PT:", VALUE {FREE: DEFAULT[] "P1" }}
DECL PARAM SpdVal = {SHORTNAME[] "S: ",UNIT[] " mm/s", VALUE {REAL:MIN 0, MAX 2000,STEP 1, AUTOLIMIT TRUE, DEFAULT 11}}
DECL PARAM ApoVal = {SHORTNAME[] "L: ",UNIT[] " mm", VALUE {REAL:MIN 0, MAX 400,STEP 1, AUTOLIMIT TRUE, DEFAULT 22}}
DECL PARAM AccVal = {SHORTNAME[] "A: ",UNIT[] " %", VALUE {REAL:MIN 0, MAX 100,STEP 1, AUTOLIMIT TRUE, DEFAULT 33}}
DECL FOLD FoldPTP[2]
MyFold[1]= "/Motion_Prm(0,%ApoVal ,%SpdVal ,%AccVal )"
MyFold[2]= "/PTP X%PtName C_DIS"
DECL FOLD FoldLIN[2]
MyFold[1]= "/Motion_Prm(1,%ApoVal ,%SpdVal ,%AccVal )"
MyFold[2]= "/LIN X%PtName C_DIS C_DIS"
DEFSCRIPT Example
REDECL(PATH[] "%MODULE/", DECLARATION[] "DECL E6POS X%PtName ={X 800 ,Y -1210.32825,Z 2911.78613,A -84.8495255,B 60.8675346,C -42.5268173,S 2,T 34,E1 0.0,E2 0.0,E3 0.0,E4 0.0,E5 0.0,E6 0.0}")
ENDSCRIPT
Decl InlineForm uPTP={FOLD[1] FoldPTP,PARAM[1] PtName, PARAM[2] ApoVal, PARAM[3] SpdVal, PARAM[4] AccVal, ONACCEPT Example, ONTOUCHUP Example}
Decl InlineForm uLIN={FOLD[1] FoldLIN,PARAM[1] PtName, PARAM[2] ApoVal, PARAM[3] SpdVal, PARAM[4] AccVal, ONACCEPT Example, ONTOUCHUP Example}
Display More
Thank you for your help.
Looking at one of the ServoGun KFD files, I see this:
DEFSCRIPT Change
Do Accept_Name
Do Base_Decission
Do Tool_Decission
Do Set_IPO_Mode
Showvar(Fullpath[] "$POS_ACT",Param Pos_Act)
SetVar(FULLPATH[] "SG%Points ", VALUE[] "%Pos_Act ")
Redecl (PATH[] "%MODULE", Declaration[] "DECL PDAT PSG%Points DAT={VEL %VelPtp ,ACC %Acc ,APO_DIST 100.0}")
Redecl (PATH[] "%MODULE", Declaration[] "DECL FDAT FSG%Points ={TOOL_NO %ToolNo ,BASE_NO %BaseNo ,IPO_FRAME %IPOType }")
Message " Position SG%Points has been changed! "
Do AcceptInlineform
Do END
ENDSCRIPT
DEFSCRIPT CreatePoint
Do Accept_Name
Do Base_Decission
Do Tool_Decission
Do Set_IPO_Mode
Showvar(Fullpath[] "$POS_ACT", Param Pos_Act)
Redecl (PATH[] "%MODULE", Declaration[] "E6POS SG%Points =%Pos_Act ")
Redecl (PATH[] "%MODULE", Declaration[] "DECL FDAT FSG%Points ={TOOL_NO %ToolNo ,BASE_NO %BaseNo ,IPO_FRAME %IPOType }")
Redecl (PATH[] "%MODULE", Declaration[] "DECL PDAT PSG%Points DAT={VEL %VelPtp ,ACC %Acc ,APO_DIST 100.0}")
Message " Postion SG%Points has been created! "
Do AcceptInlineform
ENDSCRIPT
Display More
Thank you for your help.
I dont't know where the param "pos_Act" is define and how to define it. in the UserTech manual, you can only define simple var type (Bool,Real,...)
Where dont you find those KFD files ?
I allready read it. What did i miss? Maybe the fact than servogun is not a free option.
For starters.. Software version numbers, where to find documentation, most important documents and system variables