Fanuc Robot Issues (Newbie)

  • Goodmorning,


    I recently started programming Fanucs (specifically an LR Mate 200iD) after reading the 950 pages of the manual which gave me a lot of good information. Since I come from experiences with KUKA and ABB, the Fanuc world has left me a little perplexed about some things.

    I am going to illustrate my doubts so far. Perhaps by programming, others issues will come.


    1- There are no local variables?

    I could not understand if in the basic programming of Fanuc i cannot declare "local variables" to be used exclusively within the subroutines. Is it always necessary to use the "Registeres"?


    2-Can't you use AR [] (argument) in the output of a subroutine?

    To give an example, I would need to write this code taken from a KUKA that has done the same job that my Fanuc will have to do:


    From KUKA :

    Config.dat

    ------------------------------------------------------------------

    ; INPUT

    SIGNAL JobDataConfirmed $IN[19]

    SIGNAL JobReq $IN[20]

    ...

    SIGNAL JobData $IN[41] TO $IN[48]

    ; OUTPUT

    SIGNAL JobDataRequest $OUT[19]

    ...

    SIGNAL JobDataEcho $OUT[41] TO $OUT[48]------------------------------------------------------------------



    GLOBAL DEF WaitData(Dest:OUT)

    DECL INT Dest

    WAIT FOR NOT JobDataConfirmed

    JobDataRequest=TRUE

    REPEAT

    ; Data echo to PLC

    JobDataEcho=JobData

    Dest=JobData

    UNTIL JobDataConfirmed

    JobDataRequest=FALSE

    JobDataEcho=0

    END


    To Fanuc: ?


    Very simple but if I can't use the "Argument" in output then I am forced to use a global variable ("Registers) for my "Dest" variable? I would like to avoid that...

    How would you do it?


    3- Do array exist? Can i make array of PR (Position Reg)?


    4- I know that there is the possibility of developing in Karel and I have already read something about it. Could this help me with the problems mentioned above? The additional software package


    (R632-Karel) should be purchased or is it given as a standard?


    5-Out of topic: In robotguide, if I want to import the work cell (and the program used to create the 3d cell is "Inventor") what is the extension that I need this file to be to import it correctly and use it?


    In conclusion, I would be very grateful if you could help me with these questions. Thanks for your time.

  • Following statements are valid for TP programming, Karel is another case.

    1. There are no local variables, you have to use registers

    2. You can use the index to a register and change this register in your subroutine.

    3. There is one big array of registers, one big array of PR...

    4. Karel can help, but has different different issues. Without source code you are screwed up if you want to change something, no way back from compiled code. You shouldn't use it for movements. Debugging is a pain.

  • Thank you all for the answers.

    Following statements are valid for TP programming, Karel is another case.

    1. There are no local variables, you have to use registers

    2. You can use the index to a register and change this register in your subroutine.

    3. There is one big array of registers, one big array of PR...

    4. Karel can help, but has different different issues. Without source code you are screwed up if you want to change something, no way back from compiled code. You shouldn't use it for movements. Debugging is a pain.

    2. I have no other options. I will do it in that way. The only problem is that if i need more than one variable, for just that i have to burn a "Register" variable every time, and i have just 200. In the end it looks like you have to do most things with "Registers".

    3. I wanted to have separate array. I guess that is not possible


    5 I use *.IGS

    i tried to do it with a .obj. The guy that provided me the 3d cell made a file of all the cell and i tryed to load that. It was complete but it was a single big block in the robotguide (so i could not use anyting because i could not select anything but the whole thing). When you export your file do you have something to say that that file must stay split in parts like before the export?


    If you have a controller with software version v9.40 you can use local Registers, PRs and SRs.

    How do i know if it is local or not? After selecting "Registers" if i try to modify the variable and i select "List" it shows me the global variable. So how do i select local if it's enabled in my version? (v9.40 confirmed)

  • The only problem is that if i need more than one variable, for just that i have to burn a "Register" variable every time, and i have just 200.

    Hi,


    You can increase the limit of 200 registers :

    Controlled start > Menu > Program Setup > Numeric registers


    I set up the limit to 1000 on all my robots.


    Hope this helps.


    Jeff

  • Argument registers are local but only can be used as inputs to the called program. There are no return values.


    Points are local but PRs are global.


    Separate arrays are not possible, but it is common to reserve a block for that purpose, just make sure to comment well.


    Each file you import to RoboGuide will become a single object.


    Also you may need interested to know that Registers are dynamically typed as either 32 bit Int or 32 bit float.


    For better or worse Fanuc has chosen to keep their TP programming setup fairly basic. I would not just jump into Karel if not need, but instead suggest you get used to the Fanuc TP way.

  • I don't know if i will use all 200 registers yet, but i'm pretty sure i will be close to it, at least. This is actually very useful and gives me relief. Thank you!

    Ok, that's clear now. I will try to focus sorely on TP programming. I got not enough time probably anyway :loudly_crying_face: . Thank you very much.

  • How do i know if it is local or not? After selecting "Registers" if i try to modify the variable and i select "List" it shows me the global variable. So how do i select local if it's enabled in my version? (v9.40 confirmed)

    Check this thread for more information on local registers.

  • Check this thread for more information on local registers.

    Understood. Thank you.

    First of all, we work with Solidworks

    Our engineering creates a solid model of everything I ask

    Usually it a model of the tool (no part), a part, a pallet. Basically all the components separated and I put them together,

    So basically when you import, you have to "rebuild" the whole thing on robotguide?

  • Sorry but you have to be more specific. What is the "whole thing"

    I don't rebuild anything.

    If I want an obstacle I Add and obstacle from Single CAD file, same with parts

    If I want a tool. I just go to robot UTOOL and I loaded from a file

    If I want a part on the gripper, I select the robot tool, select Parts tab and added


    Lets say you want a conveyor with pallets. You can ask for one single object with both of them or separated and you "build" It's t your convenience. You might even want both cases (together and separated)

    Retired but still helping

  • Sorry, i explained it bad. I do understand now what you guys mean. I was worried that if i export the part one by one, during the import in robotguide they would have fall in random position. If as HawkMe said "If the exported CAD files all share the same origin, then they will fall in place correctly", then i should not have any issues. Thank you.

    If the exported CAD files all share the same origin, then they will fall in place correctly. You must make sure they are exported from the same assembly, not individual part or sub-assemblies.

    I'll try, thanks.

Advertising from our partners