Question of difference between *.tp and *.pc

  • Hi all


    Files *.tp are teach pendant program and files with extention *.pc are p-code files born by karel files translation.
    Each other are binary files but somebody know if *.pc files are more "light" to use by the controller? Or is there no differences?


    Thank you all for future answer

  • Hi, toso


    Sorry, but you're asking about two different languages. TP program was created for motion and KAREL is backend language of the robot. a lot of internal programs of fanuc robot was written with using KAREL. Everything is depends on your tasks.


    Regards,
    Scotty

  • Hi Scotty


    Thank you for the answer.
    You can write motion programs also in karel, so i think that TP program are only to simplify the creation of motion's programs.
    But if the "internal" language of Fanuc is karel, i think karel programs need less "manipulations" then tp programs. (So are more light)
    But i don't know if what i described is only a fantasy or if it correct. :icon_smile:


    For example if you have the same sequence, one in a tp program and one in karel, and you execute first the tp and then the pc program, what of the two programs use more CPU and memory?


    Has somebody an idea?

  • I don't know which is "lighter", but (having done no Karel programming) it seems easier and quicker to modify a motion program via pendant (TP) programs than having to recompile a Karel routine... just my opinion.

  • Iowan I agree.


    It is only an example to explain better my question.
    I did this question because i have a lot of program that run in BG logic because i have to monitor and locked some system thing.
    I had some problems with DRAM in the past, so i'm trying to understand if karel is more light for the controller.
    I want more open ways if i will have problem in the future with controller workload


    But in the manuals i didn't find information about my question so i hope that on this forum somebody tell me his experience and opinion.


    Thank you all

  • Toso,

    Quote

    You can write motion programs also in karel, so i think that TP program are only to simplify the creation of motion's programs.


    For your information if you don't have enough ram memory for making some calculation or etc., you can set buffer size in your TP program or karel program. If your read attentively the Karel reference manual, then you remember note about motion in karel. You can't debug your motion in karel and you should avoid to use motion command in karel for regular programs. It's like a simple rule for fanuc programming. Also as you remember you can mix up background logic in bg program and skip conditions in regular tp program that can help you to make your code less and make work robot controller faster.

    Quote

    But if the "internal" language of Fanuc is karel, i think karel programs need less "manipulations" then tp programs. (So are more light)


    Anyway karel of tp will be translated to machine code. Everything depends on compiler. Maybe karel takes more conditions during running. Also background tp program has priorities where we can run the program with ~8ms(i don't remember exactly) per line. Again different configuration and different content can give you different result. In example some option for welding give you change to assign karel program in header of tp program. It's means that you tp program has some pre-run conditions and rules. But it doesn't means that your program will takes more memory. It's just conditions of start program.
    My personal opinion that karel and tp use two different cores for running. TP program include less logical commands, thats means the tp program should works faster and do not spend time for difficult commands. That's why bg program can use 8ms per line.
    Also don't forget when you need in karel to declare a variable, initialize the variable .... it takes time and memory. Again when you read some system variables/register/pr you need to check is is the variable initialized. In opposite case you will get exception and your program going down. Always it's very easy to break something but very difficult to make it stable.
    Sorry, it's just philosophy and my personal opinion. Looks like I types a lot of words....hope you caught my idea.

  • Hi Scotty


    Thank you a lot.
    I searched a similar answer :icon_mrgreen:
    I have small experience so i'm happy to see your answer and your opinion.
    I hope in other opinions like yours.


    I only do a clarification about this


    [quote='scotty','https://www.robot-forum.com/forum/index.php?thread/&postID=89548#post89548']
    Also background tp program has priorities where we can run the program with ~8ms(i don't remember exactly) per line.


    BG logic program can scan 600 items in 8 msec. "Item" as used here refer to data items and operators. If there are more than 600 items, scanning time increases. For example, if there are 1600 operations, processing time is 24 milliseconds.


    Otherwise i agree with you that for motion, karel isn't convenient and you can't debug it. The only benefits of motion program in karel is that you can protect your know how if you don't leave the source file on the controller.
    About the use of memory i have some doubts because there aren't certainties.
    It is strange that there are two different core for running different type of program. (It is only my opinion)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now