EasyManuals Logo

Mitsubishi MELSEC Q Series Structured Programming Manual

Mitsubishi MELSEC Q Series
268 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #28 background imageLoading...
Page #28 background image
3-10
3.6 Expressing Methods of Constants
3.7.1 Precautions on assigning a name
3.6 Expressing Methods of Constants
The following table shows the expressing method for setting a constant to a label.
Table 3.6-1 Constant expressing method
3.7 Precautions on Programming
Reserved words cannot be used for a name that is used in a program (label name, function block
instance name, structured data type name, etc.).
3.7.1 Precautions on assigning a name
This section explains the conditions for assigning a name and shows the list of reserved words.
Conditions
(1) Specify a name by a character string of up to 32 characters.
(2) Do not use a reserved word.
For reserved words, refer to Table 3.7-1 Reserved words.
(3) Use alphanumeric and underscore (_).
(4) Do not use an underscore at the end of a name.
Do not use two or more underscores in succession.
(5) Do not use a space.
(6) Do not use a number at the initial character.
(7) A constant cannot be used.
(An identifier that begins with 'H' or 'h' and an expression where a hexadecimal (0 to F)
immediately follows 'H' or 'h' (maximum 9 digits including 'H' or 'h' (excluding 0 that
immediately follows 'H' or 'h')) are also treated as a constant. (Example: 'hab0'))
Constant
type
Expressing method Example
Bool
Input FALSE or TRUE, or input 0 or 1. TRUE, FALSE
Binary Append '2#' in front of a binary number. 2#0010, 2#01101010
Octal
notation
Append '8#' in front of an octal number. 8#0, 8#337
Decimal Directly input a decimal number, or append 'K' in front of a decimal number. 123, K123
Hexadecimal
Append '16#' or 'H' in front of a hexadecimal number.
When a lowercase letter 'h' is appended, it is converted to uppercase automatically.
16#FF, HFF
Real
number
Directly input a real number or append 'E' in front of a real number. 2.34, E2.34
Character
string
Enclose a character string with single quotations (') or double quotations ("). 'ABC', "ABC"

Table of Contents

Other manuals for Mitsubishi MELSEC Q Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC Q Series and is the answer not in the manual?

Mitsubishi MELSEC Q Series Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC Q Series
CategoryController
LanguageEnglish

Related product manuals