Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Communication between ABB IRC5 controlller and Arduino MEGA and RAMPS

#1
Hello everyone. I am doing a project in which I am trying to perform 3D printing by fixing an extruder to a structure and then providing all the motions of the printing bed through the ABB IRB 120 Robot. The microcontroller I am using is based on Arduino MEGA and RAMPS 1.4 that has Marlin Firmware installed in it. The only option available to communicate with the ABB IRC5 controller is ethernet/LAN. The RAPID code that RoboDK generates call the extruder with the command ExtruderSpeed. My question is how to transfer this command to the microcontroller of the 3D printing setup? I came across the fact that Python coding is normally used to do that but I have never done Python coding in my life so kind of stuck right now. Can someone guide how to establish this communication? Whenever the Rapid code calls the extruder through the ExtruderSpeed command, it should print the filament accordingly. What I had plan regarding the communication that my PC will serve as the server through which a LAN will be going to the network switch. From there one LAN will be going to the ABB IRC5 controller and one LAN will be going to the Raspberry Pi that will be serially connected to the Arduino MEGA. The problem is how to establish the communication? Only having the connections will not work :) If someone has a better idea instead of my scheme of establishing communication then they can share as well. I will be really thankful. I am also attaching my code generated through RoboDK
Code:
%%%
 VERSION:1
 LANGUAGE:ENGLISH
%%%
MODULE MOD_Print3D

   ! -------------------------------
   ! Define customized variables here
   ! ...

! Tool variables:
PERS tooldata Assembly := [TRUE,[[0.000,0.000,50.000],[1.00000000,0.00000000,0.00000000,0.00000000]],[1,[0,0,20],[1,0,0,0],0,0,0.005]];

! Reference variables:
PERS wobjdata PrintingReference := [FALSE, TRUE, "", [[457.400,-0.500,649.000],[0.00000000,1.00000000,0.00000000,0.00000000]],[[0,0,0],[1,0,0,0]]];

PROC Main()
ConfJ \On;
ConfL \Off;
! Program generated by RoboDK v5.1.3 for ABB IRB 120-3/0.6 on 05/01/2021 11:12:32
! Using nominal kinematics.
M_RunCode(107);
M_RunCode(104);
! Show Assembly
MoveAbsJ [[2.280630,39.062800,-11.508300,0.000000,-117.555000,177.719000],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v1000,z1,Assembly \WObj:=PrintingReference;
MoveL [[12.500,-19.214,5.000],[0.00000000,0.00000000,1.00000000,0.00000000],[0,0,1,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v1000,z1,Assembly \WObj:=PrintingReference;
M_RunCode(109);
M_RunCode(82);
MoveL [[12.500,-19.214,0.400],[0.00000000,0.00000000,-1.00000000,0.00000000],[0,0,1,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],[130.00,500,5000,1000],z1,Assembly \WObj:=PrintingReference;
ExtruderSpeed 0.000;
MoveL [[12.500,-19.214,0.400],[0.00000000,0.00000000,-1.00000000,0.00000000],[0,0,1,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v40,z1,Assembly \WObj:=PrintingReference;
MoveL [[12.500,-19.214,0.400],[0.00000000,0.00000000,-1.00000000,0.00000000],[0,0,1,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],[130.00,500,5000,1000],z1,Assembly \WObj:=PrintingReference;
MoveL [[12.500,-19.214,0.400],[0.00000000,0.00000000,-1.00000000,0.00000000],[0,0,1,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v40,z1,Assembly \WObj:=PrintingReference;
ExtruderSpeed 4.000;
MoveL [[14.775,-18.817,0.400],[0.00000000,0.00000000,-1.00000000,0.00000000],[0,0,1,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v40,z1,Assembly \WObj:=PrintingReference;
MoveL [[16.780,-17.673,0.400],[0.00000000,0.00000000,-1.00000000,0.00000000],[0,0,1,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v40,z1,Assembly \WObj:=PrintingReference;
...
M_RunCode(84);
M_RunCode(140);
ENDPROC

ENDMODULE
  




Users browsing this thread:
1 Guest(s)