Hello and thanks for any help in advance.
I have been toying with writing macros on a Fanuc 21i Lathe Control. I wrote and tested a macro to perform incremental "Z" axis moves, should we have issues with strings and need to break chips during turning operations. A simulation in graphics and a full test run did as expected.
My macro callup looks like this: (WITH VARIABLES IN NO PARTICULAR ORDER)
G65 P8888 D(BLANK DIAMETER) X(FINISH DIAMETER) C(INC. Z CUT DEPTH) I(INC. Z RETRACT) Z(FINAL Z DEPTH) F(FEEDRATE) K(RAD. CUT ON DIAM) S(Z AXIS START POS.)
These variables are for calculation reference only and do not change. This morning I decided to rearrange them so all the Diameter and "Z" axis values are in a more orderly fashion for an easier understanding as follows:
From: G65 P8888 D X C I Z F K S
To: G65 P8888 D X K S Z C I F
Upon doing this all my numbers show up on the Local Variable page accordingly, however the "D" value is being completely ignored and replaced with the "I" value while "I" is being left blank. There is nowhere within the macro that these values are calculated to be altered. Changing it back resolves this issue. My understanding is that upon a G65 P####, the controls will read the variable values, place them in the Local variable page accordingly and then proceed to execute the macro. Why then would it ignore one value and replace it with another simply by rearranging the order? Am I missing something vital that would cause this?