Karel Program

  • Hello Everyone,




    Is there anyone know the explanation about default of Karel program?

    such as :

    - What is actually the function of "INVERSE" , "GET_HOME"?


    - How can I make the TP program to be able sharing program/memory between Robot and USB/Server?


    Thank you

  • INVERSE is matrix inverse. Takes two arguments. The PR index you want to inverse, and where you want to put the result. Should use it on PRs stored in XYZWPR format.


    Code
    67:  CALL INVERSE(77,78) ;


    GET_HOME takes the joint position stored in ref position 1, and places it in PR 1, in Joint position format.


    I don't understand your sharing question.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • As far as I know, there's no way to use a server or usb as extended TP memory - I'm guessing that you're worried about running out of space on your MD? I wrote a karel program that will load a programs from an FTP server to the MD, run them, and then delete them. If this is what you're wanting let me know and I'll share the code.

  • There is the R798 DRAM File Storage Option. It allows the controller to fetch tp files from locations other than CMOS. I haven't messed with it, but it looks like remote locations are possible.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • As far as I know, there's no way to use a server or usb as extended TP memory - I'm guessing that you're worried about running out of space on your MD? I wrote a karel program that will load a programs from an FTP server to the MD, run them, and then delete them. If this is what you're wanting let me know and I'll share the code.

    Thanks for your explanation.
    Your guess is correct. Can you share the example code?

  • Sorry for my lack explanation :smiling_face:


    By the way, do you have explanation of every karel program explanation?

    I want to study about it.

  • There is the R798 DRAM File Storage Option. It allows the controller to fetch tp files from locations other than CMOS. I haven't messed with it, but it looks like remote locations are possible.

    Thanks
    then, do you have ever tried this function?
    if yes, do you have some example for me to learn?

  • Sorry for my lack explanation :smiling_face:


    By the way, do you have explanation of every karel program explanation?

    I want to study about it.

    No I do not. I found the INVERSE explanation in the iRvision manual, under section 8.1 Vision Support Tools. For GET_HOME I figured it out after someone ran it and blew out PR[1] on a cell I was working on.


    Thanks
    then, do you have ever tried this function?
    if yes, do you have some example for me to learn?

    There is the R798 DRAM File Storage Option. It allows the controller to fetch tp files from locations other than CMOS. I haven't messed with it, but it looks like remote locations are possible.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • If the option that Nation mentioned does what you need, I'd recommend that. If, like me, your budget is $0 and you're expected to make things work anyway, my code will do what you want.


    I had to upload the code as an attachment due to character limits. Usage:


    Change the constant "device" to whatever device your files are located on. I currently have it set to "C1:" which is the FTP server.

    From your TP program, CALL LOADREMOTE(x)

    On your device, you need to have a file called TSF0000x.DT. Always 5 digits, use zeros for padding.

    The TSF file needs to look something like this:

    Code
    !Test program
    Path:TFLD
    Reg:R[5]=17
    Main:Test
    sub:test2 
    sub:test1
    sub:test3
    EOF
    !Do not delete this line   

    ! Is a comment. The karel program ignores any line that starts with a "!"

    Path sets the sub directory that the tp programs are in to device\Programs\path\. You can adjust this on line 200 of the karel code.

    Reg changes the value of the register. In my example, it sets R[5] to 17.

    Main is the program that this karel program will call. You need one, and only one, main program.

    Sub is any subroutine that the main program will need.

    EOF is a marker to let the karel program know that it's reached the end of the file.


    This program change any register values specified, load your main and all sub TP programs to the controller MD, call the main program, then delete the main and sub programs when it's done.

  • Wow Interesting.
    thanks for ur support. Really appreciate and I will try it.

  • No I do not. I found the INVERSE explanation in the iRvision manual, under section 8.1 Vision Support Tools. For GET_HOME I figured it out after someone ran it and blew out PR[1] on a cell I was working on.

    I c. thanks bro

Advertising from our partners