Hello everyone
I have a question...
How to use GroupDigital as a variable in rapid program?
this is my code,is it correct?
Code
MODULE MainModuleaaa
VAR speeddata Work:= [100,20,5000,1000];
PERS tooldata tPen :=[True,[[0,0,192],[1,0,0,0]],[0.001,[0,0,0.1],[1,0,0,0],0,0,0]];
PERS wobjdata wobj10 := [FALSE, TRUE, "", [[0, 400, 0],[1, 0, 0, 0]],
[[0, 0, 0],[1, 0, 0, 0]]];
PROC Main()
ConfL \Off;
ConfJ \Off;
MoveL [[800,-400,[b]GO1[/b]],[0,0,1,0],[0,-1,-1,0],[9E9,9E9,9E9,9E9,9E9,9E9]],Work,z10,tPen\WObj:=wobj10;
ENDPROC
ENDMODULE
Display More
the GO1 is GroupOutput,MoveL [[800,-400,GO1]....is it correct?if no correct ,how can I use GO or AO as variable for target?
Thankyou for help!
//=============Second day after 1st post ===========================
i try this code:
Code
MODULE MainModule
VAR speeddata Work:= [100,20,5000,1000];
PERS tooldata tPen :=[TRUE,[[535.000,0.000,120.000],[0.707107,0.000000,0.707107,0.000000]],[0.1,[0,0,10],[1,0,0,0],0,0,0]];
PERS wobjdata WObj6 := [FALSE, TRUE, "" , [[0, 0, 0],[1, 0, 0, 0]],[[0, 0, 0],[1, 0, 0, 0]]];
VAR num xPosition;
xPosition := DNGO1;
VAR robtarget p1:=[[xPosition,-360.638,809.490],[-0.035,0.000,0.999,0.000],[0,-1,-1,0],[0,9E9,9E9,9E9,9E9,9E9]];
PROC Main()
ConfL \Off;
ConfJ \Off;
MoveL p1,Work,z10,tPen\WObj:=WObj6;
ENDPROC
ENDMODULE
Display More
(DNGO1 is a group output alias name)
but the result failed:
failed message:
in flexpad
can anyone tell me where is wrong,thank you very much!
//===============I found the solution================
use GOutput(groupSigName)