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;
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!
0
Comments
-
1. Is this a multimove system? 2. Is a PLC controlling the robots?Lee Justice0
-
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...
0 -
soup said: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...
0 -
0
-
soup said:
0 -
Multiple robots, different controllers?
Sorry, long shot -- but have to ask -- SafeMove?
0 -
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...
0 -
soup said: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...0 -
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.Lee Justice0 -
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);
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.Lee Justice0
-
-
Cool - I like it. Had a chance to test the smooth flyby on a real robot?
0 -
soup said: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 AxisCASE 1:WHILE jReadMotor.robax.rax_1 > AxisVal DOjReadMotor := CJointT();WaitTime 0.1;ENDWHILECASE 2:WHILE jReadMotor.robax.rax_2 > AxisVal DOjReadMotor := CJointT();WaitTime 0.1;ENDWHILECASE 3:WHILE jReadMotor.robax.rax_3 > AxisVal DOjReadMotor := CJointT();WaitTime 0.1;ENDWHILECASE 4:WHILE jReadMotor.robax.rax_4 > AxisVal DOjReadMotor := CJointT();WaitTime 0.1;ENDWHILECASE 5:WHILE jReadMotor.robax.rax_5 > AxisVal DOjReadMotor := CJointT();WaitTime 0.1;ENDWHILECASE 6:WHILE jReadMotor.robax.rax_6 > AxisVal DOjReadMotor := CJointT();WaitTime 0.1;ENDWHILEENDTESTRETURN TRUE;ENDFUNC
With this after the move instruction
WaitUntil MotorVal(3,-70);
0 -
Nice!0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings