RobotStudio event

Recording or storing coordinate translation data?

Hi all,

I’m trying to find out how to capture 4 coordinate translation(x,y,z) data, so I can then send it to an external 3rd party Raspberry Pi controller.

 So far I have used the CPos instruction to capture 4 separate coordinate translation data into some variables, like below:

VAR pos pos1;

VAR pos pos2;

VAR pos pos3;

VAR pos pos4;

   

    PROC main()     

        

        MoveJ [[230.00,0.00,309.61],[0.00592441,-2.20071E-8,0.999982,-1.40272E-7],[0,-1,0,0],[9E+9,9E+9,9E+9,9E+9,9E+9,9E+9]], v1000, fine, tool0;

        pos1 := CPos(\Tool:=tool0 \WObj:=wobj0);

        MoveL [[400.00,-0.00,309.61],[0.00592472,9.63992E-10,0.999982,-1.36007E-7],[0,-1,0,0],[9E+9,9E+9,9E+9,9E+9,9E+9,9E+9]], v1000, fine, tool0;

        pos2 := CPos(\Tool:=tool0 \WObj:=wobj0);

        MoveL [[400.00,250.00,309.61],[0.00592313,-1.76557E-7,0.999982,-1.12661E-6],[0,-1,0,0],[9E+9,9E+9,9E+9,9E+9,9E+9,9E+9]], v1000, fine, tool0;

        pos3 := CPos(\Tool:=tool0 \WObj:=wobj0);

        MoveL [[230.00,250.00,309.61],[0.00592287,-1.26527E-7,0.999982,-1.40362E-6],[0,-1,0,0],[9E+9,9E+9,9E+9,9E+9,9E+9,9E+9]], v1000, fine, tool0;

        pos4 := CPos(\Tool:=tool0 \WObj:=wobj0);

        MoveL [[230.00,0.00,309.61],[0.00592441,-2.20071E-8,0.999982,-1.40272E-7],[0,-1,0,0],[9E+9,9E+9,9E+9,9E+9,9E+9,9E+9]], v1000, fine, tool0;

          

    ENDPROC

But now I am unsure of how to record or store those pos data, such that I can have them sent to the Raspberry Pi controller. I’ve tried to look in the Technical Reference PDF, but can’t seem to find exactly what I’m looking for. Would greatly appreciate any help on this.

Thank you!


Comments

  • lemster68
    lemster68 ✭✭✭
    What is or will be the connection to the Raspberry Pi?
    Lee Justice
  • Hi lemster, the ABB controller will be connected to the Raspberry Pi through an ethernet cable. 
  • DenisFR
    DenisFR ✭✭✭
    Hello,
    You can use ValToStr to get string from pos values. Then send it with SocketSend.

  • lemster68
    lemster68 ✭✭✭
    Also, you could use file and serial channel, Open instruction to write to a file on the controller's drive.  Then FTP it off with the Raspberry Pi as a completed file, .txt or .csv file.
    Lee Justice