Mitsubishi Electric MELDAS C6 Programming Manual page 187

Hide thumbs Also See for MELDAS C6:
Table of Contents

Advertisement

13. Program Support Functions
(3) Variable quotations
Variables can be used for all addresses except O, N and / (slash).
(a) When the variable value is used directly:
X#1 ...................................Value of #1 is used as the X value.
(b) When the complement of the variable value is used:
X - #2 ................................ Value with the #2 sign changed is used as the X value.
(c) When defining variables:
#3 = #5 .............................Variable #3 uses the equivalent value of variable #5.
#1 = 1000 .........................Variable #1 uses the equivalent value 1000 (which is treated as
(d) When defining variables:
#1 = #3 + #2 – 100 ...........The value of the arithmetic result of #3 + #2 - 100. Is used as the
X[#1 + #3 + 1000]............. The value of the arithmetic result of #1 + #3 + 1000. Is used as
(Note 1) A variable cannot be defined in the same block as an address. It must be defined in a
separate block.
(Note 2) Up to five sets of square parentheses [ ] may be used.
(Note 3) There are no restrictions on the number of characters and number of variables for
variable definition.
(Note 4) The variable values should be within a range form 0 to ± 99999999.
(Note 5) The variable definitions are valid from the moment that the variables are actually
defined.
(Note 6) Variable quotations are always regarded as having a decimal point at the end.
1000.)
#1 value.
the X value.
Incorrect
X#1 = #3 + 100;
#543 = − [[[[[#120]/2+15.] ∗ 3 − #100]/#520 + #125 + #128] ∗ #130 + #132]
If this range is exceeded, the arithmetic operations may not be conducted properly.
#1 = 100 ;.............................. #1 = 100 Valid from the next command
#1 = 200 #2 = #1 + 200 ; ..... #1 = 200, #2 = 400 Valid from the next command
#3 = #1 + 300 ; ..................... #3 = 500 Valid from the next command
When #100 = 10, then X#100 ; is treated as X10.
13.4 Variable commands
Correct
#1 = #3 + 100;
X#1;
179

Advertisement

Table of Contents
loading

This manual is also suitable for:

Meldas c64Meldas c64t

Table of Contents