Appd – Yaskawa MP900 Series Ladder Programming Manual User Manual
Page 405

D.1 Elements That You Can Use in Numeric Expressions
D-3
Format for EXPRESSION Instruction
AppD
( 2 ) Operands
[ a ] Constants
Integers or real numbers may be used as a constant.
• An integer may be any number that can be expressed within the range of a 32-bit integer.
(-2,147,483,648 to 2,147,483,647)
• A real number may be any number that can be expressed within the range of 32-bit floating point data.
± (1.175494351e–38F to 3.402823466e+38F)
Hexadecimal numbers must be expressed using the 0x notation when used in the EXPRESSION, IF, or WHILE
instruction.
The H notation will result in an error.
Example: H012F ... NG 0x012F ... OK
The H notation must be used for all other instructions, such as the STORE instruction.
[ b ] Variables
The EXPRESSION instruction allows you to assign arbitrary variable names that are allowed in C language to registers
in the Machine Controller.
Although the C language does not have Boolean variables, bit registers in the Machine Controller are treated as Bool-
ean variables. Boolean variables are either TRUE or FALSE and can be used only in logical expressions.
Limitations on Variable Names
The following limitations apply to variable names.
• Variable names must start with a non-numeric character.
• For ASCII characters, only alphabetic characters, underscores, and numbers may be used.
• The following variable names cannot be used because they are already used as function names.
INFO
Abc
OK
Get_input()
OK
1ab
NG
Sin
NG
EXAMPLE