Mitsubishi Electronics FXCPU manual

1
2
3
4
5
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

Go to page of

A good user manual

The rules should oblige the seller to give the purchaser an operating instrucion of Mitsubishi Electronics FXCPU, along with an item. The lack of an instruction or false information given to customer shall constitute grounds to apply for a complaint because of nonconformity of goods with the contract. In accordance with the law, a customer can receive an instruction in non-paper form; lately graphic and electronic forms of the manuals, as well as instructional videos have been majorly used. A necessary precondition for this is the unmistakable, legible character of an instruction.

What is an instruction?

The term originates from the Latin word „instructio”, which means organizing. Therefore, in an instruction of Mitsubishi Electronics FXCPU one could find a process description. An instruction's purpose is to teach, to ease the start-up and an item's use or performance of certain activities. An instruction is a compilation of information about an item/a service, it is a clue.

Unfortunately, only a few customers devote their time to read an instruction of Mitsubishi Electronics FXCPU. A good user manual introduces us to a number of additional functionalities of the purchased item, and also helps us to avoid the formation of most of the defects.

What should a perfect user manual contain?

First and foremost, an user manual of Mitsubishi Electronics FXCPU should contain:
- informations concerning technical data of Mitsubishi Electronics FXCPU
- name of the manufacturer and a year of construction of the Mitsubishi Electronics FXCPU item
- rules of operation, control and maintenance of the Mitsubishi Electronics FXCPU item
- safety signs and mark certificates which confirm compatibility with appropriate standards

Why don't we read the manuals?

Usually it results from the lack of time and certainty about functionalities of purchased items. Unfortunately, networking and start-up of Mitsubishi Electronics FXCPU alone are not enough. An instruction contains a number of clues concerning respective functionalities, safety rules, maintenance methods (what means should be used), eventual defects of Mitsubishi Electronics FXCPU, and methods of problem resolution. Eventually, when one still can't find the answer to his problems, he will be directed to the Mitsubishi Electronics service. Lately animated manuals and instructional videos are quite popular among customers. These kinds of user manuals are effective; they assure that a customer will familiarize himself with the whole material, and won't skip complicated, technical information of Mitsubishi Electronics FXCPU.

Why one should read the manuals?

It is mostly in the manuals where we will find the details concerning construction and possibility of the Mitsubishi Electronics FXCPU item, and its use of respective accessory, as well as information concerning all the functions and facilities.

After a successful purchase of an item one should find a moment and get to know with every part of an instruction. Currently the manuals are carefully prearranged and translated, so they could be fully understood by its users. The manuals will serve as an informational aid.

