Sign In
Upload
Download
Table of Contents
Contents
Add to my manuals
Delete from my manuals
Share
URL of this page:
HTML Link:
Bookmark this page
Add
Manual will be automatically added to "My Manuals"
Print this page
×
Bookmark added
×
Added to my manuals
Manuals
Brands
Mitsubishi Manuals
Controller
MELSEC-l
Programming manual
Mitsubishi MELSEC-l Programming Manual
Melsec q series; melsec l series
Hide thumbs
1
2
3
4
5
Table Of Contents
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
page
of
298
Go
/
298
Contents
Table of Contents
Bookmarks
Table of Contents
Safety Precautions
Conditions of Use for the Product
Revisions
Table of Contents
About Manuals
How to Use this Manual
Abbreviations and Generic Terms in this Manual
1 Overview
What Is the ST Language
Features of ST Program in MELSEC-Q/L Series
ST Program Creating Procedure
2 System Configuration
Applicable Cpus
Programming Tool for ST Program
ST Program Specifications
3 Handling of Characters and Numeric Values in St Programs
Usable Characters
Data Handling
Data Types
About any Type
Array and Structure
Data Representation Methods
Constants
Labels
Devices
4 St Program Expressions
Assignment Statement
Operators
Operator List
Examples of Using the Operators
Control Syntaxes
Control Syntax List
Conditional Statements
Repeat Statement
Other Control Syntaxes
Precautions for Use of Control Syntaxes
Call of Function Block
Comment
5 Melsec Functions
How the Functions Are Described
Output
Output to Device
Low-Speed Timer
High-Speed Timer
Counter
Set of Device
Reset of Device
Conversion of Direct Output into Pulse
1-Bit Shift
1-Bit Shift of Device
Termination
Stop
Comparison Operation
Block Data Comparison (=)
Block Data Comparison (>)
Block Data Comparison (<)
Arithmetic Operation
Addition of BCD 4-Digit Data (2 Devices)
Addition of BCD 4-Digit Data (3 Devices)
Subtraction of BCD 4-Digit Data (2 Devices)
Subtraction of BCD 4-Digit Data (3 Devices)
Addition of BCD 8-Digit Data (2 Devices)
Addition of BCD 8-Digit Data (3 Devices)
Subtraction of BCD 8-Digit Data (2 Devices)
Subtraction of BCD 8-Digit Data (3 Devices)
Multiplication of BCD 4-Digit Data
Division of BCD 4-Digit Data
Multiplication of BCD 8-Digit Data
Division of BCD 8-Digit Data
Character String Data Connection (2 Devices)
Character String Data Connection (3 Devices)
BIN Block Addition
BIN Block Subtraction
Increment
Decrement
32-Bit bin Increment
32-Bit bin Decrement
Data Conversion
BIN BCD Conversion
BCD bin Conversion
32-Bit BCD bin Conversion
Floating-Point bin Conversion
32-Bit Floating-Point bin Conversion
BIN Floating-Point Conversion
32-Bit bin Floating-Point Conversion
16-Bit bin 32-Bit bin Conversion
32-Bit bin 16-Bit bin Conversion
BIN Gray Code Conversion
32-Bit bin Gray Code Conversion
Gray Code bin Conversion
32-Bit Gray Code bin Conversion
Complement of 2 of 16-Bit bin
Complement of 2 of Floating-Point
Block bin BCD Conversion
Block BCD bin Conversion
Data Transfer
16-Bit Data NOT Transfer
Block Transfer
Same Data Block Transfer
16-Bit Data Exchange
Block Data Exchange
First/Last Byte Exchange
Program Execution Control
Interrupt Disable
Interrupt Enable
I/O Refresh
Logical Operation Commands
Logical Product (2 Devices)
Logical Product (3 Devices)
32-Bit Data Logical Product (2 Devices)
32-Bit Data Logical Product (3 Devices)
Block Data Logical Product
Logical Sum (2 Devices)
Logical Sum (3 Devices)
32-Bit Data Logical Sum (2 Devices)
32-Bit Data Logical Sum (3 Devices)
Block Data Logical Sum
Exclusive or (2 Devices)
Exclusive or (3 Devices)
32-Bit Data Exclusive or (2 Devices)
32-Bit Data Exclusive or (3 Devices)
Block Data Exclusive or
NOT Exclusive or (2 Devices)
NOT Exclusive or (3 Devices)
32-Bit Data NOT Exclusive or (2 Devices)
32-Bit Data NOT Exclusive or (3 Devices)
Block Data NOT Exclusive or
Rotation
Right Rotation (Carry Flag Not Included)
Right Rotation (Carry Flag Included)
Left Rotation (Carry Flag Not Included)
Left Rotation (Carry Flag Included)
32-Bit Data Right Rotation (Carry Flag Not Included)
32-Bit Data Right Rotation (Carry Flag Included)
32-Bit Data Left Rotation (Carry Flag Not Included)
32-Bit Data Left Rotation (Carry Flag Included)
Shift
N-Bit Right Shift
N-Bit Left Shift
N-Bit Data 1-Bit Right Shift
N-Bit Data 1-Bit Left Shift
1-Word Right Shift
1-Word Left Shift
Bit Processing
Bit Set of Word Device
Bit Reset of Word Device
Bit Test of Word Device
Bit Test of 32-Bit Data
Bit Device Batch Reset
Data Processing
Data Search
32-Bit Data Search
Bit Check
32-Bit Data Bit Check
Decode
Encode
7-Segment Decode
4-Bit Disconnection of 16-Bit Data
4-Bit Connection of 16-Bit Data
Bit Disconnection of any Data
Bit Connection of any Data
Byte Unit Data Disconnection
Byte Unit Data Connection
Data Maximum Value Retrieval
32-Bit Data Maximum Value Retrieval
Data Minimum Value Retrieval
32-Bit Data Minimum Value Retrieval
Data Sort
32-Bit Data Sort
Total Value Calculation
32-Bit Total Value Calculation
Structuring
Refresh
Buffer Memory Access
Intelligent Function Module 1-Word Data Read
Intelligent Function Module 2-Word Data Read
Intelligent Function Module 1-Word Data Write
Intelligent Function Module 2-Word Data Write
Character String Processing
Bin
32-Bit bin Decimal ASCII Conversion
Decimal ASCII bin Conversion
Hexadecimal ASCII bin Conversion
Hexadecimal ASCII 32-Bit bin Conversion
Decimal ASCII BCD 4-Digit Conversion
Decimal ASCII BCD 8-Digit Conversion
Device Comment Data Read
Character String Length Detection
Bin
32-Bit bin Character String Conversion
Character String bin Conversion
Character String 32-Bit bin Conversion
Floating-Point Character String Conversion
Character String Floating-Point Conversion
BIN ASCII Conversion
ASCII bin Conversion
Fetch from Character String Right Side
Fetch from Character String Left Side
Any Data Fetch in Character String
Any Data Replacement in Character String
Character String Search
Floating-Point BCD Decomposition
BCD Format Data Floating-Point
Special Functions
Floating-Point sin Operation
Floating-Point COS Operation
Floating-Point tan Operation
Floating-Point COS Operation
Floating-Point tan Operation
Floating-Point Square Root
Floating-Point Natural Exponential Operation
Floating-Point Natural Logarithm Operation
Random Number Generation
Sequence Change
BCD 4-Digit Square Root
BCD 8-Digit Square Root
BCD Type sin Operation
BCD Type COS Operation
BCD Type tan Operation
BCD Type sin Operation
BCD Type COS Operation
BCD Type tan Operation
Data Control
Upper/Lower Limit Control
32-Bit Data Upper/Lower Limit Control
Dead Band Control
32-Bit Data Dead Band Control
Bit Zone Control
32-Bit Data Bit Zone Control
File Register Block No. Switching
Set of File Register File
Set of Comment File
Clock
Read of Clock Data
Write of Clock Data
Addition of Clock Data
Subtraction of Clock Data
Clock Data Format Conversion (Hour, Minute, Second Second)
Clock Data Format Conversion (Second Hour, Minute, Second)
Program Control
Program Standby
Program Output off Standby
Program Scan Execution Registration
Program Low-Speed Execution Registration
Others
WDT Reset
6 Iec Functions
How the Functions Are Described
Type Conversion Functions
Boolean Type (BOOL) Double Precision Integer Type (DINT) Conversion
Double Precision Integer Type (DINT) Boolean Type (BOOL) Conversion
Double Precision Integer Type (DINT) Real Number Type (REAL) Conversion
Double Precision Integer Type (DINT) Character String Type
(STRING) Conversion
Integer Type (INT) Real Number Type (REAL) Conversion
Integer Type (INT) Character String Type (STRING) Conversion
Real Number Type (REAL) Double Precision Integer Type (DINT) Conversion
Real Number Type (REAL) Integer Type (INT) Conversion
Real Number Type (REAL) Character String Type (STRING) Conversion
Character String Type (STRING) Boolean Type (BOOL) Conversion
Character String Type (STRING) Double Precision Integer Type (DINT) Conversion
Character String Type (STRING) Integer Type (INT) Conversion
Character String Type (STRING) Real Number Type
Numerical Functions (General Functions)
Absolute Value
Square Root
Numeric Functions (Logarithm Functions)
Natural Logarithm
Natural Exponent
Numerical Functions (Trigonometric Functions)
Floating-Point sin Operation
Floating-Point COS Operation
Floating-Point tan Operation
Floating-Point sin Operation
Floating-Point COS Operation
Floating-Point tan Operation
Arithmetic Operation Functions
Addition
Multiplication
Subtraction
Division
Modulus Operation
Natural Exponential
Assignment
Bit Shift Functions
Bit Left Shift
Bit Right Shift
Right Rotation
Left Rotation
Bit Type Boolean Functions
Logical Product
Logical Sum
Exclusive Logical Sum
Logical NOT
Selection Functions
Binary Selection
Maximum Value
Minimum Value
Limiter
Multiplexer
Comparison Functions
Greater than Right Member ( > )
Greater than or Equal to Right Member ( >= )
Equal ( = )
Less than or Equal to Right Member ( <= )
Less than Right Member ( < )
Unequal ( <> )
Character String Functions
Character String Length Acquisition
Acquisition from Start Position of Character String
Acquisition from End of Character String
Acquisition from Specified Position of Character String
Concatenation of Character Strings
Insertion of Character String into Specified Position
Deletion of Character String from Specified Position
Replacement of Character String from Specified Position
Search for Character String from Specified Position
Advertisement
Quick Links
Download this manual
See also:
Installation Manual
,
Manual
Table of
Contents
Previous
Page
Next
Page
1
2
3
4
5
Advertisement
Table of Contents
Need help?
Do you have a question about the MELSEC-l and is the answer not in the manual?
Ask a question
Questions and answers
Related Manuals for Mitsubishi MELSEC-l
Controller Mitsubishi MELSEC L Series User Manual
Cpu module, built-in ethernet function (124 pages)
Controller Mitsubishi MELSEC Q Series Programming Manual
Common instruction 1/2 (1296 pages)
Controller mitsubishi MELSEC Q series User Manual
Programmable controller (204 pages)
Controller Mitsubishi MELSEC Q Series Reference Manual
With melsec communication protocol (532 pages)
Controller Mitsubishi MELSEC-AnS Series Handbook
Transition communications (50 pages)
Controller Mitsubishi MELSEC L Series User Manual
(418 pages)
Controller Mitsubishi MELSEC L Series User Manual
Temperature control module (440 pages)
Controller Mitsubishi MELSEC-Q Series Programming Manual
(236 pages)
Controller Mitsubishi MELSEC-L series Programming Manual
(390 pages)
Controller Mitsubishi MELSEC-L Series Quick Start Manual
(52 pages)
Controller Mitsubishi Melsec-L Series User Manual
Cc-link/lt master module (90 pages)
Controller Mitsubishi Melsec-L Series User Manual
Communication module (428 pages)
Controller Mitsubishi MELSEC-Q Series Programming Manual
Mitsubishi programmable controller (108 pages)
Controller Mitsubishi MELSEC-L Series User Manual
Analog-digital converter module (150 pages)
Controller Mitsubishi MELSEC System Q Manual
(170 pages)
Controller Mitsubishi FX1S Series Programming Manual
Melsec-f (466 pages)
Summarization of Contents
Safety Precautions
Conditions of Use for the Product
Mitsubishi Programmable Controller Usage Conditions
Conditions for using the PLC to prevent serious accidents and ensure fail-safe functions.
Prohibited Applications
List of applications where the product should not be used without authorization.
Introduction to ST Programming
1.1 What is the ST Language?
Defines ST language, its features like text format, operators, and functions.
1.2 Features of ST Program in MELSEC-Q/L Series
Details efficiency, restoration, online changes, multi-language support, and function groups.
1.3 ST Program Creating Procedure
Outlines the general ST programming workflow from project creation to debugging.
System Configuration for ST Programs
2.1 System Configuration Overview
Explains the system configuration for ST program usage.
2.1.1 Applicable CPUs
Lists the CPU modules compatible with ST programs.
2.1.2 Programming Tool for ST Program
Specifies the software package and environment for ST programming.
2.1.3 ST Program Specifications
Explains ST specifications and applicable devices, including program size.
Handling Characters and Numeric Values
3.1 Usable Characters
Details the characters, symbols, and their locations of application in ST programs.
3.2 Data Handling
Defines the types of data used in ST programs and their representation methods.
3.2.1 Data Types
Lists and defines data types like BOOL, INT, DINT, REAL, STRING, ARRAY, STRUCT.
3.2.2 About ANY Type
Explains the ANY type for functions that permit multiple data types for arguments or return values.
3.2.3 Array and Structure
Explains how arrays and structures are used as data in ST programs.
3.3 Data Representation Methods
Explains constants, labels, and devices used as data in ST programs.
3.3.1 Constants
Details how constants are represented in ST programs (Binary, Octal, Hexadecimal).
3.3.2 Labels
Explains the use of labels for data in ST programs, requiring declaration before use.
3.3.3 Devices
Explains how devices of QCPU/LCPU can be used directly in ST programs without labels.
ST Program Expressions
4.1 Assignment Statement
Explains the function of assigning an expression's result to a label or device.
4.2 Operators
Lists usable operators in ST programs and their priorities.
4.3 Control Syntaxes
Covers conditional statements and repeat statements for comparison and repetition.
4.3.2 Conditional Statements
Explains conditional statements for controlling program execution based on conditions.
4.3.3 Repeat Statement
Covers repeat statements for executing code multiple times based on conditions.
4.4 Call of Function Block
Explains how to use user-created Function Blocks (FBs) in ST programs.
4.5 Comment
Explains how to input comments in ST programs using '(*' and '*)' delimiters.
MELSEC Functions
How the Functions Are Described
Explains the manual's format for describing MELSEC functions: definitions, arguments, return values, examples.
5.1 Output Functions
Details functions for outputting data to devices.
5.2 1-Bit Shift
Covers functions for shifting data by one bit.
5.3 Termination Functions
Functions for stopping program execution.
5.4 Comparison Operation
Details functions for comparing data blocks.
5.5 Arithmetic Operation
Details arithmetic operations like addition, subtraction, multiplication, and division.
5.6 Data Conversion
Covers functions for converting data between different formats.
5.7 Data Transfer
Covers functions for transferring data between devices.
5.8 Program Execution Control
Functions for controlling program execution, such as interrupts.
5.9 I/O Refresh
Functions for refreshing I/O devices.
5.10 Logical Operation Commands
Covers logical operations like AND, OR, XOR.
5.11 Rotation
Functions for rotating bits within data.
5.12 Shift Functions
Functions for shifting data bits.
5.13 Bit Processing
Functions for setting, resetting, and testing bits.
5.14 Data Processing
Functions for searching and analyzing data.
5.15 Structuring
Functions related to structuring intelligent function modules.
5.16 Buffer Memory Access
Functions for reading and writing to buffer memory.
5.17 Character String Processing
Functions for manipulating character strings.
5.18 Special Functions
Trigonometric and other special mathematical functions.
5.19 Data Control
Functions for controlling data based on limits or dead bands.
5.20 Clock Functions
Functions for reading and writing clock data.
5.21 Program Control
Functions for controlling program execution status.
5.22 Others
Miscellaneous functions, including watchdog timer reset.
IEC Functions
How the Functions Are Described
Explains the manual's format for describing IEC functions: definitions, arguments, return values, examples.
6.1 Type Conversion Functions
Functions for converting data between types like BOOL, INT, DINT, REAL, STRING.
6.2 Numerical Functions (General Functions)
General numerical functions like absolute value and square root.
6.3 Numeric Functions (Logarithm Functions)
Logarithm functions including natural logarithm and exponent.
6.4 Numerical Functions (Trigonometric Functions)
Trigonometric functions like SIN, COS, TAN, and their inverse operations.
6.5 Arithmetic Operation Functions
Functions for performing arithmetic operations like addition, multiplication, subtraction, division, and modulus.
6.6 Bit Shift Functions
Functions for shifting bits within data.
6.7 Bit Type Boolean Functions
Logical operations on bit type Boolean data.
6.8 Selection Functions
Functions for selecting data based on a condition.
6.9 Comparison Functions
Functions for comparing data values.
6.10 Character String Functions
Functions for manipulating character strings.
Error List
Conversion Error List
Lists errors occurring during ST program conversion with causes and corrective actions.
Appendices
Appendix 1: Character Strings Not Usable as Labels/FB Names
Lists character strings that cannot be used for labels and FB names in ST programming.
Appendix 2: ST Instruction Table for GX Developer and GX Works2
Compares ST instructions usable in GX Developer vs. GX Works2.
Warranty Information
Gratis Warranty Term and Range
Details the warranty period and scope for product failures.
Onerous Repair Term After Discontinuation of Production
Specifies repair acceptance period after product production discontinuation.
Overseas Service
Information on obtaining repairs through Mitsubishi's overseas FA Centers.
Exclusion of Loss in Opportunity and Secondary Loss
Mitsubishi's liability limitations regarding consequential damages.
Changes in Product Specifications
Disclaimer regarding potential changes in product specifications.
Product Application
Conditions for applying the MELSEC controller, excluding high-risk applications.
Table of Contents
Print
Rename the bookmark
Delete bookmark?
Delete from my manuals?
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL
Need help?
Do you have a question about the MELSEC-l and is the answer not in the manual?
Questions and answers