diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/SC_TELL.dtx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/SC_TELL.dtx new file mode 100644 index 0000000..b5be081 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/SC_TELL.dtx @@ -0,0 +1,392 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/SC_TELL.pjx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/SC_TELL.pjx new file mode 100644 index 0000000..8022e1f --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/SC_TELL.pjx @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/ToDoComments.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/ToDoComments.pgx new file mode 100644 index 0000000..be3b9ce --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/ToDoComments.pgx @@ -0,0 +1,33 @@ + + + + mechanicle switch is to high + + //18.5.2018 + //Theraml correction implemented + //Corrected all the puck Positions + //hardware switch hight to check on all the positions + + + + + + + + +end]]> + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/calcDewar.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/calcDewar.pgx new file mode 100644 index 0000000..9e00ba6 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/calcDewar.pgx @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/calcDewarCold.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/calcDewarCold.pgx new file mode 100644 index 0000000..5ef9452 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/calcDewarCold.pgx @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/checkGonio.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/checkGonio.pgx new file mode 100644 index 0000000..31acb09 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/checkGonio.pgx @@ -0,0 +1,22 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/comTcp.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/comTcp.pgx new file mode 100644 index 0000000..7a78f20 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/comTcp.pgx @@ -0,0 +1,301 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + if rec_val>31 + rx=rx+chr(rec_val) + elseIf rec_val==10 + if len(rx)<4 + rx="" + else + msg_id=left(rx,4) + msg=right(rx,len(rx)-4) + rx="" + //If same id, repeat last answer + if msg_id!=last_id + for index=0 to 9 + args[index]="" + endFor + index=find(msg," ") + if index<0 + cmd=msg + else + cmd=left(msg,index) + msg=right(msg,len(msg)-index-1) + arg=0 + while (len(msg)>0 and (arg<10)) + index=find(msg,array_separator) + if index<0 + args[arg]=msg + msg="" + else + args[arg]=left(msg,index) + msg=right(msg,len(msg)-index-1) + endIf + arg=arg+1 + endWhile + endIf + tx="" + ex="" + //General commands + switch (cmd) + case "eval" + tx=$exec(args[0]) + break + + case "get_status" + aux=workingMode(count) + tx=toString("",aux)+array_separator + tx=tx+toString("",count)+array_separator + if isPowered() + tx=tx+"1"+array_separator + else + tx=tx+"0"+array_separator + endIf + aux=getMonitorSpeed() + tx=tx+toString("",aux)+array_separator + if isEmpty() + tx=tx+"1"+array_separator + else + tx=tx+"0"+array_separator + endIf + if isSettled() + tx=tx+"1"+array_separator + else + tx=tx+"0"+array_separator + endIf + //Task status + if len(args[0])>0 + tx=tx+toString("",taskStatus(args[0]))+array_separator + else + tx=tx+"0"+array_separator + endIf + tx=tx+toString("",tcp_ret)+array_separator + j=herej() + //Flange position + //p=jointToPoint(flange,world, herej()) + + //Tool position + //$exec("p=jointToPoint(" + args[1] + "," + args[2] + ", herej())") + p=jointToPoint(tcp_curtool,world,herej()) + + precision="0.2" + tx=tx+toString(precision,j.j1)+array_separator + tx=tx+toString(precision,j.j2)+array_separator + tx=tx+toString(precision,j.j3)+array_separator + tx=tx+toString(precision,j.j4)+array_separator + tx=tx+toString(precision,j.j5)+array_separator + tx=tx+toString(precision,j.j6)+array_separator + tx=tx+toString(precision,p.trsf.x)+array_separator + tx=tx+toString(precision,p.trsf.y)+array_separator + tx=tx+toString(precision,p.trsf.z)+array_separator + tx=tx+toString(precision,p.trsf.rx)+array_separator + tx=tx+toString(precision,p.trsf.ry)+array_separator + tx=tx+toString(precision,p.trsf.rz)+array_separator + + if tcp_events[0]!="" + tx=tx+tcp_events[0] + for index=0 to 8 + tcp_events[index]=tcp_events[index+1] + endFor + tcp_events[9]="" + endIf + break + + case "task_sts" + tx="" + for index=0 to (len(args)-1) + if len(args[index])>0 + tx=tx+toString("",taskStatus(args[index]))+array_separator + endIf + endFor + break + + case "dist_pnt" + //tolerance + p=jointToPoint(tcp_curtool,world,herej()) + tx="" + for index=0 to (len(args)-1) + if len(args[index])>0 + ret=getData(args[index],paux) + tx=tx+toString(".4",distance(p,paux))+array_separator + endIf + endFor + break + + case "get_var","get_bool" + if cmd=="get_var" + ret=getData(args[0],aux) + else + ret=getData(args[0],auxb) + endIf + switch (ret) + case -1 + ex="The variable does not exists" + break + case -2 + ex="The variable library does not exist" + break + case -3 + ex="The index is out of range" + break + case -4 + ex="The data's type does not match the variable's type" + break + default + if cmd=="get_var" + tx=toString(".4",aux) + else + if auxb + tx="1" + else + tx="0" + endIf + endIf + break + endSwitch + break + + case "get_arr" + toNum(args[1],count,ok) + for index=0 to count + ret=getData(args[0]+"["+toString("",index)+"]",aux) + switch (ret) + case -1 + ex="The variable does not exists" + break + case -2 + ex="The variable library does not exist" + break + case -3 + ex="The index is out of range" + break + case -4 + ex="The data's type does not match the variable's type" + break + default + tx=tx+toString(".4",aux)+"|" + break + endSwitch + endFor + break + + //case "get_str" + // //$exec("tcp_s = " + args[0]) TODO: MAKES THE CONTROLLER TO CRASH! + // //tx = s + //break + + //taskKill can freeze if executed by eval + case "kill" + taskKill(args[0]) + break + case "save" + aux=libSave() + tx=toString("",aux) + break + case "get_profile" + tx=getProfile() + break + case "set_profile" + ret=setProfile(args[0],args[1]) + if (ret<0) + ex="Invalid profile name or password" + endIf + break + case "get_pnt" + $exec("tcp_p = "+args[0]) + tx=tx+toString(".4",tcp_p.trsf.x)+"|" + tx=tx+toString(".4",tcp_p.trsf.y)+"|" + tx=tx+toString(".4",tcp_p.trsf.z)+"|" + tx=tx+toString(".4",tcp_p.trsf.rx)+"|" + tx=tx+toString(".4",tcp_p.trsf.ry)+"|" + tx=tx+toString(".4",tcp_p.trsf.rz)+"|" + break + + case "get_jnt" + $exec("tcp_j = "+args[0]) + tx=tx+toString(".4",tcp_j.j1)+"|" + tx=tx+toString(".4",tcp_j.j2)+"|" + tx=tx+toString(".4",tcp_j.j3)+"|" + tx=tx+toString(".4",tcp_j.j4)+"|" + tx=tx+toString(".4",tcp_j.j5)+"|" + tx=tx+toString(".4",tcp_j.j6)+"|" + break + + case "get_trf" + $exec("tcp_t = "+args[0]) + tx=tx+toString(".4",tcp_t.x)+"|" + tx=tx+toString(".4",tcp_t.y)+"|" + tx=tx+toString(".4",tcp_t.z)+"|" + tx=tx+toString(".4",tcp_t.rx)+"|" + tx=tx+toString(".4",tcp_t.ry)+"|" + tx=tx+toString(".4",tcp_t.rz)+"|" + break + + case "get_help" + toNum(args[0],aux,ok) + if ok==true + tx=help(aux) + else + ex="Invalid code: "+args[0] + endIf + break + + default + //App specific + call onCommandTcp(cmd,args,tx,ex) + if ((len(tx)==0) and (len(ex)==0)) + ex="Invalid command: "+cmd + endIf + break + endSwitch + last_id=msg_id + endIf + if len(ex)==0 + sSio=msg_id+tx + else + msg_id=replace(msg_id,"*",1,3) + sSio=msg_id+ex + endIf + endIf + endIf + endWhile + delay(0) + endWhile +end]]> + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/control.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/control.pgx new file mode 100644 index 0000000..f7fee6b --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/control.pgx @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/getDewar.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/getDewar.pgx new file mode 100644 index 0000000..f5f091e --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/getDewar.pgx @@ -0,0 +1,38 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/getGonio.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/getGonio.pgx new file mode 100644 index 0000000..9eb1add --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/getGonio.pgx @@ -0,0 +1,53 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/getSampleDewar.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/getSampleDewar.pgx new file mode 100644 index 0000000..75d9d61 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/getSampleDewar.pgx @@ -0,0 +1,43 @@ + + + + + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/goGonio.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/goGonio.pgx new file mode 100644 index 0000000..6255828 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/goGonio.pgx @@ -0,0 +1,44 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/goScan.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/goScan.pgx new file mode 100644 index 0000000..99f66d6 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/goScan.pgx @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/initialize.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/initialize.pgx new file mode 100644 index 0000000..4560ae5 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/initialize.pgx @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/monitor.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/monitor.pgx new file mode 100644 index 0000000..3d1ff7c --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/monitor.pgx @@ -0,0 +1,103 @@ + + + + + + + + + Turn Power ON + sMessage="Enabling arm power" + enablePower() + delay(3) + sMessage="" + + else + + //E- Stop + sMessage="E-Stop chaine open" + watch(esStatus()<2,nMessageDelay) + sMessage="" + endIf + + else + //not in remote, tell user to turn on arm power + sMessage="press the arm power button" + watch(isPowered(),nMessageDelay) + sMessage="" + endIf + + else + l_nMode=workingMode(l_nStatus) + if l_nStatus!=0 + if l_nMode==1 and (l_nStatus>1 and l_nStatus<6) + //System is in manual jogging mode + sMessage="Turn off jogging mode" + + l_nTime=clock() + do + l_nMode=workingMode(l_nStatus) + until l_nMode!=1 or l_nStatus<2 or l_nStatus>5 or clock()-l_nTime>nMessageDelay + sMessage="" + + else + //System is in hold or connecting move + sMessage="Press MOVE / HOLD Button" + + l_nTime=clock() + do + l_nMode=workingMode(l_nStatus) + until l_nStatus==0 or clock()-l_nTime>nMessageDelay + sMessage="" + endIf + endIf + endIf + + //speed is not set to 100 + if getMonitorSpeed()!=100 + + sMessage="set speed to 100" + watch(getMonitorSpeed()==100,nMessageDelay) + sMessage="" + endIf + endIf + delay(0) + + endWhile + + +end]]> + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveDewar.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveDewar.pgx new file mode 100644 index 0000000..4458cc5 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveDewar.pgx @@ -0,0 +1,66 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveGonio.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveGonio.pgx new file mode 100644 index 0000000..8f7b42b --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveGonio.pgx @@ -0,0 +1,63 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveHeater.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveHeater.pgx new file mode 100644 index 0000000..48b9311 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveHeater.pgx @@ -0,0 +1,40 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/movePark.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/movePark.pgx new file mode 100644 index 0000000..c314d69 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/movePark.pgx @@ -0,0 +1,62 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveScanner.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveScanner.pgx new file mode 100644 index 0000000..c90136c --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/moveScanner.pgx @@ -0,0 +1,50 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/onCommandTcp.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/onCommandTcp.pgx new file mode 100644 index 0000000..2496b26 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/onCommandTcp.pgx @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/putDewar.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/putDewar.pgx new file mode 100644 index 0000000..ae32f1a --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/putDewar.pgx @@ -0,0 +1,48 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/putGonio.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/putGonio.pgx new file mode 100644 index 0000000..b619129 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/putGonio.pgx @@ -0,0 +1,50 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/putSampleDewar.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/putSampleDewar.pgx new file mode 100644 index 0000000..97852c2 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/putSampleDewar.pgx @@ -0,0 +1,47 @@ + + + + + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/robotRecover.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/robotRecover.pgx new file mode 100644 index 0000000..f28a543 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/robotRecover.pgx @@ -0,0 +1,66 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/sendEventTcp.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/sendEventTcp.pgx new file mode 100644 index 0000000..ad47904 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/sendEventTcp.pgx @@ -0,0 +1,23 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/start.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/start.pgx new file mode 100644 index 0000000..ac2871c --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/start.pgx @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/stop.pgx b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/stop.pgx new file mode 100644 index 0000000..ada1db5 --- /dev/null +++ b/robot/MXLAB/Controller1/usr/usrapp/SC_TELL/stop.pgx @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file