Académique Documents
Professionnel Documents
Culture Documents
OSP-P300S/P300L
GAUGING SYSTEMS
INSTRUCTION MANUAL-APPLICATION -
(1st Edition)
Pub No. 5972-E (LE61-497-R1) Dec. 2011
5972-E P-(i)
SAFETY PRECAUTIONS
SAFETY PRECAUTIONS
This machine is equipped with safety equipment to protect persons and machinery from any danger that might
happen unexpectedly. However operators are requested to operate the equipment in such a way that no
person will use the equipment in the following unsafe manner and cause an accident without knowing the
following safety precautions.
This instruction manual and the warning sings attached to the machine cover only those hazards which
Okuma can predict.
Be aware that they do not cover all possible hazards.
Do not draw the primary power supply from a distribution panel that also supplies a major
noise source (for example, an electric welder or electric discharge machine) since this
could cause malfunction of the CNC unit.
Make sure that the CNC unit will not be subject to direct sunlight.
Make sure that the control enclosure will not be splashed with chips, water, or oil.
Make sure that the control enclosure and the operation panel will not be subject to
excessive vibration or shock.
The permissible ambient temperature range for the control enclosure is 5 to 40 °C (41 to
104 °F).
The permissible ambient humidity range for the control enclosure is relative humidity
50% or less at 40 °C (104 °F) (no condensation).
The maximum altitude at which the control enclosure can be used is 1000m (3281 ft).
(2) Make absolutely sure that there is nobody near the moving parts of the machine, and that there
are no obstacles around the machine, before starting machine operation.
(3) When turning on the power, turn on the main power disconnect switch first, then the CONTROL
ON switch on the operation panel.
5972-E P-(ii)
SAFETY PRECAUTIONS
(2) Do not operate the machine with the front cover, chuck cover, or another protective cover
removed.
(4) When machining the initial workpiece, check for machine operations, run the machine under no
load to check for interference among components, cut the workpiece in the single block mode,
and then start continuous operation.
(5) Ensure your safety before rotating the spindle or moving a machine part.
(8) Check that the condition of hydraulic chuck jaws as mounted, operating pressure, and
maximum permissible revolving speed.
(9) Check the condition and location of the cutting tool as mounted.
(12) Check that the SPINDLE OVERRIDE and FEEDRATE OVERRIDE dials on the NC operation
panel are set to 100%.
(13) When moving the turret, check the software limits for X- and Z-axes or the locations of limit
switch dogs to prevent interference with the chuck and tailstock.
(16) Cut workpieces with a transmitted power and torque within the permissible range.
(3) Always turn off the power to the machine before leaving it.
(4) To turn off the power, turn off the CONTROL ON switch on the operation panel first, then the
main power disconnect switch.
5972-E P-(iii)
SAFETY PRECAUTIONS
(1) When trouble occurs, press the emergency stop button on the operation panel to stop the
machine.
(2) Consult the person responsible for maintenance to determine what corrective measures need
to be taken.
(3) If two or more persons must work together, establish signals so that they can communicate to
confirm safety before proceeding to each new step.
(5) Always turn the power off before starting inspection or changing parts.
(6) When parts are removed during inspection or repair work, always replace them as they were
and secure them properly with their screws, etc.
(7) When carrying out inspections in which measuring instruments are used - for example voltage
checks - make sure the instrument is properly calibrated.
(8) Do not keep combustible materials or metals inside the control enclosure or terminal box.
(9) Check that cables and wires are free of damage: damaged cables and wires will cause current
leakage and electric shocks.
a. Switch the main power disconnect switch OFF before opening the control enclosure door.
b. Even when the main power disconnect switch is OFF, there may some residual charge in
the MCS drive unit (servo/spindle), and for this reason only service personnel are permitted
to perform any work on this unit. Even then, they must observe the following precautions.
c. The control enclosure contains the NC unit, and the NC unit has a printed circuit board
whose memory stores the machining programs, parameters, etc. In order to ensure that the
contents of this memory will be retained even when the power is switched off, the memory
is supplied with power by a battery. Depending on how the printed circuit boards are
handled, the contents of the memory may be destroyed and for this reason only service
personnel should handle these boards.
5972-E P-(iv)
SAFETY PRECAUTIONS
6. General Precautions
(1) Keep the vicinity of the machine clean and tidy.
(2) Wear appropriate clothing while working, and follow the instructions of someone with sufficient
training.
(3) Make sure that your clothes and hair cannot become entangled in the machine. Machine
operators must wear safety equipment such as safety shoes and goggles.
(4) Machine operators must read the instruction manual carefully and make sure of the correct
procedure before operating the machine.
(5) Memorize the position of the emergency stop button so that you can press it immediately at any
time and from any position.
(6) Do not access the inside of the control panel, transformer, motor, etc., since they contain high-
voltage terminals and other components which are extremely dangerous.
(7) If two or more persons must work together, establish signals so that they can communicate to
confirm safety before proceeding to each new step.
INTRODUCTION
Thank you very much for purchasing our numerical control unit OSP-P300L.
Before using this NC unit (hereafter simply called NC), read this programming manual (hereafter called this
manual) thoroughly in order to ensure correct use. This manual explains how to use and maintain the NC so
that it will deliver its full performance and maintain accuracy over the long term. You must pay particular
attention to the cautions given in this manual, read them carefully, and make sure you fully understand them
before operating the NC.
Display Screens
The NC display screens vary with the selected NC specifications.
Therefore, the screens used on your CNC system may differ from
those shown in this manual.
5972-E P-(i)
TABLE OF CONTENTS
TABLE OF CONTENTS
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)...............................1
1-1. Notes for Using Gauging MSB .......................................................................................... 1
1-1-1. Precautions ......................................................................................................... 1
1-1-2. Control Statements.............................................................................................. 3
1-2. Touch Setter Gauging and Touch Sensor Gauging .......................................................... 7
1-2-1. Outline ................................................................................................................. 7
1-2-2. Variable Tables ................................................................................................... 7
1-2-3. Print ................................................................................................................... 17
1-2-4. Program............................................................................................................. 21
1-2-5. Flow Chart ......................................................................................................... 24
1-2-6. Program List ...................................................................................................... 59
1-3. Touch Sensor Gauging (Automatic Zero Offset Function)............................................... 75
1-3-1. General Description of MSB.............................................................................. 75
1-3-2. Variable Tables ................................................................................................. 75
1-3-3. Program............................................................................................................. 78
1-4. Automatic C-axis Zero Offset Function............................................................................ 81
1-4-1. General Description of MSB.............................................................................. 81
1-4-2. Variable Tables ................................................................................................. 81
1-4-3. Program............................................................................................................. 86
1-5. Y-axis Gauging Function ............................................................................................... 111
1-5-1. General Description of MSB............................................................................ 111
1-5-2. Variable Tables ............................................................................................... 111
1-5-3. Program........................................................................................................... 114
1-6. Automatic Gauging System Using Five Level Signals (BCD System)........................... 139
1-6-1. General Description of MSB............................................................................ 139
1-6-2. Variable Tables ............................................................................................... 139
1-6-3. Program........................................................................................................... 145
1-7. Automatic Gauging System Using Five Level Signals................................................... 151
1-7-1. General Description of MSB............................................................................ 151
1-7-2. Variable Tables ............................................................................................... 151
1-7-3. Program........................................................................................................... 156
1-8. Automatic Gauging System by Seven Level Signals..................................................... 162
1-8-1. General Description of MSB............................................................................ 162
1-8-2. Variable Tables ............................................................................................... 162
1-8-3. Program........................................................................................................... 167
1-9. CEJ MATIC Gauging MSB ............................................................................................ 173
1-9-1. CEJ MATIC Gauging Subprograms ................................................................ 173
1-9-2. Common Variables.......................................................................................... 173
1-9-3. System variables ............................................................................................. 173
1-9-4. Program........................................................................................................... 174
1-10. MSB for Post-process Gauging Using RS-232C ........................................................... 177
5972-E P-(ii)
TABLE OF CONTENTS
1-1-1. Precautions
General notes for using maker subprograms (MSB) for gauging are presented below.
NOEX Command
In the single block mode, sequences preceded by NOEX are excluded in single block operation.
This speeds up internal processing for checking and correcting the program in single block
operation.
When specifying the NOEX command, the restrictions stated below apply.
In modes other than the single block mode, NOEX has no influence on the execution of a program.
If NOEX is specified in a variable setting sequence, the execution time is shortened since the
sequence is excluded from single block processing. (The operation itself does not vary regardless of
whether or not NOEX is specified.)
5972-E P-2
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
N2 IF Local-variable-name N3
(3) Specify the local variable name whose defined/undefined status is to be checked. Note that a
local variable name may not be enclosed by brackets ([ ]).
(4) Specify the sequence name of the destination block to which the program jumps if the specified
local variable has been defined.
The IF statement judges whether or not the specified local variable has been defined and causes a
jump to the N3 block if it has been defined.
If undefined, the next block is executed.
Example: N1000 IF ABC N2000
If local variable ABC has been defined, the program jumps to the N2000 block. If not, the program
proceeds to the next block.
Measured value = VSKPZ [*] - VZOFZ - VZSHZ - VETFZ (* = 1 or 2) After the execution of the G30
gauging cycle, the coordinate value of the contact point (in the machine coordinate system) is set at
VSKPZ.
Measured
Zero offset value
Zero shift Tool offset value
value
LE61497R0100700040001
[Supplement]
The coordinate value of the contact point is set at either variable VSKPZ [1] or VSKPZ [2]. In the
touch setter gauging cycle, the contact point coordinate value is set at VSKPZ [2]. In the touch
sensor gauging cycle (master ring gauging cycle, work gauging cycle), it is set at VSKPZ [1]. This
is also true for VSKPX [1] and VSKPX [2].
(2) IF statement
These control statements are all entered at the beginning of a block or immediately after the
“sequence name” which comes first in a block. They must be followed by a space or a tab code. If no
space or tab code is entered following a control statement, an alarm occurs.
However, note that since a left bracket “[“ is specified following IF statement, no space or tab code is
required after an IF instruction.
Example:
Specify either a space or a tab code immediately after an element consisting of two or more
consecutive address characters such as a sequence name or control code.
[Supplement]
A sequence name means a code that is used to identify a block in a program. It consists of four
alphanumeric digits following address N.
Sequence names can be expressed in two ways: [N] [4-digit number] and [N] [Alphabet] [3-digit
alphanumerics]. In this manual, sequence names include both of these two types of expression.
5972-E P-4
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
N0 GOTO N1
(a) Sequence name of this block. The sequence name may be omitted.
(b) Indicates a GOTO statement.
(c) Sequence name of the destination of branching. A branch destination sequence name
must always be specified.
LE61497R0100700060001
[Supplement]
The branch destination sequence name “N1” must be present in the same block where the
control statement (GOTO) is specified.
(2) Function
Program branches to the specified block (N1) unconditionally.
With a two-saddle model, branching from the turret A side program to the turret B side program
or from the turret B side program to the turret A side program is not allowed.
N0 IF [Qualification] N1
(2) Function
The program jumps to the specified block if the result of [qualification] is true.
If the result if false, the next block is executed.
Example:
In the example program above, if “10” is set for variable V1 (V1 = 10), the program jumps to the
N2000 block.
In other cases, the next block is executed.
5972-E P-5
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
N2 IF Local-variable name N3
Example:
:
N1000 IF ABC N2000
:
:
N2000
LE61497R0100700070004
In the example program above, if local variable ABC has been defined, the program jumps to
the N2000 block.
If not, the program proceeds to the next block.
N0 CALL O1 Q1 Variable-setting-part
(2) Function
The CALL statement calls and executes the specified subprogram (O1).
If variables are set in “variable setting set”, the specified variables are all registered.
Example: N1000 CALL O1234 XP1=150 ZP1=100
Calls and executes subprogram O1234 and registers variables XP1 and ZP1.
5972-E P-6
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
N0 RST
(a) (b)
(a) Sequence name of this block. The sequence name may be omitted.
(b) Indicates the end of the subprogram (RTS statement).
LE61497R0100700090001
(2) Function
The RTS statement must always be specified at the end of a subprogram.
When this block is executed, the called subprogram ends and the program returns to the block
next to the CALL statement block.
Variables registered by the execution of the CALL statement and those registered in the called
subprogram are discarded.
Example:
When N1000 in the main program is executed, program execution jumps to O1234 in the
subprogram and that subprogram is executed. After that, when the RTS statement in N050 is
executed, program execution jumps to the N1001 block and the blocks in the main program are
executed from N1001.
Variables XP1 and ZP1 are discarded.
program sequence
LE61497R0100700090003
The sequence name specified as the jump destination must be present in the same
subprogram.
Designation of G13 and G14 is not allowed in a subprogram.
5972-E P-7
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
1-2-1. Outline
This section covers the list, flow chart, variable table and other information relating to touch setters
M/A and the touch sensor gauging function, using the following maker subprogram (MSB) as an
example.
LMSA300A.MSB
The name of gauging control software is indicated as described below.
LMS*????.MSB
*: Contents of each gauging software
????: Version of each gauging software
In this manual, the gauging control software is represented by “MSB”.
The MSB largely differs from the other control software in the contents.
Other control software is used to control signals from the machine and also input/output of part
programs and/or user’s commands.
However, the MSB is created in the same format as that of the part program, and so it can be
considered as the control software that implements gauging cycle instead of the user.
In the explanation below, LMSA300A.MSB (tool nose gauging using a touch sensor) is used as an
example. A variety of MSBs exist in addition to this program and the internal specification is specific
to the individual programs. However, the basic programming format, variables to be used, etc. are
common to all MSBs.
(1) Common variables (different from common variables V1 to V200 used for parameter setting)
(2) System variables 1 (used for reading and correcting various types of data)
(3) System variables 2 (used for transmitting data between turret A and turret B)
The common variables are not displayed on the screen unlike the common variables (V1 to V200)
used in parameter setting.
Variable Variable
Function Remarks Function Remark
No. No.
Tool nose, position,
VS01 For printer output VS17 Not used
tool number
Absolute value of Work/touch setter
VS02 Target value For printer output VS18
judgment result gauging
Gauging (measured Sensor input number Master ring/work/
VS03 For printer output VS19
value) (1 or 2) touch setter gauging
Touch setter gauging
cycle start condition
VS04 Offset value (previous) For printer output VS20 Touch setter gauging
judgment (=1:
Gauging)
Diameter gauging,
VS05 Offset value (new) For printer output VS21 diameter gauging Work gauging
value
Diameter gauging,
VS06 Result of judgment For printer output VS22 upper diameter Work gauging
gauging value
Maximum tool group
VS07 VS23 Tool number Work gauging
number
Diameter gauging,
VS08 Tool nose, tool number Not used VS24 OD/ID judgment flag Work gauging
(=0: OD, =1: ID)
NG double-contact Touch setter gauging
VS09 Not used VS25
flag Work gauging
VS10 Not used VS26 NG processing flag Touch setter gauging
Gauging direction
Absolute value of Work/touch setter judgment flag Touch setter gauging
VS11 VS27
amount of variation gauging (= 0: X-axis, = 1: X- Work gauging
axis)
Read out, tool
breakage detection
cycle judgment flag
VS12 Not used VS28 Touch setter gauging
(= 0: read out cycle, =
1: tool breakage
detection cycle)
Master ring/work/
VS13 Not used VS29 Target point
touch setter gauging
Work/touch setter
VS14 Not used VS30 Result of judgment
gauging
Gauging cycle starting
Master ring/work/ Gauging (measured Master ring/work/
VS15 point X (Z) coordinate VS31
touch setter gauging value) touch setter gauging
value
Work/touch setter
VS16 Not used VS32 Compensation value
gauging
5972-E P-9
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
(1) Common variables V1 to V200 used for setting parameters are used in common for turrets A
and B. On the other hand, the common variables VS01 to VS32 indicated above are turret
dependent.
That is, turrets A and B have an independent VS01, for example, and the VS01 for turret A must
be specified and called out from turret A, while the VS01 for turret B must be specified and
called out from turret B.
(2) Note that these common variables (VS01 to VS32) will be used in other MSBs in addition to the
gauging cycle discussed here. Therefore, if these common variables are used as variables
transferred between subprograms, numerical values might be changed during the transfer.
When these common variables are used, their processing must end within the same
subprogram.
G13
N1 NOEX VS01=100
Variables used in common in G13 side program
N2 NOEX VS02=10 VS03=20
N3 CALL OSUB1 Within a subprogram, they can be used as desired.
N4
N5
N6
N7 CALL OSUB2 Do not use common variables for transferring
N8 numerical values from OSUB1 to OSUB2.
N9
N10
G14
N2 CALL OSUB1
N3
N4 * Not used for transferring numerical values
N5
N6 NOEX VS01=100 VS03=60
N7 CALL OSUB3
N8 When calling more than one subprogram from a subprogram,
N9 pay attention to the transfer of variables between
M02 subprograms.
LE61497R0100700120001
5972-E P-10
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 1
Variable Subscript
Function Min - Max. - Values
Name Expression
Actual position of X-axis (program coordinate
VSIOX -99999.999 to 99999.999
system)
Actual position of Z-axis (program coordinate
VSIOZ -99999.999 to 99999.999
system)
Sensor contact position of X-axis (machine
VSKPX -99999.999 to 99999.999 1 to 2
coordinate system)
Sensor contact position of Z-axis (machine
VSKPZ -99999.999 to 99999.999 1 to 2
coordinate system)
VETFX Presently used tool offset data (X-axis) -99999.999 to 99999.999
VETFZ Presently used tool offset data (Z-axis) -99999.999 to 99999.999
VDETN Presently used tool offset number 1 to 32
VETLN Presently used tool number 1 to 12
Master ring position (X-axis) (program coordinate
VRNGX -99999.999 to 99999.999
system)
Master ring position (Z-axis) (program coordinate
VRNGZ -99999.999 to 99999.999
system)
Sensor position (X-axis) (machine coordinate
VSNX -99999.999 to 99999.999 1 to 2
system)
Sensor position (Z-axis) (machine coordinate
VSNZ -99999.999 to 99999.999 1 to 2
system)
VGRSL Tool number selected within a tool group 0 to 12 1 to 12
Flag indicating an occurrence of automatic
VGRID 0 to 1 1 to 12
indexing in a tool group
Flag indicating the result in a gauging cycle was
VDTNG 0 to 1 1 to 12
NG
VTLGN Group number the tool belongs to 0 to 12 1 to 12
VDTSN Tool life - preset count number 0 to 9999 1 to 12
VDTCN Actual machined number 0 to 9999 1 to 12
VDTST Tool life - preset time 0 to 359999 1 to 12
VDTCT Actual cutting time 0 to 359999 1 to 12
VDTSA Tool life - preset wear amount 0 to 999.999 1 to 12
VDTCA Actual tool wear amount 0 to 99999.999 1 to 12
VTLLF Flag indicating the tool life status 0 to 1 1 to 12
VZOFX X-axis zero offset data -99999.999 to 99999.999
VZOFZ Z-axis zero offset data -99999.999 to 99999.999
VZSHX X-axis zero shift data -99999.999 to 99999.999
VZSHZ Z-axis zero shift data -99999.999 to 99999.999
VDTFX Tool offset data (X-axis) -99999.999 to 99999.999 1 to 32
5972-E P-11
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Variable Subscript
Function Min - Max. - Values
Name Expression
VDTFZ Tool offset data (Z-axis) -99999.999 to 99999.999 1 to 32
Setting for OPTIONAL PARAMETER (GAUGING)
Feed rate 2 for gauging cycle 2 (Feed rate for the
VSKFA 1 to 500
first contact detection in double-contact gauging
cycle)
Setting for OPTIONAL PARAMETER (GAUGING)
Feed rate 1 in gauging cycle 1 (Feed rate for the
VSKFB second contact detection in a double-contact 1 to 500
gauging cycle; feed rate for the contact detection
in a single-contact gauging cycle)
VDNRX Nose radius compensation data (X-axis) -99999.999 to 99999.999 1 to 32
VDNRZ Nose radius compensation data (Z-axis) -99999.999 to 99999.999 1 to 32
5972-E P-12
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 2
System variables 2 are used for transferring data between turret A and turret B. They cannot be
displayed on the screen.
They are used in common for the two turrets.
Variable
Function Remarks
Name
VMDT [1] Compensation value Master ring gauging
VMDT [2] Target value Work gauging
VMDT [3] Gauging (measured value) Work gauging
VMDT [4] Judgment Work gauging
VMDT [5] Compensation value Work gauging
Tool life management specification flag
Tool nose gauging, Work
VMDT [6] (=1: Specification supported, =0: Specification not
gauging
supported)
VMDT [7] Diameter gauging, upper diameter gauging value
VMDT [8] Diameter gauging, lower diameter gauging value
VMDT [9] Diameter gauging, diameter gauging value
VMDT [10] Not used
VMDT [11] Not used
VMDT [12] Not used
The system variables for data transfer, indicated above, may be used in programs other than
gauging subprograms.
They can be used in the same manner as parameter setting common variables.
5972-E P-13
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 3
Variable Variable
Function Function
Name Name
VMCN [1] Master ring gauging cycle ON preset value VMCN [17] Not used
VMCN [2] Master ring gauging cycle ON counter VMCN [18] Not used
VMCN [3] Work gauging cycle ON preset value VMCN [19] Not used
VMCN [4] Work gauging cycle ON counter VMCN [20] Not used
VMCN [5] Read-out cycle ON preset value VMCN [21] Not used
VMCN [6] Read-out cycle ON counter VMCN [22] Not used
VMCN [7] Tool breakage detection cycle ON preset value VMCN [23] Not used
VMCN [8] Tool breakage detection cycle ON counter VMCN [24] Not used
VMCN [9] Not used VMCN [25] Not used
VMCN [10] Not used VMCN [26] Not used
VMCN [11] Not used VMCN [27] Not used
VMCN [12] Not used VMCN [28] Not used
VMCN [13] Not used VMCN [29] Not used
VMCN [14] Not used VMCN [30] Not used
VMCN [15] Not used VMCN [31] Not used
VMCN [16] Not used VMCN [32] Not used
Subprogram OCNCK is used for automatically incrementing a counter; when the counter data
reaches the preset value, it is cleared.
When the setting is “0”, the corresponding counter does not operate.
System variables VMCN[1] to VMCN[32] correspond to counters No. 1 to No. 32, respectively.
LE61497R0100700150001
5972-E P-14
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System variables not assigned specific functions may be used and displayed in the same manner as
common variables.
Note that the range of numerical values that can be handled by these parameters is 0 to 9999
(positive integer).
System Variables 4
Variable
Function Remarks
Name
ID master ring gauging, upper surface gauging
VIMDX [1] value Master ring gauging
OD master ring gauging, X gauging value
ID master ring gauging, lower surface gauging
VIMDX [2] Master ring gauging
value
VIMDX [3] Compensation value Master ring gauging
Work gauging, Gauging (measured) value in the
VIMDX [4] Work gauging
X-axis direction
Touch setter gauging, Gauging (measured) value
VIMDX [5] Touch setter gauging
in the X-axis direction
Tool offset, Compensation data in the X-axis
VIMDX [6] Work/touch setter gauging
direction (amount of variation)
Diameter gauging, Upper diameter gauging
VIMDX [7] Work gauging
(measured) value in the X-axis direction
Diameter gauging, Lower diameter gauging
VIMDX [8] Work gauging
(measured) value in the X-axis direction
VIMDX [9] Not used Display available
VIMDX [10] Not used Display available
No display with standard
VIMDX [11] Spare
specification
No display with standard
VIMDX [12] Absolute value of amount of variation
specification
Variable
Function Remarks
Name
Master ring gauging, gauging (measured) value in
VIMDZ [1] Master ring gauging
the Z-axis direction
VIMDZ [2] Not used Display available
Zero offset, gauging (measured) value in the -Z
VIMDZ [3] Master ring gauging
direction
Work gauging, gauging (measured) value in the Z-
VIMDZ [4] Work gauging
axis direction
Touch setter gauging, gauging (measured) value
VIMDZ [5] Touch setter gauging
in the Z-axis direction
Tool offset, compensation data in the Z-axis
VIMDZ [6] Work/touch setter gauging
direction (amount of variation)
5972-E P-15
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Variable
Function Remarks
Name
VIMDZ [7] Not used Display available
VIMDZ [8] Not used Display available
VIMDZ [9] Not used Display available
VIMDZ [10] Not used Display available
No display with standard
VIMDZ [11] Spare
specification
No display with standard
VIMDZ [12] Spare
specification
The data is displayed by selecting the IN-PROCESS GAUGING screen in the operation mode
(automatic, MDI, manual).
LE61497R0100700160001
The data set for VIMDX [*] and VIMDZ [*] (*: 1 to 10) is displayed on the screen shown above.
For VIMDX [*] and VIMDZ [*] (*: 11 and 12), data is not displayed with the standard specification.
The data input at the turret A side is displayed in the XA and ZA columns and the data input at the
turret B side is displayed in the XB and ZB columns.
Variables VIMDX [*] and VIMDZ [*] (*: 11, 12), which are not displayed on the screen, can be used
as variables.
5972-E P-16
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Input/Output Variables
These variables are used to input and output signals to and from the MSB.
VDOUT is used for outputs and VDIN is used for inputs. The subscript determines the contents of
the inputs and outputs.
Output Variables
Variable
Function
Name
VDOUT [1] = 1:+NG indicating lamp is turned ON.
VDOUT [2] = 1:+OK indicating lamp is turned ON.
VDOUT [3] = 1:OK indicating lamp is turned ON.
VDOUT [4] = 1:-OK indication lamp is turned ON.
VDOUT [5] = 1:-NG indicating lamp is turned ON.
VDOUT [9] = 0:All judgment indicating lamps are turned OFF.
VDOUT [991] = ####: Outputs “ALARM C user reserve code ####”.
VDOUT [992] = ####: Outputs “ALARM B user reserve code ####”
VDOUT [993] = ####: Outputs “ALARM A user reserve code ####”.
Variable
Function
Name
VDOUT [31] The master ring gauging cycle ON lamp is turned on and “1” is set for VDIN [31].
VDOUT [32] = 1: The work gauging cycle ON lamp is turned on and “1” is set for VDIN [32].
VDOUT [33] = 1: The trial-cut gauging cycle ON lamp is turned on and “1” is set for VDIN [33].
= 1: The touch setter gauging cycle ON lamp is turned on
VDOUT [34]
and “1” is set for VDIN [34].
= 1: The touch setter breakage detection cycle ON lamp is turned on
VDOUT [35]
and “1” is set for VDIN [35].
= 1: The master ring gauging cycle is turned ON.
VDIN [31]
This is checked within a subprogram.
= 1: The work gauging cycle is turned ON.
VDIN [32]
This is not checked within a subprogram.
= 1: The trial-cut gauging cycle is turned ON.
VDIN [33]
This is not checked within a subprogram.
= 1: The touch setter gauging cycle is turned ON.
VDIN [34]
This is checked within a subprogram.
= 1: The touch setter breakage detection cycle is turned ON.
VDIN [35]
This is checked within a subprogram.
5972-E P-17
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
1-2-3. Print
The print (PRNT) command can be used when the gauging data print function is selected.
When PRNT* (*: 1 to 14) is specified, the measured data is output to the printer.
The number to be specified with the PRNT command is fixed for each type of data to be output.
Command
Function
No.
PRNT 1 Work gauging cycle; turret A, X-axis
PRNT 2 Work gauging cycle; turret A, Z-axis
PRNT 3 Work gauging cycle; turret B, X-axis
PRNT 4 Work gauging cycle; turret B, Z-axis
PRNT 5 Master ring gauging cycle; turret A, X-axis
PRNT 6 Master ring gauging cycle; turret A, Z-axis
PRNT 7 Master ring gauging cycle; turret B, X-axis
PRNT 8 Master ring gauging cycle; turret B, Z-axis
PRNT 9 Touch setter gauging cycle; X-axis; data of the designated turret
PRNT 10 Touch setter gauging cycle; Z-axis; data of the designated turret
PRNT 11 Work gauging cycle; X-axis; data of the designated turret
PRNT 12 Work gauging cycle; Z-axis; data of the designated turret
PRNT 13 Master ring gauging cycle; X-axis; data of the designated turret
PRNT 14 Master ring gauging cycle; Z-axis; data of the designated turret
Set the measured data at the corresponding common variables (VS01 to VS06).
Items indicated by “○” are printed.
Master Touch
Output Work
Function Ring Setter
Variable Gauging
Gauging Gauging
Tool nose, position and tool number for tool
VS01 × ○ ○
offset data to be corrected
VS02 Target value ○ ○ ○
VS03 Gauging (measured value) ○ ○ ○
VS04 Offset data before compensation ○ ○ ×
VS05 Offset data after compensation ○ ○ ×
Result of judgment: 0 for OK, ±1 for ±OK, ±2
VS06 × ○ ○
for ±NG
5972-E P-18
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Print Format
In the printout of the data for turret B, the data for COMMAND and ACTUAL are both “0”.
This is because the actual gauging cycle is carried out by turret A and the data for turret B tools is
corrected using these data.
For the measured value in the X-axis direction in the ID master ring gauging cycle, the target value
with the amount of variation added is output to facilitate checking of the amount of variation.
5972-E P-19
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
* * * WORK GAUGING * * *
B.MIN A-TURRET X-AXIS
Touch setter
Turret A
PRNT9..........A-TURRET X-AXIS
PRNT10.........A-TURRET Z-AXIS
Turret B
PRNT9...........B-TURRET X-AXIS
PRNT10.........B-TURRET Z-AXIS
1-2-4. Program
Table of Subprograms
Sub Sub
program program Function
number Name
Master ring gauging ID: To be called from turret A
(1) ORGIA Used for correcting the zero offset data of the X- and Z-axis for turret A. If
called while the chuck is closed, an alarm occurs.
Master ring gauging OD: To be called from turret A
(2) ORGOA
Used for correcting the zero offset data of the X- and Z-axis for turret A.
Master ring gauging - processing at turret B: To be called from turret B
(3) ORNGB Used for correcting the zero offset data of the X- and Z-axis for turret B
based on the data for turret A.
Judgment cycle for master ring gauging cycle
This subprogram is called from a gauging cycle subprogram.
(25) OZTM
The result of measurement is classified into five levels: OK, ±OK and
±NG.
Work gauging - Turret A in the X-axis direction: To be called from turret A
(4) OWMXA Measures the dimension of a workpiece machined by a tool on turret A in
the X-axis direction and corrects the X offset data.
Work gauging - Turret A in the Z-axis direction: To be called from turret A
(5) OWMZA Measures the dimension of a workpiece machined by a tool on turret A in
the Z-axis direction and corrects the Z offset data.
Work gauging - Turret B in the X-axis direction: To be called from turret A
Measures the dimension of a workpiece machined by a tool on turret B in
(6) OWXBA
the X-axis direction
For turret B, OWXBB must be called.
Work gauging - Turret B in the Z-axis direction: To be called from turret A
Measures the dimension of a workpiece machined by a tool on turret B in
(7) OWZBA
the Z-axis direction
For turret B, OWZBB must be called.
Work gauging - Turret B in the X-axis direction: To be called from turret B
To be called from turret B when OWXBA is called at turret A.
(8) OWXBB
Based on the data measured at turret A, the X direction tool offset data is
corrected for tools on turret B.
Work gauging - Turret B in the Z-axis direction: To be called from turret B
To be called from turret B when OWZBA is called at turret A.
(9) OWZBB
Based on the data measured at turret A, the Z direction tool offset data is
corrected for tools on turret B.
Work gauging - processing of measured data: This subprogram is called
(10) OWXZ from a gauging cycle subprogram.
Measured data is processed according to the result of judgment.
Checks ATDG and TDFN commands, and Indexes the tool nose,
position and tool number.
(12) OTDSL To be called within a gauging subprogram Determines whether the tool
life management function is used or not. An alarm occurs if an ATDG or
TDFN command is not correct.
5972-E P-22
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Sub Sub
program program Function
number Name
Cancels the gauging cycle START conditions: To be called from both
(14) OMSSF turrets A and B
Turns off all gauging cycle START conditions.
Checks conditions for starting the trial-cut gauging cycle: To be called
from both turrets A and B
(15) OTRCK Turns ON the conditions for starting the trial-cut gauging cycle when
automatic tool indexing is conducted by the tool life management
function.
Checks conditions for starting the touch setter gauging cycle: To be
called before touch setter gauging
(16) OTST Turns ON the conditions for starting the touch setter gauging cycle when
they are turned on by the counter or when automatic tool indexing has
been executed by the tool life management function.
Counter for checking the gauging cycle START conditions: To be called
from either turret A or turret B.
(13) OCNCK Compares the value set at the gauging cycle counter with the counter
data and turns on the gauging cycle START conditions if the counter data
has reached the preset value.
Touch setter gauging - tool breakage detection cycle: To be called from
the turret on which the tool to be measured is set.
(17) OTLLS
Checks chipping or breakage of the tool both in the X- and Z-axis
directions.
Touch setter gauging - tool offset data read-out cycle: To be called from
the turret on which the tool to be measured is set.
(18) OTFRD
Checks the wear amount of the tool both in the X- and Z-axis directions
and corrects the tool offset data.
Touch setter gauging cycle - processing cycle: To be called from OTFRD
(19) OTMXZ or OTLLS. Executes a gauging cycle by calling OWTM and processes
the obtained data.
Executes an actual gauging cycle in the X-axis direction with the gauging
cycle start command (G30). This subprogram also determines whether
the cycle programmed is the “single-contact” cycle or the “double-
(20) OSKPX contact” cycle. This determination is based on whether argument APPS
(argument that specifies the second approach point in the double-
contact gauging cycle) is specified or not. This subprogram is called from
a gauging cycle subprogram.
(21) OSKPZ Executes the same processing as OSPKPX in the direction of Z-axis.
Converts the coordinate value for the X-axis direction sensor “touch”
(22) OSPCX point into a program coordinate value. This subprogram is called from a
gauging cycle subprogram.
(23) OSPCZ Executes the same processing as OSPCX in the Z-axis direction.
(24) OT1ME Executes a 0.1 sec dwell.
Work gauging/Touch setter gauging - Measuring and judgment cycle:
(11) OWTM This subprogram is called from a gauging cycle subprogram.
The result of actual measurement is classified into OK, ±OK and ±NG.
Diameter gauging - OD by turret A: To be called from turret A
(26) ODOAA Measures the dimension (OD in the X-axis direction) of the workpiece
machined by a tool on turret A and corrects the X-axis tool offset data.
5972-E P-23
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Sub Sub
program program Function
number Name
Diameter gauging - ID by turret A: To be called from turret A
(27) ODIAA Measures the dimension (ID in the X-axis direction) of the workpiece
machined by a tool on turret A and corrects the X-axis tool offset data.
Diameter gauging - OD by turret B: To be called from turret A
Measures the dimension (OD in the X-axis direction) of the workpiece
(28) ODOBA
machined by a tool on turret B.
For turret B, ODMBB must be called.
Diameter gauging - OD by turret B: To be called from turret A
Measures the dimension (ID in the X-axis direction) of the workpiece
(29) ODIBA
machined by a tool on turret B.
For turret B, ODMBB must be called.
Diameter gauging - Turret B: To be called from turret B
(30) ODMBB Based on the data measured at turret A, the tool offset data on turret B is
corrected.
Measuring and judgment cycle for diameter gauging:
This subprogram is called from a gauging cycle subprogram.
(31) ODWTM
The result of actual measurement is classified into five levels: OK, ±OK
and ±NG.
(32) OTGNM Obtains the maximum value of the tool group No.
Touch setter gauging for correcting the sensor position.
(33) OSNCA
This subprogram measures and compensates the sensor position.
Touch setter gauging called by OSNCA.
(34) OSNMZ This subprogram measures and corrects the sensor position in the Z-
axis direction.
Touch setter gauging called by OSNCA.
(35) OSNMX This subprogram measures and corrects the sensor position in the X-
axis direction.
5972-E P-24
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
ORGIA
YES 3C
XSTP=VSIOX
Storing the start position
ZSTP=VSIOZ
TD=TDF1
NO
VDIN[1255]AND32¹32
NA1 YES
G00 X=-[VDTFX[TDF1]-VDTFX[TDF2]/2 G00 X=-[[VDTFX[TDF1]+VDTWX[TDF1]]
Z=ZP1 -[VDTFX[TDF2]+VDTWX[TDF2]]]/2
M155 Z=ZP1 M155
NA2 Bringing the sensor to
the center of master ring
Z=ZP2 Moving the sensor to P2
TLN: tool number only
VS29=VRNGX Setting the gauging target value
(X-coordinate of ring upper face)
VS19=1 Determining the sensor input number
TD=TDF2
NO
VDIN[1255]AND32¹32
NA3 YES
G00 X=[VDTFX[TDF1]-VDTFX[TDF2]]/2 G00 X=[[VDTFX[TDF1]+VDTWX[TDF1]]
-[VDTFX[TDF2]+VDTWX[TDF2]]]/2
NA4
2A
LE61497R0100700220001
5972-E P-25
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
2A
VS27=0
TD=TDF1
3A
LE61497R0100700220002
5972-E P-26
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
3A
VS27=1
VIMDZ[3]=VS32
VS06=VS30
ORGOA
NO
VRSTT=0 Sequence restart OFF?
YES
Waiting for
M100 synchronization
with turret B
YES
VDIN[31]=0 Gauging cycle is not ON
NO
3B
Storing the XSTP=VSIOX
start position ZSTP=VSIOZ
TD=TDFN
X=XP2 Z=ZP2
VS27=0
OZTM
VIMDX[2]=0
VIMDX[3]=VS32
2A
LE61497R0100700220004
5972-E P-28
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
2A
X=XP3
OZTM
VIMDZ[3]=VS32
VZOFZ=VZOFZ+VIMDZ[3]
VS05=VZOFZ
3A
LE61497R0100700220005
5972-E P-29
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
3A
ORNGB
NO
VRSTT=0 Sequence restart OFF?
YES
M100 Waiting for synchronization with turret A
YES
VDIN[31]=0 Gauging cycle is not ON
NO
M100 Waiting for completion of Z-direction gauging on turret A
Setting the previous zero offset X (for printing)
VS04=VZOFX Zero offset in X-direction on turret B
VZOFX=VS04+VMDT[1] Setting the new zero offset X (for printing)
VS05=VZOFX Setting the variation in X-direction displayed on CRT at the system
VIMDX[3]=VMDT[1] variable common to turrets A and B (gauging result obtained on turret A)
OWMXA OWMZA
Setting the flag for judging Gauging in
the gauging direction VS27=0 X direction VS27=1 Gauging in Z direction
ND1
M155 Air blow ON
NO
VRSTT=0 Sequence restart OFF?
YES
VDOUT[9]=0 Judgment indicator lamp OFF
YES NO ND4
VS27=0 Z direction
X direction
NO NO
VDIN[1255]AND32¹32 VDIN[1255]AND32¹32
ND2 YES ND5 YES
VIMDX[4]=VS31 VIMDX[4]=VS31 VIMDZ[4]=VS31 VIMDZ[4]=VS31
VS04=VDTFX[VS01] VS04=VDTWX[VS01] VS04=VDTFZ[VS01] VS04=VDTWZ[VS01]
ND3 ND6
OWXZ Calling the subprogram for OWXZ
processing measured data
RTS
LE61497R0100700230001
5972-E P-31
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OWXBA OWZBA
Setting the flag for judging VS27=0 Gauging in VS27=1 Gauging in Z direction
the gauging direction X direction
NE1
M155 Air blow ON
NO
VRSTT=0 Sequence restart OFF?
YES
M100 Starting the gauging cycle in synchronization with turret B
VS17=0
RTS M100 code (waiting for synchronization) is issued to turret B only twice
when the result is NG through it is issued three times when the result is OK.
This is to prevent the turret A from finishing the gauging subprogram and
executing the next sequence before the alarm occurs on turret B. If NG is
ignored (no alarm occurs), however, M100 is issued three times as in the
case where the result is OK or ±OK.
LE61497R0100700230002
5972-E P-32
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OWXBB OWZBB
Setting the flag for Gauging in
judging the gauging VS27=0 X direction VS27=1 Gauging in Z direction
direction NF1
NO
VRSTT=0 Sequence restart OFF?
YES
M100
Determining whether the tool life management function is
OTDSL used or not, checking ATG and AOG commands, and
selecting the tool number and the tool offset number
Work gauging cycle (Measured data processing, screen output, printer output)
Target value
VS02=VMDT[2]
Measured value
VS03=VMDT[3]
Result of judgment
VS06=VMDT[4] Using the absolute value of the result to determine the processing
VS18=ABS[VS06] to be executed
YES
VS18=1
NO (OK processing, ±NG processing)
VS05=VS04 Printing the new offset data (previous data if the result is ±NG or OK)
Setting the variation at the system variable common to turrets A and B
VMDT[5]=0 (variation is 0 if the result is ±NG or OK)
NO (Tool life management)
YES(±NG) YES (NG ignored)
VS18=2 VMDT[6]=0 VDIN[21]=1
YES NO VDTNG[VS08]=1
±OK NO NG1
processing No action is Setting the NG flag at
NO(-NG) the tool life management
taken when the VS06>=0 table without causing
result is OK YES(+NG) any alarm
M154 M154
VDOUT[992]=1001+VS27*2 VDOUT[992]=1000+VS27*2
Alarm No.1001 for X-direction gauging (VS27=0) Alarm No.1000 for X-direction gauging (VS27=0)
1
Alarm No.1003 for Z-direction gauging (VS27=1) Alarm No.1002 for Z-direction gauging (VS27=1)
NG3
NO
VDIN[1255]AND32¹32
NG5 YES
VS27=0 NO NO
VS27=0
NG6 YES NG4 YES
VDTFX[VS01]=VDTFX[VS01] VDTFZ[VS01]=VDTFZ[VS01] VDTWX[VS01]=VDTWX[VS01] VDTWZ[VS01]=VDTWZ[VS01]
-VMDT[5] -VMDT[5] -VMDT[5] -VMDT[5]
VS05=VDTFX[VS01] VS05=VDTFZ[VS01] VS05=VDTWX[VS01] VS05=VDTWZ[VS01]
NG7
Tool life management function OFF? YES
VMDT[6]=0
NO
TRCT specified? NO
TRCT
YES
Addition of compensation data ignored? YES
TRCT=1
NO
VDTCA[VS08]=VDTCA[VS08] Adding the compensation data 1
to the accumulated wear in the
+ABS[VMDT[5]] tool life management table C
NG9
RTS
LE61497R0100700230004
5972-E P-34
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OWTM 1
NH1
VS25=1
NO Regarding that the sensor
VS27=0 NH2 has touched the work twice
YES
OSKPX Calling the X-direction OSKPZ Calling the Z-direction
gauging and judging gauging and judging
subprogram subprogram
VIMDZ[12]=DNG
±NG?
VIMDX[12] NO NH6
>VIMDZ[12]
VIMDZ[12]=DOK
YES
APPS
YES ±OK?
VIMDX[12] NO
NG double-touch NO >VIMDZ[12] OK
gauging? VDOUT[3]=1
VS25=0
YES YES VS30=0
NO NH7
1 NH4
+OK?
NO NH5 NO NH8
VS32>0 VS32>0
+NG YES -NG +OK YES -OK
Judgment
indicator lamp VDOUT[1]=1 VDOUT[5]=1 VDOUT[2]=1 VDOUT[4]=1
ON VS30=2 VS30=-2 VS30=1 VS30=-1
NH9
RTS The touch sensor gauging may be performed simultaneously on turret A
and turret B(though work gauging is performed only on turret A), and so
the target value, measured value, ,judgment, and compensation data are
set at the common variables prepared separately for turrets A and B. For
work gauging, these values are set at the variables common to turrets A
and B to transfer the data from turret A to turret B.
LE61497R0100700230005
5972-E P-35
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
VDOUT[992]=1008
N19
RTS
LE61497R0100700230006
5972-E P-36
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OCNCK
NO
VRSTT=0
YES 1
Is "0" set at the gauging counter No. YES
VMCN[1]=0
1 (master ring gauging start)?
NO
VMCN[2]=VMCN[2]+1
Is the counter value smaller than VMCN[2]<VMCN[1] YES Checking the master ring
the preset value? gauging cycle start condition
NO
Master ring gauging cycle start condition VMCN[2]=0
is met. VDOUT[31]=1
N1
YES
VMCN[3]=0
NO
VMCN[4]=VMCN[4]+1
Is the counter value smaller than VMCN[4]<VMCN[3] YES Checking the work gauging
the preset value? cycle start condition
NO
Work gauging cycle start condition VMCN[4]=0
is met. VDOUT[32]=1
N2
YES
VMCN[5]=0
NO
VMCN[6]=VMCN[6]+1
OMSSF
NO Sequence restart OFF?
VRSTT=0
YES
M100 Synchronization with the OMSSF called from turret B
VDOUT[34]=0 Offset data readout cycle start condition cancel in touch setter gauging
VDOUT[35]=0 Tool breakage detection cycle start condition cancel in touch setter gauging
NK1
[Supplement]
RTS
Synchronization (M100) is necessary to avoid the following
case: if either of the turrets fails meet to the gauging condition,
the other turret does not perform required gauging.
LE61497R0100700230008
OTRCK
NO
VRSTT=0
YES
RTG=1 Local variable
NL1
Is a tool in the tool group
Trial cut part NL2 NO automatically indexed?
gauging ON VGRID[RTG]=0
VDOUT[33]=1 YES Repeating the index check
in all the tool groups
RTG>=VS07
RTG=RTG+1
NL3
Synchronization with the
M100 index check on turret B
NL4
RTS
Even when a tool is indexed on turret B, the actual gauging is
perform on turret A. Synchronization is thus necessary for the
gauging processing. (Do not start the gauging cycle
independently on turret A or turret B).
LE61497R0100700230009
5972-E P-38
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OTST
NO
VRSTT=0
YES When activating the tool life management
VS20=0 specification is supported, VS20 is used
as a tool tip gauging start condition.
NO
YES Is the tool breakage
VDIN[35]=1
detection cycle ON?
NO
YES Is the offset data
VDIN[34]=1
readout cycle ON?
NO
RTG=1 RTG is a local variable.
NO
VDIN[35]=1 Tool breakage detection cycle ON?
YES
VS28=1 Tool breakage detection cycle
4D 2A
NN22 NN8
LE61497R0100700240002
5972-E P-39
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
4D 2A
NN22 NN8
LE61497R0100700240003
5972-E P-40
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
2A
3A
4B 4A 4C
NN20 NN21
LE61497R0100700240005
4B 4A 4C 4D
PRNT 9
VDOUT[992]=2000+VETLN+VS28*100
NN21
G00 X=XP1 Z=ZP1 Retracting the tool nose to P1
Retracting the tool nose to the stored
X=XSTP Z=ZSTP start point
NN22
RTS
LE61497R0100700240006
5972-E P-42
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OTMXZ
NO12 NO9
1A 2A 3A
NO NO
VS27=0 VS17=1
YES YES
VDTFX[VS01]= VDTFX[VS01]= VDTFZ[VS01]=
Processing
VS32-VDTFX[VS01] VS32+VDTFX[VS01] VS32+VDTFZ[VS01]
Processing
Z-axis data X-axis data NO11
VIMDZ[5]=VS03 VIMDX[5]=VS03 VIMDX[5]=VS03 CRT display VIMDZ[5]=VS03
Measured value
VIMDZ[6]=0 VIMDX[6]=0 VIMDX[6]=VS32 Variation VIMDZ[6]=VS32
NO14
NO Is the result NG? 4A
VS18=2
Tool life management
YES specification not NO
supported? VS27=0
VMDT[6]=0 NO5 YES
YES
NO NO
VS17=1
NO NO6 YES
VORD[OT21]=1 NO15
VDTWX[VS01]= VDTWX[VS01]= VDTWZ[VS01]=
YES VS32-VDTWX[VS01] VS32+VDTWX[VS01] VS32+VDTWZ[VS01]
VTLNG[VS08]=1 VS26=1
NO7
NG flag
ON VIMDX[5]=VS03 VIMDZ[5]=VS03
VIMDX[6]=VS32 VIMDZ[6]=VS32
NO16
RTS
LE61497R0100700240008
5972-E P-44
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OSKPX
RTS
LE61497R0100700240009
5972-E P-45
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OSKPZ
RTS
LE61497R0100700240010
Converting gauged data into the coordinate value in the program coordinate system
- X-axis
OSPCX
Value in the program = Measured value in the
VS31=VSKPX[VS19]-VZOFX-VZSHX-VETFX coordinate system (machine coordinate system)
NO - Zero offset value - Zero
VS19=3
shift value - Tool offset value
YES
VS31=-VS31
NP1
RTS
LE61497R0100700240011
5972-E P-46
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Converting gauged data into the coordinate value in the program coordinate system
- Z-axis
OSPCZ
NO NP2
VMIRZ=0
YES
VS31=VSKPZ[VS19]-VZOFZ VS31=-[VSKPZ[VS19]-VZOFZ
-VZSHZ-VETFZ -VZSHZ-VETFZ]
NP3
RTS
LE61497R0100700240012
OTIME
OZTM
VDOUT[9]=0
VS11=ABS[VS32] Using the absolute value of the variation amount for the subsequent judgment
VIMDX[12]=VS11
Is DNG command specified?
NO
DNG
NS1 YES
VIMDZ[12]=DNG
Is DOK command specified?
VIMDX[12]> NO NS3 YES NS4
VIMDZ[12] DOK
NO VIMDZ[12]=DOK
YES
YES VIMDX[12]>
NS5 VIMDZ[12]
NO NS2 YES NO
VS32>0 VS32>0 NS7
YES NS6 NO
Judgment
indicator
lamp ON
VDOUT[1]=1 +NG VDOUT[5]=1 -NG VDOUT[2]=1 +OK VDOUT[4]=1 -OK VDOUT[3]=1 OK
VS30=2 VS30=-2 VS30=1 VS30=-1 VS30=0
VS32=0 VS32=0 VS32=0
M154 M154
VDOUT[992] VDOUT[922]
=1301+VS27*2 =1300+VS27*2
NS8
RTS
LE61497R0100700240014
5972-E P-48
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Diameter Gauging
ODOAA ODIAA
VDIN[1255]AND 32≠32
NO
NS2 YES
VS04=VTOFX[VS01] VS04=VTWOX[VS01]
NS3
2A
LE61497R0100700250001
5972-E P-49
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
2B 2A
TD=TDSN
RTS
LE61497R0100700250002
5972-E P-50
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
ODOBA ODIBA
VS18=ABS[VS30] Using the absolute value of the judgment data for the
subsequent processing executed after synchronization
2A
LE61497R0100700250003
5972-E P-51
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
2B 2A
Is the result ±NG?
YES ±NG Tool life management specification
VS18=2 not supported?
NO YES
VMDT[6]=0
NO NG ignore button
ON?
YES
NT2 VDIN[21]=1
M100 NO
NT3
M100 Waiting for data processing on turret B
TD=TDSN
Returning to the sensor to the gauging start
G00 X=XSTP Z=ZSTP position
NT4
M154 Air blow OFF
RTS
M100 code (waiting for synchronization) is issued to
turret B only twice when the result is NG though it is
issued three times when the result is OK. This is to
prevent the turret A from finishing the gauging
subprogram and executing the next sequence before
the alarm occurs on turret B.
If NG is ignored (no alarm occurs), however, M100 is
issued three times as in the case where the result is
OK or ±OK.
LE61497R0100700250004
5972-E P-52
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
ODMBB
NO Sequence restart OFF?
VRSTT=0
YES
VS27=0 X-direction gauging
ODWTM
OD gauging?
NO NU1
VS24=0
YES
TD=TDF2 TD=TDF1
VDIN[1255] NO
AND 32≠32
NU2 YES
G00 X=XP1 Z=ZP1 G00 X=-[VDTFX[TDF1] G00 X=-[[VDTFX[TDF1]
-VDTFX[TDF2]]/2 +VDTWX[TDF1]]
Z=ZP1 -[VDTFX[TDF2]
-VDTWX[TDF2]]]/2
1A Z=ZP1
NU3
G00 Z=ZP2
VS29=MSP Setting the target value (of the upper gauging point)
2A
LE61497R0100700250006
5972-E P-54
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
2A
X=XP1 VDIN[1255]
AND32≠32
NU8
G00 X=-[VDTFX[TDF1] G00 X=-[[VDTFX[TDF1]
-VDTFX[TDF2]]/2 +VDTWX[TDF1]]
-[VDTFX[TDF2]
-VDTWX[TDF2]]]/2
NU9
VS32=VS21+VS29 Variation amount = Measured value - Target value
VS11=ABS[VS32] Using the absolute value of the variation amount for the
subsequent judgment
VIMDX[12]=VS11
VIMDZ[12]=DNG
±NG?
VIMDX[12]> NO NU12
VIMDZ[12]
Is the judgment ±OK or OK?
VIMDZ[12]=DOK
YES
YES
APPS ±OK?
VIMDX[12]> NO
NO NG double-
YES touch VIMDZ[12]
VS25=0
NO gauging? YES
VS25=1
NO NO
1A VS32>0 VS32>0
YES YES
NU3
VDOUT[1]=1 +NG VDOUT[5]=1 -NG VDOUT[2]=1 +OK VDOUT[4]=1 -OK VDOUT[3]=1 OK
VS30=2 VS30=-2 VS30=1 VS30=-1 VS30=0
NU15
RTS
LE61497R0100700250007
5972-E P-55
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
ZSTP=VSIOZ
NO NW7
VMDT[6]=0
YES
ATC unprovided?
YES VDIN[1241] NO VDIN[1241]
AND 7=0 AND 7=0
NW3 NO YES
TDG=ATDG
TD=TDFN NW8
G00 X=XP1 Z=ZP1
NW4 TDG=ATDG
NW9
YES NW5 YES NW10
VS17=1 VS17=1
NO G40 NO G40
G00 X=XP1 Z=ZP1 G00 X=XP1 Z=ZP1 G00 X=XP1 Z=ZP1 G00 X=XP1 Z=ZP1
NW6
VS01=VETON Offset number output to the printer
NW11
X=XP2 Z=ZP2 Moving the tool nose to P2
2A
LE61497R0100700250009
5972-E P-56
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
2A
Z-axis offset
YES MSPZ=0
NW12 NO
VIMDZ[5]=0
X=XP3
VIMDZ[6]=0
OSNMZ
G00 X=XP2
NO NG processing
VS26=0
NW13 YES
YES
MSPX=0
NW14 NO
VIMDX[5]=0 VIMDX[5]=0
Z=ZP3
VIMDX[6]=0 VIMDX[6]=0
OSNMX
1
G00 Z=ZP2
1 YES
VS26=0
NW15 NO
M126
VDOUT[992]=2310
NW16
G00 X=XP1 Z=ZP1
2B
X=XSTP Z=ZSTP
NW17
RTS
LE61497R0100700250010
5972-E P-57
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OSNMZ
Is the same coordinate
system used?
NO NY1
VMIRZ=0
YES
VS29=VSNZ[MSPZ]-VZOFZ-VZSHZ VS29=-[VSNZ[MSPZ]-VZOFZ-VZSHZ]
Setting the
target value
NY2
OSKPZ
VS32=VS31-VS29
NO
DNG
NY5 YES
VIMDX[12]=ABS[VS32]
VIMDZ[12]=DNG
VIMDX[12]> YES
VIMDZ[12]
NY6 NO
VS29=VS32
NO
YES
VMIRZ=0
NO
VS29=-VS29
NY7
VSNZ[MSPZ]=VS29+VSNZ[MSPZ] VS26=1
NY8
VIMDZ[5]=VS31 Setting the measured value and the
VIMDZ[6]=VS32 offset value for display
RTS
LE61497R0100700250011
5972-E P-58
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OSNMX
VS29=VSNX[MSPX]-VZOFX-VZSHX
NO
VS19=3
YES
VS29=-VS29
NX1
OSKPX
VS32=VS31-VS29
NO
DNG
NX2 YES
VIMDX[12]=ABS[VS32]
VIMDZ[12]=DNG
VIMDX[12]> YES
VIMDZ[12]
NO
NX3
VSNX[MSPX]=VS32+VSNX[MSPX] VS26=1
NX4
VIMDX[5]=VS31
VIMDX[6]=VS32
RTS
LE61497R0100700250012
5972-E P-59
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
NA9 M100
NA10 RTS
ORNGB (Master ring gauging (processing at turret B), called from turret B)
IF [VRSTT NE 0] NC1
M100
IF [VDIN[31] EQ 0] NC1
M100
NOEX VS04=VZOFX VZOFX=VS04+VMDT[1] VS05=VZOFX VIMDX[3]=VMDT[1]
PRNT 13
M100
NOEX VS04=VZOFZ VZOFZ=VS04+VMDT[1] VS05=VZOFZ VIMDZ[3]=VMDT[1]
PRNT 14
M100
NC1 RTS
5972-E P-61
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OWMXA (Work gauging (turret A in the X-axis direction), called from turret A)
NOEX VS27=0
GOTO ND1
5972-E P-62
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OWMZA (Work gauging (turret A in the Z-axis direction), called from turret A)
NOEX VS27=1
ND1 M155
IF [VRSTT NE 0] ND7
NOEX VDOUT[9]=0 VS25=0 VS29=MSP VS19=1
CALL OTDSL
NOEX VS17=0
CALL OWTM
NOEX VMDT[2]=MSP VMDT[3]=VS31 VMDT[4]=VS30 VMDT[5]=VS32
IF [VS27 NE 0] ND4
IF [[VDIN[1255]AND 32] NE 32] ND2
NOEX VIMDX[4]=VS31 VS04=VDTWX[VS01]
GOTO ND3
ND2 NOEX VIMDX[4]=VS31 VS04=VDTFX[VS01]
ND3 CALL OWXZ
NOEX VIMDX[6]=-VMDT[5]
PRNT 11
GOTO ND7
ND4 IF [[VDIN[1255]AND 32] NE 32] ND5
NOEX VIMDZ[4]=VS31 VS04=VDTWZ[VS01]
GOTO ND6
ND5 NOEX VIMDZ[4]=VS31 VS04=VDTFZ[VS01]
ND6 CALL OWXZ
NOEX VIMDZ[6]=-VMDT[5]
PRNT 12
ND7 M154
RTS
OWXBA (Work gauging (turret B in the X-axis direction), called from turret A)
NOEX VS27=0
GOTO NE1
OWZBA (Work gauging (turret B in the Z-axis direction), called from turret A)
NOEX VS27=1
NE1 M155
IF [VRSTT NE 0] NE4
M100
M100
NOEX VDOUT[9]=0 VS25=0 VS29=MSP VS19=1 VS17=0
CALL OWTM
NOEX VMDT[2]=MSP VMDT[3]=VS31 VMDT[4]=VS30 VMDT[5]=VS32
NOEX VS18=ABS[VS30]
IF [VS18 NE 2] NE2
IF [VMDT[6] EQ 0] NE3
IF [VDIN[21] NE 1] NE3
NE2 M100
NE3 M100
M100
NE4 M154
RTS
OWXBB (Work gauging (turret B in the X-axis direction), called from turret B)
NOEX VS27=0
GOTO NF1
5972-E P-63
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OWZBB (Work gauging (turret B in the Z-axis direction), called from turret B)
NOEX VS27=1
NF1 IF [VRSTT NE 0] NF4
M100
CALL OTDSL
M100
M100
IF [VS27 NE 0] NF2
NOEX VIMDX[4]=VMDT[3] VS04=VDTFX[VS01]
CALL OWXZ
NOEX VIMDX[6]=-VMDT[5]
PRNT 11
GOTO NF3
NF2 NOEX VIMDZ[4]=VMDT[3] VS04=VDTFZ[VS01]
CALL OWXZ
NOEX VIMDZ[6]=-VMDT[5]
PRNT 12
NF3 M100
M100
NF4 RTS
OWXZ (Work gauging (processing of measured data), called within the gauging
cycle subprogram)
NOEX VS02=VMDT[2] VS03=VMDT[3] VS06=VMDT[4] VS18=ABS[VS06]
IF [VS18 EQ 1] NG3
NOEX VS05=VS04 VMDT[5]=0
IF [VS18 NE 2] NG9
IF [VMDT[6] EQ 0] NG1
IF [VDIN[21] NE 1] NG1
NOEX VDTNG[VS08]=1
GOTO NG9
NG1 IF [VS06 LT 0] NG2
M154
NOEX VDOUT[992]=1001+VS27*2
GOTO NG9
NG2 M154
NOEX VDOUT[992]=1000+VS27*2
GOTO NG9
NG3 IF [[VDIN[1255]AND 32] NE 32] NG5
IF [VS27 EQ 0] NG4
NOEX VDTWZ[VS01]=VDTWZ[VS01]-VMDT[5] VS05=VDTWZ[VS01]
GOTO NG7
NG4 NOEX VDTWX[VS01]=VDTWX[VS01]-VMDT[5] VS05=VDTWX[VS01]
GOTO NG7
NG5 IF [VS27 EQ 0] NG6
NOEX VDTFZ[VS01]=VDTFZ[VS01]-VMDT[5] VS05=VDTFZ[VS01]
GOTO NG7
NG6 NOEX VDTFX[VS01]=VDTFX[VS01]-VMDT[5] VS05=VDTFX[VS01]
NG7 IF [VMDT[6] EQ 0] NG9
IF TRCT NG8
GOTO NG9
NG8 IF [TRCT EQ 1] NG9
NOEX VDTCA[VS08]=VDTCA[VS08]+ABS[VMDT[5]]
NG9 RTS
5972-E P-64
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OWTM (Work gauging/Touch setter gauging (measuring and judgment cycle), called
from a gauging subprogram)
NH1 IF [VS27 NE 0] NH2
CALL OSKPX
GOTO NH3
NH2 CALL OSKPZ
NH3 IF [VS17 EQ 0] NH3A
IF [VS27 EQ 1] NH3A
NOEX VS32=VS29-VS31
GOTO NH3B
NH3A NOEX VS32=VS31-VS29
NH3B NOEX VS11=ABS[VS32]
VIMDX[12]=VS11
VIMDZ[12]=DNG
IF [VIMDX[12] LE VIMDZ[12]] NH6
IF APPS NH4
IF [VS25 NE 0] NH4
NOEX VS25=1
GOTO NH1
NH4 IF [VS32 LE 0] NH5
NOEX VDOUT[1]=1 VS30=2
GOTO NH9
NH5 NOEX VDOUT[5]=1 VS30=-2
GOTO NH9
NH6 VIMDZ[12]=DOK
IF [VIMDX[12] GT VIMDZ[12]] NH7
NOEX VDOUT[3]=1 VS30=0
GOTO NH9
NH7 IF [VS32 LE 0] NH8
NOEX VDOUT[2]=1 VS30=1
GOTO NH9
NH8 NOEX VDOUT[4]=1 VS30=-1
NH9 RTS
5972-E P-65
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OTDSL
Determines whether the tool life management function is used or not. Selects tool number and tool
offset number from group number.
To be called within a subprogram.
NOEX VS01=0
IF ATDG NI1
GOTO NI2
NI1
NI2 NOEX VMDT[6]=0
IF TDFN NI3
GOTO NI9
NI3 NOEX VS01=TDFN
GOTO NI7
NI4 NOEX VMDT[6]=1
VS07=9999
VS09=VDSTN[ATDG]
IF [VS09 GT VS07] NI8
IF [VS09 LE 0] NI8
NOEX VS23=VGRSL[VS09]
IF [VS23 EQ 0] NI8
NOEX VS01=ATDG
NI7 IF [VS01 NE 0] NI9
NOEX VS08=VDSEN[VS01]*10000+VDSTN[VS01]
NI8 M154
NOEX VDOUT[992]=1008
NI9 RTS
OCNCK (Counter for checking the gauging cycle START conditions, called from
either turret A or turret B.)
IF [VRSTT NE 0] N4
IF [VMCN[1]EQ 0] N1
NOEX VMCN[2]=VMCN[2]+1
IF [VMCN[2]LT VMCN[1]] N1
NOEX VMCN[2]=0 VDOUT[31]=1
N1 IF [VMCN[3]EQ 0] N2
NOEX VMCN[4]=VMCN[4]+1
IF [VMCN[4]LT VMCN[3]] N2
NOEX VMCN[4]=0 VDOUT[32]=1
N2 IF [VMCN[5]EQ 0] N3
NOEX VMCN[6]=VMCN[6]+1
IF [VMCN[6]LT VMCN[5]] N3
NOEX VMCN[6]=0 VDOUT[34]=1
N3 IF [VMCN[7]EQ 0] N4
NOEX VMCN[8]=VMCN[8]+1
IF [VMCN[8]LT VMCN[7]] N4
NOEX VMCN[8]=0 VDOUT[35]=1
N4 RTS
5972-E P-66
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OMSSF (Cancels the gauging cycle START conditions, called from both turrets A
and B)
IF [VRSTT NE 0] NK1
M100
NOEX VDOUT[31]=0 VDOUT[32]=0 VDOUT[33]=0
NOEX VDOUT[34]=0 VDOUT[35]=0
NK1 RTS
OTLLB
NOEX VS17=1
GOTO NN2
OTLLM
NOEX VS17=0
NN2 NOEX VS16=1
NN3 IF [VRSTT NE 0] NN22
5972-E P-67
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
CALL OTDSL
IF [VDIN[35] NE 1] NN22
NOEX VS28=1
GOTO NN8
OTFRD
GOTO NN4
OTFRA
NN4 NOEX VS17=0 VS16=0
GOTO NN6
OTFRB
NOEX VS17=1
GOTO NN5
OTFRM
NOEX VS17=0
NN5 NOEX VS16=1
NN6 IF [VRSTT NE 0] NN22
CALL OTDSL
IF [VDIN[34] EQ 1] NN7
IF [VMDT[6] EQ 0] NN22
IF [VGRID[ATDG] EQ 0] NN22
NN7 NOEX VS28=0
NN8 NOEX VS26=0 XSTP=VSIOX ZSTP=VSIOZ
IF [VMDT[6] NE 0] NN13
IF [[VDIN[1241] AND 7] EQ 0] NN10
NN9 TD=TDFN
NN10 IF [VS17 EQ 1] NN11
G00X=XP1 Z=ZP1
GOTO NN12
NN11 G40
G00X=XP1 Z=ZP1
NN12 NOEX VS01=VDETN
GOTO NN16
NN13 IF [[VDIN[1241] AND 7] NE 0] NN15
TDG=ATDG
IF [VS17 EQ 1] NN14
G00X=XP1 Z=ZP1
GOTO NN16
NN14 G40
G00X=XP1 Z=ZP1
GOTO NN16
TDG=ATDG
NN15 G00X=XP1 Z=ZP1
NN16 X=XP2 Z=ZP2
IF [MSPZ EQ 0] NN17
X=XP3
NOEX VS27=1
CALL OTMXZ
PRNT 10
G00X=XP2
IF [VS26 EQ 0] NN18
NOEX VIMDX[5]=0 VIMDX[6]=0
5972-E P-68
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
GOTO NN20
NN17 NOEX VIMDZ[5]=0 VIMDZ[6]=0
NN18 IF [MSPX NE 0] NN19
NOEX VIMDX[5]=0 VIMDX[6]=0
GOTO NN21
NN19 Z=ZP3
NOEX VS27=0
CALL OTMXZ
PRNT 9
G00Z=ZP2
IF [VS26 EQ 0] NN21
NN20 NOEX VDOUT[992]=2000+VETLN+VS28*100
NN21 G00X=XP1 Z=ZP1
X=XSTP Z=ZSTP
NN22 RTS
OTMXZ (Touch setter gauging cycle (processing cycle), called within a subprogram)
NOEX VDOUT[9]=0 VS19=2 VS25=1
IF [[VDIN[1236] AND 2] NE 2] NO1
IF [VS16 EQ 0] NO1
NOEX VS19=3
NO1 IF [VS27 EQ 0] NO3
IF [VMIRZ NE 0] NO2
NOEX VS29=VSNZ[MSPZ]-VZOFZ-VZSHZ
GOTO NO4
NO2 NOEX VS29=-[VSNZ[MSPZ]-VZOFZ-VZSHZ]
GOTO NO4
NO3 NOEX VS29=VSNX[MSPX]-VZOFX-VZSHX
IF [VS19 NE 3] NO4
NOEX VS29=-VS29
NO4 CALL OWTM
NOEX VS02=VS29 VS03=VS31 VS06=VS30 VS18=ABS[VS06]
IF [VS18 NE 1] NO12
IF [VS28 NE 0] NO12
IF [[VDIN[1255]AND 32] NE 32] NO8
IF [VS27 EQ 0] NO5
NOEX VDTWZ[VS01]=VS32+VDTWZ[VS01] VIMDZ[5]=VS03 VIMDZ[6]=VS32
GOTO NO16
NO5 IF [VS17 EQ 1] NO6
NOEX VDTWX[VS01]=VS32+VDTWX[VS01]
GOTO NO7
NO6 NOEX VDTWX[VS01]=VS32-VDTWX[VS01]
NO7 NOEX VIMDX[5]=VS03 VIMDX[6]=VS32
GOTO NO16
NO8 IF [VS27 EQ 0] NO9
NOEX VDTFZ[VS01]=VS32+VDTFZ[VS01] VIMDZ[5]=VS03 VIMDZ[6]=VS32
GOTO NO16
NO9 IF [VS17 EQ 1] NO10
NOEX VDTFX[VS01]=VS32+VDTFX[VS01]
GOTO NO11
NO10 NOEX VDTFX[VS01]=VS32-VDTFX[VS01]
NO11 NOEX VIMDX[5]=VS03 VIMDX[6]=VS32
GOTO NO16
NO12 IF [VS27 EQ 0] NO13
NOEX VIMDZ[5]=VS03 VIMDZ[6]=0
GOTO NO14
5972-E P-69
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OSPCX (Converts the measured value into the coordinate value in the program
coordinate system (X-axis), called from a subprogram)
NOEX VS31=VSKPX[VS19]-VZOFX-VZSHX-VETFX
IF [VS19 NE 3] NP1
NOEX VS31=-VS31
NP1 RTS
OSPCZ (Converts the measured value into the coordinate value in the program
coordinate system (Z-axis), called from a subprogram)
IF [VMIRZ NE 0] NP2
5972-E P-70
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
NOEX VS31=VSKPZ[VS19]-VZOFZ-VZSHZ-VETFZ
GOTO NP3
NP2 NOEX VS31=-[VSKPZ[VS19]-VZOFZ-VZSHZ-VETFZ]
NP3 RTS
OZTM (Judgment cycle for master ring gauging cycle, called from a subprogram)
NOEX VDOUT[9]=0 VS11=ABS[VS32]
VIMDX[12]=VS11
IF DNG NS1
GOTO NS3
NS1 VIMDZ[12]=DNG
IF [VIMDX[12] LE VIMDZ[12]] NS3
IF [VS32 LE 0] NS2
NOEX VDOUT[1]=1 VS30=2 VS32=0
M154
NOEX VDOUT[992]=1301+VS27*2
GOTO NS8
NS2 NOEX VDOUT[5]=1 VS30=-2 VS32=0
M154
NOEX VDOUT[992]=1300+VS27*2
GOTO NS8
NS3 IF DOK NS4
GOTO NS5
NS4 VIMDZ[12]=DOK
IF [VIMDX[12] LE VIMDZ[12]] NS7
NS5 IF [VS32 LE 0] NS6
NOEX VDOUT[2]=1 VS30=1
GOTO NS8
NS6 NOEX VDOUT[4]=1 VS30=-1
GOTO NS8
NS7 NOEX VDOUT[3]=1 VS30=0 VS32=0
NS8 RTS
M100
NV1 RTS
ODWTM (Measuring and judgment cycle for diameter gauging, called from a
gauging subprogram)
IF [VS24 NE 0] NU1
TD=TDF2
G00X=XP1 Z=ZP1
GOTO NU3
NU1 TD=TDF1
IF [[VDIN[1255]AND 32] NE 32] NU2
G00X=-[[VDTFX[TDF1]+VDTWX[TDF1]]-[VDTFX[TDF2]+VDTWX[TDF2]]]/2
Z=ZP1
GOTO NU3
NU2 G00X=-[VDTFX[TDF1]-VDTFX[TDF2]]/2 Z=ZP1
NU3 G00Z=ZP2
NOEX VS29=MSP
CALL OSKPX
NOEX VS22=VS31
IF [VS24 NE 0] NU4
TD=TDF1
G00Z=ZP1
X=-XP1
Z=ZP2
GOTO NU6
NU4 TD=TDF2
IF [[VDIN[1255]AND 32] NE 32] NU5
G00X=[[VDTFX[TDF1]+VDTWX[TDF1]]-[VDTFX[TDF2]+VDTWX[TDF2]]]/2
GOTO NU6
NU5 G00X=[VDTFX[TDF1]-VDTFX[TDF2]]/2
NU6 NOEX VS29=-MSP
CALL OSKPX
NOEX VS21=[VS22-VS31]/2
IF [VS24 NE 0] NU7
TD=TDF2
G00Z=ZP1
X=XP1
GOTO NU9
NU7 TD=TDF1
G00Z=ZP1
IF [[VDIN[1255]AND 32] NE 32] NU8
G00X=-[[VDTFX[TDF1]+VDTWX[TDF1]]-[VDTFX[TDF2]+VDTWX[TDF2]]]/2
GOTO NU9
NU8 G00X=-[VDTFX[TDF1]-VDTFX[TDF2]]/2
NU9 NOEX VS32=VS21+VS29 VS11=ABS[VS32]
NOEX VIMDX[12]=VS11 VIMDZ[12]=DNG
IF [VIMDX[12] LE VIMDZ[12]] NU12
IF APPS NU10
IF [VS25 NE 0] NU10
NOEX VS25=1
GOTO NU3
NU10 IF [VS32 LE 0] NU11
NOEX VDOUT[1]=1 VS30=2
GOTO NU15
NU11 NOEX VDOUT[5]=1 VS30=-2
GOTO NU15
5972-E P-73
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OSNCA
NOEX VS17=0 VS19=2 VS16=0
GOTO NW2
OSNCB
NOEX VS17=1 VS19=2
GOTO NW1
OSNCM
NOEX VS17=0 VS19=3
NW1 NOEX VS16=1
NW2 IF [VRSTT NE 0] NW17
CALL OTDSL
NOEX VS26=0 XSTP=VSIOX ZSTP=VSIOZ
IF [VMDT[6] NE 0] NW7
IF [[VDIN[1241] AND 7] EQ 0] NW4
NW3
NW4 TD=TDFN
IF [VS17 EQ 1] NW5
G00X=XP1 Z=ZP1
GOTO NW6
NW5 G40
G00X=XP1 Z=ZP1
NW6 NOEX VS01=VDETN
GOTO NW11
NW7 IF [[VDIN[1241] AND 7] NE 0] NW9
NW8 TDG=ATDG
G00X=XP1 Z=ZP1
GOTO NW11
NW9 TDG=ATDG
IF [VS17 EQ 1] NW10
G00 X=XP1 Z=ZP1
GOTO NW11
NW10 G40
G00X=XP1 Z=ZP1
NW11 X=XP2 Z=ZP2
IF [MSPZ NE 0] NW12
NOEX VIMDZ[5]=0 VIMDZ[6]=0
GOTO NW13
NW12 X=XP3
CALL OSNMZ
G00X=XP2
IF [VS26 EQ 0] NW13
NOEX VIMDX[5]=0 VIMDX[6]=0
GOTO NW15
5972-E P-74
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OSNMZ
IF [VMIRZ NE 0] NY1
NOEX VS29=VSNZ[MSPZ]-VZOFZ-VZSHZ
GOTO NY2
NY1 NOEX VS29=-[VSNZ[MSPZ]-VZOFZ-VZSHZ]
NY2 CALL OSKPZ
NY3 NOEX VS32=VS31-VS29
NY4 IF DNG NY5
GOTO NY6
NY5 NOEX VIMDX[12]=ABS[VS32] VIMDZ[12]=DNG
IF [VIMDX[12] LE VIMDZ[12]] NY6
NOEX VS26=1
GOTO NY8
NY6 NOEX VS29=VS32
IF [VMIRZ EQ 0] NY7
NOEX VS29=-VS29
NY7 NOEX VSNZ[MSPZ]=VS29+VSNZ[MSPZ]
NY8 NOEX VIMDZ[5]=VS31 VIMDZ[6]=VS32
RTS
OSNMX
NOEX VS29=VSNX[MSPX]-VZOFX-VZSHX
IF [VS19 NE 3] NX1
NOEX VS29=-VS29
NX1 CALL OSKPX
NOEX VS32=VS31-VS29
IF DNG NX2
GOTO NX3
NX2 NOEX VIMDX[12]=ABS[VS32] VIMDZ[12]=DNG
IF [VIMDX[12] LE VIMDZ[12]] NX3
NOEX VS26=1
GOTO NX4
NX3 NOEX VSNX[MSPX]=VS32+VSNX[MSPX]
NX4 NOEX VIMDX[5]=VS31 VIMDX[6]=VS32
RTS
5972-E P-75
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
LMSC300A.MSB
The content of MSM differ greatly from other control software.
Other control software is used to control signals from the machine and also input/output of part
programs and/or user’s commands.
However, the MSB is created in the same format as that of the part program, and so it can be
considered as the control software that implements gauging cycle instead of the user.
(1) Common variables (different from common variables V1 to V200 used for parameter setting)
(2) System variables 1 (used for reading and compensating various types of data)
(3) System variables 2 (used for transmitting data between turret A and turret B)
The common variables are not displayed on the screen unlike the common variables (V1 to V200)
used in parameter setting.
Variable Variable
Used as Remarks Used as Remarks
Name Name
VS01 Sensor input number VS17 Not used
For storing the Z-coordinate
VS02 value of the gauging cycle VS18 Not used
starting point
Measured value (program
coordinate value, used for
VS03 VS19 Not used
calculating compensation
values)
VS04 Not used VS20 Not used
VS05 Not used VS21 Not used
VS06 Not used VS22 Not used
VS07 Not used VS23 Not used
VS08 Not used VS24 Not used
VS09 Not used VS25 Not used
VS10 Not used VS26 Not used
Absolute value of amount of
VS11 VS27 Not used
variation
5972-E P-76
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Variable Variable
Used as Remarks Used as Remarks
Name Name
VS12 Not used VS28 Not used
VS13 Not used VS29 Not used
VS14 Not used VS30 Not used
VS15 Not used VS31 Not used
VS16 Not used VS32 Not used
(1) Common variables used for setting parameters are common for turrets A and B, however, the
above common variables are turret dependent.
That is, turrets A and B have an independent VS01, for example, and the VS01 for turret A must
be specified and called out from turret A, while the VS01 for turret B must be specified and
called out from turret B.
(2) Note that these common variables (VS01 to VS32) will be used in other MSBs in addition to the
gauging cycle discussed here. Therefore, if these common variables are used as variables
transferred between subprograms, numerical values might be changed during the transfer.
When these common variables are used, their processing must end within the same
subprogram.
G13
N1 NOEX VS01=100
Variables used in common in G13 side program
N2 NOEX VS02=10 VS03=20
N3 CALL OSUB1 Within a subprogram, they can be used as desired.
N4
N5
N6
N7 CALL OSUB2 Do not use common variables for transferring
N8 numerical values from OSUB1 to OSUB2.
N9
N10
G14
N1
N2 NOEX VS01=100 VS02=50 Variables used in common in G14 side program
N3 CALL OSUB1
N4
* Not used for transferring numerical values
N5
N6 NOEX VS01=100 VS03=60
N7 CALL OSUB3
N8 When calling more than one subprogram from a subprogram,
N9 pay attention to the transfer of variables between subprograms.
M02
LE61497R0100700290001
5972-E P-77
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 1
Variable Subscript
Function Min - Max. - Values
Name Expression
VSIOZ Actual position of Z-axis -99999.9999 to 99999.9999
Sensor contact position of Z-axis (machine
VSKPZ -99999.9999 to 99999.9999 1 to 2
coordinate system)
VZOFZ Z-axis zero offset data -99999.9999 to 99999.9999
VSHZ Z-axis zero shift data -99999.9999 to 99999.9999
VETFZ Presently used tool offset data (Z-axis) -99999.9999 to 99999.9999
Setting for OPTIONAL PARAMETER (GAUGING)
Feed rate 2 for gauging cycle 2
VSKFA 1 to 500
(Feed rate for the first contact detection in double-
contact gauging cycle)
Setting for OPTIONAL PARAMETER (GAUGING)
Feed rate 1 for gauging cycle 1
VSKFB (Feed rate for the second contact detection in a 1 to 500
double-contact gauging cycle; feed rate for the
contact detection in a single-contact gauging cycle)
[Supplement]
Concerning VSKFA and VSKFB, the setting unit in the optional parameters is fixed at “mm/min”.
However, the value appropriate for the selected unit system is set for these system variables.
System Variables 2
Variable
Function
Name
Compensation data (used for the two-saddle specification: for transferring the
VMDT [1]
compensation data calculated at the turret A side to the turret B side)
VMDT [2] Not used
VMDT [3] Not used
VMDT [4] Not used
VMDT [5] Not used
VMDT [6] Not used
VMDT [7] Not used
VMDT [8] Not used
VMDT [9] Not used
VMDT [10] Not used
VMDT [11] Not used
VMDT [12] Not used
5972-E P-78
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
1-3-3. Program
Flow Chart
During restart?
LE61497R0100700320001
5972-E P-79
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
DNG command
specified?
DNG command
specified?
Setting the
alarm number
LE61497R0100700320002
5972-E P-80
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Program List
OZOFA (Automatic zero offset (processing at turret A), called from turret A)
IF [VRSTT NE 0] NA11
NOEX VS01=1 VDOUT[9]=0
IF APPS NA2
G30Z=MSP D=APP L=IMP F=VSKFB
NOEX VS03=VSKPZ[VS01]-VZOFZ-VZSHZ-VETFZ
GOTO NA5
NA2 NOEX VS02=VSIOZ
IF [MSP LE VS02] NA3
G00Z=MSP-APP
GOTO NA4
NA3 G00Z=MSP+APP
NA4 G30Z=MSP D=APP L=IMP F=VSKFA
NOEX VS03=VSKPZ[VS01]-VZOFZ-VZSHZ-VETFZ
Z=VS03 D=APPS L=IMP F=VSKFB
NOEX VS03=VSKPZ[VS01]-VZOFZ-VZSHZ-VETFZ
G00Z=VS02
NA5 NOEX VS03=VS03-MSP VS11=ABS[VS03]
NOEX VIMDX[12]=VS11 VIMDZ[3]=VS03
IF DNG NA6
GOTO NA8
NA6 VIMDZ[12]=DNG
IF [VIMDX[12] LE VIMDZ[12]] NA8
IF [VS03 GT 0] NA7
NOEX VDOUT[992]=3002 VS03=0 VDOUT[5]=1
GOTO NA10
NA7 NOEX VDOUT[992]=3003 VS03=0 VDOUT[1]=1
GOTO NA10
NA8 IF DOK NA9
NA8A IF [VS03 GT 0] NA8B
NOEX VDOUT[4]=1
GOTO NA10
NA8B NOEX VDOUT[2]=1
GOTO NA10
NA9 VIMDZ[12]=DOK
IF [VIMDX[12] GT VIMDZ[12]] NA8A
NOEX VS03=0 VDOUT[3]=1
NA10 NOEX VZOFZ=VZOFZ+VS03 VMDT[1]=VS03
M100
NA11 RTS
OZOFB (Automatic zero offset (processing at turret B), called from turret B)
IF [VRSTT NE 0 ] NB1
M100
NOEX VZOFZ =VZOFZ+VMDT[1]
NB1 RTS
5972-E P-81
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
LMSD300A.MSB
The name of gauging control software is indicated as described below.
LMS*????.MSB
*: Contents of each gauging software
????: Version of each gauging software
The MSB largely differs from the other control software in the contents.
Other control software is used to control signals from the machine and also input/output of part
programs and/or user’s commands.
However, the MSB is created in the same format as that of the part program, and so it can be
considered as the control software that implements gauging cycle instead of the user.
(1) Common variables (different from common variables V1 to V200 used for parameter setting)
(2) System variables 1 (used for reading and compensating various types of data)
(4) System variables 3 (used for transmitting data between turret A and turret B)
The common variables are not displayed on the screen unlike the common variables (V1 to V200)
used in parameter setting.
(1) Common variables used for setting parameters are common for turrets A and B, however, the
above common variables are turret dependent.
That is, turrets A and B have an independent VS01, for example, and the VS01 for turret A must
be specified and called out from turret A, while the VS01 for turret B must be specified and
called out from turret B.
5972-E P-83
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
(2) Note that these common variables (VS01 to VS32) will be used in other MSBs in addition to the
gauging cycle discussed here. Therefore, if these common variables are used as variables
transferred between subprograms, numerical values might be changed during the transfer.
When these common variables are used, their processing must end within the same
subprogram.
G13
N1 NOEX VS01=100
Variables used in common in G13 side program
N2 NOEX VS02=10 VS03=20
Within a subprogram, they can be used as desired.
N3 CALL OSUB1
N4
N5
N6
N7 CALL OSUB2 Do not use common variables for transferring
N8 numerical values from OSUB1 to OSUB2.
N9
N10
G14
N1
N2 NOEX VS01=100 VS02=50 Variables used in common in G14 side program
N3 CALL OSUB1
N4
* Not used for transferring numerical values
N5
N6 NOEX VS01=100 VS03=60
N7 CALL OSUB3
N8 When calling more than one subprogram from a subprogram,
N9 pay attention to the transfer of variables between subprograms.
M02
LE61497R0100700360001
5972-E P-84
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 1
Subscri
Variable pt
Function Min - Max. - Values
Name Express
ion
Actual position of X-axis (program coordinate
VSIOX -9999.999 to 9999.999
system)
Actual position of C-axis (program coordinate
VSIOC 0 to 359.999
system)
VSKPC C-axis skip position (machine coordinate system) 0 to 359.999 1 to 2
VZOFC Zero offset of C-axis 0 to 359.999
VZSHC Zero shift of C-axis
Offset between sensor center and sensor head in
VSNWD
CW rotation of C-axis
Offset between sensor center and sensor head in
VSNTU 0 to 359.999
CCW rotation of C-axis
VCDIR Direction of rotation of C-axis
VRUND 360000 (constant of 360)
VCPFI Flag which indicates the presence of a groove 0, 128
Flag which indicates that sequence restart is in
VRSTT 0, 128
progress
VUNIT Unit amount 2, 4
Setting for OPTIONAL PARAMETER (GAUGING)
Feed rate 2 for gauging cycle 2
VSKFA
Feed rate for the first contact detection in double-
contact gauging cycle
Setting for OPTIONAL PARAMETER (GAUGING)
Feed rate 1 for gauging cycle 1
Feed rate for the second contact detection in
VSKFB
double-contact gauging cycle;
feed rate for the contact detection in single-contact
gauging cycle
System Variables 2
Variable
Function
Name
VIMDX [9] Variable for displaying measured values
VIMDX [10] Variable for displaying compensation data
5972-E P-85
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 3
System variables 3 are used for transferring data between turret A and turret B.
They are used in common for the two turrets.
Variable
Function
Name
VMDT [10] Variable for data transfer between turret A and turret B
Input/Output Variables
Input/output variables are used for user reserve alarm code output from MSB.
Variable
Function
Name
VDOUT [992] Alarm B user reserve code
VDOUT [993] Alarm A (user reserve code)
5972-E P-86
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
1-4-3. Program
Table of Subprograms
Sub
Sub
program Function
program No.
Name
(1) OZOFD Keyway gauging (both sides)
(2) OZOFC Keyway gauging (one side)
(3) OZOFF Key gauging (both sides)
(4) OZOFE Key gauging (one side)
(5) OCPFI Groove index cycle in the Z-axis direction
(6) OCPFX Groove index cycle in the X-axis direction
(7) ORDOF Conversion of angle data into a value between 0 and 359.999
(8) OFCAL Calculation of C-axis feedrate F
Compensation in a different coordinate system (Correcting the offset
(9) OZOFG
data at the other turret in the same spindle mode)
(10) OZOFH Compensation in a different coordinate system (different spindle mode)
5972-E P-87
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Flow Chart
Restart?
Alarm A
Machine lock OFF?
(user reserve
code)
Calculating feedrate
Calculating feedrate
LE61497R0100700420001
5972-E P-88
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
LE61497R0100700420002
5972-E P-89
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
CW rotation of the
C-axis specified
LE61497R0100700420003
5972-E P-90
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
CW rotation of the
C-axis specified
LE61497R0100700420004
5972-E P-91
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
LE61497R0100700420017
5972-E P-92
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
CCW rotation
CW rotation of the
of the C-axis
specified C-axis specified
LE61497R0100700420018
5972-E P-93
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Restart?
LE61497R0100700420005
5972-E P-94
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
LE61497R0100700420006
5972-E P-95
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
LE61497R0100700420007
5972-E P-96
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
CW rotation of the
C-axis specified
Sensor diameter
LE61497R0100700420008
5972-E P-97
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
LE61497R0100700420009
5972-E P-98
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
LE61497R0100700420010
5972-E P-99
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
CCW rotation
of the C-axis CW rotation of the
specified C-axis specified
LE61497R0100700420019
5972-E P-100
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Restart?
Restart?
Alarm A
Machine lock OFF? (user reserve
code)
3rd time
Selecting the C-axis rotating
direction specified before
groove index cycle
4th time
The angle data set for VS07 is converted in a value between 0 and 359.999°
ORDOF
NC1
YES NC2
VS07<VRUND
NO YES
VS07=VS07-VRUND VS07>=0
NO
YES VS07=VS07+VRUND
VS07>=VRUND
YES
NO VS07<0
NO
RTS
LE61497R0100700420013
5972-E P-103
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Calculation of C-axis feedrate F C-axis feedrate F is calculated from the X-axis value
so that the surface speed at the gauging position will be the parameter-set feedrate.
In units of inch?
Decimal point in
Decimal point command in units of inch?
units of 10 mm?
Multiplying by 500mm/π
Set value
Actual X-axis
position data
LE61497R0100700420014
5972-E P-104
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OZOFG
Calculating the new C-axis zero offset value from
VS07=VZOFC+VMDT[10]
the received measured data
ORDOF
RTS
LE61497R0100700420015
OZOFH
Calculating the new C-axis zero offset value from
VS07=VZOFC-VMDT[10]
the received measured data
ORDOF
RTS
LE61497R0100700420016
Program List
NOEX VS07=VSIOC-CMW/2
CALL ORDOF
IF APPS NA6
GOTO NA8
NA6 G30 C=VS07 CD=CMW/2 CL=CMW/2 F=VS09
NOEX VS07=VSKPC[1]-VZOFC-VZSHC
CALL ORDOF
NOEX VS10=VS07 VS07=VSIOC-VS10
CALL ORDOF
IF [VS07 GE APPS] NA7
M15
NOEX VS07=VS10+APPS
CALL ORDOF
G0 C=VS07
M16
NA7 G30 C=VS10 CD=APPS CL=CMW/2 F=VS08
GOTO NA9
NA8 G30 C=VS07 CD=CMW/2 CL=CMW/2 F=VS08
NA9 NOEX VS10=VSKPC[1]-VZOFC-VZSHC
NOEX VS13=ATAN[VSNTU/VSIOX*2] VS07=VS10-VS13
CALL ORDOF
NOEX VS13=VS07
IF [VS02 EQ 1] NA16
NA10 M15
NOEX VS07=VSIOC+CMW/2
CALL ORDOF
IF APPS NA11
GOTO NA13
NA11 G30 C=VS07 CD=CMW/2 CL=CMW/2 F=VS09
NOEX VS07=VSKPC[1]-VZOFC-VZSHC
CALL ORDOF
NOEX VS10=VS07 VS07=VS10-VSIOC
CALL ORDOF
IF [VS07 GE APPS] NA12
M16
NOEX VS07=VS10-APPS
CALL ORDOF
G0 C=VS07
M15
NA12 G30 C=VS10 CD=APPS CL=CMW/2 F=VS08
GOTO NA14
NA13 G30 C=VS07 CD=CMW/2 CL=CMW/2 F=VS08
NA14 NOEX VS10=VSKPC[1]-VZOFC-VZSHC
NOEX VS14=ATAN[VSNWD/VSIOX*2] VS07=VS10-VS14
CALL ORDOF
NOEX VS14=VS07
IF [VS02 EQ 1] NA15
NOEX VS07=[VS14+VS13]/2
IF [VS14 GE VS13] NA141
VS07=VS07+VRUND/2
NA141 CALL ORDOF
NA15 NOEX VS14=VS07
GOTO NA17
NA16 NOEX VS14=VS13
NA17 NOEX VIMDX[9]=VS14 VS07=VS14-COF
CALL ORDOF
5972-E P-106
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
GOTO NA8
NA6 G30 C=VS07 CD=VRUND/2 CL=VRUND/360000*179000 F=VS09
NOEX VS07=VSKPC[1]-VZOFC-VZSHC
CALL ORDOF
NOEX VS10=VS07 VS07=VSIOC-VS10
CALL ORDOF
IF [VS07 GE APPS] NA7
M15
NOEX VS07=VS10+APPS
CALL ORDOF
G0 C=VS07
M16
NA7 G30 C=VS10 CD=APPS CL=CKW F=VS08
GOTO NA9
NA8 G30 C=VS07 CD=VRUND/2 CL=VRUND/360000*179000 F=VS08
NA9 NOEX VS10=VSKPC[1]-VZOFC-VZSHC
NOEX VS13=ATAN[VSNTU/VSIOX*2] VS07=VS10-VS13
CALL ORDOF
NOEX VS13=VS07
IF [VS02 EQ 1] NA16
NA10 M15
NOEX VS14=ATAN[VSNWD/VSIOX*2]
NOEX VS07=VS07-CKW-APP+VS14
CALL ORDOF
IF RTX NA101
RTX=0
NA101 NOEX VS16=VSIOX
G00 X=VS16+RTX
C=VS07
X=VS16
NOEX VS07=VS07+APP
CALL ORDOF
IF APPS NA11
GOTO NA13
NA11 G30 C=VS07 CD=APP CL=CKW F=VS09
NOEX VS07=VSKPC[1]-VZOFC-VZSHC
CALL ORDOF
NOEX VS10=VS07 VS07=VS10-VSIOC
CALL ORDOF
IF [VS07 GE APPS] NA12
M16
NOEX VS07=VS10-APPS
CALL ORDOF
G0 C=VS07
M15
NA12 G30 C=VS10 CD=APPS CL=CKW F=VS08
GOTO NA14
NA13 G30 C=VS07 CD=APP CL=CKW F=VS08
NA14 NOEX VS10=VSKPC[1]-VZOFC-VZSHC
NOEX VS14=ATAN[VSNWD/VSIOX*2] VS07=VS10-VS14
CALL ORDOF
NOEX VS14=VS07
IF [VS02 EQ 1] NA15
NOEX VS07=[VS14+VS13]/2
IF [VS14 LT VS13] NA141 (GE)
VS07=VS07+VRUND/2
5972-E P-108
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
GOTO NB14
NB13 NOEX VDOUT[992]=3006
NB14 RTS
LMSN312A. MSB
The name of gauging control software is indicated as described below.
LMS*????.MSB
*: Contents of each gauging software
????: Version of each gauging software
The MSB largely differs from the other control software in the contents.
The other control software controls inputs such as the signals sent from the machine, user's
commands, and the commands from a part program created by the user.
However, the MSB is created in the same format as that of the part program, and so it can be
considered as the control software that implements gauging cycle instead of the user.
(1) Common variables (These are different from the common variables V1 to V200 used in
parameter setting.)
The common variables are not displayed on the screen unlike the common variables (V1 to V200)
used in parameter setting.
These common variables are used for the gauging cycles other than those done by Y-axis gauging
function. Therefore, the variable data is eliminated or changed each time the gauging cycle is
executed.
System Variables
These system variables are used for gauging cycle other than the Y-axis gauging specification and
the data are deleted and changed every time the gauging cycle is executed.
Refer the system variables to the programming manual.
1-5-3. Program
Sub-programs
Name Function
OWMYA Workpiece gauging in Y-axis direction (tool offset value compensation)
OWMYR Workpiece gauging in Y-axis direction (cutter radius compensation value
compensation)
OWYM Work gauging data judgment cycle
OWXY Workpiece gauging in Y-axis direction, gauging data handling
OKIYR Keyway width compensation
OKIYA Keyway position compensation
OKOYR Key width compensation
OKOYA Key position compensation
OKWTM Keyway, Key gauging data judgment
OSKPY Gauging cycle of Y-axis
OSPCY Conversion of measured Y-axis position into program coordinate
ODTMY Diameter gauging data judgment by Y-axis gauging
ODOAY OD gauging by Y-axis movements
ODIAY ID gauging by Y-axis movements
OZORY Y-axis zero offset
OJUDY Gauging result judgment cycle
Flow Chart
The flowcharts of the programs used in the Y-axis gauging are shown the following pages.
5972-E P-115
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OWMYA,OWMYR 1/2
1) Work Gauging in Y Direction (for Correcting Tool Offset Values) OWNYA
Work Gauging in Y Direction (for Correcting Cutter Radius Compensation Values) OWMYR
OWMYA OWMYR
Sequence restart?
VRSTT=0
N
Y
Y-axis mode?
Y
VYMOD≠0
N Machine lock? Alarm B User reserve code
VMLCK=0 VDOUT[992]=1400
Y
N ND3
ND1A
2B
VDOUT[9]=0 Judgment lamp OFF
2A
OTDSL Determine whether or not the gauging result is used for the tool life
management.
1A
LE61497R0100700490001
5972-E P-116
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
2A
ND2B
VMDT[5]=VS32 Compensation amount
OWXY
VS13=1
Y
ND2D N
VIMDX[6]=-VMDT[5] VIMDY[6]=-VMDT[5]
2B
ND3
RTS
LE61497R0100700490002
5972-E P-117
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OWYM 1/1
2) Work Gauging Judgment Cycle OWYM
1A
OWYM
NH1 NG double-touch
VS25=1
OSKPY gauging
NH3A
VS32=VS31-VS29
NH3B
VS11=ABS[VS32]
VIMDX[12]=VS11
VIMDZ[12]=DNG
± NG?
VIMDX[12]>
VIMDZ[12] NH6
N
Y VIMDZ[12]=DOK
Double-touch?
Y
APPS ± OK?
VIMDX[12]>
N VIMDZ[12] N
NG double-touch?
VS25=0 NH7
Y
Y
N VS32>0
NH4 1A N
Y
N
VS32>0
Y + NG NH5 - NG + OK NH8 - OK OK
VDOUT[1]=1 VDOUT[5]=1 VDOUT[2]=1 VDOUT[4]=1 VDOUT[3]=1
VS30=2 VS30=-2 VS30=1 VS30=-1 VS30=0
NH9
RTS
LE61497R0100700490003
5972-E P-118
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
± OK processing NYE3
VS18=1 1A
Y
N
VS05=VS04 The compensation amount is cleared to 0 when
VMDT[5]=0 judgment result is ± NG or OK. NG ignored?
Tool life management
function used?
Y
VS18=2 VMDT[6]=0 VDIN[21]=1
± NG processing N Y
N Y N
NG flag is set at the tool life
NYE1 management table without any alarm.
VS06 0
N VDTNG[VS08]=1
Y NYE2
OK processing
+NG M154 -NG M154
1A
NYE3
Y-axis gauging?
VS27=2
Y
N
NYE3A Key or keyway width gauging?
TWCD
N VS13=1,2,4
Y N Y-axis tool
NYE3B Y Cutter radius compensation offset
TWCD=0
Y VDNRY[VS01]= VDTFY[VS01]=
N VDNRY[VS01]-VMDT[5] VDTFY[VS01]-VMDT[5]
VDIN[1255] VS05=VDNRY[VS01] VS05=VDTFY[VS01]
AND 32 =32 Y
N
VDTWX[VS01]= VDTFX[VS01]=
VDTWX[VS01]-VMDT[5] VDTFX[VS01]-VMDT[5]
VS05=VDTWX[VS01] VS05=VDTFX[VS01]
NYE4
Tool life management used?
VMDT[6]=0
Y
N
TRCT command specified?
TRCT
N
Y
NYE5 Omit calculation of wear amount?
TRCT=1
Y
N
VDTCA[VS08]=VDTCA[VS08]+ABS[VMDT[5]]
NYE6
RTS
LE61497R0100700490004
5972-E P-119
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
XP2 ZP2
N N
Y Y Alarm occurs if both
NS1B
XP2 and ZP2 are
ZP2 specified or neither of
Y them is specified.
N NS1C Alarm B User reserve code
VS12=0 VS12=1 VDOUT[992]=1402 NS1A
Specify the gauging direction
NS1D between front approach and side
VS27=2 Specify the gauging approach
judgment data
M155
Air blow ON
Sequence restart?
VRSTT=0
N
Y
Y-axis mode?
Y
VYMOD≠0
OTNSL Determine whether or not the gauging result is used for the tool life
management
After checking ATG and AOG, the gauging system sets the tool number and
the tool offset/cutter radius compensation number.
2A
LE61497R0100700490005
5972-E P-120
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OKIYR,OKIYA,OKOYR,OKOYA 2/2
2A
VIMDY[4]=VS21
VIMDY[7]=VS22
VIMDY[8]=VS31
OWXY
VIMDY[6]=-VMDT[5]
2B
TD=TDSN 2C
2C
RTS
LE61497R0100700490006
5972-E P-121
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OKWTM 1/2
5) Judgment of Keyway/Key Gauging Data OKWTM
OKWTM 1A
Key gauging?
VS24=0
N
Y TD=TDF2
Positioning for gauging on -Y side
NU3
TD=TDF1 G00 Y=[VTDFY[TDF1]-VTDFY[TDF2]]/2+YSP
Change the sensor offset
NU4
VS29=YSP-[KH/2] Set the target position on -Y side
2A
LE61497R0100700490007
5972-E P-122
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
2A
NU5
G00 Y=YSP G00 Y=-[VDTFY[TDF1]-VDTFY[TDF2]]/2+YSP
NU6
Change offset in preparation for NG double-touch
VS11=ABS[VS32]
VIMDX[T2]=VS11
VIMDZ[12]=DNG
±NG?
VIMDX[12]>
VIMDZ[12] NU9
N
Y Double-touch? VIMDZ[12]=DOG
Y
APPS ±OK?
VIMDX[12]>
N VIMDZ[12]
NG double-touch? N
VS25=0 Y
Y VS32>0
N
NU7 1A N
Y
N
VS32>0
NU12
RTS
LE61497R0100700490008
5972-E P-123
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OSLPY,OSPCY 1/1
6) Y-axis Gauging Cycle OSKPY (Input)
VS29: Gauging target position
OSKPY
APPS: Double-touch command (relative value of
1st gauging point and approach point 2)
VS15=VSIOY Store the Y-axis actual
position
NPY1
VS29=≤VS15
Y
N NPY2 Approach APP in front of the
GOO Y=VS29+APP gauging target
GOO Y=VS29-APP
position by G00
NPY3
APPS command specified?
APPS
N
NPY3A Y
G30 Y=VS29 D=APP L=IMP F=VSKFA Double-touch 1st gauging
OSPCY
VS31=VSKPY[VS19]-VZOFY-VZSHY-VETFY
RTS VMIRY:becomes 0 when the directions of YI-axis program coordinate system are the
same with those of machine coordinate system, and becomes 1 when they
do not match.
Convert measured Y-axis position VSKPY [VS19]
into program coordinate and set at VS31
LE61497R0100700490009
5972-E P-124
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
ODTMY 1A
OD gauging?
VS24=0
N
Y VS25=1
TD=TDF2 TD=TDF1
NY B 1
G00 X=XP1 Z=ZP1 G00 X=XP1 Z=ZP1 Positioning to the gauging cycle start point
N Y B 2
N Y B 3
OD gauging?
VS24=0
N
Y
N Y B 4
Gauging by approach to the workpiece front
VS12=1
Y
N
N Y B 6
2A
LE61497R0100700490010
5972-E P-125
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
ODTMY 2/3
2A
OD gauging?
VS24=0
N
Y
TD=TDF1
N Y B 7
Gauging by approach to the workpiece front?
VS12=1
Y
N
OD gauging by approach to a side of
N Y B 8 the workpiece OD gauging by approach to the workpiece front
ID gauging always
G00 X=XP1/2 G00 Z=ZP1 done by approach to
the workpiece front
X=XP2 Z=ZP2
N Y B 9
OD gauging?
VS24=0
N
Y
TD=TDF2 TD=TDF1
N Y B 1 0
Gauging by approach to the workpiece front?
VS12=1
Y
N ID gauging always
OD gauging by approach to a side of Gauging by approach to the done by approach to
N Y B 1 1 the workpiece workpiece front the workpiece front
Changing
Y=0 Changing sensor offset Y=0 Changing sensor offset Y=0 sensor
offset
3A
N Y B 1 2
LE61497R0100700490011
5972-E P-126
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
ODTMY 3/3
3A
NY B 1 2
VS32=VS21-MSP
VS11=ABS[VS32]
VIMDX[12]=VS11
VIMDZ[12]=DNG
±NG?
VIMDX[12] >
VIMDZ[12] N
Y N Y B 1 5
Double touch?
APPS VIMDZ[12]=DOK
Y
N
NG double touch? ±OK?
VIMDX[12] >
VS25=0
VIMDZ[12] N
Y
N
Y
1A
NY B 1 3
NY B 1 8
RTS
LE61497R0100700490012
5972-E P-127
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
ODOAY ODIAY
NYA4
Though the diameter is measured in Y-axis direction,
VS27=0
the judgment of measured data also applies to the X-axis.
M155
Air blow ON
VRSTT=0
N
Y
Y-axis control mode? Alarm B User reserve code
VYMOD=0 VDOUT[992]=1401
N
Y
NYA5
2A 2C
NYA9
LE61497R0100700490013
5972-E P-128
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
ODOAY 2/2
2A 2B 2C
ODTMY
Judgment of
gauging cycle data TD=TDSN
Y
Position specified?
APO
N
Y
N Y A 6
BPO=VPOCH
VPOCH=APO
N Y A 7
OWXY
Gauging data processing
2B
LE61497R0100700490014
5972-E P-129
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OZORY
Sequence restart?
VRSTT=0
N
Y
Y-axis control mode?
Y
VYMOD≠0
OSKPY
NA5 VS03=VS31-MSP
VS11=ABS[VS03]
VIMDX[12]=VS11
VIMDY[3]=VS03
VS03=0
NA10
VZOFY=VZOFY+VS03 Add compensation value to zero offset
1A
VMDT[1]=VS03
NA11
RTS
LE61497R0100700490015
5972-E P-130
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
OJUDY 1/1
11) Gauging Result Judgment Cycle OJUDY
OJUDY
VS27=2
VDOUT[9]=0
VS32=MRE-MSP
VS11=ABS[VS32]
VIMDX[12]=VS11
VIMDZ[12]=JNG
±NG?
VIMDX[12]>
VIMDZ[12] NH6
N
Y VIMDZ[12]=JOK
±OK?
VIMDX[12]>
VIMDZ[12] N
NH7 Y
N
VS32>0 VS32>0
N
Y Y
+NG NH5 - NG +OK NH8 - OK OK
VDOUT[1]=1 VDOUT[5]=1 VDOUT[2]=1 VDOUT[4]=1 VDOUT[3]=1
VS30=2 VS30=-2 VS30=1 VS30=-1 VS30=0
VDOUT[992]= VDOUT[992]=
1001+VS27*2 1000+VS27*2
NH9
RTS
LE61497R0100700490016
5972-E P-131
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Program List
GOTO NYE4
NYE3B NOEX VDNRY[VS01]=VDNRY[VS01]-VMDT[5] VS05=VDNRY[VS01]
NYE4 IF [VMDT[6] EQ 0] NYE6
IF TRCT NYE5
GOTO NYE6
NYE5 IF [TRCT EQ 1] NYE6
NOEX VDTCA[VS08]=VDTCA[VS08]+ABS[VMDT[5]]
NYE6 RTS
TD=TSON
G00X=XP1 Y=YSP Z=ZP1
NS2 M154
RTS
NYB2 G138
NYB3 IF [VS24 EQ 0] NYB4
G00Z=ZP2 Y=-[VDTFY[TDF1]-VDTFY[TDF2]]/2
GOTO NYB6
NYB4 IF [VS12 NE 1] NYB5
G00Y=YP1
G00Z=ZP2
GOTO NYB6
NYB5 G00Y=YP1
G00X=XP2
NYB6 NOEX VS29=MSP/2
CALL OSKPY
NOEX VS22=VS31
IF [VS24 EQ 0] NYB7
TD=TDF2
GOTO NYB9
NYB7 TD=TDF1
IF [VS12 NE 1] NYB8
G00Z=ZP1
Y=-YP1
Z=ZP2
GOTO NYB9
NYB8 G00X=XP1/2
Y=-YP1
X=XP2
NYB9 NOEX VS29=-MSP/2
CALL OSKPY
NOEX VS21=VS22-VS31
IF [VS24 EQ 0] NYB10
TD=TDF1
G00Z=ZP1
Y=0
GOTO NYB12
NYB10 TD=TDF2
IF [VS12 NE 1] NYB11
G00Z=ZP1
Y=0
GOTO NYB12
NYB11 G00X=XP1/2
Y=0
NYB12 NOEX VS32=VS21-MSP VS11=ABS[VS32]
NOEX VIMDX[12]=VS11 VIMDZ[12]=DNG
IF [VIMDX[12] LE VIMDZ[12]] NYB15
IF APPS NYB13
IF [VS25 NE 0] NYB13
NOEX VS25=1
GOTO NYB3
NYB13 IF [VS32 LE 0] NYB14
NOEX VDOUT[1]=1 VS30=2
GOTO NYB18
NYB14 NOEX VDOUT[5]=1 VS30=-2
GOTO NYB18
NYB15 NOEX VIMDZ[12]=DOK
IF [VIMDX[12] LE VIMDZ[12]] NYB17
IF [VS32 LE 0] NYB16
NOEX VDOUT[2]=1 VS30=1
5972-E P-137
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
GOTO NYB18
NYB16 NOEX VDOUT[4]=1 VS30=-1
GOTO NYB18
NYB17 NOEX VDOUT[3]=1 VS30=0
NYB18 G136
RTS
LMSL300A.MSB
The name of gauging control software is indicated as described below.
LMS*????.MSB
*: Contents of each gauging software
????: Version of each gauging software
The MSB largely differs from the other control software in the contents.
Other control software is used to control signals from the machine and also input/output of part
programs and/or user’s commands.
However, the MSB is created in the same format as that of the part program, and so it can be
considered as the control software that implements gauging cycle instead of the user.
Gauging control software differs from other control software in the following points.
The gauging control software is written in the same format as a part program.
(1) Common variables (different from common variables V1 to V200 used for parameter setting)
(2) System variables 1 (used for reading and compensating various types of data)
The common variables are not displayed on the screen unlike the common variables (V1 to V200)
used in parameter setting.
(1) Common variables used for setting parameters are common for turrets A and B, however, the
above common variables are turret dependent.
That is, turrets A and B have an independent VS01, for example, and the VS01 for turret A must
be specified and called out from turret A, while the VS01 for turret B must be specified and
called out from turret B.
(2) Note that these common variables (VS01 to VS32) will be used in other MSBs in addition to the
gauging cycle discussed here. Therefore, if these common variables are used as variables
transferred between subprograms, numerical values might be changed during the transfer.
When these common variables are used, their processing must end within the same
subprogram.
5972-E P-141
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
G13
N1 NOEX VS01=100
LE61497R0100700530001
5972-E P-142
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 1
Variable Subscript
Function Min - Max. - Values
Name Expression
VXMDS Post-process gauging data set flag 0, 128
VXMMD For storing the previous gauging result 0 to 99 Data No. 1 to 12
VXMCO Consecutive ±OK counter 0 to 99 Data No. 1 to 12
VXMMO ±OK ignore counter 0 to 99 Data No. 1 to 12
Post-process gauging device input
position No.
VXMPO 0 to 12 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Tool offset number whose tool offset data
is corrected
VDXMN 0 to 32 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Tool group No. of the tool offset data to
be corrected
VDXMG 0 to 12 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Compensation value
VXMCD (from the POST-PROCESS GAG AUTO -999.999 to 999.999 Data No. 1 to 12
COMP DATA screen)
Compensation skip counter
VXMNC (from the POST-PROCESS GAG AUTO 0 to 99 Data No. 1 to 12
COMP DATA screen)
Axis for which compensation is to be
done
VXMXZ 0 to 99 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Tool No. of the tool presently selected in Tool group number
VGRSL 0 to 12
the tool group 1 to 12
Tool nose, tool
VDTNG NG flag in tool life management table 0 to 1
number
Actual machining count in the tool life Tool nose, tool
VDTCN 0 to 9999
management table number
Actual wear amount in the tool life Tool nose, tool
VDTCA 0 to 999.999
management table number
Machining
-9999.9999 to
VDTFX Tool offset value in X-axis preparation
9999.9999
command
Machining
-9999.9999 to
VDTFZ Tool offset value in Z-axis preparation
9999.9999
command
Gauged (measured) value (from the
VBCDE POST-PROCESS GAG INPUT DATA -0.099 to 0.099 Data No.1 to 12
screen)
5972-E P-143
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Variable Subscript
Function Min - Max. - Values
Name Expression
Fixed value to be added to tool offset
VXMAD 0 to 0.099 None
compensation data
5972-E P-144
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 2
LE61497R0100700550001
System variables not assigned specific functions may be used and displayed in the same manner as
common variables.
Note that the range of numerical values that can be handled by these parameters is 0 to 9999
(positive integer).
Input/Output Variables
Output variables
Variable
Function
Name
“Alarm C User reserve code ####” is output by setting VDOUT[991] = ####.
VDOUT [991]
(####: 1 to 9999, decimal)
Input variables
Variable
Function
Name
VDIN [801] to Post-process gauging input data that corresponds to post-process gauging input
VDIN [808] Nos. 1 to 8
5972-E P-145
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
1-6-3. Program
Flow Chart
OXMS
Sequence restart OFF?
NO
VRSTT=0
YES
M100
NO
VBCDE[VS08]=0
YES 1 VDIN (*) * ; 801 - 808
Post-process gauging
VS06=VXMPO[VS07]+800 input number
Post-process gauging OK OK OK NG NG
VS01=VDIN[VS06]
input data
NO NO NO
VS01=64? VS01=32,16? VS01=8,4?
YES YES
NOK YES NOC NNG 1
OK ±OK ±NG
processing processing processing
NA2
NOC
NO +OK
VS01=32
YES NC0
VS03=VS03-VXMAD VS03=VS03+VXMAD
NC1
VS02=VS01 AND VXMMD[VS07]
YES
VS02=32,16
NO
Clearing the ±OK
consecutive counter VXMCO[VS07]=0
Clearing the ±OK VXMMO[VS07]=0
ignore counter
NC2
VXMCO[VS07]=VXMCO[VS07]+1
NC4 Tool group number = 0?
Offset number = 0?
YES NC6 YES
VDXMN[VS07]=0 VDXMG[VS07]=0
NO NO
Ignore?
NO VS09=VDXMG[VS07] Finding the currently
VXMMO[VS07]>0
VS05=VDSTN[VS09] selected tool number
YES VS05=VGRSL[VS05] from the tool group
2C
No tool selected?
YES
VS05=0
NO
Ignore?
YES
VXMMO[VS07]>0
NO
2A 2B 2D
NC10 NCE
LE61497R0100700570002
5972-E P-147
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
NC10
2A Reducing the ignore 2B
counter value by 1
VXMMO[VS07]=VXMMO[VS07]-1 VS10=VDSEN[VS09]*10000+VS05
2C Actually machined parts
Compensation skip? < Compensation lag?
VDTCN[VS10]< YES
VXMCO[VS07]< YES VMCN[9]
VXMNC[VS07]
NO 2D
NO Compensation skip?
VS04=VDXMN[VS07] YES VXMCO[VS07]<
VXMNC[VS07]
1
NO
NC7
VS04=VDSPN[VS09]*1000000+VDSEN[VS09]*10000+VS05
NCA
VDTCA[VS10]=VDTCA[VS10]+ABS[VS03]
NCB 2D
YES
VS04=0 NCE
NO Clearing the
ignore counter VXMMO[VS07]=0
VDIN[1255] YES
AND 32¹32
NO X direction? X direction?
VXMXZ[VS07]=0
YES NCB1 YES NCC
VXMXZ[VS07]=0
NO NO
VDTWZ[VS04]= VDTWX[VS04]= VDTFZ[VS04]= VDTFX[VS04]=
VDTWZ[VS04]+VS03 VDTWX[VS04]+VS03 VDTFZ[VS04]+VS03 VDTFX[VS04]+VS03
NCD
VXMMO[VS07]=VXMMC[VS07] Setting the compensation skip counter value at the ignore counter
NCF
VXMCO[VS07]=0 Clearing 1
the ±OK
consecutive
counter
GOTO NA2
LE61497R0100700570003
5972-E P-148
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
VS02=VXMMD[VS07] AND 12
VS30=VS07+20
NO
VBCDE[VS08]=0
YES
NO
VS02=0
YES VS02=VS01 AND 12
NO
NB0 VS02=4,8
VMCN[VS30]=0 Clearing the consecutive YES
NG counter clear
NB1 OK processing
VMCN[VS30]=VMCN[VS30]+1 Consecutive NG counter increment
NOK
YES
VMCN[VS30]<VMCN[20]
NO
NB1A
VMCN[VS30]=0 Clearing the consecutive NG counter clear
NO
VDXMN[VS07]0
YES Tool group No. specified?
VDXMG[VS07]=0
YES
NO
VS09=VDXMG[VS07]
Finding the currently selected tool
VS05=VDSTN[VS09] No. in the tool group
VS05=VGRSL[VS05]
No selected tool?
YES
VS05=0
NO
VS10=VDSEN[VS09]*10000+VS05
Actually machined number of workpieces smaller than
the compensation lag?
VDTCN[VS10]
<VMCN[9] YES
NO
VDTNG[VS10]=1
NB2
VDOUT[991]=9000
NOK
VXMCO[VS07]=0 ±OK consecutive counter clear
VXMMO[VS07]=0 ±OK invalid counter clear
GOTO NA2
LE61497R0100700570004
5972-E P-149
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Program List
GOTO NCB
NC6 IF [VDXMG[VS07] EQ 0] NCE
NOEX VS09=VDXMG[VS07]
NOEX VS05=VDSTN[VS09]
NOEX VS05=VGRSL[VS05]
IF [VS05 EQ 0] NCE
IF [VXMMO[VS07] GT 0] NC10
NOEX VS10=VDSEN[VS09]*10000+VS05
IF [VDTCN[VS10] LT VMCN[9]] NCE
IF [VXMCO[VS07] LT VXMNC[VS07]] NA2
NOEX VS04=VDSPN[VS09]*1000000+VDSEN[VS09]*10000+VS05
NCA NOEX VDTCA[VS10]=VDTCA[VS10]+ABS[VS03]
NCB IF [VS04 EQ 0] NCE
IF [[VDIN[1255] AND 32] NE 32] NCB2
IF [VXMXZ[VS07] EQ 0] NCB1
NOEX VDTWZ[VS04]=VDTWZ[VS04]+VS03
GOTO NCD
NCB1 NOEX VDTWX[VS04]=VDTWX[VS04]+VS03
GOTO NCD
NCB2 IF [VXMXZ[VS07] EQ 0] NCC
NOEX VDTFZ[VS04]=VDTFZ[VS04]+VS03
GOTO NCD
NCC NOEX VDTFX[VS04]=VDTFX[VS04]+VS03
NCD NOEX VXMMO[VS07]=VXMMC[VS07]
GOTO NCF
NCE NOEX VXMMO[VS07]=0
NCF NOEX VXMCO[VS07]=0
GOTO NA2
NC10 NOEX VXMMO[VS07]=VXMMO[VS07]-1
NA2 NOEX VXMMD[VS07]=VS01
NA3 NOEX VS07=VS07+1
IF [VS07 LE 8] NA1
NOEX VXMDS=0
NA4 RTS
5972-E P-151
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
LMSE300A.MSB
The name of gauging control software is indicated as described below.
LMS*????.MSB
*: Contents of each gauging software
????: Version of each gauging software
In this manual, the gauging control software is represented by “MSB”.
The MSB largely differs from the other control software in the contents.
Other control software is used to control signals from the machine and also input/output of part
programs and/or user’s commands.
However, the MSB is created in the same format as that of the part program, and so it can be
considered as the control software that implements gauging cycle instead of the user.
Gauging control software differs from other control software in the following points.
The gauging control software is written in the same format as a part program.
(1) Common variables (different from common variables V1 to V200 used for parameter setting)
(2) System variables 1 (used for reading and compensating various types of data)
The common variables are not displayed on the screen unlike the common variables (V1 to V200)
used in parameter setting.
(1) Common variables used for setting parameters are common for turrets A and B, however, the
above common variables are turret dependent.
That is, turrets A and B have an independent VS01, for example, and the VS01 for turret A must
be specified and called out from turret A, while the VS01 for turret B must be specified and
called out from turret B.
5972-E P-153
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
(2) Note that these common variables (VS01 to VS32) will be used in other MSBs in addition to the
gauging cycle discussed here. Therefore, if these common variables are used as variables
transferred between subprograms, numerical values might be changed during the transfer.
When these common variables are used, their processing must end within the same
subprogram.
G13
N1 NOEX VS01=100
Variables used in common in G13 side program
N2 NOEX VS02=10 VS03=20
Within a subprogram, they can be used as desired.
N3 CALL OSUB1
N4
N5
N6
N7 CALL OSUB2 Do not use common variables for transferring
N8 numerical values from OSUB1 to OSUB2.
N9
N10
G14
N1
N2 NOEX VS01=100 VS02=50 Variables used in common in G14 side program
N3 CALL OSUB1
N4
* Not used for transferring numerical values
N5
N6 NOEX VS01=100 VS03=60
N7 CALL OSUB3
N8 When calling more than one subprogram from a subprogram,
N9 pay attention to the transfer of variables between subprograms.
M02
LE61497R0100700610001
5972-E P-154
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 1
Variable Subscript
Function Min - Max. - Values
Name Expression
VXMDS Post-process gauging data set flag 0, 128
VXMMD For storing the previous gauging result 0 to 99 Data No. 1 to 12
VXMCO Consecutive ±OK counter 0 to 99 Data No. 1 to 12
VXMMO ±OK ignore counter 0 to 99 Data No. 1 to 12
Post-process gauging device input
position No.
VXMPO 0 to 12 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Tool offset number whose tool offset data
is corrected
VDXMN 0 to 32 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Tool group No. of the tool offset data to
be corrected
VDXMG 0 to 12 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Compensation value
VXMCD (from the POST-PROCESS GAG AUTO -999.999 to 999.999 Data No. 1 to 12
COMP DATA screen)
Compensation skip counter
VXMNC (from the POST-PROCESS GAG AUTO 0 to 99 Data No. 1 to 12
COMP DATA screen)
Axis for which compensation is to be
done
VXMXZ 0 to 99 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Tool No. of the tool presently selected in Tool group number
VGRSL 0 to 12
the tool group 1 to 12
Tool nose, tool
VDTNG NG flag in tool life management table 0 to 1
number
Actual machining count in the tool life Tool nose, tool
VDTCN 0 to 9999
management table number
Actual wear amount in the tool life Tool nose, tool
VDTCA 0 to 999.999
management table number
Machining
-9999.9999 to
VDTFX Tool offset value in X-axis preparation
9999.9999
command
Machining
-9999.9999 to
VDTFZ Tool offset value in Z-axis preparation
9999.9999
command
5972-E P-155
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 2
LE61497R0100700630001
System variables not assigned specific functions may be used and displayed in the same manner as
common variables.
Note that the range of numerical values that can be handled by these parameters is 0 to 9999
(positive integer).
Input/Output Variables
Output variables
Variable
Function
Name
“Alarm C User reserve code ####” is output by setting VDOUT[991] = ####.
VDOUT [991]
(####: 1 to 9999, decimal)
Input variables
Variable
Function
Name
VDIN [801] to Post-process gauging input data that corresponds to post-process gauging input
VDIN [808] Nos. 1 to 8
5972-E P-156
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
1-7-3. Program
Flow Chart
OXMS
Sequence restart OFF?
NO
VRSTT=0
YES
M100
YES Is the gauging data read?
VXMDS=0
NO
VS07=1 Setting "1" at the reading counter
NA1
YES
VXMPO[VS07]=0
NO VDIN (*) * ; 801 - 808
VS06=VXMPO[VS07]+800 Post-process gauging input number
VS01=VDIN[VS06] Post-process gauging input data OK OK OK NG NG
NO NO NO
VS01=64? VS01=32,16? VS01=8,4?
NOK YES NOC YES NNG YES
OK ±OK ±NG
processing processing processing
NA2
VXMMD[VS07]=VS01 Saving the judgment result for the next gauging
NA3
VS07=VS07+1 Reading counter; increment
YES
VS07≤8 Is there remaining data?
NO
VXMDS=0 Gauging data reading completed
NA4
RTS
LE61497R0100700650001
5972-E P-157
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
±OK processing
NOC
Setting the OK/NG flag
VS03=VXMCD[VS07] Setting the compensation data
NO
VS01=32
YES
VS03=-VS03
NC1
VS02=VS01 AND VXMMD[VS07]
YES
VS02=32,16
NO
VXMCO[VS07]=0 Clearing the ±OK consecutive counter
VXMMO[VS07]=0 Clearing the ±OK ignore counter
NC2
VXMCO[VS07]=VXMCO[VS07]+1
NC4 Tool group number = 0?
Offset number = 0? YES NC6 YES
VDXMN[VS07]=0 VDXMG[VS07]=0
NO NO
NO Ignore?
VXMMO[VS07]>0
YES VS09=VDXMG[VS07] Finding the currently
2C VS05=VDSTN[VS09] selected tool number
VS05=VGRSL[VS05] from the tool group
LE61497R0100700650002
5972-E P-158
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
NC10
2A Reducing the ignore 2B
counter value by 1
2C VXMMO[VS07]=VXMMO[VS07]-1
Compensation skip?
VS10=VDSEN[VS09]*1000+VS05
VXMCO[VS07]< YES
Actually machined parts
VXMNC[VS07]
< Compensation lag?
NO VDTCN[VS10]< YES
VMCN[9]
VS04=VDXMN[VS07]
NO 2D
Compensation skip?
YES VXMCO[VS07]<
VXMNC[VS07]
1
NO
VS04=VDSPN[VS09]*1000000+VDSEN[VS09]*10000+VS05
NCA
VDTCA[VS10]=VDTCA[VS10]+ABS[VS03]
NCB 2D
YES
VS04=0 NCE
NO Clearing the
ignore counter VXMMO[VS07]=0
VDIN[1255] YES
AND 32¹32
NO X direction? X direction?
YES YES NCC
VXMXZ[VS07]=0 VXMXZ[VS07]=0
NO NO
VDTWZ[VS04]= VDTWX[VS04]= VDTFZ[VS04]= VDTFX[VS04]=
VDTWZ[VS04]+VS03 VDTWX[VS04]+VS03 VDTFZ[VS04]+VS03 VDTFX[VS04]+VS03
NCD
VXMMO[VS07]=VXMMC[VS07] Setting the compensation skip counter value at the ignore counter
NCF
VXMCO[VS07]=0 Clearing 1
the ±OK
consecutive
GOTO NA2 counter
LE61497R0100700650003
5972-E P-159
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
VS02=VXMMD[VS07] AND 12
VS30=VS07+20
NO
VS02=0
YES VS02=VS01 AND 12
NBO NO
VS02=4,8
VMCN[VS30]=0 Clearing the consecutive YES
NG counter clear
NB1
OK processing
VMCN[VS30]=VMCN[VS30]+1 Consecutive NG
counter increment NOK
YES
VMCN[VS30]<VMCN[20]
NO
VMCN[VS30]=0 Clearing the consecutive NG
counter clear
NO VDXMN[VS07]0
YES
Tool group No. specified?
VDXMG[VS07]=0
YES
NO
VS09=VDXMG[VS07]
Finding the currently selected
VS05=VDSTN[VS09] tool No.in the tool group
VS05=VGRSL[VS05]
No selected tool?
YES
VS05=0
NO
VS10=VDSEN[VS09]*10000+VS05
Actually machined number of workpieces
VDTCN[VS10] smaller than the compensation lag?
<VMCN[9] YES
NO
VDTNG[VS10]=1
NB2
VDOUT[991]=9000
NOK
VXMCO[VS07]=0 ±OK consecutive counter clear
VXMMO[VS07]=0 ±OK invalid counter clear
GOTO NA2
LE61497R0100700650004
5972-E P-160
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Program List
IF [VXMMO[VS07] GT 0] NC10
NOEX VS10=VDSEN[VS09]*10000+VS05
IF [VDTCN[VS10] LT VMCN[9]] NCE
IF [VXMCO[VS07] LT VXMNC[VS07]] NA2
NOEX VS04=VDSPN[VS09]*1000000+VDSEN[VS09]*10000+VS05
NCA NOEX VDTCA[VS10]=VDTCA[VS10]+ABS[VS03]
NCB IF [VS04 EQ 0] NCE
IF [[VDIN[1255] AND 32] NE 32] NCB2
IF [VXMXZ[VS07] EQ 0] NCB1
NOEX VDTWZ[VS04]=VDTWZ[VS04]+VS03
GOTO NCD
NCB1 NOEX VDTWX[VS04]=VDTWX[VS04]+VS03
GOTO NCD
NCB2 IF [VXMXZ[VS07] EQ 0] NCC
NOEX VDTFZ[VS04]=VDTFZ[VS04]+VS03
GOTO NCD
NCC NOEX VDTFX[VS04]=VDTFX[VS04]+VS03
NCD NOEX VXMMO[VS07]=VXMMC[VS07]
GOTO NCF
NCE NOEX VXMMO[VS07]=0
NCF NOEX VXMCO[VS07]=0
GOTO NA2
NC10 NOEX VXMMO[VS07]=VXMMO[VS07]-1
NA2 NOEX VXMMD[VS07]=VS01
NA3 NOEX VS07=VS07+1
IF [VS07 LE 8] NA1
NOEX VXMDS=0
NA4 RTS
5972-E P-162
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
LMSF300A? MSB
The name of gauging control software is indicated as described below.
LMS*????.MSB
*: Contents of each gauging software
????: Version of each gauging software
The MSB largely differs from the other control software in the contents.
Other control software is used to control signals from the machine and also input/output of part
programs and/or user’s commands.
However, the MSB is created in the same format as that of the part program, and so it can be
considered as the control software that implements gauging cycle instead of the user.
(1) Common variables (different from common variables V1 to V200 used for parameter setting)
(2) System variables 1 (used for reading and compensating various types of data)
The common variables are not displayed on the screen unlike the common variables (V1 to V200)
used in parameter setting.
(1) Common variables used for setting parameters are common for turrets A and B, however, the
above common variables are turret dependent.
That is, turrets A and B have an independent VS01, for example, and the VS01 for turret A must
be specified and called out from turret A, while the VS01 for turret B must be specified and
called out from turret B.
5972-E P-164
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
(2) Note that these common variables (VS01 to VS32) will be used in other MSBs in addition to the
gauging cycle discussed here. Therefore, if these common variables are used as variables
transferred between subprograms, numerical values might be changed during the transfer.
When these common variables are used, their processing must end within the same
subprogram.
G13
N1 NOEX VS01=100
Variables used in common in G13 side program
N2 NOEX VS02=10 VS03=20
N3 CALL OSUB1 Within a subprogram, they can be used as desired.
N4
N5
N6
N7 CALL OSUB2 Do not use common variables for transferring
N8 numerical values from OSUB1 to OSUB2.
N9
N10
G14
N1
N2 NOEX VS01=100 VS02=50 Variables used in common in G14 side program
N3 CALL OSUB1
N4
* Not used for transferring numerical values
N5
N6 NOEX VS01=100 VS03=60
N7 CALL OSUB3
N8 When calling more than one subprogram from a subprogram,
N9 pay attention to the transfer of variables between subprograms.
M02
LE61497R0100700690001
5972-E P-165
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 1
Variable Subscript
Function Min - Max. - Values
Name Expression
VXMDS Post-process gauging data set flag 0, 128
VXMMD For storing the previous gauging result 0 to 99 Data No. 1 to 12
VXMCO Consecutive ±OK counter 0 to 99 Data No. 1 to 12
VXMMO ±OK ignore counter 0 to 99 Data No. 1 to 12
Post-process gauging device input
position No.
VXMPO 0 to 12 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Tool offset number whose tool offset data
is corrected
VDXMN 0 to 32 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Tool group No. of the tool offset data to
be corrected
VDXMG 0 to 12 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Compensation value
VXMCD (from the POST-PROCESS GAG AUTO -999.999 to 999.999 Data No. 1 to 12
COMP DATA screen)
Compensation skip counter
VXMNC (from the POST-PROCESS GAG AUTO 0 to 99 Data No. 1 to 12
COMP DATA screen)
Axis for which compensation is to be
done
VXMXZ 0 to 99 Data No. 1 to 12
(from the POST-PROCESS GAG AUTO
COMP DATA screen)
Tool No. of the tool presently selected in Tool group number
VGRSL 0 to 12
the tool group 1 to 12
Tool nose, tool
VDTNG NG flag in tool life management table 0 to 1
number
Actual machining count in the tool life Tool nose, tool
VDTCN 0 to 9999
management table number
Actual wear amount in the tool life Tool nose, tool
VDTCA 0 to 999.999
management table number
Machining
-9999.9999 to
VDTFX Tool offset value in X-axis preparation
9999.9999
command
Machining
-9999.9999 to
VDTFZ Tool offset value in Z-axis preparation
9999.9999
command
5972-E P-166
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
System Variables 2
LE61497R0100700710001
System variables not assigned specific functions may be used and displayed in the same manner as
common variables.
Note that the range of numerical values that can be handled by these parameters is 0 to 9999
(positive integer).
Input/Output Variables
Output variables
Variable
Function
Name
“Alarm C User reserve code ####” is output by setting VDOUT[991] = ####.
VDOUT [991]
(####: 1 to 9999, decimal)
Input variables
Variable
Function
Name
VDIN [801] ? Post-process gauging input data that corresponds to post-process gauging input
VDIN [808] Nos. 1 to 8
5972-E P-167
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
1-8-3. Program
Flow Chart
OXMS
Sequence restart OFF?
NO
VRSTT=0
YES
M100
YES Is the gauging data read?
VXMDS=0
NO
VS07=1 Setting "1" at the reading counter
NA1
VXMPO[VS07]=0 YES
NO NO NO NO
VS01=64? VS01=32,16? VS01=8,4? VS01=2,1?
NOK YES NOC YES NNC YES NNG YES
OK ±OK ±NG ±±NG
processing processing processing processing
NA2
VXMMD[VS07]=VS01 Saving the judgment result for the next gauging
NA3
VS07=VS07+1 Reading counter; increment
YES
VS07≤8 Is there remaining data?
NO
VXMDS=0 Gauging data reading completed
NA4
RTS
LE61497R0100700730001
5972-E P-168
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
NO NO
Ignore?
NO
VXMMO[VS07]>0
VS09=VDXMG[VS07] Finding the currently
YES VS05=VDSTN[VS09] selected tool number
2C VS05=VGRSL[VS05] from the tool group
No tool selected?
YES
VS05=0
NO
Ignore?
YES
VXMMO[VS07]>0
NO
2A 2B 2D
NC10 NCE
LE61497R0100700730002
5972-E P-169
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
NC10
2C 2A Reducing the ignore 2B
counter value by 1
NO VXMMO[VS07]=VXMMO[VS07]-1
VS06=0
YES Compensation skip? VS10=VDSEN[VS09]*1000+VS05
VXMCO[VS07]< YES Actually machined parts
VXMNC[VS07] < Compensation lag?
VDTCN[VS10]< YES
NC5 NO VMCN[9]
NO 2D
VS04=VDXMN[VS07]
NO
VS06=0
Compensation
YES skip?
YES VXMCO[VS07]<
VXMNC[VS07]
1 NO
VS04=VDSPN[VS09]*1000000+VDSEN[VS09]*10000+VS05
NCA
VDTCA[VS10]=VDTCA[VS10]+ABS[VS03]
NCB 2D
YES
VS04=0 NCE
NO Clearing the
ignore counter VXMMO[VS07]=0
VDIN[1255] YES
AND 32¹32
NO X direction? X direction?
YES YES NCC
VXMXZ[VS07]=0 VXMXZ[VS07]=0
NO NO
VDTWZ[VS04]= VDTWX[VS04]= VDTFZ[VS04]= VDTFX[VS04]=
VDTWZ[VS04]+VS03 VDTWX[VS04]+VS03 VDTFZ[VS04]+VS03 VDTFX[VS04]+VS03
NCD
VXMMO[VS07]=VXMMC[VS07] Setting the compensation skip counter value at the ignore counter
NCF
VXMCO[VS07]=0 Clearing 1
the ±OK
Consecutive
GOTO NA2 counter
LE61497R0100700730003
5972-E P-170
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
VS02=VXMMD[VS07] AND 3
VS30=VS07+20
NO
VS02=0
YES VS02=VS01 AND 3
NBO NO
VS02=1,2
VMCN[VS30]=0 Clearing the consecutive YES
NG counter clear
NB1 OK processing
VMCN[VS30]=VMCN[VS30]+1 Consecutive NG counter NOK
increment
YES
VMCN[VS30]<VMCN[20]
NO
Clearing the consecutive NG
VMCN[VS30]=0
counter clear
NO VDXMN[VS07]0
YES
Tool group No.specified?
VDXMG[VS07]=0
YES
NO
VS09=VDXMG[VS07]
VS05=VDSTN[VS09] Finding the currently selected
VS05=VGRSL[VS05] tool No.in the tool group
No selected tool ? YES
VS05=0
NO
VS10=VDSEN[VS09]*10000+VS05
Actually machined number of workpieces
smaller than the compensation lag?
VDTCN[VS10]
<VMCN[9] YES
NO
VDTNG[VS10]=1
NB2
VDOUT[991]=9000
NOK
VXMCO[VS07]=0 ±OK consecutive counter clear
VXMMO[VS07]=0 ±OK invalid counter clear
GOTO NA2
LE61497R0100700730004
5972-E P-171
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
Program List
Variable
Function
Name
CEJ MATIC gauging, Turret A side compensation processing, Called at turret A
OCEJA
side, No arguments
CEJ MATIC gauging, Turret B side compensation processing, Called at turret B
OCEJB
side, No arguments
Variable
Function
Name
VS04 Tool offset number of the tool offset data to be corrected
VS05 Tool number or tool group number read from CEJ MATIC
VS06 Tool No. of the tool presently selected in the tool group
VS07 Gauging (measured) value read counter
VS08 Work variables
VS09 Turret designation (A or B)
VS10 Machining preparation command (group number designation)
VS11 Tool group number
VS12 Tool nose, tool number
Variable
Function
Name
VXMDR CEJ MATIC gauging data read completion flag
VCEJM CEJ MATIC read data
VXMAB Turret designation (A/B) in CEJ MATIC read data
VXMBD Compensation data in CEJ MATIC read data
VXMXZ Axis designation (X/Z) in CEJ MATIC read data
VDXMN Tool offset No. set at the CEJ MATIC gauging automatic offset data screen
VGRSL Tool No. of the tool presently selected in the tool group
VDTFX Tool offset in X-axis
VDTFZ Tool offset in Z-axis
5972-E P-174
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
1-9-4. Program
OCEJA OCEJB
M100 M100
Setting the flag for
VS09=1 VS09=0 recognizing turret A
or turret B
N1
NO
VRSTT=0
YES
YES Is data read from CEJ MATIC gauging device?
VXMDR=0
NO
2C
VXMDR=0 Clearing the post-process data setting flag
Setting "1" at the measured value reading
NB 1A VS07=1 counter (max. counter value: 12 times)
N2
VCEJM[*] *;1~12
VS08=VCEJM[VS07]/$1000000
VS08=VS08 AND $80 Check
of (c)
YES
VS08=0 (a) Tool or tool group number
NO (b) Type of tool number/tool group
NO number
VXMAB[VS07]=VS09 (c) Indicating that the gauging
YES data has been written
YES
VS06=0
NO
VS04=VDSPN[VS10]*1000000
+VDSEN[VS10]*10000+VS06
2B 2A
N6
LE61497R0100700780001
5972-E P-175
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
2A
NO
TRCT
YES
NO
TRCT=0
YES
VS12=VDSEN[VS04]*1000000
+VDSTN[VS04]
VDTCA[VS12]=VDTCA[VS12]
+ABS[VXMBD[VS07]]
N8
YES
VS04=0
NO
VDIN[1255]AND32=32 NO
YES
YES
VXMXZ[VS07]=0
NO
VDTWX[VS04]= VDTWZ[VS04]=
VDTWX[VS04]-VXMBD[VS07] VDTWZ[VS04]-VXMBD[VS07]
YES N9
VXMXZ[VS07]=0
NA NO
VDTFX[VS04]= VDTFZ[VS04]=
VDTFX[VS04]-VXMBD[VS07] VDTFZ[VS04]-VXMBD[VS07]
2C VS07=<12
NB 1A
RTS
LE61497R0100700780002
5972-E P-176
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
1-10-1.Gauging Subprogram
Variable
Function
Name
OXMRA Subprogram called at turret A side
OXMRB Subprogram called at turret B side
1-10-2.System Variables
Variable
Function
Name
VEXDR Post-process gauging data read completion flag
VEXPO Gauging position number
Designation of turret for which tool offset data is corrected (0: Turret A side, 1:
VEXTR
Turret B side)
VEXAX Designation of axis for which tool offset is corrected (0: Z-axis, 1: X-axis)
VEXGF Group flag (0: offset number, 1: group number)
VDEXT Machining preparation command value to be corrected
VEXOK Judgment of gauging result (0: OK, 1: NG)
VEXFB Feedback data
1-10-3.Common Variables
Variable
Function
Name
VS01 Gauging position number
VS02 Machining preparation command
VS03 Tool No. of the tool presently selected in a tool group
VS04 Tool nose, position, tool number
VS07 Gauging position counter
VS08 Turret to be called
VS09 Machining preparation command (group number designation)
VS10 Tool nose, tool number
5972-E P-178
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
1-10-4.Program
OXMRA OXMRB
VS08=0 VS08=1
NA1
YES Reading of post-process gauging data completed?
VEXDR=0
NO
M100
VEXDR=0
1A
VS07=1 Gauging position counter
NA2
YES Is the above counter value "0"?
VEXPO[VS07]=0
NO
VS01=VEXPO[VS07]
NA4 YES
Is the gauging result OK?
VEXOK[VS01]=0
NO
YES Offset number or group
VS02=VEXTO[VS01] number used for compensated
Group flag 0: Offset number
VEXGF[VS01]=0 1: Group number
NO
YES
VS04=VS02 Tool offset
number
3B 3A 2B 2A 3C
NA10 NA8 NA5 NA4A NA11
LE61497R0100700830001
5972-E P-179
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
VS04=VDSPN[VS09]*1000000
+VDSEN[VS09]*10000+VS05
Gauging NA7A
result is NO Is the gauging result OK?
NG VEXOK[VS01]=0
VDTNG[VS10]=1 NA7B YES Is the actual wear amount
accumulated?
TRCT
NO Is the actual wear amount
NA7C YES ignored?
TRCT=1
YES
NO
VDTCA[VS10]=VDTCA[VS10]+ABS[VEXFB[VS01]]
NA8
3B 3A
NA10
LE61497R0100700830002
5972-E P-180
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
3B 3A NA8
YES
VS04=0
NO
VDIN[1255] NO Is the offset data compensated
AND 32¹32 for Z-axis?
YES NO
VEXAX[VS01]=0
NO YES
VEXAX[VS01]=0
YES VDTWZ[VS04]=VDTWZ[VS04]
-VEXFB[VS01]
VDTFZ[VS04]=VDTFZ[VS04]
-VEXFB[VS01]
VDTWX[VS04]=VDTWX[VS04]
-VEXFB[VS01]
VDTFX[VS04]=VDTFX[VS04]
-VEXFB[VS01]
NA10
LE61497R0100700830003
OXMRA
VS08=0
GOTO NA1
OXMRB
VS08=1
NA1 IF [VEXDR EQ 0] NA11
M100
VEXDR=0
VS07=1
NA2 IF [VEXPO[VS07] EQ 0] NA10
VS01=VEXPO[VS07]
IF [VS08 EQ 0] NA3
IF [VEXTR[VS01] EQ 0] NA10
GOTO NA4
NA3 IF [VEXTR[VS01] NE 0] NA10
NA4 IF [VEXOK[VS01] NE 0] NA4A
VS02=VDEXT[VS01]
IF [VEXGF[VS01] NE 0] NA5
VS04=VS02
GOTO NA8
NA4A IF [VEXGF[VS01] EQ 0] NA4B
5972-E P-181
SECTION 1 MAKER SUBPROGRAMS FOR GAUGING (MSB)
VS02=VDEXT[VS01]
GOTO NA5
NA4B VDOUT[991]=9010
GOTO NA10
NA5 IF [VS02 EQ 0] NA10
VS09=VS02
VS03=VDSTN[VS09]
VS03=VGRSL[VS02]
IF [VS03 EQ 0] NA10
VS10=VDSEN[VS09]*10000+VS05
VS04=VDSPN[VS09]*1000000+VDSEN[VS09]*10000+VS05
NA7A IF [VEXOK[VS01] EQ 0] NA7B
VDTNG[VS10]=1
GOTO NA10
NA7B IF TRCT NA7C
GOTO NA8
NA7C IF [TRCT EQ 1] NA8
VDTCA[VS10]=VDTCA[VS10]+ABS[VEXFB[VS01]]
NA8 IF [VS04 EQ 0] NA10
IF [[VDIN[1255] AND 32] NE 32] NA9A
IF [VEXAX[VS01] NE 0] NA9
VDTWX[VS04]=VDTWX[VS04]-VEXFB[VS01]
GOTO NA10
NA9 VDTWZ[VS04]=VDTWZ[VS04]-VEXFB[VS01]
GOTO NA10
NA9A IF [VEXAX[VS01] NE 0] NA9B
VDTFZ[VS04]=VDTFZ[VS04]-VEXFB[VS01]
GOTO NA10
NA9B VDTFX[VS04]=VDTFX[VS04]-VEXFB[VS01]
NA10 VS07=VS07+1
IF [VS07 LE 12] NA2
NA11 RTS
LIST OF PUBLICATIONS
This manual may be at variance with the actual product due to specification or
design changes.
Please also note that specifications are subject to change without notice.
If you require clarification or further explanation of any point in this manual,
please contact your OKUMA representative.