MoveAbsJ with the \Inpos argument

Hey, I have multiple robots who’s sharing the same zone. Since they do not have the world zones option my code looks as follow

MoveAbsJ Startpos,vmax,z20,tRob_4_Vevhusgrip\WObj:=wobj0;
Reset OUT_bInSharedZone;
Set 1_Ready;
WaitUntil TestDI(2_Ready);
Reset 1_Ready;

Since I want to keep a nice flow I don’t want to use my MoveAbsJ as a stop-point, but this will as you know move the program pointer further down the code. I’ve tried the WaitRob \inpos, but this works the same as if I have a fine point.

I’ve read something about the \inpos argument in the MoveAbsJ instruction, but how does this work exactly? Does it make sure the PP won’t move until the robot is within the specified zone?

Thanks!

I forget if it’s an option you have to buy or not, but could TriggIO work?

  1. Is this a multimove system? 2. Is a PLC controlling the robots?

Sadly there is no TriggAbsJ…

  1. No. 2. Yes!

Sadly there is no TriggAbsJ…
That’s too bad.

Maybe a WZHomeJointDef around the target to get I/O to trigger a little early and be able to fly through the WaitUntil…

WZHomeJointDef is a part of the World option, which i do not have…

Ah, my mistake – maybe WaitSyncTask

Sadly also this is not available as it is from the MultiTasking option…

Multiple robots, different controllers?

Sorry, long shot – but have to ask – SafeMove?

Yeah, quite a few of them all with different controllers.

Nope, the only option I have at hand is 888-3 Profinet slave.

Would knowing Axis 1 location help any? - If so, you could make a move instruction that checks a giAxis1 from the other robot and reports the goAxis1 location of where it’d like to move before the move is made…

Now we’re talking! Something like this maybe;

MoveAbsJ Startpos,vmax,z20,tRob_4_Vevhusgrip\WObj:=wobj0;
WaitUntil ReadMotor(1) < xxx;

Reset OUT_bInSharedZone;
Set 1_Ready;
WaitUntil TestDI(2_Ready);
Reset 1_Ready;

I noticed the ReadMotor() reads the current motor angle without the calibrated output, but if there is no other way you can think of I suppose we’ll have to live with that…

Since you have the PLC controlling the cell, you should use it to control the safety of the robot workzones. It is most common in these situations to do just so. You set a request bit to the PLC, it checks that the other robot/s are out of the zone, and sets the permission to enter when all is clear. Here is an example of one such routine:

PROC rEnter(
string area,
VAR signaldo request,
VAR signaldi wait,
VAR signaldo going)

CONST string stEnter:="Robot is waiting to enter ";
CONST string stGoing:="Robot is entering ";

! This routine is a universal wait
! routine using parameters passed
! from the calling routine.
! area is string for Pick, drop, etc.,
! request is the robot output request
! to enter the area. wait is the digital
! input granting permission to enter the
! area. going is the robot clear output
! to indicate not clear.
TPWrite stEnter+area;
Set request;
WaitDI wait,1;
TPWrite stGoing+area;
Reset going;
Reset request;
ENDPROC

The neat thing about this is that no named IO are used, so you can just add it in and use it without rewriting it for your eio setup. I am looking for some other examples.

My last answer assumed I/O between the multiple robots to know Robot1’s axis vs. Robot2’s, etc. – but I shouldn’t have assumed that’s needed or available.

Play with ReadMotor and see if a smooth fly-through can be achieved, specifically \PollRate and destination zone – virtual test below – gave -102, -189, -181, -156…

TPErase;
MoveAbsJ [[45,0,0,0,0,0],[0,9E9,9E9,9E9,9E9,9E9]], vmax, fine, tool0;
TPWrite NumToStr(ReadMotor(1),0);

MoveAbsJ [[90,0,0,0,0,0],[0,9E9,9E9,9E9,9E9,9E9]], vmax, fine, tool0;
MoveAbsJ [[0,0,0,0,0,0],[0,9E9,9E9,9E9,9E9,9E9]], vmax, z50, tool0;
WaitUntil ReadMotor(1)>-200 \PollRate:=0.01;
TPWrite NumToStr(ReadMotor(1),0);

MoveAbsJ [[90,0,0,0,0,0],[0,9E9,9E9,9E9,9E9,9E9]], vmax, fine, tool0;
MoveAbsJ [[0,0,0,0,0,0],[0,9E9,9E9,9E9,9E9,9E9]], vmax, z50, tool0;
WaitUntil ReadMotor(1)>-200 \PollRate:=0.1;
TPWrite NumToStr(ReadMotor(1),0);

MoveAbsJ [[90,0,0,0,0,0],[0,9E9,9E9,9E9,9E9,9E9]], vmax, fine, tool0;
MoveAbsJ [[0,0,0,0,0,0],[0,9E9,9E9,9E9,9E9,9E9]], vmax, z150, tool0;
WaitUntil ReadMotor(1)>-200 \PollRate:=0.1;
TPWrite NumToStr(ReadMotor(1),0);

The problem with using ReadMotor is that there is not a one to one correspondence of motor angle to joint angle. Use CJointT instead if that is the method you go with. It will also be more robust because it will still be valid if, sometime in the future, the motor gets changed out.

Basicly this is what I am doing

Found a better way:
LOCAL VAR jointtarget jReadMotor;

MoveAbsJ Position_X,vmax,Z1\Inpos:=inpos20,tool_Rob\WObj:=wobj0;

jReadMotor := CJointT();
WHILE jReadMotor.robax.rax_3 > -70 DO
jReadMotor := CJointT();
WaitTime 0.1;
ENDWHILE

Cool - I like it. Had a chance to test the smooth flyby on a real robot?

Yep, works like a charm! I also made it into a function…

FUNC bool MotorVal(num Axis, num AxisVal)
VAR jointtarget jReadMotor;

jReadMotor := CJointT();

TEST Axis
CASE 1:
WHILE jReadMotor.robax.rax_1 > AxisVal DO
jReadMotor := CJointT();
WaitTime 0.1;
ENDWHILE

CASE 2:

WHILE jReadMotor.robax.rax_2 > AxisVal DO
jReadMotor := CJointT();
WaitTime 0.1;
ENDWHILE
CASE 3:

WHILE jReadMotor.robax.rax_3 > AxisVal DO
jReadMotor := CJointT();
WaitTime 0.1;
ENDWHILE
CASE 4:

WHILE jReadMotor.robax.rax_4 > AxisVal DO
jReadMotor := CJointT();
WaitTime 0.1;
ENDWHILE
CASE 5:

WHILE jReadMotor.robax.rax_5 > AxisVal DO
jReadMotor := CJointT();
WaitTime 0.1;
ENDWHILE
CASE 6:

WHILE jReadMotor.robax.rax_6 > AxisVal DO
jReadMotor := CJointT();
WaitTime 0.1;
ENDWHILE

ENDTEST

RETURN TRUE;

ENDFUNC

With this after the move instruction
WaitUntil MotorVal(3,-70);

Nice!