Table of contents for the manual

  • Page 1

    FXCPU Structured Programming Manu al [Application Functions][...]

  • Page 2

    [...]

  • Page 3

    1 FXCPU Structured Programming Manual (Application Functions) FXCPU Structured Programming Manual (Application Functions) Foreword This manual contains text, diagrams and explanations which will guide the reader through the safe and correct installation, use, and operation of the FX Series function for structured programs. It should be read and und[...]

  • Page 4

    2 FXCPU Structured Programming Manual (Application Functions) Outline Precautions • This manual provides information for the use of the FX Se ries Programmable Controllers. The manual has been written to be used by trained and competent personnel . The definition of such a person or persons is as follows; a) Any engineer who is responsible for th[...]

  • Page 5

    3 Table of Contents FXCPU Structured Programming Manual (Application Functions) Table of Contents Positioning of This Manual..... .............. .............. ........... .............. .............. ........... .............. .... .. 7 Related Manuals ............. ............ .............. ........... .............. .............. ...........[...]

  • Page 6

    4 Table of Contents FXCPU Structured Programming Manual (Application Functions) 5. Applied Functions 36 5.1 Type Conversion Functions ................................................................................................. ......... 36 5.1.1 BOOL_TO_INT(_E) ............. ........... .............. .............. ........... .............. [...]

  • Page 7

    5 Table of Contents FXCPU Structured Programming Manual (Application Functions) 5.2 Standard Functions Of One Numeric Variable ............................................................................ 134 5.2.1 ABS(_E).............. .......................................... ............................................... .......... .......... .[...]

  • Page 8

    6 Table of Contents FXCPU Structured Programming Manual (Application Functions) 6. Standard Function Blocks 206 6.1 R_TRIG(_E) ............................................................................. ................................... ................ 206 6.2 F_TRIG(_E)..........................................................................[...]

  • Page 9

    7 FXCPU Structured Programming Manual (Application Functions) Positioning of This Manual This manual explains application functions for struct ured programs provided by GX Works2. Refer to other manuals for devices, parameters and sequence instructions. Refer to each corresponding manual for analog, communication, positioning control and special un[...]

  • Page 10

    8 FXCPU Structured Programming Manual (Application Functions) 2. When using FX 1S /FX 1N /FX U /FX 1NC /FX 2NC PLCs (Additional Manual) (Additional Manual) (Additional Manual) (Additional Manual) QCPU/FXCPU Structured Programming Manual (Fundamentals) This manual explains programming methods, specifications, functions, etc. required to create struc[...]

  • Page 11

    9 FXCPU Structured Programming Manual (Application Functions) 3. When using FX 0 /FX 0S /FX 0N /FX U /FX 2C PLCs (Additional Manual) (Additional Manual) (Additional Manual) (Additional Manual) (Additional Manual) QCPU/FXCPU Structured Programming Manual (Fundamentals) This manual explains programming methods, specifications, functions, etc. require[...]

  • Page 12

    10 FXCPU Structured Programming Manual (Application Functions) Related Manuals This manual explains devices and parameters fo r structured programs provided by GX Works2. Refer to other manuals for sequence instructions and applied functions. This chapter introduces only reference manuals for this manual and manuals which describe the hardware info[...]

  • Page 13

    11 FXCPU Structured Programming Manual (Application Functions) FX 1S /FX 1N /FX 2N /FX 1NC /FX 2NC PLCs Programming FX 3G /FX 3U /FX 3UC User's Manual- Analog Cont rol Edit ion JY997D16701 Additiona l Manual Detaileds a bout the anal og special fu nction bloc k (FX 3U -4AD, FX 3U -4DA, FX 3UC -4AD) a nd analog special adap ter (FX 3U -****- AD[...]

  • Page 14

    12 FXCPU Structured Programming Manual (Application Functions) FX 0 /FX 0S /FX 0N /FX U /FX 2C PLCs [whose production is finished] Manuals of models whose prod uction is finished Production is finished for FX 0 /FX 0S /FX 0N /FX U /FX 2C PLCs. Manual name Manual number Supplie d with produ ct or Additional Manual Contents Model name code PLC main u[...]

  • Page 15

    13 FXCPU Structured Programming Manual (Application Functions) Generic Names and Abbreviations Used in Manuals Abbreviation /generic name Name PLCs FX 3U Series o r FX 3U PLC Generic name of FX 3U Series PLCs FX 3UC Series or F X 3UC PLC Generic name of FX 3UC Series PLCs FX 3G Series or FX 3G PLC Generic name of FX 3G Series PLCs FX 2N Series o r [...]

  • Page 16

    1 Outline 1.1 Outline of Structured Pro grams and Programming 14 FXCPU Structured Programming Manual (Application Functions) 1. Outline This manual explains applied functions for structured programs provided by GX Works2. Refer to a different manual for devices, parameters and sequence instructions. Refer to the following manual for labels, data ty[...]

  • Page 17

    1 Outline 1.2 PLC Series and Programming Soft ware Version 15 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 1.1.2 Programming languages The following p[...]

  • Page 18

    1 Outline 1.3 Cautions on Creati on of Fundamental Programs 16 FXCPU Structured Programming Manual (Application Functions) 1.3 Cautions on Creation of Fundamental Programs This section explains cautions on programming. Refer to the following manual for cautions on structured programs and programming languages: → Q/FX Structured Progr amming Manua[...]

  • Page 19

    1 Outline 1.3 Cautions on Creati on of Fundamental Programs 17 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 1.3.2 Double output (double coil) operatio[...]

  • Page 20

    1 Outline 1.3 Cautions on Creati on of Fundamental Programs 18 FXCPU Structured Programming Manual (Application Functions) 1.3.3 Circuits not available in struct ured ladder programs and countermeasures 1. Bridge circui t A circuit in which the current flows in both directions should be changed as shown in the right figure (so that a circuit withou[...]

  • Page 21

    1 Outline 1.3 Cautions on Creati on of Fundamental Programs 19 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 1. Program containing many flags (Example [...]

  • Page 22

    1 Outline 1.3 Cautions on Creati on of Fundamental Programs 20 FXCPU Structured Programming Manual (Application Functions) 2. Introduction of a method to use flags in an y positions other than positions just under sequence instructions If two or more sequence instructions are programmed, general flags turn ON or OFF when each corresponding instruct[...]

  • Page 23

    1 Outline 1.3 Cautions on Creati on of Fundamental Programs 21 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 1.3.5 Handling of operation error flag Whe[...]

  • Page 24

    2 Function List 2.1 Type Conversion Functions 22 FXCPU Structured Programming Manual (Application Functions) 2. Function List This chapter introduces a list of functions available in programming. 2.1 Type Conversion Functions Function name Function Applicable PLC Reference FX 3U(C) FX 3G FX 2N(C) FX 1N(C) FX 1S FX U /FX 2C FX 0N FX 0(S) BOOL_TO_INT[...]

  • Page 25

    2 Function List 2.1 Type Conversion Functions 23 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses REAL_TO _INT(_E) Converts float (si ngle precis ion) dat[...]

  • Page 26

    2 Function List 2.2 Standard Fu nctions Of One Numeric Variable 24 FXCPU Structured Programming Manual (Application Functions) 2.2 Standard Functions Of One Numeric Variable 2.3 Standard Arithmetic Functions Function name Function Applicable PLC Reference FX 3U(C) FX 3G FX 2N(C) FX 1N(C) FX 1S FX U /FX 2C FX 0N FX 0(S) ABS(_E) O btains t he absolu [...]

  • Page 27

    2 Function List 2.4 Standard Bit Sh ift Functions 25 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 2.4 Standard Bit Shift Functions 2.5 Standard Bitwis[...]

  • Page 28

    2 Function List 2.7 Standard Comparison Functions 26 FXCPU Structured Programming Manual (Application Functions) 2.7 Standard Comparison Functions 2.8 Standard Character String Functions 2.9 Functions Of Time Data Types Function name Function Applicable PLC Reference FX 3U(C) FX 3G FX 2N(C) FX 1N(C) FX 1S FX U /FX 2C FX 0N FX 0(S) GT_E Compares d a[...]

  • Page 29

    2 Function List 2.10 Standard Function Blocks 27 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 2.10 Standard Function Blocks Function name Function App[...]

  • Page 30

    3 Function Constr uction 3.1 Applied Functi on Expression and Execution Type 28 FXCPU Structured Programming Manual (Application Functions) 3. Function Construction This chapter explains the construction of applied functions. 3.1 Applied Function Expression and Execution Type Applied function and argument • The name expressing the contents is giv[...]

  • Page 31

    3 Function Constr uction 3.2 Labels 29 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 3.2 Labels Label types Labels are classified into two types, globa[...]

  • Page 32

    3 Function Constr uction 3.2 Labels 30 FXCPU Structured Programming Manual (Application Functions) Constant description method The table below the description method required to set a constant to a label. Data type The label data type is basic or universal. • The table below shows a list of basic data types. Constant type Description method Examp[...]

  • Page 33

    3 Function Constr uction 3.2 Labels 31 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses • The universal data type indicates data type of a label which c[...]

  • Page 34

    3 Function Constr uction 3.3 Device and Add ress 32 FXCPU Structured Programming Manual (Application Functions) 3.3 Device and Address Devices can be described in two methods, device method and address method. Device method In this method, a device is described using the device name and device number. Address method This method is defined in IEC611[...]

  • Page 35

    3 Function Constr uction 3.4 EN and ENO 33 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 3.4 EN and ENO Execution of an instruction can be controlled w[...]

  • Page 36

    4 How to Read Explana tion of Function s 34 FXCPU Structured Programming Manual (Application Functions) 4. How to Read Explanation of Functions Function explanation pages have the following configuration. 1) 2) 3) 4) * The above page is prepared for explanation, and is dif ferent from the actual page. 6) 7) 5)[...]

  • Page 37

    4 How to Read Explana tion of Function s 35 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 1) Indicates the chapter/section/subsection number and instru[...]

  • Page 38

    5 Applied Functions 5.1 Type Conversion Functions 36 FXCPU Structured Programming Manual (Application Functions) 5. Applied Functions This chapter explains the operation outline of each appli ed function, symbols, I/O data type, equivalent circuit in sequence instructions, target models, cautions and program examples. Refer to the following manual [...]

  • Page 39

    5 Applied Functions 5.1 Type Conversion Functions 37 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, bit data stored in [...]

  • Page 40

    5 Applied Functions 5.1 Type Conversion Functions 38 FXCPU Structured Programming Manual (Application Functions) 5.1.2 BOOL_TO_DINT(_E) Outline This function converts bit data into double word [signed] data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) [...]

  • Page 41

    5 Applied Functions 5.1 Type Conversion Functions 39 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this prog ram, bit data st ored i[...]

  • Page 42

    5 Applied Functions 5.1 Type Conversion Functions 40 FXCPU Structured Programming Manual (Application Functions) 5.1.3 BOOL_TO_STR(_E) Outline This function converts bit data into string data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. [...]

  • Page 43

    5 Applied Functions 5.1 Type Conversion Functions 41 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, bit data stored in [...]

  • Page 44

    5 Applied Functions 5.1 Type Conversion Functions 42 FXCPU Structured Programming Manual (Application Functions) 5.1.4 BOOL_TO_WORD(_E) Outline This function converts bit data into word [unsigned]/bit st ring [16-bit] data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O varia[...]

  • Page 45

    5 Applied Functions 5.1 Type Conversion Functions 43 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, bit data stored in [...]

  • Page 46

    5 Applied Functions 5.1 Type Conversion Functions 44 FXCPU Structured Programming Manual (Application Functions) 5.1.5 BOOL_TO_DWORD(_E) Outline This function conv erts bit data in to double word [unsig ned]/bit str ing [32-bit] data , and output s the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functio[...]

  • Page 47

    5 Applied Functions 5.1 Type Conversion Functions 45 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, bit data stored in [...]

  • Page 48

    5 Applied Functions 5.1 Type Conversion Functions 46 FXCPU Structured Programming Manual (Application Functions) 5.1.6 BOOL_TO_TIME(_E) Outline This function converts bit data into time data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. E[...]

  • Page 49

    5 Applied Functions 5.1 Type Conversion Functions 47 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, bit data stored in [...]

  • Page 50

    5 Applied Functions 5.1 Type Conversion Functions 48 FXCPU Structured Programming Manual (Application Functions) 5.1.7 INT_TO_DINT(_E) Outline This function converts wo rd [signed] da ta into double word [signed] data, and outputs the dat a obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables[...]

  • Page 51

    5 Applied Functions 5.1 Type Conversion Functions 49 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, word [signed] data [...]

  • Page 52

    5 Applied Functions 5.1 Type Conversion Functions 50 FXCPU Structured Programming Manual (Application Functions) 5.1.8 DINT_TO_INT(_E) Outline This function converts d ouble word [signed] data into word [signed] data, and outputs the dat a obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables [...]

  • Page 53

    5 Applied Functions 5.1 Type Conversion Functions 51 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, double word [signed[...]

  • Page 54

    5 Applied Functions 5.1 Type Conversion Functions 52 FXCPU Structured Programming Manual (Application Functions) 5.1.9 INT_TO_BOOL(_E) Outline This function converts word [signed] data into bit data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are desc[...]

  • Page 55

    5 Applied Functions 5.1 Type Conversion Functions 53 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, word [signed] data [...]

  • Page 56

    5 Applied Functions 5.1 Type Conversion Functions 54 FXCPU Structured Programming Manual (Application Functions) 5.1.10 DINT_TO_BOOL(_E) Outline This function converts double word [signed] data into bit data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( )[...]

  • Page 57

    5 Applied Functions 5.1 Type Conversion Functions 55 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this pro gram, double word [signe[...]

  • Page 58

    5 Applied Functions 5.1 Type Conversion Functions 56 FXCPU Structured Programming Manual (Application Functions) 5.1.11 INT_TO_REAL(_E) Outline This function converts word [signed] data into float (single precision) data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variabl[...]

  • Page 59

    5 Applied Functions 5.1 Type Conversion Functions 57 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this pr ogram, word [signed] data[...]

  • Page 60

    5 Applied Functions 5.1 Type Conversion Functions 58 FXCPU Structured Programming Manual (Application Functions) 5.1.12 DINT_TO_REA L(_E) Outline This function co nverts double word [signed] dat a into float (sin gle precision) da ta, and output s the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of function[...]

  • Page 61

    5 Applied Functions 5.1 Type Conversion Functions 59 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, double word [signed[...]

  • Page 62

    5 Applied Functions 5.1 Type Conversion Functions 60 FXCPU Structured Programming Manual (Application Functions) 5.1.13 INT_TO_STR(_E) Outline This function converts word [signed] data into string data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are d[...]

  • Page 63

    5 Applied Functions 5.1 Type Conversion Functions 61 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Error An operation error occurs in the follo wing ca[...]

  • Page 64

    5 Applied Functions 5.1 Type Conversion Functions 62 FXCPU Structured Programming Manual (Application Functions) 5.1.14 DINT_TO_STR(_E) Outline This function converts doubl e word [signed ] data into string da ta, and output s the data obtain ed by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables ins[...]

  • Page 65

    5 Applied Functions 5.1 Type Conversion Functions 63 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) Use the function having "_E" i[...]

  • Page 66

    5 Applied Functions 5.1 Type Conversion Functions 64 FXCPU Structured Programming Manual (Application Functions) 5.1.15 INT_TO_WORD(_E) Outline This function converts word [signed] data into word [unsigned]/bit string [16-bit] data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, [...]

  • Page 67

    5 Applied Functions 5.1 Type Conversion Functions 65 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, word [signed ] data[...]

  • Page 68

    5 Applied Functions 5.1 Type Conversion Functions 66 FXCPU Structured Programming Manual (Application Functions) 5.1.16 DINT_TO_WORD(_E) Outline This function conve rts double word [sig ned] data into word [u nsigned]/b it string [16-bit] data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of[...]

  • Page 69

    5 Applied Functions 5.1 Type Conversion Functions 67 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, double word [signed[...]

  • Page 70

    5 Applied Functions 5.1 Type Conversion Functions 68 FXCPU Structured Programming Manual (Application Functions) 5.1.17 INT_TO_DWORD(_E) Outline This function conve rts word [signed] da ta into double word [uns igned]/bit string [32-bit] data, an d outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of[...]

  • Page 71

    5 Applied Functions 5.1 Type Conversion Functions 69 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, word [signed] data [...]

  • Page 72

    5 Applied Functions 5.1 Type Conversion Functions 70 FXCPU Structured Programming Manual (Application Functions) 5.1.18 DINT_TO_DWORD(_E) Outline This functio n converts d ouble word [signed] da ta into doub le word [ unsigned]/bi t string [32 -bit] data , and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In ex[...]

  • Page 73

    5 Applied Functions 5.1 Type Conversion Functions 71 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, do uble word [sig n[...]

  • Page 74

    5 Applied Functions 5.1 Type Conversion Functions 72 FXCPU Structured Programming Manual (Application Functions) 5.1.19 INT_TO_BCD(_E) Outline This function converts word [signed] data into BCD data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are desc[...]

  • Page 75

    5 Applied Functions 5.1 Type Conversion Functions 73 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this progra m, word [signed] data[...]

  • Page 76

    5 Applied Functions 5.1 Type Conversion Functions 74 FXCPU Structured Programming Manual (Application Functions) 5.1.20 DINT_TO_BCD(_E) Outline This function converts double word [signed] data into BCD data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) [...]

  • Page 77

    5 Applied Functions 5.1 Type Conversion Functions 75 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Error An operation error occurs when the value store[...]

  • Page 78

    5 Applied Functions 5.1 Type Conversion Functions 76 FXCPU Structured Programming Manual (Application Functions) 5.1.21 INT_TO_TIME(_E ) Outline This function converts word [signed] data into time data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are d[...]

  • Page 79

    5 Applied Functions 5.1 Type Conversion Functions 77 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, word [sign ed] data[...]

  • Page 80

    5 Applied Functions 5.1 Type Conversion Functions 78 FXCPU Structured Programming Manual (Application Functions) 5.1.22 DINT_TO_TIME(_E) Outline This function converts double word [signed] data into time data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( [...]

  • Page 81

    5 Applied Functions 5.1 Type Conversion Functions 79 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, double word [signed[...]

  • Page 82

    5 Applied Functions 5.1 Type Conversion Functions 80 FXCPU Structured Programming Manual (Application Functions) 5.1.23 REAL_TO_INT(_E) Outline This function converts float (single precision) data into word [signed] data, and outputs the data ob tained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variab[...]

  • Page 83

    5 Applied Functions 5.1 Type Conversion Functions 81 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, float (single preci[...]

  • Page 84

    5 Applied Functions 5.1 Type Conversion Functions 82 FXCPU Structured Programming Manual (Application Functions) 5.1.24 REAL_TO_DINT(_ E) Outline This function co nverts float (sing le precision) data into double wo rd [signed] da ta, and outputs t he data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of function[...]

  • Page 85

    5 Applied Functions 5.1 Type Conversion Functions 83 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, float (single preci[...]

  • Page 86

    5 Applied Functions 5.1 Type Conversion Functions 84 FXCPU Structured Programming Manual (Application Functions) 5.1.25 REAL_TO_STR(_E) Outline This function c onverts float (single precision ) data into st ring data, a nd outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables [...]

  • Page 87

    5 Applied Functions 5.1 Type Conversion Functions 85 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 2) The string data obtained by conversion is output [...]

  • Page 88

    5 Applied Functions 5.1 Type Conversion Functions 86 FXCPU Structured Programming Manual (Application Functions) Error An operation error occurs in the following cases. T he error flag M8067 turns ON, and D8067 st ores the error code. 1) When the value stored in a device specified in is outside the following range: 0, ±2 -126 ≤ (Value of device [...]

  • Page 89

    5 Applied Functions 5.1 Type Conversion Functions 87 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.26 WORD_TO_BOOL(_E) Outline This function conver[...]

  • Page 90

    5 Applied Functions 5.1 Type Conversion Functions 88 FXCPU Structured Programming Manual (Application Functions) Program example In this program, word [unsigned]/bit string [16-bit] data stored in a device specified in is converted into bit data, and the data obtained by conversion is output to a device specified in . 1) Function without EN/ENO(WOR[...]

  • Page 91

    5 Applied Functions 5.1 Type Conversion Functions 89 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.27 DWORD_TO_BOOL(_E) Outline This function conv [...]

  • Page 92

    5 Applied Functions 5.1 Type Conversion Functions 90 FXCPU Structured Programming Manual (Application Functions) Program example In this program, double word [unsigned]/bit string [32-bit] data stored in a device specified in is converted into bit data, and the data obtained by conversion is output to a device specified in . 1) Function without EN/[...]

  • Page 93

    5 Applied Functions 5.1 Type Conversion Functions 91 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.28 WORD_TO_INT(_E) Outline This function convert[...]

  • Page 94

    5 Applied Functions 5.1 Type Conversion Functions 92 FXCPU Structured Programming Manual (Application Functions) Program example In this progr am, word [uns igned]/bit str ing [16-bit] data stored in a device spec ified in is converted int o word [signed] data, and the data obtained by conversion is output to a device specified in . 1) Function wit[...]

  • Page 95

    5 Applied Functions 5.1 Type Conversion Functions 93 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.29 WORD_TO_DIN T(_E) Outline This function conve[...]

  • Page 96

    5 Applied Functions 5.1 Type Conversion Functions 94 FXCPU Structured Programming Manual (Application Functions) Program example In this progr am, word [uns igned]/bit str ing [16-bit] data stored in a device spec ified in is converted int o double word [signed] data, and the data obtained by conversion is output to a device specified in . 1) Funct[...]

  • Page 97

    5 Applied Functions 5.1 Type Conversion Functions 95 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.30 DWORD_TO_INT(_ E) Outline This function conve[...]

  • Page 98

    5 Applied Functions 5.1 Type Conversion Functions 96 FXCPU Structured Programming Manual (Application Functions) Program example In this program, double word [unsigned]/bit string [32-bit] data stored in a device specified in is converted into word [signed] data, and the data obtained by conversion is output to a device specified in . 1) Function w[...]

  • Page 99

    5 Applied Functions 5.1 Type Conversion Functions 97 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.31 DWORD_TO_DINT(_E) Outline This functio n conv[...]

  • Page 100

    5 Applied Functions 5.1 Type Conversion Functions 98 FXCPU Structured Programming Manual (Application Functions) Program example In this program, double word [unsigned]/bit string [32-bit] data stored in a device specified in is converted into double word [signed] data, and the data obtained by conversion is output to a device specified in . 1) Fun[...]

  • Page 101

    5 Applied Functions 5.1 Type Conversion Functions 99 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.32 WORD_TO_DWORD(_E) Outline This function conve[...]

  • Page 102

    5 Applied Functions 5.1 Type Conversion Functions 100 FXCPU Structured Programming Manual (Application Functions) Program example In this progr am, word [uns igned]/bit str ing [16-bit] data stored in a device spec ified in is converted int o double word [unsigned] /bit string [32-bit] data , and the data ob tained by conversio n is output to a dev[...]

  • Page 103

    5 Applied Functions 5.1 Type Conversion Functions 101 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.33 DWORD_TO_WORD(_E) Outline This function con [...]

  • Page 104

    5 Applied Functions 5.1 Type Conversion Functions 102 FXCPU Structured Programming Manual (Application Functions) Program example In this program, double word [unsigned]/bit string [32-bit] data stored in a device specified in is converted into word [ unsigned]/b it string [16-b it] data, and the data obtained by c onversion is o utput to a d evice[...]

  • Page 105

    5 Applied Functions 5.1 Type Conversion Functions 103 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.34 WORD_TO_TIM E(_E) Outline This function conv[...]

  • Page 106

    5 Applied Functions 5.1 Type Conversion Functions 104 FXCPU Structured Programming Manual (Application Functions) Program example In this progr am, word [uns igned]/bit str ing [16-bit] data stored in a device spec ified in is converted int o time data, and the data obtained by conversion is output to a device specified in . 1) Function without EN/[...]

  • Page 107

    5 Applied Functions 5.1 Type Conversion Functions 105 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.35 DWORD_TO_TIME(_E ) Outline This function con[...]

  • Page 108

    5 Applied Functions 5.1 Type Conversion Functions 106 FXCPU Structured Programming Manual (Application Functions) Program example In this program, double word [unsigned]/bit string [32-bit] data stored in a device specified in is converted into time data, and the data obtained by conversion is output to a device specified in . 1) Function without E[...]

  • Page 109

    5 Applied Functions 5.1 Type Conversion Functions 107 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.36 STR_TO_BOOL(_E) Outline This function conver[...]

  • Page 110

    5 Applied Functions 5.1 Type Conversion Functions 108 FXCPU Structured Programming Manual (Application Functions) Program example In this program, string data stored in a d evice specified in is converted into bit data, and t he data obtained by conversion is output to a device specified in . 1) Function without EN/ENO(STR_TO_BOOL) 2) Function with[...]

  • Page 111

    5 Applied Functions 5.1 Type Conversion Functions 109 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.37 STR_TO_INT(_E) Outline This function convert[...]

  • Page 112

    5 Applied Functions 5.1 Type Conversion Functions 110 FXCPU Structured Programming Manual (Application Functions) Error 1) When the sign data (low-order byte) of the 1st word stored in a device specified in is any other than "20H (space)" or "2DH (-)" (Error code: K6706) 2) When the ASCII code for each place (digit) stored in to[...]

  • Page 113

    5 Applied Functions 5.1 Type Conversion Functions 111 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.38 STR_TO_DINT(_E ) Outline This function conve[...]

  • Page 114

    5 Applied Functions 5.1 Type Conversion Functions 112 FXCPU Structured Programming Manual (Application Functions) Error 1) When the sign data (low-order byte) of the 1st word stored in a device specified in is any other than "20H (space)" or "2DH (-)" (Error code: K6706) 2) When the ASCII code for each place (digit) stored in to[...]

  • Page 115

    5 Applied Functions 5.1 Type Conversion Functions 113 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.1.39 STR_TO_REAL(_E) Outline This function c onve[...]

  • Page 116

    5 Applied Functions 5.1 Type Conversion Functions 114 FXCPU Structured Programming Manual (Application Functions) b) In the case of exponent format 3) With regard to string data, six digits excluding the sign, decimal point and exponent part are valid, and the 7th and later digits are discarded during conversion. a) In the case of decimal format b)[...]

  • Page 117

    5 Applied Functions 5.1 Type Conversion Functions 115 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Error An operatio n error occurs in the following c[...]

  • Page 118

    5 Applied Functions 5.1 Type Conversion Functions 116 FXCPU Structured Programming Manual (Application Functions) 5.1.40 STR_TO_TIME(_E) Outline This function converts string data into time data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are describe[...]

  • Page 119

    5 Applied Functions 5.1 Type Conversion Functions 117 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Error An operatio n error occurs in the following c[...]

  • Page 120

    5 Applied Functions 5.1 Type Conversion Functions 118 FXCPU Structured Programming Manual (Application Functions) 5.1.41 BCD_TO_INT(_E) Outline This function converts BCD data into word [signed] data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are des[...]

  • Page 121

    5 Applied Functions 5.1 Type Conversion Functions 119 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this example , BCD data stored i[...]

  • Page 122

    5 Applied Functions 5.1 Type Conversion Functions 120 FXCPU Structured Programming Manual (Application Functions) 5.1.42 BCD_TO_DINT(_E) Outline This function converts BCD data into double word [signed] data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( )[...]

  • Page 123

    5 Applied Functions 5.1 Type Conversion Functions 121 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this example, BCD data stored in[...]

  • Page 124

    5 Applied Functions 5.1 Type Conversion Functions 122 FXCPU Structured Programming Manual (Application Functions) 5.1.43 TIME_TO_BOOL(_E) Outline This function converts time data into bit data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described.[...]

  • Page 125

    5 Applied Functions 5.1 Type Conversion Functions 123 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, time data stored i[...]

  • Page 126

    5 Applied Functions 5.1 Type Conversion Functions 124 FXCPU Structured Programming Manual (Application Functions) 5.1.44 TIME_TO_INT(_E) Outline This function converts time data into word [signed] data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are d[...]

  • Page 127

    5 Applied Functions 5.1 Type Conversion Functions 125 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, time data stored i[...]

  • Page 128

    5 Applied Functions 5.1 Type Conversion Functions 126 FXCPU Structured Programming Manual (Application Functions) 5.1.45 TIME_TO_DINT(_E) Outline This function converts time data into double word [signed] data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ([...]

  • Page 129

    5 Applied Functions 5.1 Type Conversion Functions 127 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, time data stored i[...]

  • Page 130

    5 Applied Functions 5.1 Type Conversion Functions 128 FXCPU Structured Programming Manual (Application Functions) 5.1.46 TIME_TO_STR(_E) Outline This function converts time data into string data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are describe[...]

  • Page 131

    5 Applied Functions 5.1 Type Conversion Functions 129 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, time data stored i[...]

  • Page 132

    5 Applied Functions 5.1 Type Conversion Functions 130 FXCPU Structured Programming Manual (Application Functions) 5.1.47 TIME_TO_WORD(_E) Outline This function converts time data into word [unsigned]/bit string [16-bit] data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O var[...]

  • Page 133

    5 Applied Functions 5.1 Type Conversion Functions 131 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, time data stored i[...]

  • Page 134

    5 Applied Functions 5.1 Type Conversion Functions 132 FXCPU Structured Programming Manual (Application Functions) 5.1.48 TIME_TO_DWORD(_E) Outline This function converts time data into doub le word [unsigned]/bit string [32-bit ] data, and outputs the data obtained by conversion. 1. Format *1. Output variable 2. Set da ta In explanation of function[...]

  • Page 135

    5 Applied Functions 5.1 Type Conversion Functions 133 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, time data st ored [...]

  • Page 136

    5.2 Standard Fu nctions Of One Numeric Variable 134 FXCPU Structured Programming Manual (Application Functions) 5.2 Standard Functions Of One Numeric Variable 5.2.1 ABS(_E) Outline This function obtains the absolute value, and outputs it. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described.[...]

  • Page 137

    5.2 Standard Fu nctions Of One Numeric Variable 135 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, the absolute value i[...]

  • Page 138

    5.3 Standard Arithmetic Functions 136 FXCPU Structured Programming Manual (Application Functions) 5.3 Standard Arithmetic Functions 5.3.1 ADD_E Outline This function performs addition using two values (A + B = C), and outputs the operation result. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are d[...]

  • Page 139

    5.3 Standard Arithmetic Functions 137 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) When handling 32-bit data in structured programs, y ou [...]

  • Page 140

    5.3 Standard Arithmetic Functions 138 FXCPU Structured Programming Manual (Application Functions) 5.3.2 SUB_E Outline This function performs subtraction using two values (A - B = C), and outputs the operation result. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of functi[...]

  • Page 141

    5.3 Standard Arithmetic Functions 139 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) When handling 32-bit data in structured programs, y ou [...]

  • Page 142

    5.3 Standard Arithmetic Functions 140 FXCPU Structured Programming Manual (Application Functions) 5.3.3 MUL_E Outline This function performs multiplication using two values (A × B = C), and outputs the operation result. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of fu[...]

  • Page 143

    5.3 Standard Arithmetic Functions 141 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this progra m, multiplication is performed u sin[...]

  • Page 144

    5.3 Standard Arithmetic Functions 142 FXCPU Structured Programming Manual (Application Functions) 5.3.4 DIV_E Outline This function performs division using two values (A / B = C … remainder), and outputs the quotient. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of fun[...]

  • Page 145

    5.3 Standard Arithmetic Functions 143 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, division is performed using double[...]

  • Page 146

    5.3 Standard Arithmetic Functions 144 FXCPU Structured Programming Manual (Application Functions) 5.3.5 MOD(_E) Outline This function performs division using two values (A / B = C … remainder), and outputs the remainder. 1. Format *1. Output variable *2. Refer to the Cautions 2. Set da ta In explanation of functions, I/O variables inside ( ) are [...]

  • Page 147

    5.3 Standard Arithmetic Functions 145 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Error 1) An operation error occurs when the divisor stored in a dev[...]

  • Page 148

    5.3 Standard Arithmetic Functions 146 FXCPU Structured Programming Manual (Application Functions) 5.3.6 EXPT(_E) Outline This function obtains raised result, and outputs it. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation This function raises float[...]

  • Page 149

    5.3 Standard Arithmetic Functions 147 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Error An operatio n error occurs in the following c ases. The erro [...]

  • Page 150

    5.3 Standard Arithmetic Functions 148 FXCPU Structured Programming Manual (Application Functions) 5.3.7 MOVE(_E) Outline This function transfers data stored in a device to another device. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation This functio[...]

  • Page 151

    5.3 Standard Arithmetic Functions 149 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, word [signed] d ata stored in a de[...]

  • Page 152

    5.4 Standard Bit Sh ift Functions 150 FXCPU Structured Programming Manual (Application Functions) 5.4 Standard Bit Shift Functions 5.4.1 SHL(_E) Outline This function shifts data of specified bit leng th leftward by the specified number of bits. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are des[...]

  • Page 153

    5.4 Standard Bit Sh ift Functions 151 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) Use the function having "_E" in its name to c[...]

  • Page 154

    5.4 Standard Bit Sh ift Functions 152 FXCPU Structured Programming Manual (Application Functions) 5.4.2 SHR(_E) Outline This function shifts data of specified bit length rightward by the specified numbe r of bits. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function [...]

  • Page 155

    5.4 Standard Bit Sh ift Functions 153 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) Use the function having "_E" in its name to c[...]

  • Page 156

    5.5 Standard Bitwise Boolean Funct ions 154 FXCPU Structured Programming Manual (Application Functions) 5.5 Standard Bitwise Boolean Functions 5.5.1 AND_E Outline This function obtains the logical product of two or more bits, and outputs it. 1. Format *1. Output variable 2. Variable In explanation of functions, I/O variables inside ( ) are describe[...]

  • Page 157

    5.5 Standard Bitwise Boolean Funct ions 155 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, the logical product is obtai[...]

  • Page 158

    5.5 Standard Bitwise Boolean Funct ions 156 FXCPU Structured Programming Manual (Application Functions) 5.5.2 OR_E Outline This function obtains the logical sum of two or more bits, and outputs it. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation 1)[...]

  • Page 159

    5.5 Standard Bitwise Boolean Funct ions 157 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this pro gram, the logical sum is obt aine[...]

  • Page 160

    5.5 Standard Bitwise Boolean Funct ions 158 FXCPU Structured Programming Manual (Application Functions) 5.5.3 XOR_E Outline This function obtains the exclusive logical sum of two or more bits, and outputs it. 1. Format *1. Output variable 2. .Set dat a In explanation of functions, I/O variables inside ( ) are described. Explanation of function and [...]

  • Page 161

    5.5 Standard Bitwise Boolean Funct ions 159 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 3) If there are 3 or more , the exclusive logical sum is obta[...]

  • Page 162

    5.5 Standard Bitwise Boolean Funct ions 160 FXCPU Structured Programming Manual (Application Functions) 5.5.4 NOT(_E) Outline This function obtains the logical negation of bits, and outputs it. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation This f[...]

  • Page 163

    5.5 Standard Bitwise Boolean Funct ions 161 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, the logical negation is obta[...]

  • Page 164

    5.6 Standard Selection Functions 162 FXCPU Structured Programming Manual (Application Functions) 5.6 Standard Selection Functions 5.6.1 SEL(_E) Outline This function selects either one b etween two data in accordance with the input condi tion, and out puts the selection result. 1. Format *1. Output variable 2. Set da ta In explanation of functions,[...]

  • Page 165

    5.6 Standard Selection Functions 163 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) Use the function having "_E" in its name to co[...]

  • Page 166

    5.6 Standard Selection Functions 164 FXCPU Structured Programming Manual (Application Functions) 5.6.2 MAXIMUM(_E) Outline This function searches the maximum value among data, and outputs the maximum value. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and ope[...]

  • Page 167

    5.6 Standard Selection Functions 165 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, the maximum value among word [signe[...]

  • Page 168

    5.6 Standard Selection Functions 166 FXCPU Structured Programming Manual (Application Functions) 5.6.3 MINIMUM(_E) Outline This function searches the minimum value among data, and outputs the minimum value. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and ope[...]

  • Page 169

    5.6 Standard Selection Functions 167 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, the minimum value among word [signe[...]

  • Page 170

    5.6 Standard Selection Functions 168 FXCPU Structured Programming Manual (Application Functions) 5.6.4 LIMITATION(_E) Outline This function judges whether data is located within the range between the upper limit value and the lower limit value. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are desc[...]

  • Page 171

    5.6 Standard Selection Functions 169 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) Use the function having "_E" in its name to co[...]

  • Page 172

    5.6 Standard Selection Functions 170 FXCPU Structured Programming Manual (Application Functions) 5.6.5 MUX(_E) Outline This function selects data, and outputs the selected data. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation 1) This function outpu[...]

  • Page 173

    5.6 Standard Selection Functions 171 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) Use the function having "_E" in its name to co[...]

  • Page 174

    5.7 Standard Comparison Functions 172 FXCPU Structured Programming Manual (Application Functions) 5.7 Standard Comparison Functions 5.7.1 GT_E Outline This function compares data with regard to " > (larger)". 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of f[...]

  • Page 175

    5.7 Standard Comparison Functions 173 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, the contents of devices specified [...]

  • Page 176

    5.7 Standard Comparison Functions 174 FXCPU Structured Programming Manual (Application Functions) 5.7.2 GE_E Outline This function compares data with regard to " ≥ (larger or equal)". 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation 1) T[...]

  • Page 177

    5.7 Standard Comparison Functions 175 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.7.3 EQ_E Outline This function compares data with regard to "[...]

  • Page 178

    5.7 Standard Comparison Functions 176 FXCPU Structured Programming Manual (Application Functions) 5.7.4 LE_E Outline This function compares data with regard to " ≤ (smaller or equal)". 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation 1) [...]

  • Page 179

    5.7 Standard Comparison Functions 177 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, the contents of devices specified [...]

  • Page 180

    5.7 Standard Comparison Functions 178 FXCPU Structured Programming Manual (Application Functions) 5.7.5 LT_E Outline This function compares data with regard to " < (smaller)". 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation 1) This fun[...]

  • Page 181

    5.7 Standard Comparison Functions 179 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.7.6 NE_E Outline This function compares data with regard to "[...]

  • Page 182

    5.7 Standard Comparison Functions 180 FXCPU Structured Programming Manual (Application Functions) Program example In this program, the contents of devices specified in and are compared, and the operation result is output to a device specified in . [Structu red ladder] [ST] s1 s2 d NE_E EN ENO g_bool2 g_bool1 g_int1 g_int2 _IN1 _IN2 g_bool3 g_bool3:[...]

  • Page 183

    5.8 Standard Character Stri ng Functions 181 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.8 Standard Character String Functions 5.8.1 MID(_E) Outlin[...]

  • Page 184

    5.8 Standard Character Stri ng Functions 182 FXCPU Structured Programming Manual (Application Functions) Explanation of function and operation 1) This function extracts specified number of charac ters from an arbitrary position of a character string stored in devices specified in , and outputs the obtained data to devices specified in . The value s[...]

  • Page 185

    5.8 Standard Character Stri ng Functions 183 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, specified number of charact[...]

  • Page 186

    5.8 Standard Character Stri ng Functions 184 FXCPU Structured Programming Manual (Application Functions) 5.8.2 CONCAT(_E) Outline This function connects character strings. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. FX 3U(C) FX 3G FX 2N(C) FX 1N(C) FX 1S FX U /FX 2C FX 0N FX 0(S) F[...]

  • Page 187

    5.8 Standard Character Stri ng Functions 185 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Explanation of function and operation 1) This function conne[...]

  • Page 188

    5.8 Standard Character Stri ng Functions 186 FXCPU Structured Programming Manual (Application Functions) Program example In this program, a charac ter string stored in devic es specified in is connect ed after a character string stored in devices specif ied in , and the ch aracter string ob tained by connection is output to devices specified in . 1[...]

  • Page 189

    5.8 Standard Character Stri ng Functions 187 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.8.3 INSERT(_E) Outline This function inserts a character s[...]

  • Page 190

    5.8 Standard Character Stri ng Functions 188 FXCPU Structured Programming Manual (Application Functions) Explanation of function and operation 1) This function inserts a character string stored in devices specified in into an arbitrary position (counted from th e head) of a character string stored in devic es specified in , a nd outputs the charact[...]

  • Page 191

    5.8 Standard Character Stri ng Functions 189 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, a character string stored i[...]

  • Page 192

    5.8 Standard Character Stri ng Functions 190 FXCPU Structured Programming Manual (Application Functions) 5.8.4 DELETE(_E) Outline This function deletes a character string. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation 1) This function deletes spe[...]

  • Page 193

    5.8 Standard Character Stri ng Functions 191 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) Use the function having "_E" in its na[...]

  • Page 194

    5.8 Standard Character Stri ng Functions 192 FXCPU Structured Programming Manual (Application Functions) 5.8.5 REPLACE(_E) Outline This function replaces a character string. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. FX 3U(C) FX 3G FX 2N(C) FX 1N(C) FX 1S FX U /FX 2C FX 0N FX 0(S)[...]

  • Page 195

    5.8 Standard Character Stri ng Functions 193 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Explanation of function and operation 1) This function repla[...]

  • Page 196

    5.8 Standard Character Stri ng Functions 194 FXCPU Structured Programming Manual (Application Functions) Error An operatio n error occurs in the following c ases. The erro r flag M806 7 turns ON, and D8067 stores the error code. 1) When "00H" does not exist in the corresponding device range after the devices specified in and (Error code: [...]

  • Page 197

    5.8 Standard Character Stri ng Functions 195 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 5.8.6 FIND(_E) Outline This function searches a character st[...]

  • Page 198

    5.8 Standard Character Stri ng Functions 196 FXCPU Structured Programming Manual (Application Functions) Explanation of function and operation 1) This function searches a character string stored in devices specified in from the beginning of a character string stored in devices specified in , and outputs the search result to devices specified in . T[...]

  • Page 199

    5.8 Standard Character Stri ng Functions 197 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, a character string stored i[...]

  • Page 200

    5.9 Function s Of Time Data Typ es 198 FXCPU Structured Programming Manual (Application Functions) 5.9 Functions Of Time Data Types 5.9.1 ADD_TIME(_E) Outline This function adds time data. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation This functi[...]

  • Page 201

    5.9 Function s Of Time Data Typ es 199 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) Use the function having "_E" in its name to [...]

  • Page 202

    5.9 Function s Of Time Data Typ es 200 FXCPU Structured Programming Manual (Application Functions) 5.9.2 SUB_TIME(_E) Outline This function performs subtraction of time data. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation This function performs su[...]

  • Page 203

    5.9 Function s Of Time Data Typ es 201 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) Use the function having "_E" in its name to [...]

  • Page 204

    5.9 Function s Of Time Data Typ es 202 FXCPU Structured Programming Manual (Application Functions) 5.9.3 MUL_TIME(_E) Outline This function performs multiplication of time data. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation This function performs[...]

  • Page 205

    5.9 Function s Of Time Data Typ es 203 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, multiplication ( × ) is performe[...]

  • Page 206

    5.9 Function s Of Time Data Typ es 204 FXCPU Structured Programming Manual (Application Functions) 5.9.4 DIV_TIME(_E) Outline This function performs division using time data. 1. Format *1. Output variable 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and operation 1) This function performs[...]

  • Page 207

    5.9 Function s Of Time Data Typ es 205 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, division ( / ) is performed using[...]

  • Page 208

    6 Standard Functio n Blocks 6.1 R_TRIG (_E) 206 FXCPU Structured Programming Manual (Application Functions) 6. Standard Function Blocks 6.1 R_TRIG(_E) Outline This function block detects the rising edge of a signal, and outputs pulse signal. 1. Format *1. Refer to caution points. 2. Set da ta In explanation of functions, I/O variables inside ( ) ar[...]

  • Page 209

    6 Standard Functio n Blocks 6.1 R_TRIG (_E) 207 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, a device specified in tu[...]

  • Page 210

    6 Standard Functio n Blocks 6.2 F_TRIG(_E) 208 FXCPU Structured Programming Manual (Application Functions) 6.2 F_TRIG(_E) Outline This function block detects the falling edge of a signal, and outputs pulse signal. 1. Format *1. Refer to caution points. 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of [...]

  • Page 211

    6 Standard Functio n Blocks 6.2 F_TRIG(_E) 209 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, a device specified in tur[...]

  • Page 212

    6 Standard Functio n Blocks 6.3 CTU(_E) 210 FXCPU Structured Programming Manual (Application Functions) 6.3 CTU(_E) Outline This function block counts up the number of times of rising of a signal. 1. Format *1. Refer to caution points. 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and oper[...]

  • Page 213

    6 Standard Functio n Blocks 6.3 CTU(_E) 211 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, the number of times the bit [...]

  • Page 214

    6 Standard Functio n Blocks 6.4 CTD(_E) 212 FXCPU Structured Programming Manual (Application Functions) 6.4 CTD(_E) Outline This function block counts down the number of times of rising of a signal. 1. Format *1. Refer to caution points. 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function and op[...]

  • Page 215

    6 Standard Functio n Blocks 6.4 CTD(_E) 213 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Program example In this program, the number of times the bit [...]

  • Page 216

    6 Standard Functio n Blocks 6.5 CTUD(_E) 214 FXCPU Structured Programming Manual (Application Functions) 6.5 CTUD(_E) Outline This function block counts up/down the number of times of rising of a signal. 1. Format *1. Refer to caution points. 2. Set da ta In explanation of functions, I/O variables inside ( ) are described. Explanation of function a[...]

  • Page 217

    6 Standard Functio n Blocks 6.5 CTUD(_E) 215 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses This function block re sets the count value of a de vice spe[...]

  • Page 218

    6 Standard Functio n Blocks 6.5 CTUD(_E) 216 FXCPU Structured Programming Manual (Application Functions) Program example In this program, the number of times the bit data store d in a device specified in turns ON from OFF is counted up (added by "1"). When the value stored in a device specified in reaches the value specified in , a device[...]

  • Page 219

    6 Standard Functio n Blocks 6.6 TP(_E) 217 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 6.6 TP(_E) Outline This function block keeps ON a signal for s[...]

  • Page 220

    6 Standard Functio n Blocks 6.6 TP(_E) 218 FXCPU Structured Programming Manual (Application Functions) Program example In this program, when bit data stored in a dev ice specified in turns ON, bit data stor ed in a device specified in turns ON and remains ON for 10 seconds. 1) Function without EN/ENO(TP) 2) Function with EN/ENO(TP_E) [Structu red l[...]

  • Page 221

    6 Standard Functio n Blocks 6.7 TON(_E) 219 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 6.7 TON(_E) Outline This function block turns ON after specif[...]

  • Page 222

    6 Standard Functio n Blocks 6.7 TON(_E) 220 FXCPU Structured Programming Manual (Application Functions) Program example In this program, when bit data stored in a dev ice specified in turns ON, bit data stor ed in a device specified in turns ON 10 seconds later. 1) Function without EN/ENO(TON) 2) Function with EN/ENO(TON_E) [Structu red ladder] [ST[...]

  • Page 223

    6 Standard Functio n Blocks 6.8 TOF(_E) 221 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 6.8 TOF(_E) Outline When the input signal turns OFF, this fun[...]

  • Page 224

    6 Standard Functio n Blocks 6.8 TOF(_E) 222 FXCPU Structured Programming Manual (Application Functions) Program example In this program, when bit data stored in a dev ice specified in turns ON, bit data stor ed in a device specified in turns ON. When bit data stored in a device specified in turns OFF, bit dat a stored in a device specified in turns[...]

  • Page 225

    6 Standard Functio n Blocks 6.9 COUNTER_FB_M 223 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 6.9 COUNTER_FB_M Outline This counter starts counting wh[...]

  • Page 226

    6 Standard Functio n Blocks 6.9 COUNTER_FB_M 224 FXCPU Structured Programming Manual (Application Functions) Cautions 1) Expression in each language of function block *1. Set the instance when using the function block. Describe the instance name when programming the function block. 2) For the function block, the automatic allocation device needs to[...]

  • Page 227

    6 Standard Functio n Blocks 6.10 TIMER_10_FB_M 225 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses 6.10 TIMER_10_FB_M Outline This function block generat[...]

  • Page 228

    6 Standard Functio n Blocks 6.11 TIMER_CONT_FB_M 226 FXCPU Structured Programming Manual (Application Functions) 6.11 TIMER_CONT_FB_M Outline This functio n block coun ts the pe riod of time while the c ondition i s satisfied, and generat es an outpu t when the timer counts up the specified time. 1. Format *1. Refer to "Cautions". 2. Set [...]

  • Page 229

    6 Standard Functio n Blocks 6.11 TIMER_CONT_FB_M 227 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Cautions 1) Expression in each language of function [...]

  • Page 230

    6 Standard Functio n Blocks 6.12 TIMER_100_FB_M 228 FXCPU Structured Programming Manual (Application Functions) 6.12 TIMER_100_FB_M Outline This function block generates an output when the condition continues for the specified time. The initial value and setting value of the timer is multiplied by 100 ms. 1. Format *1. Refer to "Cautions"[...]

  • Page 231

    Appendix A: Corres pondence be tween Devices an d 229 FXCPU Structured Programming Manual (Application Functions) 1 Outline 2 Function List 3 Function Construction 4 How to R ead Explanation of Functions 5 Applied Functions 6 S tandard Function Blocks A Correspondence between Devices and Addresses Appendix A: Correspondence between Devices and Addr[...]

  • Page 232

    230 FXCPU Structured Programming Manual (Application Functions) Warranty Warranty Please confirm the following product warra nty details before using this product. 1. Gratis Warranty Term and Gratis Warran ty Range If any faults or defects (he reinafter "Failure") found to be the responsibility of M itsubis hi occurs during use of the pro[...]

  • Page 233

    231 FXCPU Structured Programming Manual (Application Functions) Revision History Revision History Date of prepar ation Revision Desc ription 1/2009 A First Edition. 7/2009 B • Equival ent circuits are deleted. • Followin g instructions ar e not supported in FX 0 ,FX 0S and FX 0N PLCs. CTD(_E), CTU( _E), CTUD(_E) , TOF(_E), TON(_ E), TP(_E) • [...]

  • Page 234

    232 FXCPU Structured Programming Manual (Application Functions) Revision History MEMO[...]

  • Page 235

    [...]

  • Page 236

    HEAD OFFICE: TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN HIMEJI WORKS: 840, CHIYO DA CHO, HIMEJI, JAPAN JY997D34801B (MEE) Effective Jul. 2009 Specifications are subject to chang e without notice. FXCPU Structured Programming Manual [Application Functions] MODEL FX-KP-OK-E MODEL CODE 09R927[...]