Meldas c6-c64-c64t DDB Interface Manual
Meldas c6-c64-c64t DDB Interface Manual
C6/C64/C64T
BNP-B2312A(ENG)
MELDAS and MELSEC are registered trademarks of Mitsubishi Electric Corporation.
The other company names and product names are trademarks or registered trademarks
of the respective companies.
Introduction
This manual describes the DDB (Direct Data Bus) function used to realize data input/output with a CNC
while running a program developed with a MELDAS C6/C64/C64T user PLC (ladder language).
The methods for reading and writing various NC information using the DDB from a PLC are described in
this manual.
Please read this manual before programming.
Please read the "Precautions for Safety" listed on the following page to ensure safe use of the MELDAS
C6/C64/C64T.
CAUTION
For items described in "Restrictions" or "Usable State", the instruction manual issued by the
machine maker takes precedence over this manual.
Items not described in this manual must be interpreted as "not possible".
This manual is written on the assumption that all option functions are added. Refer to the
specifications issued by the machine maker before starting use.
Refer to the Instruction Manual issued by each machine tool builder for details on each machine
tool.
Some screens and functions may differ depending on the NC system (or its version), and some
functions may not be possible. Please confirm the specifications before use.
Setting incorrect values could cause the machine to malfunction or run away. Take care when
programming.
General precautions
The following documents are available as documents related to the contents of this manual. Refer
to these as required.
C6/C64 PLC Programming Manual(Ladder section with MELSEC tool) .... BNP-B2309
C6/C64/C64T PLC Interface Manual..................................................................... BNP-B2261
Precautions for Safety
Always read the specifications issued by the machine maker, this manual, related manuals and enclosed
documents before starting installation, operation, programming, maintenance or inspections to ensure
correct use. Thoroughly understand the basics, safety information and precautions of this numerical
controller before using the unit.
The safety precautions are ranked as "DANGER", "WARNING" and "CAUTION" in this manual.
When there is a great risk that the user could be subject to fatalities or
DANGER serious injuries if handling is mistaken.
Note that even if the item is ranked as " CAUTION", incorrect handling could lead to serious
results. Important information is described in all cases, so please observe the items.
DANGER
Not applicable in this manual.
WARNING
Not applicable in this manual.
CAUTION
1. Items related to product and manual
For items described as "Restrictions" or "Usable State" in this manual, the instruction
manual issued by the machine maker takes precedence over this manual.
Items not described in this manual must be interpreted as "not possible".
This manual is written on the assumption that all option functions are added. Refer to the
specifications issued by the machine maker before starting use.
Refer to the Instruction Manual issued by each machine tool builder for details on each
machine tool.
Some screens and functions may differ depending on the NC system (or its version), and
some functions may not be possible. Please confirm the specifications before use.
Setting incorrect values could cause the machine to malfunction or run away. Take care
when programming.
Contents
1. Outline ............................................................................................................... 1
1. Outline
This manual describes the DDB (Direct Data Bus) function used to realize data input/output with a
CNC while running a program developed with the user PLC ladder language.
DDB includes the synchronous type (DDBS) and the asynchronous type (DDBA), but only the
asynchronous type will be explained in this manual.
DDB is a function that allows the PLC to directly read and write the various data in the CNC. By
setting the information required for reading and writing into the buffer and calling out the DDB function,
the PLC can set (write) the designated data into the CNC. Generally, the data is read and written in
one piece units, but data related to the control axis can be processed for the designated number of
axes.
Features of this function include that the read data can be referred to in the step immediately following
the execution of the DDBA command. This also applies to the written data. (Note that for the
parameters, they may not be valid immediately after writing.)
This manual is organized in the following manner after the first chapter. Please refer to the required
section for use.
6. Example of
DDB with
5. Explanation of Ladder Circuit
Read/write
Data
4. Sub-section
No. List
3. Selection No.
List
2. Usage of DDB
Function with
ladder
-1-
2. Usage of DDB Function with Ladder
ACT (Note 1)
S.DDBA Rn/Dn
(Note 1) The file registers (Rn) and data registers (Dn) in the range usable by the user can be
used in the control data buffer of the asynchronous type DDB .
The file registers (R) usable by the user are from R4000 to R4499 (not backup) and from
R6400 to R7199 (backup).
(Note 1) The part system designation is used when there is a multi-part system specification.
(Note 2) Always secure 4 bytes as the buffer for one read/write data item.
(Note 3) Always secure the buffer size equivalent to 14 axes (28 words data).
(Note 4) For example, if only the 3rd axis is designated, the data for the 3rd axis will be the
read/write data.
-2-
2. Usage of DDB Function with Ladder
F E D C B A 9 8 7 6 5 4 3 2 1 0
0 : Read designation
Warning output * 1 : Write designation Set by PLC during
0 : Direct input DDB command
1 : Added input execution
0 : Decimal point invalid
1 : Decimal point valid
Error during chopping
(not used) Last four digits of the data
No option during reading/writing of
Size over Set by controller at variables correspond to
Number of axes illegal completion of DDB the decimal place
Section/sub-section No. command
error
Write protect
Error occurrence
*Warning output
bit 4= 1 : Variable data blank
0 : Variable data not blank
bit 5= 1 : Variable data overflowing
0 : Variable data not overflowing
(Note) The date size has not been checked, so give an attention to data size when setting.
-3-
2. Usage of DDB Function with Ladder
F E D C B A 9 8 7 6 5 4 3 2 1 0
(Note 1)
Part system designation 1st axis
0 : 1st part system 2nd axis
3rd axis
~
4th axis
6 : 7th part system 5th axis
6th axis
(Note 1) The part system designation is used when there is a multi-part system specification.
(Note 2) When reading and writing the axis data, if there is no axis designation or if the
designation exceeds the maximum control axes, the alarm "No. of axes illegal" will occur.
The valid area of the data will differ according to the data size. (Shaded area)
When read is designated, a code will be added to the 1-byte and 2-byte data to create a 4-byte data
size. Thus, even when reading 1-byte or 2-byte data, 4 bytes are required for the buffer size.
-4-
3. Section No. List
-5-
4. Sub-section No. List
Search No.
4. Sub-section No. List
1 - 10
No. of searching (Note) This is not the sub-section No.
Section No.
1-10 Maximum spindle speed (Gear 1st step to gear 4th step)
[Data definition]
This is a parameter for the maximum spindle speed of each gear step.
(This corresponds to the setup parameter, spindle parameter smax1 to 4.)
The CNC creates the spindle gear shift command 1 and 2 based on this value and the
commanded S command.
~ During tapping, the maximum speed will be the spindle tap speed. ~
~ ~
-6-
4. Sub-section No. List
-7-
4. Sub-section No. List
-8-
4. Sub-section No. List
-9-
4. Sub-section No. List
- 10 -
4. Sub-section No. List
- 11 -
4. Sub-section No. List
- 12 -
4. Sub-section No. List
- 13 -
4. Sub-section No. List
- 14 -
4. Sub-section No. List
- 15 -
4. Sub-section No. List
- 16 -
4. Sub-section No. List
- 17 -
4. Sub-section No. List
- 18 -
5. Explanation of Read/Write Data
~ ~
~ ~
(3)
5. Explanation of Read/Write Data
1-10 Maximum spindle speed (Gear 1st step to gear 4th step)
[Data definition]
This is a parameter for the maximum spindle speed of each gear step.
(This corresponds to the setup parameter, spindle parameter smax1 to 4.)
The CNC creates the spindle gear shift command 1 and 2 with this value and the commanded S command.
During tapping, the maximum speed will be the spindle tap speed.
[Data unit, range]
The data unit is r/min, and the setting range is 0 to 99999.
[Precaution]
After being set (written), this data is valid from the next spindle speed (S) command.
~ ~
~ However, the clamping operation with the maximum speed will be validated immediately. ~
(1) Search for the data to be read or written from the type of data given in the "Sub-section No. List" of the target model.
(2) Confirm the search No. corresponding to the searched data.
(3) Search for the reference data from the "5. Explanation of Read/Write Data" based on the confirmed search No.
(Note 1) Note that the first value of the search No. (for example, 1-10) is the section No., but the second
value is not the sub-section No.
(Note 2) The expression "1-50-6)" in the read/write data explanation indicates section No. : 1, search No.:
50 and bit: 6.
(Note 3) The search No. expressed as "11/15-10" in the read/write data explanation indicates that the
contents are common to the data in section No.:11, search No.: 10, and the data in section No.:
15 and search No.: 10.
- 19 -
5. Explanation of Read/Write Data
B C
Unit system Selection parameter
(1 µm system) (0.1 µm system)
Setup parameter
mm 0.001 0.0001 Basic specification parameter
#1041 I_inch = 0
Input unit
Setup parameter
inch 0.0001 0.00001 Basic specification parameter
#1041 I_inch = 1
Setup parameter
mm 0.0005 0.00005 Basic specification parameter
Output unit
#1061 iout = 0
(Detection
Setup parameter
unit)
inch 0.00005 0.000005 Basic specification parameter
#1061 iout = 1
Setup parameter
mm 0.001 0.001 Basic specification parameter
Machine #1040 M_inch = 0
constant
input unit Setup parameter
inch 0.0001 0.00001 Basic specification parameter
#1040 M_inch = 1
(Note 1) The unit systems B and C are settings for the setup parameters (basic specification
parameters: #1003 iunit). This may differ according to the machine type.
(Note 2) The unit system C (0.1 µm system) is an option specification.
(Note 3) Of the selection parameters, #1041 I_inch and #1040 M_inch are common for each axis,
and #1061 iout is for the independent axis.
(Note 4) The data is read and written in the internal unit.
- 20 -
5. Explanation of Read/Write Data
1-10 Maximum spindle speed (Gear 1st step to gear 4th step)
[Data definition]
This is a parameter for the maximum spindle speed of each gear step.
(This corresponds to the setup parameter, spindle parameter smax1 to 4.)
The CNC creates the spindle gear shift command 1 and 2 with this value and the commanded S
command.
During tapping, the maximum speed will be the spindle tap speed.
[Precaution]
After being set (written), this data is valid from the next spindle speed (S) command.
However, the clamping operation with the maximum speed will be validated immediately.
1-11 Spindle limit speed (Gear 1st step to gear 4th step)
[Data definition]
This parameter is used to calculate the spindle speed (S-analog) data for each gear step.
(This corresponds to the setup parameter, spindle parameter slimt 1 to 4.)
The CNC determines the corresponding spindle limit speed with the spindle gear selection input (Y
…) output from the PLC, and calculates the spindle speed (S-analog) data.
Sd1d2d3d4 SOVR
Spindle speed data = x
slimt n 100
[Precaution]
This setting is validated immediately after setting (writing).
- 21 -
5. Explanation of Read/Write Data
1-13 Spindle shift speed (Gear 1st step to gear 4th step)
[Data definition]
When changing the spindle gears, the spindle motor is run slowly at a constant speed to make the
changeover operation smooth. This parameter is used to designate the speed at that time.
(This corresponds to the setup parameter, spindle parameter ssift 1 to 4.)
The CNC determines the corresponding spindle shift speed with the spindle gear selection input
(Y…) output from the PLC.
ssift n
Spindle speed data for gear shift =
slimt n
[Precaution]
This setting is validated immediately after setting (writing).
[Data definition]
This parameter is used to rotate the spindle at a slow constant speed when carrying out spindle
orientation (orient position stop).
(This corresponds to the setup parameter, spindle parameter sori.)
sori
Spindle speed data for orient =
slimt n
[Precaution]
This setting is validated immediately after setting (writing).
[Supplement]
The orient function is provided for most of the recent spindle controllers, so this parameter is not
used often for the spindle orientation.
- 22 -
5. Explanation of Read/Write Data
[Data definition]
This parameter specifies the minimum spindle speed value.
If the S command issued is a spindle speed lower than this parameter value or if the results of the
spindle override are lower than this parameter value, the spindle will be rotated at this minimum
spindle speed.
(This corresponds to the setup parameter, spindle parameter smini.)
[Precaution]
This setting is validated immediately after setting (writing).
[Data definition]
These parameters are used to control the spindles.
(These correspond to the setup parameter, spindle parameter “#3201 SP001” to “#3584 SP384”.)
Refer to Parameter Manual for details of these parameters.
[Precaution]
Setting of some parameters will become valid after turning the NC power ON. Please turn the NC
power ON after setting the data using DDB.
- 23 -
5. Explanation of Read/Write Data
[Data definition]
The following parameters are indicated in bit units.
[Data definition]
The following parameters are set in bit units.
[Data range]
The setting range is 0 to 255.
The set data could affect the other bits, so take care when setting.
1-70-1) Tool compensation method ....... Valid only for lathe (L) system
The type of movement command for when the tool compensation operation (Tmove) is set to "1" is
designated.
0 : Compensation is carried out regardless of the movement command type.
1 : Compensation is carried out only for a movement command issued with an absolute value.
(This corresponds to the setup parameter, basic specification parameter Tabsmv.)
[Data definition]
The following parameters are set in bit units.
[Data range]
The setting range is 0 to 255.
The set data could affect the other bits, so take care when setting.
- 24 -
5. Explanation of Read/Write Data
[Data definition]
A software dog switch is established at a designated point of the axis on the machine, and the
output signal from this switch is output to the PLC interface when the axis passes over this switch.
A maximum of sixteen switches can be set per part system.
This switch can be used after the zero point is established.
(This corresponds to the setup parameter, position switches axis, dog1 and dog 2.)
The position switch uses the axis, dog1 and dog2 data as one set.
Axis : Name of axis for which switch is established.
dog1 : Distance 1 from basic machine coordinate system zero point
dog2 : Distance 2 from basic machine coordinate system zero point
The difference of dog1 and dog2 becomes the position switch width.
[Precaution]
There will be a slight delay in the output signal changes in respect to the actual machine position.
This maximum delay time (tmax) can be obtained with the following equation.
1
TP : Position loop time constant ( [s] )
PGN
- 25 -
5. Explanation of Read/Write Data
[Data definition]
The 1st reference point, 2nd reference point, 3rd reference point and 4th reference point using 0 of
the basic machine coordinates as the base point can be set for each axis with these parameters.
(This corresponds to the setup parameter, reference point return parameters G53ofs to #4_rfp.)
#1 reference point
#2 reference point
#3 reference point
#4 reference point
[Precaution]
This setting is validated from the next reference point return after setting (writing).
2-11 Axis n Stored stroke limit I (+), (-) ..... For machine tool builder
[Data definition]
These parameters indicate the movable range in the (+) or (-) limit using 0 of the basic machine
coordinates as the base point. These can be set for each axis.
(This corresponds to the setup parameter, axis specification parameters OT+ and OT-.)
Basic machine coordinate system
OT-(X)
OT+
(X)
OT-(Y)
Movable range
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
- 26 -
5. Explanation of Read/Write Data
[Data definition]
The following parameters are indicated in bit units.
Near-point dog
CW
CCW
- 27 -
5. Explanation of Read/Write Data
2-20-D) Diameter designated axis ..... Valid only for lathe system
This parameter indicates the movement amount (commanded with U) in the X axis direction to half
of the command value.
The command in address X will always be a diameter command.
0 : Addresses X and U command movement amounts are the same.
1 : The address U command movement amount is half of the address X movement amount.
(This corresponds to the setup parameter, basic specification parameter dia.)
[Data definition]
This parameter indicates the movement speed when moving toward the reference point after
detecting the near-point dog and decelerating to a stop during the reference point return command.
This parameter can be set for each axis.
(This corresponds to the setup parameter, reference point return parameter G28crp.)
Approach speed
Rapid traverse
Reference point
Near-point dog
[Precaution]
This setting is validated immediately after setting (writing).
- 28 -
5. Explanation of Read/Write Data
[Data definition]
This parameter defines the distance from the electrical reference point (grid) to the actual machine
reference point during the reference point return command. This can be set for each axis.
(This corresponds to the setup parameter, reference point return parameter G28sft.)
▲
Mechanically fixed reference
Dog point (Reference point return
position after setting shift
amount)
[Precaution]
This setting is validated immediately after setting (writing).
[Data definition]
This parameter indicates the backlash amount to be compensated when the movement direction is
reversed with the movement command in the rapid traverse mode or with the manual operation
(excluding handle feed). This can be set for each axis.
(This corresponds to the setup parameter, axis specification parameter G0back.)
[Precaution]
This setting is valid immediately after setting (writing).
[Data definition]
This parameter indicates the backlash amount to be compensated when the movement direction is
reversed with the movement command in the cutting feed mode or with the handle feed mode of
the manual operation.
(This corresponds to the setup parameter, axis specification parameter G1back.)
[Precaution]
This setting is validated immediately after setting (writing).
- 29 -
5. Explanation of Read/Write Data
[Data definition]
The following parameters are indicated in the bit unit.
2-39-A)
Select the soft limit function (stored stroke limit II or IIB) set in the parameter #8204 and #8205.
0 : Soft limit valid
1 : Soft limit invalid
2-40 Axis n Stored stroke limit II (+), (-) ..... For user
[Data definition]
These parameters indicate the movable range in the (+) or (-) limit using 0 of the basic machine
coordinates as the base point. These can be set for each axis.
(This corresponds to the setup parameter, axis specification parameters soft limit (+) and soft limit
(-).)
+Y
M
-X Basic machine coordinate system
+X
Movable range -Y
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
[Data definition]
Set up the primary-delay time constant for the acceleration and deceleration in the cutting feed
mode. This can be set for each axis with the parameter.
(This corresponds to the setup parameter, axis specifications parameter G1t1. When acceleration
or deceleration by software is selected, the second stage time constant is used in G1t1.)
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
- 30 -
5. Explanation of Read/Write Data
[Data definition]
Set the rate (%) in respect to the stall rated current for special operations (absolute position
initialization, stopper operation, etc). (This is the limit value for both the + and – direction.) For
making the maximum driver torque level available, assign “500”. This can be set for each axis with
the parameter.
(This corresponds to the setup parameter, servo parameter SV014.)
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
- 31 -
5. Explanation of Read/Write Data
[Data definition]
Specify the basic axis address for machine error compensation.
For pitch error compensation‚ set the name of the axis to be compensated.
For relative position compensation‚ set the name of the axis to be the base axis.
In the multi-part system, set "part system No. + axis name".
(This corresponds to the setup parameter, machine compensation parameter cmpax.)
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
[Data definition]
Specify the compensation axis address for machine error compensation.
For pitch error compensation‚ set the same axis name as #4001 cmpax.
For relative position compensation‚ set the name of the axis to be actually compensated.
In the multi-part system, set "part system No. + axis name".
(This corresponds to the setup parameter, machine compensation parameter drcax.)
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
[Data definition]
Set the compensation data No. corresponding to the reference point position. The reference point
is actually the base‚ so there is no compensation No. Set the number that is decremented by 1.
(This corresponds to the setup parameter, machine compensation parameter rdvno.)
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
- 32 -
5. Explanation of Read/Write Data
[Data definition]
Set the compensation data No. that is on the farthest negative side.
(This corresponds to the setup parameter, machine compensation parameter mdvno.)
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
[Data definition]
Set the compensation data No. that is on the farthest positive side.
(This corresponds to the setup parameter, machine compensation parameter pdvno.)
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
[Data definition]
Set the compensation amount’s scale.
(This corresponds to the setup parameter, machine compensation parameter sc.)
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
[Data definition]
Set the interval to divide the basic axis. Each compensation data will be the compensation amount
for each of these intervals.
(This corresponds to the setup parameter, machine compensation parameter spcdy.)
[Precaution]
This setting is validated immediately after setting (writing). (Note that this is only when the axis
movement is stopped.)
- 33 -
5. Explanation of Read/Write Data
[Data definition]
These are the G54 to G59 workpiece offset amount of the nth axis (n: 1 to No. of control axes.)
(This corresponds to the tool/compensation amount workpiece coordinate offset G54 to G59.)
[Precautions]
(1) This setting is valid after the data is rewritten and the next workpiece coordinate
changeover is commanded.
[Data definition]
This is the external workpiece coordinate system offset amount of the nth axis (n : 1 to No. of
control axes).
(This corresponds to the tool/compensation amount workpiece coordinate offset EXT.)
[Precautions]
(1) This setting is valid after the data is rewritten and the next workpiece coordinate
changeover is commanded.
- 34 -
5. Explanation of Read/Write Data
[Data definition]
This indicates that an error has occurred in the servo system.
When an error occurs, the NC alarm 2 (AL2: X431) will turn ON.
- 35 -
5. Explanation of Read/Write Data
- 36 -
5. Explanation of Read/Write Data
(Note 1) Depending on the driver type and power supply type, there may be some alarms that
might not occur.
(Note 2) Refer to the alarm No. when the alarm attribute bit F is set to 1.
- 37 -
5. Explanation of Read/Write Data
[Data definition]
This indicates that a warning alarm has occurred in the servo system.
(Note 1) E7 of the alarm No. sub 1 cannot be viewed as the servo warning No.
(Note 2) Refer to the alarm No. when the alarm attribute bit F is set to 1.
- 38 -
5. Explanation of Read/Write Data
[Data definition]
This indicates that the axis cannot move, etc., due to the operation or machine side conditions.
When an error occurs, the NC alarm 4 (AL4) will turn ON.
$1 $2 $3 $4 $5 $6 $7
AL4
X633 X6B3 X733 X7B3 X833 X8B3 X933
- 39 -
5. Explanation of Read/Write Data
(Note 1) Refer to the alarm No. when the alarm attribute bit F is set to 1.
- 40 -
5. Explanation of Read/Write Data
[Data definition]
This indicates the cause of automatic stop or block stop.
- 41 -
5. Explanation of Read/Write Data
(Note 1) Refer to the alarm No. when the alarm attribute bit F is set to 1.
(Note 2) 0
orientation to complete
traverse deceleration
position to be looped
unclamp signal (Note3)
speed deceleration
Waiting for spindle
MSTB completion
Waiting for rapid
Door open (Note4)
Waiting for
Waiting for
Alarm No.
Alarm No.
Alarm No.
Dwelling
0 0 0
1 × 1 × 1 ×
8 × 8 × 2 ×
9 × × 9 × × 3 × ×
4 ×
5 × ×
6 × ×
7 × × ×
8 ×
9 × ×
A × ×
B × × ×
C × ×
(Note 3) Waiting for unclamp when "#2076 index_x" = 1. D × × ×
(Note 4) Door open mode is enabled by the door interlock
E × × ×
function.
F × × × ×
- 42 -
5. Explanation of Read/Write Data
[Data definition]
The remaining movement distance of the block being executed is indicated.
[Interpolation vector length]
Σ (Remaining movement distance of each axis)
2
[Data unit]
The unit is 1/2 of the input unit. (Either 0.5µm, or 0.05µm)
[Precaution]
The data is not set when G0 non-interpolation (G0Intp = 1). The data will be updated with the
interpolation cycle.
[Data definition]
- 43 -
5. Explanation of Read/Write Data
[Data definition]
The remaining movement distance of each axis in the block being executed is indicated.
[Data unit]
The unit is 1/2 of the input unit. (Either 0.5µm, or 0.05µm)
[Precautions]
(1) If the movement mode is skip or multi-step skip, the movement end point will not be the
skip stop point, but instead will be a value calculated from the commanded value.
(2) If the movement mode is counter preset, the counter preset value will be set instead of
the remaining movement distance of each axis. The value will be cleared immediately
after the counter preset is executed.
(3) If the movement mode is reference point return, the remaining movement distance to
the middle point will be set.
(4) If the movement mode is start position return, the remaining movement distance from
the middle point will be set.
- 44 -
5. Explanation of Read/Write Data
[Data definition]
The current movement modal (group 1) is indicated.
[Data definition]
The current plane selection modal (group 2) is indicated.
[Data definition]
The current feed modal (group 5) is indicated.
- 45 -
5. Explanation of Read/Write Data
[Data definition]
The current radius compensation modal (group 7) is indicated.
[Data definition]
The current fixed cycle modal (group 9) is indicated.
- 46 -
5. Explanation of Read/Write Data
[Data definition]
The current workpiece coordinate system modal (group 12) is indicated.
[Data definition]
The current cutting modal (group 13) is indicated.
[Data definition]
The current G modal (group 3, 4, 6, 10, 17, 18) is indicated.
[Data definition]
The current block No. is indicated.
[Data range]
The setting range is 0 to 99.
- 47 -
5. Explanation of Read/Write Data
[Data definition]
T* * * * * * * *
Tool length compensation
Tool nose wear compensation Same compensation No.
Tool No.
T* * * * * * * * *
Tool length compensation
Same compensation No.
Tool nose wear compensation
Tool No.
(b) When designating the tool length compensation No. and tool nose wear compensation No.
independently.
T * * * * * * * *
Tool nose wear compensation
T * * * * * * * * *
Tool nose wear compensation
Tool No. + Tool length compensation
In this case, the tool length compensation No. is the last two digits of the high-order digit.
[Data definition]
- 48 -
5. Explanation of Read/Write Data
[Data definition]
The miscellaneous function No. commanded with the miscellaneous function code (M) is indicated.
[Data definition]
The spindle speed commanded with the spindle function code (S) is indicated.
[Data definition]
The tool No. commanded with the tool function code (T) is indicated.
[Data definition]
The data commanded with the 2nd miscellaneous function code (B, A or C) is indicated.
[Data definition]
The current program No. (modal) is indicated.
[Data range]
The setting range is 1 to 99999999 (binary).
[Data definition]
The current sequence No. is indicated.
[Data range]
The setting range is 1 to 99999 (binary).
[Data definition]
The tool length compensation No. of that axis is indicated.
[Data range]
The setting range is 0 to the maximum compensation No. (binary).
This is valid only for the machining center system.
- 49 -
5. Explanation of Read/Write Data
[Data definition]
The actual feedrate in the automatic mode is indicated.
(This includes the speed change conditions such as override.)
(1) For G0, G1, G2, G3, G27
The composite speed of all commanded axes is indicated.
(2) For G28, G29, G30
The speed of the fastest axis among the axes moving simultaneously is indicated.
[Data unit]
[Data definition]
The actual feedrate in the manual mode is indicated.
(This includes the speed change conditions such as override.)
The speed of the fastest axis among the axes moving simultaneously is indicated.
[Data unit]
20-20 In-position
[Data definition]
This indicates that the control axes which belong to each part system are in the state of in-position
F E D C B A 9 8 7 6 5 4 3 2 1 0
1st axis
2nd axis
3rd axis
4th axis
5th axis
6th axis
- 50 -
5. Explanation of Read/Write Data
[Data definition]
The current position of the axis in the machine coordinate system is indicated.
[Data unit]
[Data definition]
The total of the movement amount in the manual mode with the manual absolute switch OFF is
indicated.
The program coordinate system is shifted by the distance corresponding to this data.
[Data unit]
[Data definition]
The total of the movement amount in the manual mode with the manual absolute switch ON is
indicated.
This data is cleared in the following cases:
(1) When calculation of the buffer is started during automatic starting, or when automatic start
up is executed.
(2) When the reset signal is input.
[Data unit]
- 51 -
5. Explanation of Read/Write Data
[Data definition]
The current position in the currently selected workpiece coordinate system is indicated.
[Data unit]
[Data definition]
The current position in the workpiece coordinate system when the skip signal is input during the
G31 command is indicated.
This corresponds to the macro variables #5061, #5062 .....
[Data unit]
[Data definition]
The current position in the machine coordinate system when the skip signal is input during the G31
command is indicated.
[Data unit]
- 52 -
5. Explanation of Read/Write Data
[Data definition]
The remaining commanded distance when the skip signal is input during the G31 command is
indicated.
[Data unit]
[Data definition]
The current position in the machine coordinate system when the skip signal is ON during the
manual skip command is indicated.
[Data unit]
- 53 -
5. Explanation of Read/Write Data
[Data definition]
The cause of why the CNC entered the emergency stop state is indicated.
This data can also be referred to with the file register R21 in the PLC and CNC interfaces.
The correspondence of each bit is explained below. Here, the signal is normally "1", and is set to
"0" when an emergency stop occurs.
22-10-6) Built-in PLC Software emergency stop output device Y427 is “1”.
This indicates that the user PLC has entered the emergency stop state.
The PLC device "Y427" is the PLC emergency stop interface.
- 54 -
5. Explanation of Read/Write Data
[Data definition]
This is not the spindle function (S) command value, but instead is the commanded speed that is
obtained by adding the conditions such as spindle override, spindle stop and spindle gear shift to
the S command. Set the spindle No. in the part system designation bit.
(bit 0:1st spindle, bit 1:2nd spindle, … bit 6:7th spindle)
[Data definition]
This is the total cumulative time from when the controller power is turned ON to when it is turned
OFF.
[Data unit]
The read data is a binary, and is not a time unit.
The following calculation is carried out to change the data to time (unit: second).
256
Time (second) = DDB read data x
9000
9000
DDB write data = x time
256
[Data definition]
This is the total cumulative time per machining time from when the automatic start button is
pressed in the memory (tape) mode to when the M02/M30 command is issued, or to when the
reset process is carried out by pressing the reset button.
[Data unit]
The read data is a binary, and is not a time unit.
The following calculation is carried out to change the data to time (unit: second).
256
Time (second) = DDB read data x
9000
9000
DDB write data = x time
256
- 55 -
5. Explanation of Read/Write Data
[Data definition]
This is the total cumulative time of automatic starting from when the automatic start button is
pressed in the memory (tape) mode or MDI mode to when the feedhold stop, block stop or reset
button is pressed.
[Data unit]
The read data is a binary, and is not a time unit.
The following calculation is carried out to change the data to time (unit: second).
256
Time (second) = DDB read data x
9000
9000
DDB write data = x time
256
[Data definition]
This counts and displays the total cumulative time that the designated signal (Y414, Y415) is ON
with the user PLC. The signals are assigned in the following manner.
24-4 External cumulative time 1: Y414
24-5 External cumulative time 2: Y415
[Data unit]
The read data is a binary, and is not a time unit.
The following calculation is carried out to change the data to time (unit: second).
256
Time (second) = DDB read data x
9000
9000
DDB write data = x time
256
- 56 -
5. Explanation of Read/Write Data
[Data definition]
This is the real speed of the spindle motor detected by the encoder built into the motor.
[Data unit]
The data unit is r/min.
[Precaution]
This signal is limited to the "MDS-*-SP/SPH/SPJ2" spindle controller.
[Data definition]
This is the load (torque current) of the spindle motor.
The rated load for 30 minutes is regarded as 100%.
Spindle motor load (%) = Read data (An absolute value is retrieved.)
- 57 -
5. Explanation of Read/Write Data
[Data definition]
The various servo related information is expressed in bit units.
27-10-0) Ready ON
If the drive unit can be entered the ready ON state, including the ready ON request signal from the
CNC, the main circuit will be turned ON. While the main circuit is ON, the ready ON signal will turn
ON as the answer signal to the CNC.
The conditions for turning OFF are as follows:
1) When the ready ON request signal from the CNC turns OFF.
2) When the CNC enters the emergency stop state.
3) When a servo alarm occurs.
27-10-1) Servo ON
When the above ready ON signal is ON and the servo ON request signal is received from the CNC,
if the conditions provide that the servo can be turned ON, the servo ON signal will turn ON (a
position loop will be structured). The servo ON signal will remain ON as the answer signal to the
CNC while the position loop is structured.
The condition for turning OFF is as follows:
1) When in addition to the conditions for the ready ON signal to turn OFF, the servo ON
request
signal from the CNC turns OFF.
27-10-3) In alarm
This notifies that the drive unit is in the servo OFF state.
27-10-6) In-position
This indicates that the difference of the command and the feedback from the detector, or in other
words, the position deflection (position loop droop) is within the range designated by the servo
parameter "SV024" (in-position width) in the setup parameters.
How the CNC operates upon receiving this signal depends on the basic specification parameter
"inpos" (in-position check valid) in the setup parameters.
Servo
Command
In-position width
- 58 -
5. Explanation of Read/Write Data
27-10-8) Smoothing 0
The acceleration/deceleration time constant to make the machine movement smooth is applied to
the issued step-state command. The circuit onto which the acceleration/deceleration time constant
is applied is called the smoothing circuit.
Smoothing 0 means that there is no droop amount in that smoothing circuit.
(Note 1) This may turn ON when the machine is moving at an extremely low speed.
(Note 2) This state is equivalent to when the plus motion (+) signal (MVPn) and the minus motion
(-) signal (MVMn) sent from the CNC to the PLC are both OFF.
Creep speed
Reference point return Rapid traverse rate
operation
Dog
Reference point
Near-point dog ON
- 59 -
5. Explanation of Read/Write Data
[Data definition]
This is an amount that indicates the difference of the actual machine position from the commanded
position. (With code (+) or (-).)
The servo delay amount will be the same as the droop on the diagnosis screen's servo monitor,
according to the following equation.
1
Droop [command unit] = Read data x
2
[Data definition]
This is the load of the feed axis motor.
The data read with the DDB has a code (+ or -).
Feed axis motor load (%) = Read data (An absolute value is retrieved.)
[Precaution]
The motor data is data that considers the motor type. Thus, conversion may not be required
depending on the motor type.
[Data definition]
This is the load (current) of the feed axis motor.
Feed axis motor load (%) = Read data (An absolute value is retrieved.)
(Note) The same contents as the feed axis motor load A (27-30) are obtained for the feed axis
motor load B.
To read the feed axis motor load, use the feed axis motor load A (27-30).
[Data definition]
This is the speed of the feed axis motor.
The data read with the DDB has a code (+ or -).
Feed axis motor speed (r/min) = Read data (An absolute value is retrieved.)
- 60 -
5. Explanation of Read/Write Data
[Data definition]
These are common variables used by the variable commands and user macros.
The sub-section No. of the DDB uses the same value as the variable No. to be read or written.
The common variable 1 can be used common for all the part systems.
Function
Common variables
Sub-section No. Remarks
50 sets: #500 to #549 500 to 549 These can be used in the main program,
100 sets: #500 to #599 500 to 599 subprogram and each macro program.
200 sets: #500 to #699 500 to 699
[Precautions]
(1) When data is changed during operation:
• The data will not be effective on a block that has already been calculated.
(2) The substitute command is executed when the command block is ACT.
(3) When handling decimal place with the DDB, the last four digits of the data read or written
correspond to the decimal place when the control signal bit 2 is set to "1".
When the control signal bit 2 is set to "0", only the integer is read or written.
- 61 -
5. Explanation of Read/Write Data
[Data definition]
These are the local variables for the main program (macro level 0).
The sub-section No. of the DDB uses the same value as the local variable No. to be read or
written.
[Precautions]
(1) When data is changed during operation:
(a) The data is not effective on a block that has already been calculated.
(b) The variable is cleared to a blank when the macro is called.
(2) The substitute command is executed when the command block is ACT.
(3) When handling decimal place with the DDB, the last four digits of the data read or written
correspond to the decimal place when the control signal bit 2 is set to "1".
[Data definition]
These are the same as the local variables (level 0), and are the local variables in macro level 1.
Note that the sub-section No. used by the DDB is the value which 100 has been added to the local
variable No.
[Data definition]
These are the same as the local variables (level 1), and are the local variables in macro level 2.
Note that the sub-section No. used by the DDB is the value which 200 has been added to the local
variable No.
[Data definition]
These are the same as the local variables (level 2), and are the local variables in macro level 3.
Note that the sub-section No. used by the DDB is the value which 300 has been added to the local
variable No.
[Data definition]
This is the tool offset and differs according to the distinction of shape and wear.
Without shape/wear distinction : Tool compensation amount
With shape/wear distinction : Tool length shape compensation amount
The sub-section No. used by the DDB corresponds to the tool offset No.
[Precaution]
Even if this data is changed during operation, it will not be effective on a block that has already
been calculated.
- 62 -
5. Explanation of Read/Write Data
[Data definition]
This is the tool length wear compensation amount.
(This is valid only when there is a shape/wear distinction in the tool offset.)
The sub-section No. used by the DDB is the value which 1000 has been added to the tool offset
No.
[Precaution]
Even if this data is changed during operation, it will not be effective on a block that has already
been calculated.
[Data definition]
This is the tool radius shape compensation amount.
(This is valid only when there is a shape/wear distinction in the tool offset.)
The sub-section No. used by the DDB is the value which 6000 has been added to the tool offset No.
The following is the same as tool compensation amount 1.
[Data definition]
This is the tool radius wear compensation amount.
(This is valid only when there is a shape/wear distinction in the tool offset.)
The sub-section No. used by the DDB is the value which 7000 has been added to the tool offset No.
The following is the same as the tool compensation amount 2.
[Data definition]
This is the X axis tool length compensation amount.
The sub-section No. used by the DDB corresponds to the tool offset No.
[Precaution]
Even if this data is changed during operation, it will not be effective on a block that has already
been calculated.
- 63 -
5. Explanation of Read/Write Data
[Data definition]
This is the X axis wear compensation amount.
The sub-section No. used by the DDB is the value which 1000 has been added to the tool offset
No.
[Precaution]
Even if this data is changed during operation, it will not be effective on a block that has already
been calculated.
[Data definition]
This is the 3rd tool length compensation amount.
The sub-section No. used by the DDB is the value which 2000 has been added to the tool offset
No.
The following is the same as the X axis tool length compensation amount.
[Data definition]
This is the 3rd axis wear compensation amount.
The sub-section No. used by the DDB is the value which 3000 has been added to the tool offset
No.
The following is the same as the X axis wear compensation amount.
[Data definition]
This is the Z axis tool length compensation amount
The sub-section No. used by the DDB is the value which 4000 has been added to the tool offset
No.
The following is the same as the X axis tool length compensation amount.
[Data definition]
This is the Z axis wear compensation amount.
The sub-section No. used by the DDB is the value which 5000 has been added to the tool offset
No.
The following is the same as the X axis wear compensation amount.
[Data definition]
This is the nose R compensation amount.
The sub-section No. used by the DDB is the value which 6000 has been added to the tool offset
No.
The following is the same as the X axis tool length compensation amount.
- 64 -
5. Explanation of Read/Write Data
[Data definition]
This is the nose R wear compensation amount.
The sub-section No. used by the DDB is the value which 7000 has been added to the tool offset
No.
The following is the same as the X axis wear compensation amount.
[Data definition]
This is the hypothetical nose No.
(1) Nose point
Generally, the tool nose is rounded, so the nose position in the program is aligned to point P
as shown in the following example.
With nose R compensation, select one point from the points shown below for each tool No.,
and preset this position relation.
(In the G46 mode, 1 to 8 are selected, and in the G41/G42 mode, 0 to 9 are selected.)
+X
8
0,9 4 3
7
5 P 5 7
P
1 2
3 6
8 4 Nose point 0 to 9
+Z
Correspondence of hypothetical
nose No. and nose point
The sub-section No. used by the DDB is the value which 8000 has been added to the tool
offset No.
[Data definition]
These are common variables used by the variable commands and user macros.
The sub-section No. of the DDB uses the same value as the variable No. to be read or written.
The common variable 2 is prepared per part system. Designate the part system No. on the part
system No. designation bit.
Function
Common variables
Sub-section No. Remarks
50 sets * No. of part systems: 100 to 149 These can be used in the main
#100 to #149 program, subprogram and each macro
100 sets * No. of part systems: 100 to 199 program.
#100 to #199
[Precautions]
(1) When data is changed during operation:
• The data will not be effective on a block that has already been calculated.
(2) The substitute command is executed when the command block is ACT.
(3) When handling decimal place with the DDB, the last four digits of the data read or written
correspond to the decimal place when the control signal bit 2 is set to "1".
When the control signal bit 2 is set to "0", only the integer is read or written.
- 65 -
6. Example of DDB with Ladder Circuit
(1) Axis load
The spindle load can be read in, and can be displayed on the CNC screen by using the load meter
display function in the PLC.
Refer to the section on the PLC Auxiliary Functions in the "PLC Programming Manual " for details
on the load meter display.
M1000
MOV K0 D100 Control signal set
WOR D114 H9400 R153 Set load meter display validity, length
of section not to be reversed or
displayed in red, and length of bar
graph.
- 66 -
(2) Z axis load
The Z axis load can be read in, and can be displayed on the CNC screen by using the load meter
display function in the PLC.
M1000
MOV K0 D116 Control signal set
In this example, only the Z axis data is read out, and the previous states are held
for the X, Y and 4th axis data.
- 67 -
Revision History
Duplication Prohibited
This instruction manual may not be reproduced in any form, in part or in whole,
without written permission from Mitsubishi Electric Corporation.
MODEL MC6/C64/C64T
MODEL
CODE 008-183