EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-F Series - Comment

Mitsubishi Electric MELSEC iQ-F Series
128 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
Loading...
6 ST LANGUAGE
6.1 Configuration
61
6
Precautions
The pointer type can be used for ST programs.
When a value is assigned using nibble specification, use the same data type for the left side and right side of an operation.
Ex.
D0 := K5X0;
In the above case, since K5X0 is the double word type and D0 is the word type, an error occurs in the program.
When a value is assigned using nibble specification and the data size of the right side is larger than that of the left side,
data is transmitted within the range of the target points of the left side.
Ex.
K5X0 := 2#1011_1101_1111_0111_0011_0001;
In the above case, since the target points of K5X0 is 20, 1101_1111_0111_0011_0001 (20 bits) are assigned to K5X0.
When the current value (such as TNn) of a counter (C), timer (T), or retentive timer (ST) is used with a type other than Word
[unsigned]/Bit string [16-bit], or when the current value (such as LCNn) of a long counter (LC) is used with a type other than
Double word [unsigned]/Bit string [32-bit], use the type conversion function.
Ex.
varInt := WORD_TO_INT(TN0); (*Use the type conversion function*)
Comment
The following table shows the comment formats that can be used in a ST program.
When the multiple-line comment format is used, do not use end symbols inside comments.
Comment format Comment
symbol
Description Example
Single line comment // The character strings between the start symbol "//" and the end of the
line are used as a comment.
// Comment
Multiple-line comment (* *) The character strings between the start symbol "(*" and the end symbol
"*)" are used as a comment.
Newlines can be inserted in the comment.
Without newline
(* Comment *)
With newline
(* Comment in the first line
Comment in the second line *)
/* */ The character strings between the start symbol "/*" and the end symbol
"*/" are used as a comment.
Newlines can be inserted in the comment.
Without newline
/* Comment */
With newline
/* Comment in the first line
Comment in the second line */

Other manuals for Mitsubishi Electric MELSEC iQ-F Series

Related product manuals