Hi
I'm trying to find a way to detect if the PR[] is uninitialize before use it. Any idea?
Thanks
Hi
I'm trying to find a way to detect if the PR[] is uninitialize before use it. Any idea?
Thanks
malain
My first thought about your question was: Just select DATA, PosReg, Item, 53 (if you want to check PR[53], and take a look if there are any numbers
OK, maybe I must specify that i want to do this during the execution of the program and by using a command.
Something like "R[1] = isUninit(53)" R[1] = 0 if ok and =1 if uninit
Hi
I'm trying to find a way to detect if the PR[] is uninitialize before use it. Any idea?
Thanks
Well you could easily come up with code to tell you if it's uninit or not, but Fanuc does that for you by faulting.
Why would you need to know that?
There are definitely ways to detect it, like looking for PR1,1 = 0 and also for it to be <>0. If it's uninit, neither would be true.
The need is : I want to be sure that the operator teach what he need to teach
To ESIELI, i already try that (test with PR[1,1])... the controler tells me unitialize data as well...
but maybe i can initialize at the beginning of my prog the PR with a wierd value like (-9999,-9999,-9999,-9999,-9999,-9999) and then using the PR[1,1] to test... but it look more like a patch...
Is someone has something more "official"....?
If you will go with this option why not make a sum of PR[1,1] .. PR[1,6] and check that with 0 (= / <>).
Just put simple statement into your program
PR[#] = 0
I do that all the time and it works for me
You can use IRmath to check if the position is valid to move to if you want. Im sure there is a way to use it to see if it is initialized also.
Check for "UNINIT Built-In Function" in the karel manual, possibly this can help you out with your problem.