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.