EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-F FX5 - Comment

Mitsubishi Electric MELSEC iQ-F FX5
64 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...
48
6 ST LANGUAGE
6.1 Configuration
The following shows the devices to which device type specifiers can be added.
Data register (D)
Link register (W)
Module access device (U\G)
File register (R)
Device specification method
The following methods can be used for specifying a device.
Indexing
Bit specification
Nibble specification
Indirect specification
For details, refer to the following.
User's manual (Application)
Programming manual (Instructions, Standard Functions/Function Blocks)
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.
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.
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.
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.
:E FLOAT (Single Precision) D0:E The value when D0 and D1 are single-precision real
numbers
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 */
Device type specifier Data type Example Description
Ex.
Ex.
Ex.

Other manuals for Mitsubishi Electric MELSEC iQ-F FX5

Related product manuals