I have a KRC4 with 2 external axis(headstock and track) ... And I want a position output of the robot is in a position range for joints 2,3,4,5,and 6 no matter where the 2 external axis or joint 1 are located
Is this possible
Arm position output
-
tonygast -
July 10, 2015 at 7:28 PM -
Thread is marked as Resolved.
-
-
If you want to get a digital output ON when the robot arm is in a specific position (or in a position range) I would suggest you to use the submit program.
You can use the system variable $AXIS_ACT and even see the positions for each axis of the structure: $AXIS_ACT.A1, $AXIS_ACTA2, $AXIS_ACT..., $AXIS_ACT.A6.
And you could get the external axis positions too using $AXIS_ACT.E1...
Then simply compare positions and activate that output.
Hope this helps.
-
I was hoping for something easier (like Japanese robots).....But that will work
-
so how exactly does it work on Japanese robots? what stops you from making the same thing in KRL?
for example I made a function that compares arbitrary set of axes to any degree of accuracy with current robot position. for example one can do something like:
in the DAT file declare position and set values or simply record position by program:
in the SRC file, record position then compare it (after giving chance to user to jog robot to another position)
Code
Display MoreDEF TestAxes() DECL REAL Degrees DECL INT Mask Degrees = 0.1 ; this is our allowed tolerance Mask = 'B000000111110' ; use axes A2...A6 but not A1 or E1..E6 P1=$axes_act ; record current robot position (if you don't want to type the values in DAT file) HALT ; let user move robot axes ; when done press START again to check if still in 'same' position $OUT[13]=AxisMatch(P1,Degrees,Mask) ; set output if there is a match END
-
I think RSI is easier to solve your problem. In RSI, you can simply to compare your robot's actual position with a setting value, the you can map the result to a variable such as $out, $in, $sen_pint etc. You should only make a RSI diagram, and start it in your src file. And then, it will be auto executing cyclically. Hope it's helpful!
-
...You should only make a RSI diagram, and start it in your src file. And then, it will be auto executing cyclically. Hope it's helpful!Jonson ,
the RSI diagram is made by the RSI Visual on the PC, is it?
-
Yes, you are right!
-
One could also use Axis Workspace Monitoring. Set the min/max values for A1, E1, and E2 to their respective $SOFT(N/P)_END values, and A2-A6 to the values you want the output active for (also, use Inside mode instead of Outside). One advantage there is that the output signal works even if no programs are running, and even if the robot has just been cold-booted.
-
The easistest way is:
1) goto mada\machine.dat and manually set the joint angles
$AXIS_HOME[1]={A1 0.0,A2 -154.000,A3 131.000,A4 0.0,A5 22.5000,A6 0.0,E1 0.0,E2 0.0,E3 0.0,E4 0.0,E5 0.0,E6 0.0}
$AXIS_HOME[2]={A1 0.0,A2 -90.0000,A3 90.0000,A4 0.0,A5 0.0,A6 0.0,E1 0.0,E2 0.0,E3 0.0,E4 0.0,E5 0.0,E6 0.0}
$AXIS_HOME[3]={A1 0.0,A2 -90.0000,A3 90.0000,A4 0.0,A5 0.0,A6 0.0,E1 0.0,E2 0.0,E3 0.0,E4 0.0,E5 0.0,E6 0.0}
$AXIS_HOME[4]={A1 0.0,A2 -90.0000,A3 90.0000,A4 0.0,A5 0.0,A6 0.0,E1 0.0,E2 0.0,E3 0.0,E4 0.0,E5 0.0,E6 0.0}
$AXIS_HOME[5]={A1 0.0,A2 -90.0000,A3 90.0000,A4 0.0,A5 0.0,A6 0.0,E1 0.0,E2 0.0,E3 0.0,E4 0.0,E5 0.0,E6 0.0}You may also set the positioning tolerace in degrees for each joint:
E6AXIS $H_POS_TOL={A1 2.00000,A2 2.00000,A3 2.00000,A4 2.00000,A5 2.00000,A6 2.00000,E1 2.00000,E2 2.00000,E3 2.00000,E4 2.00000,E5 2.00000,E6 2.00000}2) go to steu\mada\machine.dat and link each position to a $OUT[] signal. FALSE=DISABLED
SIGNAL $IN_HOME1 $OUT[2025]
SIGNAL $IN_HOME2 FALSE
SIGNAL $IN_HOME3 FALSE
SIGNAL $IN_HOME4 FALSE
SIGNAL $IN_HOME5 FALSEIn my case, $out[2025] is set each time the robot is in home position without adding load to the SPS.
diglo