Can someone please advice me how to read PMC-parameter "D-type" in a NC-progamme? It´s for a Fanuc 31i.
I would like to use this external bit information in a macro, calculating variables.
Thank you!
Can someone please advice me how to read PMC-parameter "D-type" in a NC-progamme? It´s for a Fanuc 31i.
I would like to use this external bit information in a macro, calculating variables.
Thank you!
you can only read data parameters through your ladder programm using special instructions.So only one modification of your ladder programm can help you using window(sub 51 or sub 52 i think)
Thank you,
I have got an answer from another source.
It turns out to be readable by using "G340 Fn. An. Qn. ;"
Where:
"F" specifies numbers of bytes:
F0.=bit, F1.=1byte, F2.=2bytes, F4.=4bytes
"A" specifies adress:
A0.=R, A1=D, A2=C, A3=K, A4=X, A5=Y, A6=F, A7=G
"Q" specifies adress number
e.g. G340 F0. A0. Q128.3 ; Reads status of R128 bit 3
G340 F2. A1. Q80. ; Reads status of D80 (2 bytes)
The value is written to macro variable #100 which can be used in the NC-programs.
Hope this will be useful to other programmers as well.
/Ingmar
Does it apply to 31i only?
No.
I am quite sure it is working in Fanuc 16i/18i/30i as well.
How is your program using this data? Just curious...
DP
In this case we thought of using some externaly set D-parameters as a code for calling up different machining programs from a network.
There is a robot loading the machine with different articles and it can set these parameters externaly. Then we can call the requested program with this code.
G340 A F Q
M198 P#100
M30
There are naturally a lot of other examples one can think of using different status of parameters, e.g. jump in programs depending on situation.
Sounds extremely complicated. I'm already up to 100 variables just to automatically time shifts and cycle processes...on one machine.
Would it be simpler to program another robot with a large whip attachment to whip the robots in question until they get their act together?
DP
Where can I find more details about the G340
Is there anything similar to WRITE to a D-parameter from within a program?
DP