Versioning of NC programs
NC programs can be provided with a version number using the V.G. variable V.G.PROG_VERSION.
Notice
The complete version number must always have the format
“<Major>.<Minor>.<Build>.<Patch>“.
If a different format is used, the error ID 22015 is output.
The complete version number is composed of the following:
“Complete“=“<Major>.<Minor>.<Build>.<Patch>“
For example, the complete version number or individual elements of the version number can be defined.
V.G.PROG_VERSION.COMPLETE = "4.1.2.3"
V.G.PROG_VERSION.PATCH = 4
PROG_VERSION.MAJOR | Major version of the NC program | UNS08 | - | R/W |
PROG_VERSION.MINOR | Minor version of the NC program | UNS08 | - | R/W |
PROG_VERSION.BUILD | Build version of the NC program | UNS08 | - | R/W |
PROG_VERSION.PATCH | Patch version of the NC program | UNS08 | - | R/W |
PROG_VERSION.COMPLETE | Major.Minor.Build.Patch | STRING | - | R/W |
The version information is inherited to called subroutines. A self-defined version number can also be assigned in subroutines and it is then inherited to its called subroutines.
Example
Versioning of NC programs
Example 1
%L UP_1
N110 V.G.PROG_VERSION.COMPLETE = "5.1.2.3"
N120 #MSG ["Version UP_1: %s", V.G.PROG_VERSION.COMPLETE]
N130 M17
%MAIN
N010 V.G.PROG_VERSION.COMPLETE = "4.1.2.3"
N20 LL UP_1
N30 #MSG ["Version Main: %s", V.G.PROG_VERSION.COMPLETE]
N040 M30
The following is output:
Version UP_1: 5.1.2.3
Version Main: 4.1.2.3
Example 2
%L UP_1
( --- no separate version specified ---)
N120 #MSG ["Version UP_1: %s", V.G.PROG_VERSION.COMPLETE]
N130 M17
%MAIN
N010 V.G.PROG_VERSION.COMPLETE = "4.1.2.3"
N20 LL UP_1
N30 #MSG ["Version Main: %s", V.G.PROG_VERSION.COMPLETE]
N040 M30
The following is output:
Version UP_1: 4.1.2.3
Version Main: 4.1.2.3