一般来说,六轴机械手臂有8种姿态。
分为三个部分 左肩/右肩 外肘/内肘 正腕/反腕,这八种姿态与joint值有关。
不是所有的空间点都有8个姿态
程序代码:
代码
1 begin 2 mNomSpeed.accel=mNomSpeed.decel=200 3 cls() 4 userPage() 5 wait(isPowered()) 6 taskCreate "Screen",100,Screen() 7 while true 8 9 10 //1. 11 nFlag=0 12 pP.config.shoulder=righty 13 pP.config.elbow=enegative 14 pP.config.wrist=wnegative 15 movej(pP,flange,mNomSpeed) 16 waitEndMove() 17 nFlag=1 18 delay(3) 19 20 21 //2 22 nFlag=0 23 pP.config.shoulder=righty 24 pP.config.elbow=enegative 25 pP.config.wrist=wpositive 26 movej(pP,flange,mNomSpeed) 27 waitEndMove() 28 nFlag=2 29 delay(3) 30 31 32 //3. 33 nFlag=0 34 pP.config.shoulder=righty 35 pP.config.elbow=epositive 36 pP.config.wrist=wnegative 37 movej(pP,flange,mNomSpeed) 38 waitEndMove() 39 nFlag=3 40 delay(3) 41 42 //4. 43 nFlag=0 44 pP.config.shoulder=righty 45 pP.config.elbow=epositive 46 pP.config.wrist=wpositive 47 movej(pP,flange,mNomSpeed) 48 waitEndMove() 49 nFlag=4 50 delay(3) 51 52 //5. 53 nFlag=0 54 pP.config.shoulder=lefty 55 pP.config.elbow=enegative 56 pP.config.wrist=wnegative 57 movej(pP,flange,mNomSpeed) 58 waitEndMove() 59 nFlag=5 60 delay(3) 61 62 //6. 63 nFlag=0 64 pP.config.shoulder=lefty 65 pP.config.elbow=enegative 66 pP.config.wrist=wpositive 67 movej(pP,flange,mNomSpeed) 68 waitEndMove() 69 nFlag=6 70 delay(3) 71 72 73 //7. 74 nFlag=0 75 pP.config.shoulder=lefty 76 pP.config.elbow=epositive 77 pP.config.wrist=wnegative 78 movej(pP,flange,mNomSpeed) 79 waitEndMove() 80 nFlag=7 81 delay(3) 82 83 84 //8. 85 nFlag=0 86 pP.config.shoulder=lefty 87 pP.config.elbow=epositive 88 pP.config.wrist=wpositive 89 movej(pP,flange,mNomSpeed) 90 waitEndMove() 91 nFlag=8 92 delay(3) 93 94 endWhile 95 96 end