Posts by joH

    Yes ! 8)

    Thank you very much for yr explication! seriously you are so good! 8)

    Just my opinion, but in 2 months you could probably have had the entire thing programmed in TP.


    Does the set of points change? Why do you need to read them from a csv versus storing them all in the robot program.

    I know but I focused too much on Karel programming as if it was THE solution for me. the points remain fixed but I did not know how to concretely import the data from a CSV file. I am just trying to understand how it works to analyze data from a CSV file and how to use PR[] in a karel program to take data from the CSV file. can I just have an example where karel reads data from a CSV file to put it in a PR[] or another way to do it?

    Fanuc recommends not to use Karel for movements since many years.

    For your task, you need two paralleI running programs. A Karel program that reads the csv file, pushes the values into a ring buffer of PR[], let's say PR[10] to PR[30], use two R[] as pointer into this buffer, where one points to the last written buffer entry from Karel.

    A TP program that moves to those PR[], this program uses the second R[] to show the last moved PR[] so the Karel program can fill up the next positions.

    is the file read with a special function that delimits the data in the CSV file?

    Why do you need many points from a csv file? What is your application?

    I am an intern in a small business for my second year of university in automated production engineering. I was asked to program a FANUC robot that I discover for the first time. No one in the company knows how the FANUC robot works. I have to cut a piece with an ultrasonic blade. I need to import about 200-300 points into the robot with many precision. I was asked to program in Karel but when I arrived on this forum I already had 2 months of work with the Karel language. I preferred to continue with the Karel language so as not to re-start all over again from the beginning.

    Salut tout le monde!

    Hi all! I know that it's hard to start in Karel's code and i want to give a small code to move the fanuc robot in JOINT with coordinates POSITION.

    this my code:

    PROGRAM NAME OF PROJECT

    %CMOSVARS

    %SYSTEM

    %NOBUSYLAMP

    %NOPAUSESHFT

    %ENVIRONMENT MOTN

    %ENVIRONMENT sysdef

    %ENVIRONMENT REGOPE

    %ENVIRONMENT STRNG

    %NOLOCKGROUP

    %NOABORT=ERROR+COMMAND

    %NOPAUSE=ERROR+COMMAND+TPENABLE

    %ALPHABETIZE

    %INCLUDE KLEVKEYS

    %INCLUDE KLEVKMSK

    %INCLUDE KLEVCCDF

    %INCLUDE KLIOUOP

    %INCLUDE KLIOTYPS

    VAR

    c: config

    i: INTEGER

    jnt0:JOINTPOS

    rnt0:POSITION

    rpos0:ARRAY[9] OF REAL

    cur_current: JOINTPOS

    status1: INTEGER

    uframe: POSITION

    utool: POSITION

    BEGIN

    $UFRAME = $MNUFRAME[1,1]

    $UTOOL = $MNUTOOL[1,1]

    uframe=$UFRAME

    utool=$UTOOL

    --***********************************************************************************************************POINT0 same process for other points

    CNV_STR_CONF('NUT,0,0,0',c,0)

    rnt0= POS(79,114,203, -179.169, -0.053, -52.294, c)

    cur_current=CURJPOS(0,0)

    POS2JOINT(cur_current,rnt0,uframe,utool,0,c,rpos0,jnt0,status1)

    WITH $SPEED=100, $MOTYPE=JOINT, $TERMTYPE=NODECEL MOVE TO jnt0


    END NAME OF PROJECT


    Have fun. 8)

    Hi all! :)

    i know write in karel to move my fanuc robot on 100 points but i can't for 200 points or more. I see that you must use TP program with a file's points that we put in the controller via usb or memory cards etc . I try to understand how use registers PR[] to import points from file's points. can i have direction to do this one?


    Thank you very for help!

    Best regards :)

    Hi all!!!

    i may know how i could put a point from a file karel in a register PR[] on TP? thank you very much for the help. this my code:

    cur_pos:XYZWPREXT


    status1:INTEGER


    uframe:POSITION

    utool:POSITION



    BEGIN

    -- $MNUTOOLNUM[1]=1

    -- $MNUFRAMENUM[1]=1

    $UFRAME = $MNUFRAME[1,1]

    $UTOOL = $MNUTOOL[1,1]


    cur_pos=CURPOS(0,0)

    cur_pos.x=1378.591

    cur_pos.y=1633.715

    cur_pos.z=175.532

    SET_EPOS_REG(6,cur_pos,status1)


    END PROJET2


    and on tp i tried call :

    CALL projet2

    PR[6]=LPOS


    best regards

    Hi all!! may i have a explication on command "GROUP" to build JOINT2POS ? I searched in the manual Karel but I don't understand the explication.


    thank you for the help.


    Best regards.

    Hi! :dj:

    I often see on the forum programming with registers on karel. Can I use them to call 200 points from a .CSV file? If so, how? I'm trying to read points from a .CSV file while programming with Karel but I'm not sure how to use the READ function. In the Karel manual, I don't see how to use it.


    Thank you for your help :merci: . Best regards


    PS: sorry for my English.

    Hi everyone! :)

    I tried hard to read one position from .CSV file but i have errors in my code.

    this my code:

    PROGRAM PROJET

    %CMOSVARS

    %SYSTEM

    %NOBUSYLAMP

    %NOPAUSESHFT

    %ENVIRONMENT sysdef

    %ENVIRONMENT REGOPE

    %ENVIRONMENT STRNG--pour la fonction CNV_STR_CONF()

    %NOLOCKGROUP

    %NOABORT=ERROR+COMMAND

    %NOPAUSE=ERROR+COMMAND+TPENABLE

    %ALPHABETIZE

    %INCLUDE KLEVKEYS

    %INCLUDE KLEVKMSK

    %INCLUDE KLEVCCDF

    %INCLUDE KLIOUOP

    %INCLUDE KLIOTYPS


    VAR

    virgule:INTEGER

    data_var:FILE

    X:REAL

    Y:REAL

    Z:REAL

    W:REAL

    R:REAL

    P:REAL


    BEGIN

    $MNUTOOLNUM[1]=1

    OPEN FILE data_var('RO','Vftest.csv')

    READ data_var(';',X::4,';',';',Y::4,';',';',Z::4,';',';',W::4,';',';',R::4,';',';',P::4,CR)

    END PROJET


    it's appriciated to help me. :merci:


    Best regard

    Hello everyone ! :) I am pretty new on Karel and i can't use an other language for this moment. I may read a file .CSV with Karel, i want to take points in file .CSV to use in my karel's program. I may to explain me how to do that ? thank you for the help! 8)