R30ib Position questions

  • My search skills may be limited but I didn't see this but i believe it would have been discussed before if you can point me to the thread.


    Ultimately, I am trying to drive a robot from a .csv file to points from that .csv file.


    I move to an x,y and move about 4 or 5 z moves for that same x,y, so


    (x1,y1,z1)

    (x1,y1,z2)

    (x1,y1,z3)

    (x1,y1,z4)

    (x1,y1,z5)


    then I move and repeat

    (x2,y2,z1)

    (x2,y2,z2)

    (x2,y2,z3)

    (x2,y2,z4)

    (x2,y2,z5)


    there are about 30 x,y positions


    My first question is how can I insert the Z to make them a variable so I can update all my z movements?


    The X and Y will be pulled from a .csv file


    (1.000,2.000)

    (3.000,1.000)

    (2.000,2.000)

    (4.000,1.000)

    (5.000,2.000)


    I exported the .ls file and see that the points are defined at the bottom of the text file.


    [1]{

    GP1:

    UF : 2, UT : 2, CONFIG : 'N U T, 0, 0, 0',

    X = 3.075 mm, Y = -13.610 mm, Z = 58.056 mm,

    W = -90.107 deg, P = -.530 deg, R = -179.055 deg

    };

    P[2]{

    GP1:

    UF : 2, UT : 2, CONFIG : 'N U T, 0, 0, 0',

    X = 3.141 mm, Y = -13.164 mm, Z = 20.335 mm,

    W = -90.127 deg, P = -.516 deg, R = -179.027 deg



    Is there a way to have this Z a variable?


    for the second part of getting the x,y from the .csv into the program, do you have any suggestions.

    I was going to try python and let chat gpt help me make a program.


    Any advice on this is greatly appreciated. :smiling_face:

  • Thank you HawkME,


    How do I use position registers for the z value only? I am using the tp now and want to get to the .csv possibly after I figure out this first step. I am low on the knowledge of robots and Fanuc.


    For as a why this may help,

    We will have a variety of different electrical connectors to populate. We have a separate process that maps connector hole locations and outputs their xy values. Atleast, we are working on that now as a separate project.


    We setup a frame that has a reference 0,0 in the center of the electrical connector we are populating with this robot and mapping the holes as a separate process.


    Each hole will have an x,y from that origin.


    There are a massive amount of electrical connectors so we thought this may be a better process to reduce the programming burden on the xy of each hole of each connector. I've done dumber things but I understand your inputs and i'm not sure if this is the best route and it would be nice to actually figure that out sooner than later as i'm about to start the mapping project.

  • You can use an offset to a position with only the Z value in the PR.


    For example.


    : L P[1] 500 mm/s Fine Offset, PR[10];


    Where P[1] is your base position and PR[10] has all values set to 0 except for the z value.


    To read in position values from a csv file will require Karel programming. You would have to purchase that option then also learn that programming language. There are other methods to send data to a robot, including from a PLC, HMI, or PC. Each method has is pros and cons and requires different programming languages and sometimes different paid options on the robot.

  • I'm not exactly sure what you are trying to do but if the machine knows whats running why not just send the offset from the PLC. The number will have to be binary. The Group input will need to be mapped to I/O where the binary number inputs are.



    PR[1,1] = 0

    PR[1,2] = 0

    PR[1,3] = GI[1]

    PR[1,4] = 0

    PR[1,5] = 0

    PR[1,6] = 0

Advertising from our partners