13. Program Support Functions
13.5 User Macro Specifications
331
Other modals
Using variable numbers #4101 to #4120, it is possible to read the model commands assigned up to
the block immediately before.
Similarly, it is possible to read the modals in the block being executed with variable numbers #4301
to #4320.
Variable number
Variable number
Pre-read Execution
Modal
information
Pre-read Execution
Modal information
#4101 #4301
#4111 #4311
Tool length compensation
No. H
#4102 #4302
#4112 #4312
#4103 #4303
#4113 #4313
Miscellaneous function M
#4104
#4304
#4114
#4314
Sequence number N
#4105 #4305
#4115 #4315
Program number L(O)
(Note 1)
#4106 #4306
#4116 #4316
#4107 #4307
Tool radius
compensation No. D
#4117 #4317
#4108 #4308
#4118 #4318
#4109
#4309
Feedrate F
#4119
#4319
Spindle function S
#4110
#4310
#4120
#4320
Tool function T
(Note 1) The programs are registered as files. When the program No. (file name) is read with #4115,
#4315, the character string will be converted to a value.
(Example 1) The file name "123" is the character string 0×31, 0×32, 0×33, so the value will be
(0×31-0×30)*100 + (0×32-0×30)*10 + (0×33-0×30) = 123.0. Note that if the file
name contains characters other than numbers, it will be "blank".
(Example 2) If the file name is "123ABC", it contains characters other than numbers; so, the
result will be "blank".