Variables - Mitsubishi Electric MELDAS C6 Programming Manual

Hide thumbs Also See for MELDAS C6:
Table of Contents

Advertisement

13. Program Support Functions
(Example 1)

13.5.3 Variables

Function and purpose
Both the variable specifications and user macro specifications are required for the variables which
are used with the user macros.
The offset amounts of the local, common and system variables among the variables for this
MELDAS NC system except #33 are retained even when the unit's power is switched off.
(Common variables can also be cleared by parameter "#1129 PwrVC1".)
Use of multiple variables
When the user macro specifications applied, variable numbers can be turned into variables
(multiple use of variables) or replaced by <formula>. Only one of the four basic arithmetic rule (+, –,
× , ÷ ) operations can be conducted with <formula>.
(Example 1) Multiple use of variables
(Example 2) Example of multiple designation of variables
Main program
G66Pp
;
(p
call)
1
1
Zz1
;
After Z1 execution
G66Pp
;
(p
call)
2
2
Zz2
;
After Z2 execution
(p
cancel)
2
G67 ;
Zz3
;
After Z3 execution
(p
cancel)
1
G67
;
Zz4
;
Zz5
;
#1 = 10 #10 = 20 #20 = 30 ;
#5 = #[#[#1]] ;
#1 = 20 #10 = 20 #20 = 30 #5
= 1000 ;
#[#[#1]] = #5 ;
#10 = 5
In which case ##10 = 100 ; #5 =
100
188
13.5 User macro specifications
User macro operation
Macro p
1
x
y
1
Macro p
2
x
y
1
Macro p
1
Macro p
1
x
y
1
#[#[#1]] = #[#10] from #1 = 10.
#[#10] = #20 from #10 = 20.
Therefore, #5 = #20 or #5 = 30.
#[#[#1]] = #[#10] from #1 = 10.
#[#10] = #20 from #10 = 20.
Therefore, #20 = #5 or #20 = 1000.
<Formula>##10 = 100; is handled in the
same manner as # [#10] = 100.
x
M99
1
2
x
M99
1
2
Macro p
Macro p
1
1
x
M99
1
2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Meldas c64Meldas c64t

Table of Contents