Mitsubishi Electric MELDAS C6 Programming Manual page 197

Hide thumbs Also See for MELDAS C6:
Table of Contents

Advertisement

13. Program Support Functions
(Example 3) Replacing variable numbers with <formula>
Undefined variables
Variables applying with the user macro specifications such as variables which have not been used
even once after the power was switched on or local variables not quoted by the G65, G66 or G66.1
commands can be used as <vacant>. Also, variables can forcibly be set to <vacant>. Variable #0 is
always used as the <vacant> variable and cannot be defined in the left-side member.
(1) Arithmetic expressions
#1 = #0 ; ................... #1 = <vacant>
#2 = #0 + 1 ;............. #2 = 1
#3 = 1 + #0 ;............. #3 = 1
#4 = #0 ∗ 10 ; ............. #4 = 0
#5 = #0 + #0 ;........... #5 = 0
It should be borne in mind that <vacant> in an arithmetic expression is
handled in the same way as 0.
<Vacant> + <Vacant> = 0
<Vacant> + <Constant> = Constant
<Constant> + <Vacant> = Constant
(2) Variable quotations
When undefined variables only are quoted, they are ignored up to the address.
When #1 = <Vacant>
G0 X#1 Y1000 ; ............... Equivalent to G0 Y1000 ;
G0 X#1 + 10 Y1000 ; ....... Equivalent to G0 X10 Y1000 ;
(3) Conditional expressions
<Vacant> and 0 are not equivalent for EQ and NE only. (#0 means <vacant>.)
<Vacant> = <Vacant> established
<Vacant> ≥ <Vacant> established
<Vacant> > 0 not established
<Vacant> ≤ <Vacant> established
<Vacant> < 0 not established
(Note 1) EQ and NE should be used only for integers. For comparison of numeric values with
#10 = 5 ;
#[#10 + 1] = 1000 ;
#[#10 − 1] = − 1000 ;
#[#10 ∗ 3] = 100 ;
#[#10/2] = − 100 ;
When #101 = <Vacant>
#101 EQ #0
#101 NE 0
<Vacant> ≠ 0 established
#101 GE #0
#101 GT 0
#101 LE #0
#101 LT 0
decimals, GE, GT, LE, and LT should be used.
189
13.5 User macro specifications
In which case, #6 = 1000.
In which case, #4 = − 1000.
In which case, #15 = 100.
In which case, #3 = − 100.
(fraction rounded up)
When #101 = 0
#101 EQ #0
0 = <Vacant> not established
#101 NE 0
0 ≠ 0 not established
#101 GE #0
0 ≥ <Vacant> established
#101 GT 0
0 > 0 not established
#101 LE #0
0 ≤ <Vacant> established
#101 LT 0
0 < 0 not established

Advertisement

Table of Contents
loading

This manual is also suitable for:

Meldas c64Meldas c64t

Table of Contents