Adding and subtracting offsets
The V.G.NP[j].ALL variable re-assigns complete NPV data records by the additive assignment of existing NPVs. The offsets of all axes are included in the various calculations. The notations ` += `, ` -= `, and `=` are permitted in NPV assignment.
Programing Example
G54 (NPV1) is assigned the combination of G55 (NPV2) and G57 (NPV4):
N10 V.G.NP[1].ALL = V.G.NP[2].ALL + V.G.NP[4].ALL
Programing Example
The same operation but with the inclusion of G54:
N10 V.G.NP[1].ALL = V.G.NP[1].ALL + V.G.NP[2].ALL + V.G.NP[4].ALL
or
N10 V.G.NP[1].ALL += V.G.NP[2].ALL + V.G.NP[4].ALL
Attention
It is not possible to interconnect V.G.NP[j].ALL variables with axis-specific V.G.NP[j].V[i] variables or constants within an assignment.
Programing Example
G54 (NPV1) is defined by the combination of G55 (NPV2), the X offset of G57 (NPV4) and a compensation value:
WRONG:
N10 V.G.NP[1].ALL = V.G.NP[2].ALL + V.G.NP[4].V.X + 100
RIGHT:
A assignment must be made in two steps:
N10 V.G.NP[1].ALL = V.G.NP[2].ALL
N20 V.G.NP[1].V.X = V.G.NP[4].V.X + 100