PROGRAMMABLE CONTROLLER

FP0
Programming

This manual was created using Adobe Acrobat. Adobe, the Adobe logo, and Acrobat are trademarks of Adobe Systems Incorporated.

BEFORE BEGINNING
This manual and everything described in it are copyrighted. You may not copy this manual, in whole or part, without written consent of Matsushita Electric Works, Ltd. Matsushita Electric Works, Ltd. pursues a policy of continuous improvement of the design and performance of its products, therefore, we reserve the right to change the manual/product without notice. In no event will Matsushita Electric Works, Ltd. be liable for direct, special, incidental, or consequential damage resulting from any defect in the product or its documentation, even if advised of the possibility of such damages.

LIMITED WARRANTY
If physical defects caused by distribution are found, Matsushita Electric Works, Ltd., will replace/repair the product free of charge. Exceptions include: D When physical defects are due to different usage/treatment of the product other than described in the manual. D When physical defects are due to defective equipment other than the distributed product. D When physical defects are due to modifications/repairs by someone other than Matsushita Electric Works, Ltd. D When physical defects are due to natural disasters.

MS-DOS and Windows are registered trademarks of Microsoft Corporation. IBM Personal Computer AT is a registered trademark of the International Business Machines Corporation.

Table of Contents
Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v High - level Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Chapter 1
1.1 1.2 1.3 1.4

Relays, Memory Areas and Constants

Type and Function of Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 3 Type and Function of Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 12 Type and Function of Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 21 Data Ranges Which can be Handled in the PLC . . . . . . . . . . . . . . . . . . . . . 1 - 24 1.4.1 Data Ranges Which can be Handled in the PLC . . . . . . . . . . . . . 1 - 24 1.4.2 Overflow and Underflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 27

Chapter 2
2.1 2.2 2.3

Basic Instructions

Composition of Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 3 Table of Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 7 Explanation of Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 13

Chapter 3
3.1

High-level Instructions

3.2 3.3

Composition of High-level Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 3 3.1.1 Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 3 3.1.2 High-level Instruction Numbers and Program Input . . . . . . . . . . . . 3 - 4 3.1.3 High-level Instructions and Execution Condition (Trigger) . . . . . . 3 - 4 3.1.4 Types of High-level Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 6 Table of High-level Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 11 Explanation of High - level Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 22

Chapter 4
4.1

Precautions During Programming4 - 1
4-3 4-3 4 4 4 4 4 5 5 5
i

4.2

Use of Duplicated Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 Duplicated Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 When Output is Repeated with an OT, KP, SET, or RST Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Handling BCD Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 BCD Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 Handling BCD Data in the PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Table of Contents

FP0

4.3

Handling Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2 Memory Areas Which can be Modified with Index Registers . . . . 4.3.3 Example of Using an Index Register . . . . . . . . . . . . . . . . . . . . . . . .

4 4 4 4 -

-

7 7 7 8

4.4

Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4.4.1 Outline of Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4.4.2 Operation Mode When an Operation Error Occurs . . . . . . . . . . . 4 4.4.3 Dealing with Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4.4.4 Points to Check in Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Instruction of Leading Edge Detection Method . . . . . . . . . . . . . . . . . . . . . . 4.5.1 Instructions of Leading Edge Detection Method . . . . . . . . . . . . . . 4.5.2 Operation and Precautions at Run Start Time . . . . . . . . . . . . . . . 4.5.3 Precautions When Using a Control Instruction . . . . . . . . . . . . . . . Rewrite Function During RUN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.1 Operation of Rewrite During RUN . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.2 Cases Where Rewriting During Run is not Possible . . . . . . . . . . 4.7.3 Procedures and Operation of Rewrite During RUN . . . . . . . . . . . 4.7.4 Changing Modes in FP Programmer II . . . . . . . . . . . . . . . . . . . . . Changing the Set Value of Timer/Counter During RUN . . . . . . . . . . . . . . . 4.8.1 Method of Rewriting Constant in FP Programmer II . . . . . . . . . . 4.8.2 Method of Rewriting a Value in the Set Value Area . . . . . . . . . . . 4 4 4 4 4 4 4 4 4 4 4 4

10 10 10 11 12 13 13 14 16 19 19 20 21 22 23 23 24

4.5

4.6 4.7

Precautions for Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 18

4.8

4.9

Processing During Forced Input and Output . . . . . . . . . . . . . . . . . . . . . . . . 4 - 27

Chapter 5
5.1

High - speed Counter/Pulse Output/ PWM Output
5 5 5 5 5 5 3 3 4 5 5 7

5.2

Outline of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 Three Functions that Use Built- in High - speed Counter . . . . . . . . 5.1.2 Performance of Built- in High - speed Counter . . . . . . . . . . . . . . . . . Specifications and Restricted Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.2 Functions and Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5.3

High - speed Counter Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 9 5.3.1 Outline of High - speed Counter Function . . . . . . . . . . . . . . . . . . . . . 5 - 9 5.3.2 Types of Input Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 9 5.3.3 I/O Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 11 5.3.4 Instructions Used with High - speed Counter Function . . . . . . . . . 5 - 12 5.3.5 Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 14

ii

FP0

Table of Contents

5.4

Pulse Output Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.1 Outline of Pulse Output Function . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.2 Control Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.3 I/O Allocation and Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.4 Instructions Used with Pulse Output Function . . . . . . . . . . . . . . . 5.4.5 Sample Program for Positioning Control . . . . . . . . . . . . . . . . . . . .

5 5 5 5 5 5

-

18 18 19 20 22 25

5.5

PWM Output Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 33 5.5.1 Outline of PWM Output Function . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 33 5.5.2 Instruction Used with PWM Output Function . . . . . . . . . . . . . . . . 5 - 33

Chapter 6
6.1

General - use Serial Communications
6 6 6 6 3 3 3 4

General - use Serial Communications Function . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 General - use Serial Communications . . . . . . . . . . . . . . . . . . . . . . . . 6.1.2 Data Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.3 Data Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6.2 6.3

System Register Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 5 Explanation of Operations When Using General - use Serial Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 8 6.3.1 If “None” is Set for Start and Terminal Codes . . . . . . . . . . . . . . . . . 6 - 8 6.3.2 If “Yes” has been Set for the Start and Terminal Codes (Start Code: STX, Terminal Code: ETX) . . . . . . . . . . . . . . . . . . . . . 6 - 9

Chapter 7
7.1

Programming for FP0 Analog I/O Unit

Analog I/O Unit Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 3

Chapter 8
8.1 8.2 8.3 8.4

Appendix

Performance Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 3 I/O Allocation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 7 Relays, Memory Areas and Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 9 Table of System Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8.4.1 System Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8.4.2 Content of System Register Settings . . . . . . . . . . . . . . . . . . . . . . . 8 8.4.3 Table of System Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 11 11 13 15

8.5 8.6

Table of Special Internal Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 26 Table of Special Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 29
iii

Table of Contents

FP0

8.7

Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7.1 Error Confirmation When “ERROR/ALARM LED” Turns ON . . . 8.7.1.1 Error Confirmation Method . . . . . . . . . . . . . . . . . . . . . 8.7.1.2 Syntax Check Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7.1.3 Self - diagnostic Error . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7.2 Table of Syntax Check Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7.3 Table of Self - diagnostic Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8 8 8 8 8 8 8

-

39 39 39 39 40 41 42

8.8 8.9

FP0 - SL1 S - LINK Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 43 Binary/Hexadecimal/BCD Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 44

8.10 ASCII Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 45

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I - 1 Record of changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R - 1

iv

FP0

Table of Contents

Basic Instructions
Sequence basic instructions
ST ST/ OT / AN AN/ OR OR/ ANS ORS PSHS RDS POPS DF DF/ SET RST KP NOP Start . . . . . . . . . . . . . . . . . . 2 - 14 Start Not . . . . . . . . . . . . . . 2 - 14 Out . . . . . . . . . . . . . . . . . . . 2 - 14 Not . . . . . . . . . . . . . . . . . . . 2 - 16 AND . . . . . . . . . . . . . . . . . . 2 - 17 AND Not . . . . . . . . . . . . . . 2 - 17 OR . . . . . . . . . . . . . . . . . . . 2 - 18 OR Not . . . . . . . . . . . . . . . . 2 - 18 AND stack . . . . . . . . . . . . . 2 - 19 OR stack . . . . . . . . . . . . . . 2 - 21 Push stack . . . . . . . . . . . . 2 - 23 Read stack . . . . . . . . . . . . 2 - 23 Pop stack . . . . . . . . . . . . . 2 - 23 Leading edge differential . 2 - 26 Trailing edge differential . 2 - 26 Set . . . . . . . . . . . . . . . . . . . 2 - 30 Reset . . . . . . . . . . . . . . . . . 2 - 30 Keep . . . . . . . . . . . . . . . . . . 2 - 32 No operation . . . . . . . . . . . 2 - 34 LOOP ED CNDE Loop . . . . . . . . . . . . . . . . . . 2 - 59 End . . . . . . . . . . . . . . . . . . . 2 - 63 Conditional end . . . . . . . . 2 - 64

Step ladder instructions
SSTP NSTL NSTP CSTP STPE Start step . . . . . . . . . . . . . . 2 - 66 Next step . . . . . . . . . . . . . . 2 - 66 Next step . . . . . . . . . . . . . . 2 - 66 Clear step . . . . . . . . . . . . . 2 - 66 Step end . . . . . . . . . . . . . . 2 - 66

Subroutine instructions
CALL SUB RET Subroutine call . . . . . . . . . 2 - 76 Subroutine entry . . . . . . . . 2 - 76 Subroutine return . . . . . . . 2 - 76

Interrupt instructions
INT IRET ICTL Interrupt . . . . . . . . . . . . . . . 2 - 79 Interrupt return . . . . . . . . . 2 - 79 Interrupt control . . . . . . . . 2 - 84

Data compare instructions Basic function instructions
TML TMR TMX TMY CT SR On - delay timer TML . . . . 2 - 35 On - delay timer TMR . . . . 2 - 35 On - delay timer TMX . . . . 2 - 35 On - delay timer TMY . . . . 2 - 35 Counter . . . . . . . . . . . . . . . 2 - 42 Shift register . . . . . . . . . . . 2 - 49 ST>= ST< ST<= STD= ST<> ST> ST= 16 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 90 16 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 90 16 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 90 16 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 90 16 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 90 16 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 90 32 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 92

Control instructions
MC MCE JP LBL Master control relay . . . . . 2 - 52 Master control relay end . 2 - 52 Jump . . . . . . . . . . . . . . . . . 2 - 56 Label . . . . . . . . . . . 2 - 56, 2 - 59

STD<> 32 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 92
v

Table of Contents

FP0

STD> STD>= STD< STD<= AN= AN<> AN> AN>= AN< AN<= AND= AND<> AND> AND>= AND< AND<= OR= OR<> OR> OR>= OR< OR<= ORD=

32 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 92 32 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 92 32 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 92 32 - bit data compare (Start) . . . . . . . . . . . . . . . . . 2 - 92 16 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 94 16 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 94 16 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 94 16 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 94 16 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 94 16 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 94 32 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 96 32 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 96 32 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 96 32 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 96 32 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 96 32 - bit data compare (AND) . . . . . . . . . . . . . . . . . 2 - 96 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . . 2 - 98 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . . 2 - 98 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . . 2 - 98 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . . 2 - 98 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . . 2 - 98 16 - bit data compare (OR) . . . . . . . . . . . . . . . . . . 2 - 98 32 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 100

ORD<> 32 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 100 ORD> 32 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 100

ORD>= 32 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 100 ORD< 32 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 100

ORD<= 32 - bit data compare (OR) . . . . . . . . . . . . . . . . . 2 - 100

vi

FP0

Table of Contents

High - level Instructions

Data transfer instructions
F0 F1 F2 F3 F5 F6 F10 F11 F12 P13 F15 F16 F17 MV DMV MV/ DMV/ BTM DGT BKMV COPY ICRD PICWT XCH DXCH SWAP 16-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 23 32-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 24 16-bit data invert and move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 25 32-bit data invert and move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 27 Bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 29 Hexadecimal digit (4-bit) data move . . . . . . . . . . . . . . . . . . . . . . . . 3 - 31 Block move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 34 Block copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 36 Data read from EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 38 Data write to EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 40 16-bit data exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 42 32-bit data exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 44 Higher/ lower byte in 16-bit data exchange . . . . . . . . . . . . . . . . . . 3 - 46

Binary arithmetic instructions
F20 F21 F22 F23 F25 F26 F27 F28 F30 F31 F32 F33 F35 F36 F37 F38 + D+ + D+ DD* D* % D% +1 D+1 -1 D-1 16-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 47 32-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 49 16-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 51 32-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 53 16-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 55 32-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 57 16-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 59 32-bit data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 61 16-bit data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 63 32-bit data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 65 16-bit data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 67 32-bit data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 69 16-bit data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 71 32-bit data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 73 16-bit data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 75 32-bit data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 77

BCD arithmetic instructions
F40 B+ 4-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 79
vii

Table of Contents

FP0

F41 F42 F43 F45 F46 F47 F48 F50 F51 F52 F53 F55 F56 F57 F58

DB+ B+ DB+ BDB BDB B* DB* B% DB% B+1 DB+1 B-1 DB - 1

8-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 81 4-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 83 8-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 85 4-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 87 8-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 89 4-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 91 8-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 93 4-digit BCD data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 95 8-digit BCD data multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 97 4-digit BCD data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 99 8-digit BCD data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 101 4-digit BCD data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 103 8-digit BCD data increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 105 4-digit BCD data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 107 8-digit BCD data decrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 109

Data comparison instructions
F60 F61 F62 F63 F64 CMP DCMP WIN DWIN BCMP 16-bit data compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 111 32-bit data compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 115 16-bit data band compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 119 32-bit data band compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 121 Block data compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 123

Logic operation instructions
F65 F66 F67 F68 WAN WOR XOR XNR 16-bit data AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 126 16-bit data OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 128 16-bit data exclusive OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 130 16-bit data exclusive NOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 132

Data conversion instructions
F70 F71 F72 F73 F74 F75 F76 F77
viii

BCC HEXA AHEX BCDA ABCD BINA ABIN DBIA

Block check code calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 134 Hexadecimal data → ASCII code . . . . . . . . . . . . . . . . . . . . . . . . 3 - 137 ASCII code → Hexadecimal data . . . . . . . . . . . . . . . . . . . . . . . . 3 - 140 4-digit BCD data → ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 144 ASCII code → 4-digit BCD data . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 148 16-bit binary data → ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 152 ASCII code → 16-bit binary data . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 155 32-bit binary data → ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 158

FP0

Table of Contents

F78 F80 F81 F82 F83 F84 F85 F86 F87 F88 F89 F90 F91 F92 F93 F94 F95 F96

DABI BCD BIN DBCD DBIN INV NEG DNEG ABS DABS EXT DECO SEGT ENCO UNIT DIST ASC SRC

ASCII code → 32-bit binary data . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 161 16-bit binary data → 4-digit BCD data . . . . . . . . . . . . . . . . . . . . . 3 - 165 4-digit BCD data → 16-bit binary data . . . . . . . . . . . . . . . . . . . . . 3 - 167 32-bit binary data → 8-digit BCD data . . . . . . . . . . . . . . . . . . . . . 3 - 169 8-digit BCD data → 32-bit binary data . . . . . . . . . . . . . . . . . . . . . 3 - 170 16-bit data invert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 171 16-bit data complement of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 172 32-bit data complement of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 173 16-bit data absolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 174 32-bit data absolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 175 16-bit data sign extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 176 Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 178 7-segment decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 181 Encode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 183 16-bit data combine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 186 16-bit data distribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 188 Character → ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 190 16-bit table data search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 193

Data shift instructions
F100 F101 F105 F106 F110 F111 F112 F113 SHR SHL BSR BSL WSHR WSHL WBSR WBSL Right shift of multiple bits (n bits) in a 16-bit data . . . . . . . . . . . 3 - 195 Left shift of multiple bits (n bits) in a 16-bit data . . . . . . . . . . . . . 3 - 197 Right shift of one hexadecimal digit (4-bit) . . . . . . . . . . . . . . . . . 3 - 199 Left shift of one hexadecimal digit (4-bit) . . . . . . . . . . . . . . . . . . 3 - 201 Right shift of one word (16-bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 203 Left shift of one word (16-bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 205 Right shift of one hexadecimal digit (4-bit) . . . . . . . . . . . . . . . . . 3 - 207 Left shift of one hexadecimal digit (4-bit) . . . . . . . . . . . . . . . . . . 3 - 209

Basic function instructions
F118 F119 UDC LRSR UP/DOWN counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 211 Left/right shift register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 214

Data rotate instructions
F120 F121 F122 F123 ROR ROL RCR RCL 16-bit data right rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 217 16-bit data left rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 219 16-bit data right rotate with carry flag (R9009) data . . . . . . . . . 3 - 221 16-bit data left rotate with carry flag (R9009) data . . . . . . . . . . 3 - 223
ix

Table of Contents

FP0

Bit manipulation instructions
F130 F131 F132 F133 F135 F136 BTS BTR BTI BTT BCU DBCU 16-bit data bit set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 225 16-bit data bit reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 227 16-bit data bit invert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 229 16-bit data bit test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 231 Number of on (1) bits in 16-bit data . . . . . . . . . . . . . . . . . . . . . . . 3 - 233 Number of on (1) bits in 32-bit data . . . . . . . . . . . . . . . . . . . . . . . 3 - 234

Basic function instruction
F137 STMR Auxiliary timer (16 - bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 235

Special instructions
F140 F141 F143 F144 F147 F148 F149 STC CLC IORF TRNS PR ERR MSG Carry flag (R9009) set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 238 Carry flag (R9009) reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 239 Partial I/O update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 240 Serial data communication control for R232C port . . . . . . . . . . 3 - 241 Printout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 247 Self-diagnostic error set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 251 Message display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 253

Special instructions (High - speed counter instructions)
F0 F1 F166 F167 F168 F169 F170 MV DMV HC1S HC1R SPD1 PLS PWM High - speed counter control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 254 Change and read of the elapsed value of high- speed counter 3 - 257 Target value match on instruction (with channel specification) Target value match off instruction (with channel specification) 3 - 260 3 - 262

Positioning control (with channel specification) . . . . . . . . . . . . 3 - 264 Pulse output instruction (with channel specification) . . . . . . . . . 3 - 268 PWM output instruction (with channel specification) . . . . . . . . . 3 - 270

Basic function instruction
F183 DSTM Auxiliary timer (32-bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 272

Floating point type real number operation instructions
F309 F310 F311 F312 F313
x

FMV F+ FF* F%

Floating point type data move . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 275 Floating point type data addition . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 277 Floating point type data subtraction . . . . . . . . . . . . . . . . . . . . . . . 3 - 279 Floating point type data multiplication . . . . . . . . . . . . . . . . . . . . . 3 - 281 Floating point type data division . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 283

. . . . . 3 . .317 Floating point type data to 16-bit integer conversion (rounding the first decimal point off to integer) . 3 . . 3 . . . . . . . . 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299 Floating point type data logarithm . . . . . . . . . . . . . . . . . . .323 Floating point type data rounding the first decimal point off . . . . . . . . . . . . 3 . . . . . . . . . . . . . . . 3 . . . . . .301 Floating point type data power . .327 Floating point type data absolute . . . . . . . .285 Floating point type data cosine operation . . . . . . . . . . 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 . . . 3 .309 Floating point type data to 16-bit integer conversion (the largest integer not exceeding the floating point type data) . . 3 . . . . . .313 Floating point type data to 16-bit integer conversion (rounding the first decimal point down to integer) . . . . . . . . . . . . . . . . . . . . . . . . .335 xi . . . . 3 . . . . . . . . . . .325 Floating point type data sign changes . . . . . . . . . . . . . 3 . . .289 Floating point type data arcsine operation . . . . . . . . . . 3 . . . 3 . . . . . . . . . .287 Floating point type data tangent operation . . . . . . . . . . . 3 . . 3 . . . . . .305 16-bit integer data to floating point type data conversion . . . . . .307 32-bit integer data to floating point type data conversion . .291 Floating point type data arccosine operation . . . . . . . . . . .293 Floating point type data arctangent operation . . . . .311 Floating point type data to 32-bit integer conversion (the largest integer not exceeding the floating point type data) . . . . . . . . . . . . . . . . . . . . . . . .333 F328 DINT F329 F330 F331 F332 F333 F334 F335 F336 F337 F338 FIX DFIX ROFF DROFF FINT FRINT F+/ FABS RAD DEG Time series processing instruction F355 PID PID processing . . . . . . . . . . . .295 Floating point type data natural logarithm . . . . . . . . . . . . . . 3 . . . . . . . . . . . . . . . . . . . . . . . . . 3 . . . . .297 Floating point type data exponent . . .315 Floating point type data to 32-bit integer conversion (rounding the first decimal point down to integer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .331 Floating point type data radians → degrees . . . . . . . . . . . 3 . . . . . . . . . . . . . . . . . .FP0 Table of Contents F314 F315 F316 F317 F318 F319 F320 F321 F322 F323 F324 F325 F326 F327 SIN COS TAN ASIN ACOS ATAN LN EXP LOG PWR FSQR FLT DFLT INT Floating point type data sine operation . . . . . . 3 . . . . . 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 . . . . . . . 3 .303 Floating point type data square root . . . . . . . . . .329 Floating point type data degrees → radians . . . . . . . . . . . . . .321 Floating point type data rounding the first decimal point down . . .319 Floating point type data to 32-bit integer conversion (rounding the first decimal point off to integer) . . 3 . . . . . . . . . . . . . . . . . . . . . . . . . . 3 . . . . . . . . . .

Table of Contents

FP0

xii

Chapter 1 Relays, Memory Areas and Constants
1.1 1.2 1.3 1.4 Type and Function of Relays . . . . . . . . . . . . . . . . . . . . . 1 - 3 Type and Function of Memory Areas . . . . . . . . . . . . . 1 - 12 Type and Function of Constants . . . . . . . . . . . . . . . . . 1 - 21 Data Ranges Which can be Handled in the PLC . . . 1 - 24 1.4.1 1.4.2 Data Ranges Which can be Handled in the PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 24 Overflow and Underflow . . . . . . . . . . . . . . . . 1 - 27

Relays, Memory Areas and Constants

FP0

1- 2

FP0

Relays, Memory Areas and Constants 1.1 Type and Function of Relays

1.1
Item
Relays

Type and Function of Relays
Numbering C10/C14/C16/C32/T32/SL1
External input relay External output relay Internal relay (* Note 2) Timer (* Note 2) Counter (* Note 2) Special internal relay X Y R 208 points (X0 to X12F) (* Note 1) 208 points (Y0 to Y12F) (* Note 1) 1,008 points (R0 to R62F) Turns on or off based on external input. Externally outputs on or off state. Relay which turns on or off only within program. If a TM instruction has timed out, the contact with the same number turns on. If a CT instruction has counted up, the contact with the same number turns on. 64 points (R9000 to R903F) Relay which turns on or off based on specific conditions and is used as a flag. For detailed information section 8.5

Function

T 144 points (* Note 3) (T0 to T99/C100 to C143) C R

Notes
1) The number of points noted is the number of points which the system has. For the actual number of points, refer to the table of I/O allocations in section 8.2. 2) There are two unit types, the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non - hold type that resets them. For the FP0 T32, the selection of hold type and non - hold type can be changed by the setting section 8.4). of system register ( For the FP0 C10/C14/C16/C32/SL1, that area is fixed and allotted the numbers as shown below. Hold type and Non-hold type areas
Item
Timer Counter Non-hold type Hold type Internal relay Non-hold type Hold type

C10/C14/C16
All non-hold type From the set value to C139 4 points (C140 to C143) 976 points (R0 to R60F) 61 words (WR0 to WR60) 32 points (R610 to R62F) 2 words (WR61 to WR62)

C32/SL1
From the set value to C127 16 points (C128 to C143) 880 points (R0 to R54F) 55 words (WR0 to WR54) 128 points (R550 to R62F) 8 words (WR55 to WR62)

3) The points for the timer and counter can be changed by the setting of system register 5. The numbers given in the table are the numbers when system register 5 is at its default section 8.4 setting. For more detailed information

1- 3

Relays, Memory Areas and Constants 1.1 Type and Function of Relays

FP0

How to Specify Relay Numbers
External input relays (X), External output relays (Y), and Internal relays (R) Since external input relays (X), external output relays (Y) and internal relays (R) are handled in units of 16 points, they are expressed as a combination of decimal and hexadecimal numbers as shown below. Example: External input relay (X)
X Decimal number 1, 2, 3⋅⋅⋅⋅⋅⋅⋅⋅12 Hexadecimal number 0, 1, 2, 3,⋅⋅⋅⋅⋅ 9, A, B⋅⋅⋅⋅⋅F

X 0, X 1 . . . . . . . . . . . . . . . . . . . . X F X 10, X 11 . . . . . . . . . . . . . . . . . . . . X 1F X 20, X 21 . . . . . . . . . . . . . . . . . . . . X 2F to to . . . . . . . . . . . . . . . . . . . . . . . . to X120, X121 . . . . . . . . . . . . . . . . . . . . X12F

Timers (T) and Counters (C) The addresses for timer contacts (T) and counter contacts (C) are correspond to the timer and counter instruction numbers and expressed in decimals as shown below. Example: Timer contact
T Decimal number 0, 1, 2,⋅⋅⋅⋅⋅⋅⋅99

T0, T1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T99 C100, C101 . . . . . . . . . . . . . . . . . . . . . . . . . . . . C143

Note
Counters and timers share the same area. The division of the area can be changed with system register 5. (The table and example are when settings are the default values.)

1- 4

FP0

Relays, Memory Areas and Constants 1.1 Type and Function of Relays

Relay Number of External I/O Relays
Only relays with numbers actually allocated to input contacts can be used as external input relay (X). Only relays with numbers actually allocated to output contacts can output as external output relay (Y). The external output relays (Y) which are not allocated can be used as internal relays. Allocation of numbers is determined by the combination of units used. For detailed information section 8.2

Number of Points for Timer and Counter
If you do not have enough timer or counter points, you can change the number of points by setting system register 5. However, the overall number of counter and timer points cannot be changed. section 8.4 For detailed information about the system register setting

Relation of WX, WY and WR to X, Y and R
WX, WY and WR correspond respectively to groups of 16 external input relay (X) points, 16 external output relay (Y) points and 16 internal relay (R) points. Example: Word external input relay (WX) Each relay is composed of 16 external input relay (X) points as shown below.
XFXE XDXCXB XA X9 X8 X7 X6 X5 X4 X3 X2 X1 X0

WX0
X1F X1E X1D X12 X11 X10

WX1

X12FX12E X12D

X122 X121X120

WX12

When the state of an external input relay (X) changes, the content of WX also changes.

1- 5

Relays, Memory Areas and Constants 1.1 Type and Function of Relays

FP0

External Input Relays (X)
Function of external input relays (X) This relay feeds signals to the programmable controller from an external device such as a limit switch or a photoelectric sensor and the intelligent units.
Program
X contact: on
X Input Y

Operation control section

Input interface

Input: on

Usage restrictions The addresses for inputs which do not actually exist cannot be used. The on or off status of the external input relays cannot be changed by the operation (program). There is no limitation regarding the number of times one external input relay is programmed.

External Output Relays (Y)
Function of external output relays (Y) This relay outputs the program operation result at operation control section and activates the load (external device) such as a solenoid or operating panel. The on or off status of the external output relay is output as a control signal.
Program
X R R Output relay Y

Operation Output

Operation control section

Output interface

Load: on
output

Usage restrictions External output relays which are not actually allocated can be used in the same way as internal relays. However, they cannot be specified as hold types. When used as contacts, there are no restrictions on the number of times that can be used. As a rule, when specified as the output destination for operation results of OT and KP instructions, use is limited to once in a program (to inhibit double output).

1- 6

FP0

Relays, Memory Areas and Constants 1.1 Type and Function of Relays

Note
You can permit duplicated use of an output by changing the system register 20 setting. Even if the same relay is used as an operand for instructions such as SET and RST, it is not regarded as duplicated use of outputs. Example of duplicated use of external output relay (Y3)
Y3 Y3 Duplicated output

Internal Relays (R)
Function of internal relays (R) This relay can be used only within program and on or off status does not provide an external output. When the coil of the relay is energized, its contacts turn on.
Internal relay R0 R0 F0 MV

Usage restrictions When used as contacts, there are no restrictions on the number of times that can be used. As a rule, when specified as the output destination for operation results of OT and KP instructions, use is limited to once in a program (to inhibit double output).

Note
You can permit duplicated use of an output by changing the system register 20 setting. Even if the same relay is used as an operand for instructions such as SET and RST, it is not regarded as duplicated use of outputs.

1- 7

Relays, Memory Areas and Constants 1.1 Type and Function of Relays

FP0

Non- hold type relay and hold type relay There are two types of internal relays: hold type relays and non - hold type relays. When the power is turned off or the mode changed from RUN to PROG. Hold type relays hold their on or off status and resume operation in that status when the system is restarted. Non - hold type relays reset. For the FP0 C10/C14/C16/C32/SL1, non - hold type and hold type relay numbers are as follows:
Item
Internal y relay Non-hold type Hold type

C10/C14/C16
976 points (R0 to R60F) 61 words (WR0 to WR60) 32 points (R610 to R62F) 2 words (WR61 to WR62)

C32/SL1
880 points (R0 to R54F) 55 words (WR0 to WR54) 128 points (R550 to R62F) 8 words (WR55 to WR62)

For FP0 T32, system register 7 can be used to specify whether a hold type or a non - hold type is used. If the beginning of a hold type relay is specified using a word number, relays before that point will be non - hold types, and subsequent relays will be hold types.
Non-hold type
Value of system register 7 (initial number of hold type)

Hold type

Default settings for hold types and non - hold types
Item
Internal y relay Non - hold type Hold type

T32
160 points (R0 to R9F) 10 words (WR0 to WR9) 848 points (R100 to R62F) 53 words (WR10 to WR62)

1- 8

FP0

Relays, Memory Areas and Constants 1.1 Type and Function of Relays

Special Internal Relays (from R9000)
Function of special internal relays The special internal relays turn on or off under specific conditions. The on or off state is not externally output and only functions within the program. The principal special internal relays are as follows: Operation status flags: Operation status is indicated by on or off. - Operation (RUN mode) in progress (R9020) - Turns on and off at each scan (R9012) - Result of comparison instruction (R900A to R900C) - High - speed counter control flag (R903A to R903D) Error flags: Turns on when an error occurs. - Operation error (R9007, R9008) Relays which turn on and off under special conditions: The required conditions can be selected in the program and the relays used accordingly. - Always on relay (R9010) - Clock pulse relay (R9018 to R901E) REFERENCE For detailed information about the content of special internal relay section 8.5

1- 9

Relays, Memory Areas and Constants 1.1 Type and Function of Relays

FP0

Timer (T)
Function of timers (T) When a timer is activated and the set time elapses, the timer contact with the same number as the timer turns on. When the timer is in the time - up state and the timer execution condition (trigger) turns off, the timer contact turns off.
TM n

Time - up Tn: on

Timer number
Tn

Timer contact: on

n: Timer number

Usage restrictions When used as contacts, there are no restrictions on the number of times that can be used.

Counter (C)
Function of counters (C) When the decrement - type preset counter is activated and the elapsed value reaches zero, the counter contact with the same number as the counter turns on. When the counter’s reset input is turned on, the counter contact turns off.
Count input Counter number CT n Reset input

Count - up Cn:on

Cn

Counter contact: on

n: Counter number

Usage restrictions When used as contacts, there are no resrictions on the number of times that can be used.

1 - 10

FP0

Relays, Memory Areas and Constants 1.1 Type and Function of Relays

Items Shared by the Timer and Counter
Timer and counter partitioning Timers and counters share the same area. The partitioning of the area can be changed to obtain the number of timers or counters needed. Partition the area by setting system register 5.
0

Timers

to 99 100

(T0 to T99)

Counters

to 143

(C100 to C143)

Set the number of the leading counter in system register 5. The initial setting is 100, therefore 100 points are timers and 44 points are counters as shown above. For detailed information about the system register setting section 8.4

Hold type and non - hold type partitioning The contents of timer contacts, counter contacts, set value areas and elapsed value areas can be held when the power is turned off or the mode switched from RUN to PROG., and operation later resumed based on those contents. In the case of the FP0 C10/C14/C16/C32/SL1, the areas which hold their contents when the power is turned off are fixed as shown below. System register settings 6 to 8 as well as 14 become invalid.
Timer Counter Non- hold type: all points Non- hold type Hold type C10, C14, C16: From set value to C139 C32, SL1: From set value to C127

C10, C14, C16: C140 to C143 C32, SL1: C128 to C143

For the FP0 T32, system register 6 can be used to specify whether a hold type or a non - hold type is used. If the beginning of a hold type is specified using a word number, the contents of timer/counter contacts before that point will be non - hold types, and subsequent the contents of timer/counter contacts will be hold types. Default settings for hold types and non - hold types
Non - hold type
T0 to T99 (100 points)

Hold type
C100 to C143 (44 points)

If the same value is set for system register 5 and 6, timers are non - hold types, and counters are hold types. Normally, the same value should be set for both system registers.

1 - 11

and non . Memory Areas and Constants 1. ( For the FP0 C10/C14/C16/C32/SL1. mode.384 words words words (DT0 to (DT0 to (DT0 to DT1659) DT6143) DT16383) 144 words (SV0 to SV143) Timer/Counter set value area (* Note 3) Timer/Counter elapsed value area (* Note 3) Special data register SV EV 144 words (EV0 to EV143) DT 112 words (DT9000 to DT9111) 112 words (DT90000 to DT90111) Data memory for storing a target value of a timer and an initial value of a counter. Memory Areas 13 words (WX0 to WX12) (* Note 1) 13 words (WY0 to WY12) (* Note 1) 63 words (WR0 to WR62) 1. 2) There are two unit types.144 16.hold type that resets them. the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG.2 Type and Function of Memory Areas FP0 1. Data memory for storing specific data.hold type can be changed by the setting of section 8. For the actual number of points. the selection of hold type and non . Data is handled in 16-bit units (one word).660 6. refer to the table of I/O allocations in section 8.4) system register. Data memory for storing the elapsed value during operation of a timer/ counter. Stores by timer/counter number.Relays. Index register IX IY 2 words (IX. Data memory used in program. that area is fixed and allotted the numbers as shown below. Hold type and Non-hold type areas Item Data register Non-hold type Hold type C10/C14/C16 1652 words (DT0 to DT1651) 8 words (DT1652 to DT1659) C32/SL1 6112 words (DT0 to DT6111) 32 words (DT6112 to DT6143) 1 . For the FP0 T32. IY) Notes 1) The number of points noted is the number of points which the system has. Stores by timer/counter number.2. ( section 8. Code for specifying 16 internal relay points as one word (16 bits) of data.6) Register can be used as an address of memory area and constants modifier. Code for specifying 16 external output points as one word (16 bits) of data.2 Item Type and Function of Memory Areas Numbering C10/C14/ C32/SL1 C16 External input relay External output relay Internal relay Data register (* Note 2) WX WY WR DT Function T32 Code for specifying 16 external input points as one word (16 bits) of data. Various settings and error codes are stored.12 .

The numbers given in the table are the numbers when system register 5 is at its default setting. Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 DTn Example of a program which writes a numeric value to DTn.bit) units. use two data registers as a set.4 For detailed information Data Register (DT) Function of data registers (DT) Data registers are memory areas which are handled in word (16 . section 8. Memory Areas and Constants Type and Function of Memory Areas 3) The points for the timer and counter can be changed by the setting of system register 5. MV. DT n Decimal constant (K) or hexadecimal constant (H) When 32-bit (double word) data is handled in data registers.13 . DTn+1 0 0 0 1 1 0 1 0 0 1 DTn 0 1 0 0 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 higher 16-bit area lower 16-bit area 1 . and are used to store data such as numerical data configured of 16 bits.FP0 1. F0.2 Relays. The number of the data register for the lower 16 bits is specified. ffff.

hold types.hold type Hold type C10/C14/C16 1652 words (DT0 to DT1651) 8 words (DT1652 to DT1659) C32/SL1 6112 words (DT0 to DT6111) 32 words (DT6112 to DT6143) For the FP0 T32. Memory Areas and Constants 1. 1 .2 Type and Function of Memory Areas FP0 Non.Relays. non .hold type data registers reset when operation stops.hold type data and hold type data There are two types of data registers which handle data differently when the power is turned off or the mode is changed from RUN to PROG. Item Data register Non . and subsequent data registers will be hold types.: Hold type data registers hold their contents while operation stops and allow operation to be restarted with the contents still effective. Non . Non-hold type Value of system register 8 (initial number of hold type) Hold type For the default value.14 . If the beginning of a hold type data register is specified using a word number.hold types are to be used. In the case of the FP0 C10/C14/C16/C32/SL1. all data registers are hold types (set value: 0).hold type and hold type register numbers are as shown in the following table. system register 8 can be used to specify whether hold types or non . data registers before that point will be non .

High . . 1 . month. is stored.speed counter elapsed/target value area (DT9044 to DT9051/DT9104 to DT9111. minute.diagnostic error code (DT9000/DT90000) . day.FP0 1. The main functions of these registers are: Environmental settings and operation statuses The operation statuses of the PLC (programmable controller) specified with the system registers and the various types of instructions are stored. Error contents The unit in which the error occurred. second. Values should be written to DT90054 to DT90057 either using the F0 (MV) instruction or directly. . Note The values stored for the clock/calendar timer can be overwritten (to calibrate the date and time).Address where the operation error occurred (DT9017/DT90017) High .speed counter These registers are used for reading and writing the target value and elapsed value of the high. DT90044 to DT90051/DT90104 to DT90111) Clock/calendar timers (can be used with FP0 T32C only) The year.2 Relays.15 . using programming tools. hour. and other information.Self .speed counter control register (DT9052/DT90052) etc. Data cannot be written to most of them using instructions such as F0 (MV). Memory Areas and Constants Type and Function of Memory Areas Special Data Registers (from DT9000/DT90000) Function of the special data registers These data registers have specific applications. .speed counters. and day of the week tracked by the calendar timer are stored here (DT90054 to DT90057).High .

segment displays. All of the relays can be used to monitor 16 . The numbers correspond to the words as shown. The composition of the one .bit words.word (16 . These are one .Relays. WY and WR WX can be used to read in digital switch and keyboard inputs. and WY can be used for output to 7 . WY and WR Relays (X. WR0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 1 When R1 is turned on WR0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 1 1 1 . Precautions concerning usage If an on or off status of one of the relays composing the memory area changes. thus they can be treated as data memory. the memory area value will also change. WY and WR Function of WX. R) can be handled as blocks of 16 points.word memory areas is as follows.16 . Memory Areas and Constants 1. WR can also be used as a shift register.2 Type and Function of Memory Areas FP0 WX. WR0 RF RE RD RC RB RA R9 R8 R7 R6 R5 R4 R3 R2 R1 R0 WR1 R1F R1E · · · · · · · · · · · R12 R11 R10 WR2 R2F R2E · · · · · · · · · · · R22 R21 R20 Examples of using WX.bit) memory areas. Y.

Using FP Programmer II Execute “OP8” and specify the set value area.bit memory area which stores a decimal number from K0 to K32767. . Set value TM n. a set value for a timer or counter can be changed by rewriting the corresponding set value area. For detailed information section 4. The value in a set value area can be read and rewritten using a programming tool.8 SV and EV areas are in a one .Using programming tool software (NPST . K30 SVn K30 (Decimal number) A decimal number or SV area number is specified for the set value when the TM or CT instruction is entered in the program.GR/FPWIN GR) In the online monitor.FP0 1. .word. 16 . An SV is a one .2 Relays. Using set value area (SV) During RUN mode.to . execute “MONITOR & TEST RUN”/“Monitoring Registers” and specify the set value area.17 . Timer/Counter number T0 T1 ⋮ T99 C100 ⋮ Set value area (SV) SV0 SV1 ⋮ SV99 SV100 ⋮ Elapsed value area (EV) EV0 EV1 ⋮ EV99 EV100 ⋮ 1 .one correspondence with timers and counters. Memory Areas and Constants Type and Function of Memory Areas Set Value Area for Timer/Counter (SV) Function of set value areas (SV) A set value for a timer or counter is stored in the set value area (SV) with the same number as the timer or counter. The value in a set value area can be read and changed from the program by specifying the destination and other information in a data transfer instruction.

8 1 . . the timer or counter contact with the same number turns on.18 . For detailed information section 4. 16 .Using programming tool software (NPST .GR/FPWIN GR) In the online monitor. the elapsed value is stored in the elapsed value area (EV) with the same number as the timer or counter. execute “MONITOR & TEST RUN”/“Monitoring Registers” and specify the elapsed value area. . Memory Areas and Constants 1.Relays.Using FP Programmer II Execute “OP8” and specify the elapsed value area. An EV is a one .2 Type and Function of Memory Areas FP0 Elapsed Value Area for Timer/Counter (EV) Function of elapsed value areas (EV) While a timer or counter is operating. The value in elapsed value area can be read and rewritten using a programming tool. TM n. The value in elapsed value area can be read and changed from the program by specifying the a data transfer instruction.bit memory area which stores a decimal number from K0 to K32767. K 30 0 Value of SVn SVn K30 Value of EVn Tn 28 Decrements EVn K30 29 1 EVn 0 Tn turns on when decrement operation ends Using elapsed value area (EV) The elapsed value of a timer or counter in operation can be changed to prolong or shorten the operation.word. When the EV reaches zero.

10 = DT1 Modifying a constant Constant = Base value + Value in IX or IY Example 1: Modifying K100 IXK100 Base value K100 K100 K100 + + + IX value K0 = K10 = K .FP0 1.19 .3 1 .bit registers are available.2 Relays. IY) Function of index registers (IX.10 = Constant K100 K110 K90 Example 2: Modifying H10 IXH10 Base value IX value H10 + HA = H10 + H10 = Constant H1A H20 For detailed information about the index register section 4.level instructions. Changing addresses and constants using a value in an index register is called “index modification”. IY) Index registers are used to indirectly specify constants and memory area addresses in high. IX and IY. Memory Areas and Constants Type and Function of Memory Areas Index Registers (IX. Two 16 . Modifying an address Address = Base address + Value in IX or IY (K constant) Example: Modifying DT11 IXDT11 Base address 11 + 11 + 11 + IX value Target address K0 = DT11 K10 = DT21 K .

IXWR0. Memory Areas and Constants 1.2 Type and Function of Memory Areas FP0 Index modification method Example 1: Modifying a destination address X0 F0 MV. an operation error will result. At this point.bit constants. K100 is written to WR10. DT 0. Higher 16. IXWR0 The value of DT0 determines the WR address where K100 is written. → IX WR0 ↓ K10 ↓ 10 + 0 = 10 WR10 Example 2: Modifying a source address X0 F0 MV. IX and IY in combination are handled as 32 . IX ↓ K9 ↓ 9 WR0 → WR9 + 0 = 9 Cautions when using index registers An index register can not be modified with an index register. IXIX. IXIY If the result of address modification overflows the memory area. the value in WR9 is transferred to DT0. IX is specified. IX DT 0 IX setting The value of DT1 determines the WR address for transferring a value to DT0. IX IX setting F0 MV.bit data. When the DT1 value is K9. 1 . When the DT0 value is K10. F0 MV.bit area Contents of IY Contents of IX The modification result is 32 .Relays. When the address resulting from modification is negative or a large number. K100.20 .bit data. When modifying 32 .bit area Lower 16. DT 1.

32768 to K32767 (for 16-bit operation) K . When entering and reading a decimal constant. as well. In this case.] The MSB (Most Significant Bit) is called the “sign bit”. it is also occasionally handled in units of two words (32 bits). Example: Decimal number “+32” (K32) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 “+” Example: Decimal number “ .).32” (K . the decimal constant (K) is processed as binary (BIN) data in units of 16 bits. the MSB serves as the sign bit. The available range of a decimal constant is: For 16-bit operation: K-32768 to K32767 For 32-bit operation: K-2147483648 to K2147483647 1 .3 Type and Function of Constants 1.32) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 “-” Data is normally handled in units of one word (16 bits). Decimal constants are primarily used to specify data sizes and quantities such as set values for timers. [A “0” indicates a positive sign (+).2147483648 to K2147483647 (for 32-bit operation) H0 to HFFFF (for 16-bit operation) H0 to HFFFFFFFF (for 32-bit operation) Decimal Constants (K) Function of decimal constants (K) This binary data that has been converted to the decimal format. The sign is determined by the MSB “Most Significant Bit” (bit position 15). In the PLC. Memory Areas and Constants 1.21 . as shown below. specify the value by entering a “K” at the beginning. however. and a “1” indicates a negative sign ( .FP0 Relays.3 Item Type and Function of Constants Numbering C10/C14/ C32/SL1 C16 K H Function T32 Constant Decimal constants Hexadecimal constants K .

3 Type and Function of Constants FP0 Hexadecimal Constants (H) Function of hexadecimal constants (H) Hexadecimal constants are values which have been converted from binary into hexadecimal.Relays. however.level instructions. Hexadecimal constants are primarily used to specify an ordering of 1’s and 0’s in 16 . Memory Areas and Constants 1.22 . it is also occasionally handled in units of two words (32 bits). as shown below. the hexadecimal constant (H) is processed as binary (BIN) data in units of 16 bits. The available range of a hexadecimal constant is: For 16-bit operation: H0 to HFFFF For 32-bit operation: H0 to HFFFFFFFF 1 . When entering and reading a hexadecimal constant.bit data. In the PLC. Example: Hexadecimal number “2A” (H2A) Bit position 15 Hexadecimal · · 1211 · · 8 7 · · 4 3 · · 0 0 0 A 2 Binary data 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 Data is normally handled in units of one word (16 bits). Hexadecimal constants are also used to specify BCD data. such as system register settings and specification of control data for high. specify the value by entering an “H” at the beginning.

The character constant is expressed by adding the prefix “M” to the data. Example: When character constant “MEWNET” is input T 54 E 45 N 4E W 57 E 45 M Character constant 4D ASCII Hex code One word One word One word When using an FP programmer II.FP0 Relays.3 Type and Function of Constants Character Constants (M) Function of character constants (M) The character constant is used to express ASCII code in binary data. the set characters appear in the display on FP programmer II.GR/FPWIN GR).23 . F95 (ASC) instruction and F149 (MSG) instruction. as shown below. Input can be done using the programming tool software (NPST . The character constant is stored in a specified memory area in the PLC as BIN data. you can only confirm program. There are only two instructions in which character constants can be specified. Memory Areas and Constants 1. When an F149 (MSG) instruction is executed. 1 .

24 .32768 32767 Hexadecimal constants H7FFF · · · H0001 H0000 HFFFF · · · H8000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 · · · 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 K 32-bit data Data which can be handled in the PLC (32-bit binary data) 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 · · · Decimal constants K 2147483647 · · · K 1 K 0 K -1 · · · K . Memory Areas and Constants 1.4.Relays.4 Data Ranges Which can be Handled in the PLC FP0 1.1 Data Ranges Which can be Handled in the PLC 16-bit data Data which can be handled in the PLC (16-bit binary data) 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 · · · Decimal constants K · · · K K K 1 0 -1 · · · .2147483648 Hexadecimal constants H7FFFFFFF · · · H00000001 H00000000 HFFFFFFFF · · · H80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 · · · 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 .4 Data Ranges Which can be Handled in the PLC 1.

FP0 Relays.384 8. data is regarded as having a zero or positive value and when the MSB is “1”.4” Most significant bit: 1 (negative value) 1 .868 Most significant bit: 0 (positive value) A negative number is expressed as a two’s complement (the bits of the 16 . data is regarded as having a negative value.024 512 256 128 64 32 16 8 4 2 1 The data size is indicated by the these bits.25 .4 Data Ranges Which can be Handled in the PLC Expression of decimal numbers in PLC Decimal number is basically processed in 16-bit or 32-bit binary. the bits following the most significant bit express the size of the data.4” 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 Binary expression of decimal number “4” Invert each bit 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 Add 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 Binary expression of decimal number “ . The most significant bit (MSB) expresses negative or positive sign of the data.096 2. 1.048 1. Example 2: Expressing the decimal number “ .192 4. When the MSB is “0”.024 + 512 + 256 + 64 + 8 + 4 = 1. Memory Areas and Constants 1. Example 1: Expressing the decimal number “1868” 0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 0 16.bit binary data of the positive number are inverted and 1 is added to the result). In the case of positive numbers.

Relays. overflow or underflow will result. BCD is an acronym for binary coded decimal and refers to expressing each digit of a decimal number by four binary digits.4 Data Ranges Which can be Handled in the PLC FP0 Data ranges which can be handled in the PLC Data which can be handled by binary operation are: For 16-bit operation: K-32768 to K32767 For 32-bit operation: K-2147483648 to K2147483647 Data which can be handled by BCD operation are: For 16-bit (4-digit BCD H code) operation: H0 to H9999 For 32-bit (8-digit BCD H code) operation: H0 to H99999999 If any of the above ranges are exceeded when processing the corresponding data.26 . When the decimal number is expressed in BCD Decimal number 6 0110 4 0100 5 Each digit is converted to binary 0101 → H645 BCD code (Binary coded decimal) 1 . Memory Areas and Constants 1.

FP0 Relays. 8 . the carry flag R9009 turns on.4. value H 0 (Underflow results if under the minimum value. . Overflow and underflow during binary operation If any of the following values are exceeded.digit BCD code operation (Overflow results if over the maximum value. . . . value K 32767 . . . 1 0 -1 H 0001 H 0000 H FFFF . .) Max. value H (Underflow results if under the minimum value. . .bit binary operation (Overflow results if over the maximum value. . .27 .) Max. 1 0 -1 H 00000001 H 00000000 H FFFFFFFF . Min.digit BCD code operation (Overflow results if over the maximum value. 16. 32. .) 1 . . value . . overflow or underflow will result. K K K Min. value H 9999 . value . Only positive values can be handled. K-32768 H 8000 K-2147483648 H 80000000 (Underflow results if under the minimum value. H 7FFF . When an overflow or underflow occurs.2 Overflow and Underflow Operation instructions occasionally produce a value which is outside of the allowed range.4 Data Ranges Which can be Handled in the PLC 1. K K K Min.bit binary operation (Overflow results if over the maximum value.) Overflow and underflow during BCD operation If any of the following values are exceeded. This is called “overflow” if the value exceeds the maximum value and “underflow” if the value falls short of the minimum value. .) 0 Min. Memory Areas and Constants 1.) Max. .) (Underflow results if under the minimum value. H 7FFFFFFF .) Max. value H 99999999 . . 4 . value K 2147483647 . . overflow or underflow will result.

Relays. value K-32768 H 8000 Underflow Example 1: For K32767 + K1 (overflow) The operation result is K . Memory Areas and Constants 1.. The max.32768 .H1 (underflow) The operation result is H9999 and the carry flag turns on.bit binary operation Overflow Max. Example 2: For H0 .. Example 2: For K .. 0 .. . Min. value links with the min. value K 32767 H 7FFF .. value H 9999 The max... 4 .K1 (underflow) The operation result is K32767 and the carry flag turns on. value H Underflow Example 1: For H9999 + H1 (overflow) The operation result is H0 and the carry flag turns on.digit BCD code operation Overflow Max. 1 .. value. value links with the min.28 . ... 16 . Min. K K K 1 0 -1 H 0001 H 0000 H FFFF .32768 and the carry flag turns on..4 Data Ranges Which can be Handled in the PLC FP0 Values when overflow or underflow occurs Numerical value handled by the FP0 all form a loop joined at the maximum value and the minimum value as shown below. value..

. . . . . .Chapter 2 Basic Instructions 2.1 2. . . . . . . . 2 .13 . . . . 2 . . . . . 2 . . . . .3 Table of Basic Instructions . . . . .7 Explanation of Basic Instructions . . . . . . . .2 2. . . . . . . . . . . .3 Composition of Basic Instructions . . . . . . .

2 .Basic Instructions FP0 2.

1.FP0 Basic Instructions 2. Out (OT) instruction Output the operation result to the specified coil. this is expressed by the combination of the relay coil and contact. 2. Example: Start (ST) instruction Read the on or off status of the specified contact. Output the operated result (on and off) to the external output (Y0). As shown in the illustration below.1 Composition of Basic Instructions Sequence Basic Instructions These basic instructions perform bit unit logic operations and are the basis of the relay sequence circuit.1 Composition of Basic Instructions 2. Refer to the explanation of each instruction.3 . Example: Input contacts Address X0 0 ST R0 1 Internal relay contacts 4 ST OT AN OR OT Output coil X1 R0 Internal relay coil R0 Y10 Bus line There are several relay types which are explained in section 1. Read the status of external input (X0). and the relay which can be specified depends on the instruction.

4 . the instructions are composed of several steps. 2.Basic Instructions 2.1s units timer (Timer 5) Set value X0 TMX 5. To specify set values. K 30 T5 Constant of timer 5 Y0 Example of setting 3. and T5 turns on when 3.1s units timer (timer 5) Timing begins when X0 turns on.1 Composition of Basic Instructions FP0 Basic Function Instructions These are the timer.0 seconds in the 0.0 seconds elapses. counter and shift register instructions. Example: 0.

2. Step ladder control Part of the program (specified with SSTP or STPE) is treated as an independent “process”. and sequential and branch execution is carried out. Jump Skips execution of part of the program (specified with JP or LBL) when the appropriate condition is met.FP0 Basic Instructions 2. depending on the conditions. Subroutine program A program which is repeatedly executed for a particular operation is called as a subroutine (specified with SUB or RET) and executed when needed. It is possible to change the sections to be executed.5 .1 Composition of Basic Instructions Control Instructions These instructions determine the order and flow of program execution. Specify the section which will execute. or to execute only the necessary segments. This shortens program execution time. enter an interrupt program (specified with INT or IRET) if you need a program which will execute immediately when a certain condition is met. When an interrupt is received. Interrupt program In addition to the normal program. This is composed of several steps. Master control relay A certain part of the program (specified with MC or MCE) is only executed when the appropriate condition is met. the normal program is interrupted and the interrupt program is executed.

1 Composition of Basic Instructions FP0 Data Compare Instructions This is a group of instructions which compare two data. Example: <=. DT 10. Y0 is turned on.6 . A contact is turned on or off based on the result of the comparison. K100 Y0 Example of comparing the value of DT10 to K100. If the value of DT10 is less than K100. 2.Basic Instructions 2. Each comparison instruction is composed of several steps. Y0 is turned off. If the value of DT10 is greater than K100.

R.21 Push stack Read stack Pop stack Leading edge differential Trailing edge differential Set Reset Keep No operation PSHS RDS POPS DF DF/ SET RST KP NOP Set Reset 2 . 1 AND stack OR stack ORS Connects the multiple instruction blocks in paral.1 rially.R.18 2 .1 lel.26 2 . Connects a Form B (normally closed) contact serially.Y. Connects the multiple instruction blocks serially.26 2 .C Connects a Form B (normally closed) contact in 1 parallel. Connects a Form A (normally open) contact in parallel.Y.T.R.1 put. 1 2 .R. (DF ) Turns on the contact for only one scan when the 1 leading edge of the trigger is detected.16 2 .14 2 .R <S> Y. No operation.C Begins a logic operation with a Form A (normally 1 open) contact. Turns on the contact for only one scan when the 1 trailing edge of the trigger is detected.R X. Output is set to and held at off. 1 Reads the operated result stored by the PSHS instruction.T.C Y.T.T.R <R> KP 2.C X.T. 1 Connects a Form A (normally open) contact se.T.R.30 2 .Y.2 Name Start Start Not Out Not AND AND Not OR OR Not Table of Basic Instructions Boolean ST ST/ OT / AN AN/ OR OR/ ANS X. 1 1 X.C Symbol Description Steps Page 2 .23 2 .23 2 .2 Basic Instructions Table of Basic Instructions 2. Inverts the operated result up to this instruction. Outputs the operated result to the specified out.7 .FP0 2.19 Sequence basic instructions X.R.30 2 . 3 3 1 1 (DF/ ) Y.Y.14 2 .17 2 . Output is set to and held at on. Begins a logic operation with a Form B (normally 1 closed) contact.14 2 . Stores the operated result up to this instruction.18 2 .32 2 .23 2 .Y.17 2 .34 Reads and clears the operated result stored by 1 the PSHS instruction. Outputs at set trigger and holds until reset trigger turns on.C X.Y.

4. the specified output and R900D are set to on.2 or later or FP Programmer II (AFP1114V2) is needed to enter the TML and F183 (DSTM) instruction. timer contact is set to on.235 3 . Y.52 2 .01 second.35 2 .272 Basic function instructions After set value “n” × 0. timer contact is set to on.214 Control instructions Master control relay Master control relay end MC MCE (MCE n) (MC n) Master control area Starts the master control program. D Y. After set value “n” × 0.01 second.52 Note NPST .2 Table of Basic Instructions FP0 Name Timer Boolean TML (*Note) TMR TMX TMY Symbol Description After set value “n” × 0.bit) Auxiliary timer (32.1 second.GR Ver. D Auxiliary timer (16.35 2 . 3 Count Reset CT n 2 . Ends the master control program.01 second.42 UP/DOWN counter F118 (UDC) UP/DOWN Count F118 UDC S Increments or decrements from the preset 5 value “S” based on up/down input.49 Left/right shift register F119 (LRSR) L/R Data F119 LRSR D1 Shift D2 Reset Shifts one bit of the 16-bit data range spe.35 2 . After set value “n” × 1 second. 3 .4 tact is set to on.R F137 STMR. 5 After set value “S” × 0. timer con. 3 . S.bit) Counter F137 (STMR) F183 (DSTM) (*Note) CT 5 After set value “S” × 0.001 second.R F183 DSTM. TM n Steps Page 3 3 3 2 .5 cified by “D1” and “D2” to the left or to the right. S. 2 2 2 . the specified output and R900D are set to on. 1 2 . Decrements from the preset value “n”.35 3 .8 .211 Reset D Shift register SR Data Shift Reset SR WR n Shifts one bit of 16-bit data [word internal relay (WR)] to the left.Basic Instructions 2. timer contact is set to on. 2.

Ends the subroutine program.79 2 .66 2 . The start of program “n” for process control Start the specified process “n” and clear the process currently started.66 (STPE ) Subroutine instructions Subroutine call Subroutine entry Subroutine return CALL SUB RET (RET ) (CALL n) Executes the specified subroutine program.76 2 .59 (ED ) 2 .66 Clear step Step end CSTP STPE (CSTP n) 3 1 2 .66 2 . Indicates the start of the subroutine program “n”. The operation of program is ended when the trigger turns on. (Scan execution type) Start the specified process “n” and clear the process currently started. 1 5 ICTL S1.66 NSTP (NSTP n) 3 2 .76 2 .76 (SUB n) Interrupt instructions Interrupt Interrupt return Interrupt control INT IRET ICTL (DF) (INT n) Indicates the start of the interrupt program 1 “n”.64 (CNDE ) Step ladder instructions Start step Next step SSTP NSTL (NSTL n) (SSTP n) 3 3 2 .84 (IRET Ends the interrupt program. The operation of program is ended.FP0 2. S2 2. (Pulse execution type) Resets the specified process “n”. End of step ladder area 1 1 (LBL n) (LBL n) LOOP n. S 2 . Indicates the end of a main program.56 The program jumps to the label instruction 2 1 and continues from there.2 Basic Instructions Table of Basic Instructions Name Jump Label Loop Label End Conditional end Boolean JP LBL LOOP LBL ED CNDE Symbol (JP n) Description Steps Page 2 . ) 2 . Select interrupt enable/disable or clear in “S1” and “S2” and execute.79 2 . 2 1 1 2 .63 2 . The program jumps to the label instruction 4 and continues from there (the number of 1 jumps is set in “S”).9 .

bit data in the comparative condition “(S1+1.92 2 .Basic Instructions 2.90 ST < < S1. S2).” Begins a logic operation by comparing two 32.bit data in the comparative condition “(S1+1.bit data compare ( ) (Start) STD = D= S1.” Begins a logic operation by comparing two 32.” Begins a logic operation by comparing two 32.” 5 2 . S2 5 2 . S2 Begins a logic operation by comparing two 16.10 . S1) > (S2+1. S2 5 2 .bit data in the comparative condition “(S1+1. S2).bit data in the comparative condition “S1 ≦ S2.90 ST <= < = S1. S1)≦ (S2+1.bit data in the comparative condition “S1 > S2.” Begins a logic operation by comparing two 16. S1) = (S2+1.bit data in the comparative condition “(S1+1.” Begins a logic operation by comparing two 32.” Begins a logic operation by comparing two 16.bit data in the comparative condition “S1 ≧ S2.90 ST > > S1. S1) ≠ (S2+1. S2).” Begins a logic operation by comparing two 16.” Begins a logic operation by comparing two 16.bit data in the comparative condition “(S1+1.” Begins a logic operation by comparing two 32.bit data in the comparative condition “S1 = S2. S2 9 2 .92 STD <> D< > S1. S2 5 2 .” Begins a logic operation by comparing two 32.90 32. S2 5 2 .92 STD < D< S1. S2 9 2 . S2 9 2 . S2 9 2 . S2).2 Table of Basic Instructions FP0 Name Boolean Symbol Description Steps Page Data compare instructions 16.bit data compare ( ) (Start) ST = = S1. S1) < (S2+1.bit data in the comparative condition “S1 < S2. S1)≧ (S2+1.90 ST >= > = S1. S2 9 2 . S2 5 2 .90 ST <> < > S1.” Begins a logic operation by comparing two 16.bit data in the comparative condition “(S1+1. S2).bit data in the comparative condition “S1 ≠ S2.92 STD > D> S1.92 STD <= D< = S1. S2).92 STD >= D> = S1. S2 9 2 .

S2 9 2 . S2 5 2 .bit data in the comparative condition “(S1+1.94 AN <> < > S1. S1) = (S2+1. S2 9 2 .” Connects a Form A (normally open) contact serially by comparing two 32.” Connects a Form A (normally open) contact serially by comparing two 32. S2).bit data in the comparative condition “S1 < S2. S2 9 2 .” Steps 5 Page 2 .” Connects a Form A (normally open) contact serially by comparing two 16. S2 5 2 .” Connects a Form A (normally open) contact serially by comparing two 32.” Connects a Form A (normally open) contact serially by comparing two 16. S2). S2 9 2 .94 AN < < S1. S2 Description Connects a Form A (normally open) contact serially by comparing two 16.11 .bit data in the comparative condition “(S1+1.96 AND > D> S1. S2 9 2 .bit data in the comparative condition “S1 ≦ S2. S1) > (S2+1.96 AND < D< S1.2 Basic Instructions Table of Basic Instructions Name 16. S2). S2 9 2 .94 AN >= > = S1. S2 5 2 .96 2 .96 AND <> D< > S1.bit data in the comparative condition “(S1+1. S1) ≧ (S2+1. S2 5 2 . S1) ≦ (S2+1.bit data in the comparative condition “S1 = S2.94 AN > > S1.” Connects a Form A (normally open) contact serially by comparing two 16.94 32. S2). S2 5 2 .96 AND <= D< = S1. S1) ≠ (S2+1. S1) < (S2+1.bit data compare (AND) AND = D= S1.” Connects a Form A (normally open) contact serially by comparing two 32.bit data compare (AND) Boolean AN = Symbol = S1.” Connects a Form A (normally open) contact serially by comparing two 32.FP0 2.96 AND >= D> = S1.bit data in the comparative condition “S1 ≧ S2.bit data in the comparative condition “(S1+1.bit data in the comparative condition “S1 > S2.94 AN <= < = S1. S2).” Connects a Form A (normally open) contact serially by comparing two 16. S2).bit data in the comparative condition “(S1+1.bit data in the comparative condition “(S1+1.” Connects a Form A (normally open) contact serially by comparing two 16.bit data in the comparative condition “S1 ≠ S2.” Connects a Form A (normally open) contact serially by comparing two 32.

98 OR < < S1.” 9 2 .” Connects a Form A (normally open) contact in parallel by comparing two 32. S1) ≦ (S2+1. S2 9 2 .” Steps 5 Page 2 . S2). S2 9 2 .2 Table of Basic Instructions FP0 Name 16. S1) > (S2+1.” 5 2 .bit data in the comparative condition “(S1+1.” Connects a Form A (normally open) contact in parallel by comparing two 32.100 ORD <> D< > S1. S2). S1) < (S2+1.100 ORD < D< S1. S2). S2 2 .bit data in the comparative condition “(S1+1. S2).bit data in the comparative condition “(S1+1.” Connects a Form A (normally open) contact in parallel by comparing two 16.” 5 2 .100 2 .” Connects a Form A (normally open) contact in parallel by comparing two 16.12 .bit data in the comparative condition “S1 = S2. S1) ≧ (S2+1. S2 Connects a Form A (normally open) contact 5 in parallel by comparing two 16.bit data in the comparative condition “(S1+1.” Connects a Form A (normally open) contact in parallel by comparing two 32. S2).bit data in the comparative condition “S1 ≧ S2. S2 Connects a Form A (normally open) contact 5 in parallel by comparing two 16.” Connects a Form A (normally open) contact in parallel by comparing two 32. S2 9 2 .98 OR <> < > S1.bit data in the comparative condition “S1 ≠ S2.100 ORD > D> S1.100 ORD <= D< = S1. S2). S2 9 2 .bit data in the comparative condition “S1 > S2.98 OR > > S1.bit data in the comparative condition “S1 ≦ S2.” Connects a Form A (normally open) contact in parallel by comparing two 32.100 ORD >= D> = S1. S1) = (S2+1. S1) ≠ (S2+1.98 OR <= < = S1.98 OR >= > = S1.98 32. S2 Description Connects a Form A (normally open) contact in parallel by comparing two 16.bit data compare (OR) ORD = D= S1.bit data in the comparative condition “(S1+1.bit data compare ( ) (OR) Boolean OR = Symbol = S1. S2 2 .” Connects a Form A (normally open) contact in parallel by comparing two 32.bit data in the comparative condition “S1 < S2.Basic Instructions 2. S2 9 2 .bit data in the comparative condition “(S1+1. S2 Connects a Form A (normally open) contact 5 in parallel by comparing two 16. S2 2 .

as well as types of flags and the conditions under which they go on and off. 2 . Boolean This indicates how codes are used when data is entered using boolean entry with the programming tool software (NPST GR/FPWIN GR).13 . For information on types of memory areas. On the programming tool software (NPST . refer to section 1.GR/FPWIN GR).GR/FPWIN GR) screen. Number of steps This is the number of steps used with this instruction.FP0 Basic Instructions 2. types of registers and constants which can be used as operands. For information on types of relays.1.3 Explanation of Basic Instructions 2. Available operands This indicates types of relays which can be used with the instruction. coils are displayed using the [ ] symbol.2. the operation and relay movements are shown. Explanation of program example and flag conditions Using the program given in the above ladder diagram as an example.3 Explanation of Basic Instructions Layout of instruction explanations Ladder diagram This indicates the ladder diagram screen displayed when data is entered using the programming tool software (NPST . Data is also entered in this format when using the FP Programmer II. refer to section 1.

2 .Basic Instructions 2. C14. C32. X0 Y0 Y1 on off on off on off Description The ST instruction starts logic operations and regards the input contact specified at the start as a Form A (normally open) contact. OT: Outputs the operation result.3 Explanation of Basic Instructions Step Availability FP0 ST ST/ OT Outline Program example Start Start Not Out 1 1 1 FP0 C10. The ST/ instruction starts logic operations and regards the input contact specified at the start as a Form B (normally closed) contact. The OT instruction outputs the operation result to a specified coil. 1 Ladder Diagram X0 0 X0 2 Start Start Not Out Out Y1 Y0 Boolean Address 0 1 2 3 Instruction ST OT ST/ OT X Y X Y 0 0 0 1 Operands Instruction X ST. Y1 goes on when X0 turns off.14 . SL1 ST. ST/ OT A N/A Relay Y A A R A A Timer/Counter Contact T A N/A C A N/A A: Available N/A: Not Available Explanation of example Y0 goes on when X0 turns on. C16. ST/: Begins a logic operation. T32.

such as emergency stop switch with a Form B (normally closed) contact is programmed.FP0 Basic Instructions 2. be sure to use the ST instruction. Y0 The OT instruction can be used consecutively.3 Explanation of Basic Instructions Precautions during programming The ST and ST/ instructions start from the bus line. X0 Y0 Y1 Y2 When an external switch. 2 .15 . X0 Y0 The OT instruction cannot start directly from the bus line.

16 . T32. Y0 goes off and Y1 goes on when X0 turns off. 1 FP0 C10. C14. X0 Y0 Y1 on off on off on off Description The / (Not) instruction inverts the operation result up to this instruction. SL1 2 Ladder Diagram X0 0 Y1 Not Y0 Boolean Address 0 1 2 3 Instruction ST OT / OT Y 1 X Y 0 0 Explanation of example Y0 goes on and Y1 goes off when X0 turns on. 2 . C32. C16.Basic Instructions 2.3 Explanation of Basic Instructions Step Availability FP0 / Outline Program example Not Inverts the operation result up to this instruction.

X0 X1 X2 Y0 on off on off on off on off Description Performs a logical AND operation with the results of the immediately preceding serially connected operation. AN/: Connects Form B (normally closed) contacts in series. X0 X1 X2 X3 2 . 3 Ladder Diagram Boolean Address 0 Instruction ST AN AN/ OT X X X Y 0 1 2 0 X0 0 X1 X2 AND AND Not Y0 1 2 3 Operands Instruction X AN. Use the AN/ instruction when normally closed contacts (Form B contacts) are serially connected.FP0 Basic Instructions 2. AN/ A Relay Y A R A Timer/Counter Contact T A C A A: Available Explanation of example Y0 goes on when both X0 and X1 turn on and also X2 turns off. T32. C14. C32.17 . SL1 AN AN/ Outline Program example AND AND Not 1 1 AN: Connects Form A (normally open) contacts in series. X0 X2 X1 X3 Y0 Y1 The AN and AN/ instructions can be used consecutively. Precautions during programming Use the AN instruction when normally open contacts (Form A contacts) are serially connected.3 Explanation of Basic Instructions Step Availability FP0 C10. C16.

C14. C16. X0 X1 X2 X3 Y0 2 . C32. The OR instruction starts from the bus line.3 Explanation of Basic Instructions Step Availability FP0 OR OR/ Outline Program example OR OR Not 1 1 FP0 C10. OR/ A Relay Y A R A Timer/Counter Contact T A C A A: Available Explanation of example Y0 goes on when either X0 or X1 turns on or X2 turns off. X0 X1 X2 Y0 on off on off on off on off Description Performs a logical OR operation with the results of the immediately preceding operation connected in parallel.18 . OR/: Connects Form B (normally closed) contacts in parallel. The OR and OR/ instructions can be used consecutively. SL1 OR: Connects Form A (normally open) contacts in parallel. 4 Boolean Address Y0 0 1 2 X2 OR OR Not 3 Instruction ST OR OR/ OT X X X Y 0 1 2 0 Ladder Diagram X0 0 X1 Operands Instruction X OR. T32.Basic Instructions 2. Precautions during programming Use the OR instruction when normally open contacts (Form A contacts) are connected in parallel. Use the OR/ instruction when normally closed contacts (Form B contacts) are connected in parallel.

3 Explanation of Basic Instructions Step ANS Outline Program example AND stack 1 Availability FP0 C10. C14. (X0 OR X1) AND (X2 OR X3) → Y0 Block 1 X0 X1 X2 X3 Y0 on off on off on off on off on off Block 2 Description Blocks connected in parallel are connected in series. + A block begins with the ST instruction.FP0 Basic Instructions 2. 2 .19 . T32. Boolean Address 0 X0 0 X1 X3 Block 2 Block 1 X2 Y0 1 2 3 4 5 Instruction ST OR ST OR ANS OT Y 0 X X X X 0 1 2 3 Ladder Diagram Explanation of example Y0 goes on when X0 or X1 and X2 or X3 turn on. SL1 Multiple blocks are connected in series. C32. C16.

. . . ST Block 3 OR X X 4 5 Block 1 Block Block 2 3 ANS . . .3 Explanation of Basic Instructions FP0 When blocks are consecutive When blocks are consecutive. a division of the blocks should be considered. . . Block ST 1 OR ST Block 2 OR X X X X 0 1 2 3 1 1 2 Block 5 Block 4 Block 4 X4 X5 Y0 Block 5 X0 X1 X2 X3 ANS . . OUT Y 0 2 When entered using FP Programmer II Key operation ANS: AN Y-WY STK IX/IY WRT 2 . . .Basic Instructions 2. . . . .20 . such as that shown below. . . . .

C14. T32. 2 . C16. Ladder Diagram Boolean Address 0 Instruction ST AN ST AN ORS OT Y 0 X X X X 0 1 2 3 X0 X1 X3 Block 1 Block 2 Y0 1 2 3 4 5 0 X2 Explanation of example Y0 goes on when both X0 and X1 or both X2 and X3 turn on.3 Explanation of Basic Instructions Step ORS Outline Program example OR stack 5 1 Availability FP0 C10.21 . SL1 Multiple blocks are connected in parallel. +  A block begins with the ST instruction.FP0 Basic Instructions 2. C32. (X0 AND X1) OR (X2 AND X3) → Y0 Block 1 X0 X1 X2 X3 Y0 on off on off on off on off on off Block 2 Description Blocks connected in series are connected in parallel.

22 . 1 Block ST 3 AN X X 4 5 2 ORS . Block 5 OUT Y 0 When entered using FP Programmer II Key operation ORS: OR R-WR STK IX/IY WRT 2 . . . . .3 Explanation of Basic Instructions FP0 When blocks are consecutive When blocks are consecutive. . . .Basic Instructions 2. Block ST 1 AN Block 4 ST Block 5 X X X 0 1 Block 4 Block 1 Block 2 Block 3 X0 X2 X4 X1 X3 1 X5 2 Y0 2 Block AN X 3 2 ORS . . . . . . a division of the blocks should be considered. . . . . such as that shown below.

X0 X1 Y0 X2 Y1 X3 Y2 on off on off on off on off on off on off on off 2 . Reads the stored result using the POPS instruction and Y2 goes on when X3 turns off.FP0 Basic Instructions 2. T32. C16. POPS: Reads and clears the operation result stored by the PSHS instruction. Boolean Address 0 1 X0 0 X2 Push Stack X3 Read Stack Pop Stack Y1 Y2 X1 Y0 2 3 4 5 6 7 8 9 Instruction ST PSHS AN OT RDS AN OT POPS AN/ OT X Y 3 2 X Y 2 1 X Y 1 0 X 0 Program example Ladder Diagram Explanation of example When X0 turns on: Stores the operation result up to the PSHS instruction and Y0 goes on when X1 turns on.23 . SL1 PSHS: Stores the operation result up to this instruction. 6 RDS: Reads the operation result stored by the PSHS instruction. Reads the stored result using the RDS instruction and Y1 goes on when X2 turns on. C32. C14.3 Explanation of Basic Instructions Step Availability PSHS RDS POPS Outline Push stack Read stack Pop stack 1 1 1 FP0 C10. Also clears the result stored by the PSHS instruction.

followed by another contact or contacts. using this result. continues operation from the next step. These instructions are used if there is branching from a single contact. continues operation from the next step. When you are finished. Precautions during programming You can continue to use the same operation result several times by repeatedly using the RDS instruction. Also clears the operation result stored by the PSHS instruction.Basic Instructions 2. X0 X1 X2 RDS X4 X6 X5 X7 Y3 Y4 X3 Y0 Y1 Y2 2 . RDS (reads operation result): Reads the operation result stored using the PSHS instruction and.24 .3 Explanation of Basic Instructions FP0 Description One operation result can be stored in memory and read. POPS (resets operation contents): Reads the operation result stored using the PSHS instruction and. X0 PSHS RDS X1 X2 X3 X4 Y0 Y1 Y2 POPS An RDS instruction can be used repeatedly any number of times. PSHS (stores operation result): Stores the operation result up to this instruction and continues execution from the next step. using this result. and multiple processes performed. be sure to issue the POPS instruction.

. . reading will take place in order beginning from the last data stored by the PSHS instruction. 6 AN X 6 PSHS . . 8 times If a POPS instruction is used during repeated use of a PSHS instruction. . caution is required as correct operation cannot be guaranteed. . 5 AN X 5 PSHS . . 3 Reading AN X 8 OT Y 3 2 . . . . If used nine times. . .FP0 Basic Instructions 2. . . . . 7 AN X 7 PSHS .25 . 4 Reading AN X 7 OT Y 2 POPS . 3 AN X 3 PSHS .3 Explanation of Basic Instructions Caution regarding repeated use of a PSHS instruction A PSHS instruction can be used up to eight times before the next POPS instruction is entered. . . . . . . . . 8 AN X 8 OT Y 0 1 2 3 4 5 6 7 8 Max. X0 X1 X2 X3 X4 X5 X6 X7 X8 Y0 ST X 0 PSHS . . 5 Reading AN X 6 OT Y 1 POPS . . 2 AN X 2 PSHS . . 1 AN X 1 PSHS . . X0 X1 X2 X3 X4 X5 X6 1 2 3 4 5 Y0 Y1 Y2 Y3 Y4 Y5 X7 X8 X9 XA POPS . . . 4 AN X 4 PSHS . . . . . . . .

DF/: Turns on the contact for only one scan when the trailing edge of the trigger is detected.3 Explanation of Basic Instructions Step Availability FP0 DF DF/ Outline Leading edge differential Trailing edge differential 1 1 FP0 C10.26 . Y1 goes on for only one scan when the trailing edge (on → off) of X1 is detected. C32. C14. C16. 7 Boolean Address 0 1 2 Y1 (DF/) Trailing edge differential 3 4 5 Instruction ST DF OT ST DF/ OT Y 1 Y X 0 1 X 0 Program example Ladder Diagram Leading edge differential X0 0 X1 3 (DF) Y0 Explanation of example Y0 goes on for only one scan when the leading edge (off → on) of X0 is detected. X0 X1 Y0 Y1 on off on off on off on off ↔ 1 scan ↔ 1 scan ↔ 1 scan ↔ 1 scan Leading edge Trailing edge 2 .Basic Instructions 2. SL1 DF: Turns on the contact for only one scan when the leading edge of the trigger is detected. T32.

Leading edge For detailed information section 4. only a change in the on and off status of the contact is detected. output will not be obtained. if the execution condition is initially on such as when the mode is changed to RUN or the power turned on in RUN mode. There is no limit on the number of times the DF and DF/ instructions can be used. operation will be as follows. X0 (DF) X1 Y0 X0 X1 Y0 1 2 3 1 2 3 When X1 is off. Example: Leading edge differential (DF) instruction X0 on off Y0 on off DF instruction RUN not executed. Even if X1 rises when X0 is on. 2 . then Y0 will go on for one scan.FP0 Basic Instructions 2.5 Precautions during programming With a program such as the one in the figure below. Y0 remains off.3 Explanation of Basic Instructions Description The DF instruction executes and turns on output for only one scan duration when the trigger changes from an off to an on state. Thus.27 . If X0 rises when X1 is on. even if X0 rises. Y0 remains off. The DF/ instruction executes and turns on output for only one scan duration when the trigger changes from an on to an off state. With the DF and DF/ differential instructions.

Basic Instructions 2. R9014 DF Y0 R9014 turns on from the second scan after RUN begins. R9013 DF Y0 R9013 only turns on during the first scan after RUN begins. output is obtained.LOOP and LBL instructions . For detailed information section 4.Subroutine instructions When combining a differential instruction with an AND stack or pop stack instruction. therefore output is not obtained.5 .Step ladder instructions . With the following program.28 .6 is correct. Exercise caution when used in combination with instructions which change the order of instruction execution such as MC and MCE or JP and LBL (see below). R9010 DF Y0 R9010 is always on.JP and LBL instructions . take care that the syntax section 4.CNDE instruction . For detailed information 2 .3 Explanation of Basic Instructions FP0 In the following program the execution condition (trigger) is initially on.MC and MCE instructions .

3 Explanation of Basic Instructions Example of a differential instruction application Using a differential instruction makes it easier to adjust a program. X0 DF Y0 X1 DF R0 R0 Y0 X0 X1 R0 Y0 Y0 With no differential instruction Application to an alternating circuit A differential instruction can also be applied to an alternating circuit to hold and release the circuit using a single signal.FP0 Basic Instructions 2.hold circuit Using a differential instruction makes it possible to handle long input signals. Example 1: X0 DF R0 R0 Y0 Y0 Y0 R0 Example 2: X0 DF R0 Y0 R0 Y0 Y0 R0 2 .29 . Application to a self .

When X1 turns on.) 2 . SL1 SET: When the execution conditions have been satisfied. T32. Y0 goes off and stays off.30 〈 X1 〈R Y0 〈 20 〈S . Output turns off and stays off even if the trigger’s state changes. the output is turned off. Boolean Address Y0 20 21 24 25 Reset Instruction ST SET ST RST X Y X Y 0 0 1 0 Program example Ladder Diagram X0 Set 24 Output destination Operands Instruction X SET. (Even if a total check is run. this is not handled as a syntax error. Output turns on and holds on even if the trigger’s state changes.3 Explanation of Basic Instructions Step Availability FP0 SET RST Outline Set Reset 3 3 FP0 C10. X0 X1 Y0 on off on off on off Description The SET instruction executes when the trigger is turned on. C32. C16. You can use relays with the same number as many times as you like with the SET and RST instructions.Basic Instructions 2. and the on status is retained. RST: When the execution conditions have been satisfied. the output is turned on. C14. RST N/A Relay Y A R A Timer/Counter Contact T N/A C N/A A: Available N/A: Not Available Explanation of example When X0 turns on. and the off status is retained. Y0 goes on and holds on. The RST instruction executes when the trigger is turned on.

〈R 2 .FP0 Basic Instructions 2. X1. Precautions during programming The output destination of a SET instruction is held even during the operation of an MC instruction. and X2 are turned on 〈 This portion of the program is processed as if Y0 were on. X1 Y0 X0 Y0 〈S Y0 I/O update is performed when an ED instruction is executed. the Y0 output is on. In the above example. X2 〈S Y0 〈 This portion is processed as if Y0 were off. Example: When X0.3 Explanation of Basic Instructions When SET and RST instructions are used When the SET and RST instructions are used. (DF) X1 (DF) 〈 〈R Y0 〈 X0 〈S Y0 〈 This portion is processed as if Y0 were on. SET and RST instructions and differential instructions Be sure to place a differential instruction before the SET and RST instructions to make program development and refinement easier. This is particularly effective when the same output destination is used in several places in the program. use a partial I/O update instruction (F143). For detailed information MC and MCE instructions The output destination of a SET instruction is reset when the mode is changed from RUN to PROG.31 . the output changes with each step during processing of the operation. To output a result while operation is still in progress. therefore the data actually output is determined by the final operation result. or when the power is turned off. except when a hold type internal relay is specified as the output destination.

Basic Instructions 2. X0 X1 on off on off on R30 off Set Reset Reset takes precedence Description When the set input turns on. the reset input has priority. 4 Boolean Address KP R 30 Reset input Output destination 0 1 2 Instruction ST ST KP X X R 0 1 30 Ladder Diagram X0 0 X1 1 Set input Operands Instruction X KP N/A Relay Y A R A Timer/Counter Contact T N/A C N/A A: Available N/A: Not Available Explanation of example When X0 turns on.32 . regardless of the on or off states of the set input. output of the specified relay goes on and stays on. T32. output relay R30 goes on and stays on. and which is retained. R30 goes off when X1 turns on. C14. If the set input and reset input turn on simultaneously. C32. C16. Output relay goes off when the reset input turns on.3 Explanation of Basic Instructions Step FP0 KP Outline Program example Keep 1 Availability FP0 C10. 2 . The output relay’s on state is maintained until a reset input turns on. SL1 This is output which is accompanied by set or reset input.

FP0 Basic Instructions 2.33 . a reset does not take place. For detailed infromation If an internal relay (R) is set as the non-hold type. 2 . it is reset when the mode of operation is changed from RUN to PROG or when the power is turned off.3 Explanation of Basic Instructions Precautions during programming When the KP instruction is programmed between the MC and MCE instructions. If an internal relay set as a hold type is specified as the output destination. the status of output MC and MCE instructions destination is maintained.

C14. The NOP instruction can be used to make the program easier to read when checking or correcting. write a NOP instruction (overwrite the previous instruction). Deleting a NOP instruction To delete the NOP instruction after editing in the PROG. (-) Key operation: ACLR OP 1 ENT SHIFT (DELT) SC INST 2 . This is a convenient means of breaking a long program into several blocks.34 .Basic Instructions 2. SL1 No operation 5 Boolean Address 0 X0 0 X1 S NOP X2 Y0 1 2 3 4 Instruction ST AN NOP AN/ OT X Y 2 0 X X 0 1 Ladder Diagram Description This instruction has no effect on the operation result to that point. Address 36 S S 39 40 S S S 44 ST OR OT ST AN OT ST DF ST X0 X1 Y1 X2 X3 R20 R2 X3 Address 36 S S 39 40 41 S S S 45 ST X0 OR X1 OT Y1 NOP ST X2 AN X3 OT R20 ST R2 DF ST X3 This moves the starting point to address 40. When you want to delete an instruction without changing addresses. mode. C16. use the programming tools. Using programming tool software (NPST . insert a NOP instruction at address 39. Insert a NOP instruction. T32. C32. When you want to move the addresses of one part of a program without changing the program. insert a NOP instruction. Example: To move the starting point of a program block from address 39 to address 40.GR/FPWIN GR): Select [DELETE ALL NOPS] on the menu.3 Explanation of Basic Instructions Step FP0 NOP Outline Program example No operation 1 Availability FP0 C10. Using the FP programmer II: Enter the following series of key operations. The same operation takes place without a NOP instruction. and execute the instruction.

FP0 Basic Instructions 2.01s units timer 0.1s units Sets the on-delay timer for 1. C16.35 . SL1 Program example Ladder Diagram Unit of timer Timer number Set value Boolean Address 0 1 Instruction ST TMX K T5 4 Timer contact of timer No.0s units 6 3 3 3 4 FP0 C10. C32.001s units timer 0. C14.1s units timer 1s units timer Sets the on-delay timer for 0.001s units Sets the on-delay timer for 0.5 X 0 5 30 Trigger X0 0 TMX 5 K 30 Elapsed value Y0 4 5 ST OT T Y 5 0 Operands Instruction Set value Relay Timer/ Counter EV N/A Register DT N/A Index Constant register IX IY K A H N/A N/A A: Available N/A: Not Available Index modifier WX WY WR SV N/A N/A N/A A N/A N/A 2 . T32.3 Explanation of Basic Instructions Step Availability TML TMR TMX TMY Outline TML: TMR: TMX: TMY: 0.01s units Sets the on-delay timer for 0.

3 Explanation of Basic Instructions FP0 Description The 100 points from T0 to T99 can be used for the timer.1 to 3276.36 .1 × 43 = 4. For detailed information section 8. C14. the set time is 0.2 or later) or FP Programmer II (AFP1114V2) is necessary to read or write a TML instruction (0.TMX is from 0. When K500 is set in TMR. . .TML is from 0.67 seconds in increments of 0. . the timer is reset and does not retain its data when the power is turned off or the mode is changed from the RUN to the PROG mode. you can increase the number by changing the setting of system register 5.001 to 32. (A correct result will not be obtained if no processing operations or multiple processing operations take place during one scan due to an interrupt program or JP/LOOP instruction.01 × 500 = 5 seconds. . Timer set time The formula of the timer set time is [the time unit] × [set value]. For detailed information section 4.GR Ver. For FP0 C10.1 or later and FP0 T32. An OT instruction can be entered immediately after a timer coil.767 seconds in increments of 0. Example: When K43 is set in TMX.) Take care that the syntax is correct when combining a timer instruction with an AND stack or pop stack instruction.001 second. C32 CPU Ver. the set time [n] decrements. therefore. 4. and when the elapsed value reaches zero. The timer set value [n] must be a decimal constant from K1 to K32767.7 seconds in increments of 0. If the execution condition (trigger) turns off during operation.6 2 . set system register 6. 2. (If you need to retain the operating state.Basic Instructions 2.01 second.01 to 327.) When the execution condition (trigger) is on.4. C16. create the program so that one decrement occurs during one scan. the set time is 0. Note on programming tools The programming tool software (NPST .001 sec increment timer).TMR is from 0. timer contact Tn (n is the timer contact number) turns on.3 seconds. operation stops and the elapsed value is reset (cleared to 0). If there are not enough the point number of timer. Precautions during programming The timer value decrements during processing.1 second.TMY is from 1 to 32767 seconds in increments of 1 second.

2 3 Transfers to EV area EV5 30 29 28 27 X0 T5 TMX 5. the timer set value is transferred to the set value area (SV) with the same number. see page 2 . For an explanation of operation when a set value area (SV) is specified. K 30 Y0 SV5 30 4 EV5 0 Decrement operation ends See section 1. the setting is transferred from the set value area (SV) to the elapsed value area (EV) with the same number. 1 Transfers to SV area SV5 30 Set value X0 T5 TMX 5.3 Explanation of Basic Instructions Timer operation The following is an example of setting the set value with a K constant. 1 When the mode is changed to RUN or when the power is turned on with the mode set to RUN. (The same operation takes place if the mode is changed to RUN when the trigger is on. K 30 Y0 2 When the timer trigger rises from off to on. X0 T5 TMX 5.) The value in the elapsed value area (EV) decrements every scan if the trigger stays on.37 . K 30 Y0 3 SV5 30 Decrements 4 When the value in the elapsed value area (EV) reaches zero.39.2 for an explanation of the set value area (SV) and the elapsed value area (EV).FP0 Basic Instructions 2. 2 . the timer contact (T) with same number turns on.

F183) for timers.Basic Instructions 2. K 30 TMX 1.3 Explanation of Basic Instructions FP0 Examples of timer instruction applications Serial connection of timer Ladder diagram X0 T0 T1 TMX 0. For detailed information section 4. K 20 Boolean ST TMX TMX ST OT ST OT K T Y T Y X K Y0 Y1 Time chart 0 0 30 1 20 0 0 1 1 X0 T0 T1 Y0 Y1 on off on off on off on off on off 3s 2s Parallel connection of timer Ladder diagram X0 TMX 0. K 20 T0 T1 Y0 Y1 Boolean ST X PSHS TMX K POPS TMX K ST T OT Y ST T OT Y 0 0 30 1 20 0 0 1 1 Time chart X0 T0 T1 Y0 Y1 on off on off on off on off on off 3s 2s Changing a timer setting time while in operation A timer setting time can be changed during RUN. 2 .38 . K 30 TMX 1.8 Related instructions There are also auxiliary timer instructions (F137.

..WX 5 ENT T. TM TM ST Key operation of FP Programmer II: T.SV 5 Display: Timer number TMX 5 SV 5 Set value area number (n) These must be the same.FP0 Basic Instructions 2. . set the K30 in SV5.SV X. decrement operation begins from the set value 30.. 2 .. K30... SV5 X1 T5 TMX 5... the decrement operation will continue from the value before the change.... When execution condition (trigger) X1 turns on. Even if the value of the set value area (SV) is changed during decrement operation. 1 2 The above program operates as follows: 1 When execution condition (trigger) X0 is on the data transfer instruction [F0 (MV)] is executed..3 Explanation of Basic Instructions Directly specifying a set value area number as a timer setting value X0 F0 MV.. 2 Specify [n] (the number of the set value area SV) to be the same number as the timer. The set value area (SV) is normally a non .39 ....... Timer operation from the new value will not begin until decrement operation has ended or is interrupted and the execution condition (trigger) subsequently changes from off to on...... SV5 Y0 .hold type which resets if the power is turned off or the mode is changed from RUN to PROG.

The following diagram shows an example of using the high . SV 5 Y0 3 2 3 Transfers to EV area EV5 30 29 28 27 SV5 30 Decrement operation 4 When the value in the elapsed value area (EV) reaches zero. the setting is transferred from the set value area (SV) to the elapsed value area (EV) with the same number. the value is set in the set value area (SV). Set value X0 F0 MV.2 for an explanation of the set value area (SV) and the elapsed value area (EV).3 Explanation of Basic Instructions FP0 Timer operation when a set value area number is directly specified 1 When the execution condition (trigger) for a high .) The value in the elapsed value area (EV) decrements if the execution condition (trigger) stays on every scan.level instruction is on. SV 5 Y0 SV5 30 4 EV5 0 Decrement operation ends See section 1.40 . K30. X0 F0 MV. the timer contact (T) with same number turns on.level instruction F0(MV). SV 5 1 Transfers to SV area Y0 2 When the timer execution condition (trigger) rises from off to on. (The same operation takes place if the mode is changed to RUN when the execution condition (trigger) is on. SV5 X1 T5 TMX 5. 2 . SV5 X1 T5 SV5 30 TMX 5. X1 T5 TMX 5.Basic Instructions 2. K30.

41 R F81 BIN.FP0 Basic Instructions 2. K 30. K 50. SV 5 Y0 ST/ AN F0 ST TMX F0 MV. WX 0. SV 5 Boolean ST/ AN F0 X X 1 0 (MV) K 50 SV 5 X 0 X 1 (MV) K 30 SV 5 X 2 5 SV 5 T 5 Y 0 Time chart X0 X1 X2 T5 on off on off on off on off ST OT 5s SV5 K0 K50 3s K30 K50 Example 2: Example of setting a set value from external digital switches The BCD data of the digital switches connected to X0 through XF is converted and becomes the set value Connection example FP0 control unit 0 7 9 4 Set value of timer WX0 Digital switch Ladder diagram R10 Boolean ST F81 ST TMX ST OT 10 (BIN) WX 0 SV 5 R 11 5 SV 5 T 5 Y 0 2 . SV 5 TMX 5. SV 5 Y0 . Ladder diagram X1 X0 X0 X1 X2 T5 F0 MV. SV 5 R11 T5 TMX 5.3 Explanation of Basic Instructions Examples of applying direct specification of set value area numbers Example 1: Changing set values based on specified conditions The set value is K50 when X0 is on and K30 when X1 is on.

X0 X1 on off on off . 100 (example showing a case where 100 and subsequent numbers are specified for counters) Count input Reset input CT K 100 10 Boolean Address 0 1 2 Instruction ST ST CT K 5 6 ST OT C Y X X 0 1 100 10 100 0 Elapsed value Set value Y0 Operands Instruction Set value Relay WX WY WR N/A N/A N/A Timer/Counter Register SV A EV N/A DT N/A Index register IX IY Constant K A H N/A N/A A: Available N/A: Not Available Index modifier N/A N/A Explanation of example When the leading edge of X0 is detected ten times.42 .. counter contact C100 turns on and then Y0 goes on. T32. SL1 Decrements a preset counter. C16. Ladder Diagram Count number X0 0 X1 1 C 100 5 Counter contact for counter no..Basic Instructions 2. C32. C14. The elapsed value is reset when X1 turns on. 10 times C100 on off Y0 on off 2 .3 Explanation of Basic Instructions Step FP0 CT Outline Program example Counter 5 3 Availability FP0 C10..

in which the counter status is retained even if the power supply is turned off. If the count input and reset input both turn on at the same time. 2 . and when the elapsed value reaches 0. Type FP0 C10/C14/C16 Useable counter point numbers 44 points (C100 to C143) Non.4 At the fall time when the reset input goes from on to off.43 . there is a hold type. the count input is ignored and preset is executed.hold type: 40 points (C100 to C139) Hold type: 4 points (C140 to C143) 44 points (C100 to C143) Non. in which the counter is reset under these conditions.hold type. For FP0 T32. or if the mode is switched from RUN to PROG. If the count input rises and the reset input falls at the same time. the reset input is given priority.hold type. and a non . the counter contact Cn (n is the counter number) turns on. An OT instruction can be entered immediately after a counter instruction. System register 6 can be used to specify a non .hold type: 28 points (C100 to C127) Hold type: 16 points (C128 to C143) 44 points (C100 to C143) FP0 C32/SL1 FP0 T32 For FP0 C10/C14/C16/C32/SL1. When the count input changes from off to on. in which the counter status is retained even if the power supply is turned off. the elapsed value is reset to 0. Setting the counting value The counting value can be set to a decimal constant (K constant) from K0 to K32767. the set value begins to decrement. For detailed information section 8. When the reset input is on. The following point numbers can be used for counters depending on the type of FP0 C10/C14/C16/C32/ T32/SL1. the value of the set value area (SV) is preset in the elapsed value area (EV).FP0 Basic Instructions 2. there is a hold type. or if the mode is switched from RUN to PROG.3 Explanation of Basic Instructions Description The counter is a decremental preset counter.

44 .3 Explanation of Basic Instructions FP0 Counter operation The following are examples of specifying a K constant as the set value. see page 2 . 2 . When the reset input falls. For an explanation of operation when a set value area number is specified.Basic Instructions 2. X0 CT 100 K X1 C100 Y0 10 SV100 10 4 EV100 0 Decrement operation ends For information on the set value area (SV) and the elapsed value area (EV). see section 1. the value in the set value area (SV) is preset in the elapsed value area (EV).46. the value in the elapsed value area (EV) decrements. 1 When the mode is changed to RUN or the power is turned on with the mode set to RUN. the counter set value is transferred to the set value area (SV) with the same number.2. 1 2 Transfer 2 X0 CT 100 K 10 Preset EV100 10 SV100 10 X1 C100 Y0 3 Each time the count input X0 turns on. X0 CT 100 K X1 C100 Y0 10 SV100 10 EV100 10 9 8 7 3 Decrements 4 When the value in the elapsed value area (EV) reaches zero. the counter contact (C) with the same number turns on.

Exercise caution in these cases.45 .JP and LBL instructions . .Step ladder instructions .MC and MCE instructions . If the count input remains continuously on. no further subtraction will take place. decrement operation will not take place at the first scan.5 When combining a counter instruction with an AND stack instruction or pop stack instruction.FP0 Basic Instructions 2. since a decrement will only take place at the rise. the decrement takes place when the rise of the count input from off to on is detected. In cases where the count input is initially on such as when the mode is changed to RUN or the power is turned on with the mode set to RUN. RUN (Power: on) Counter input Operation of instruction Not counting Counting When used in combination with instructions which change the order of instruction execution such as MC and MCE or JP and LBL (see below).8.Subroutine instructions For detailed information section 4. the operation of the instruction may change depending on the timing of instruction execution and the count input. Precautions of counting input detection In a counter instruction.CNDE instructions .3 Explanation of Basic Instructions Changing counter set value during RUN The counter set value can be changed during RUN. see section 4.6 Related instructions Counter instructions also include an up/down counter instruction (F118). For the procedure. For detailed information section 4. An increment instruction (F35) can be used to provide the same type of function. 2 . take care that the syntax is correct.LOOP and LBL instructions .

EV 1 0 0 ENT TM T. the set value will be preset the next time the power is turned on or the mode is changed from PROG.. set the K30 in SV100. Key input of FP Programmer II: Display: CT SV CT C. 2 Specify [n] (the number of the set value area SV) to be the same number as the counter.... the decrement operation will continue from the value before the change. 2 .... to RUN... 2 ..46 . K30....3 Explanation of Basic Instructions FP0 Directly specifying a set value area number as a counter set value X0 F0 MV. If the SV value is changed during RUN. SV100 X1 X2 C100 CT 100 . Counter operation from the new value will not begin until the counter is reset and the count input subsequently changes from off to on. When the count input X1 turns on. decrement operation begins from the set value 30... the set value area (SV) will not reset if the power is turned off or the mode changed from RUN to PROG. 1 SV 100 Y0 The above program operates as follows: 1 When execution condition (trigger) X0 is on the data transfer instruction [F0 (MV)] is executed..Basic Instructions 2. In the case of a hold type counter..SV 1 0 0 Counter number 100 100 These must be the same... Set value area number [n] Even if the value in the set value area (SV) is changed during decrement operation..

FP0 Basic Instructions 2. the value in the elapsed value area (EV) decrements. The following diagram shows an example of using the high . the value in the set value area (SV) is preset in the elapsed value area (EV). X1 X2 C100 CT SV 100 100 Y0 SV100 30 4 EV100 0 Decrement operation ends See section 1. SV100 X1 X2 C100 CT SV 100 100 1 SV100 30 Transfers to SV area Y0 2 When the reset input is off.2 for an explanation of the set value area (SV) and the elapsed value area (EV). 2 . the value is set in the set value area (SV). X1 X2 C100 CT SV 100 100 SV100 30 EV100 30 29 28 27 3 Y0 Decrements 4 When the elapsed value area (EV) reaches zero. X1 X2 C100 CT SV 100 100 SV100 30 2 EV100 30 Presetting Y0 3 Each time the count input X1 turns on. the counter contact C with the same number turns on.3 Explanation of Basic Instructions Counter operation when a set value area number is directly specified 1 When the execution condition (trigger) for a high .47 . K30.level instruction is on.level instruction F0 (MV). X0 F0 MV.

Connection diagram FP0 control unit 0 7 9 4 Set value of counter Digital switch: WX0 Ladder diagram R10 Boolean ST F81 ST ST CT Y0 F81 BIN... K0 K50 Example 2: Example of setting a set value from external digital switches The BCD data of the digital switches connected to X0 through XF is converted and becomes the set value..48 . SV 100 R11 R12 C100 CT SV 100 100 ST OT 10 (BIN) WX 0 SV 100 R 11 R 12 100 SV 100 C 100 Y 0 R 2 . WX 0.Basic Instructions 2.. SV 100 X0 X1 F0 MV.3 Explanation of Basic Instructions FP0 Examples of applying direct specification of set value area numbers Example 1: Changing set values based on specified conditions The set value is K50 when X0 is on and K30 when X1 is on. K 30. K 50. Ladder diagram X1 X0 Boolean ST/ AN F0 ST/ AN F0 ST ST CT ST OT X X 1 0 (MV) K 50 SV 100 X 0 X 1 (MV) K 30 SV 100 X 2 X 3 100 SV 100 C 100 Y 0 F0 MV. SV 100 X2 X3 C100 CT SV 100 100 Y0 Time chart Example when X0 turns on X0 X1 X2 X3 C100 SV100 on off on off on off on off on off 50 times ..

the contents of the internal relay WR3 (internal relays R30 to R3F) are shifted one bit to the left. the contents of WR3 are reset to 0.FP0 Basic Instructions 2. SL1 5 One bit shift of 16-bit [word internal relay (WR)] data to the left.3 Explanation of Basic Instructions Step SR Outline Program example Shift register 1 Availability FP0 C10. and “0” is shifted in R30 if X0 is off. C16. C14. If the X2 turns on. “1” is shifted in R30 if X0 is on. T32. X0 X1 X2 on off on off on off on on on on on R30 off R31 off R32 off R33 off R34 off 2 . C32.49 . Ladder Diagram X0 Data input X1 1 X2 2 Reset input Shift input SR WR 3 Boolean Address 0 1 2 3 Instruction ST ST ST SR X X X WR 0 1 2 3 0 D Operands Instruction Relay WX WY WR D: Data area N/A N/A A Timer/Counter Register SV N/A EV N/A DT N/A Index register IX IY Constant K N/A H N/A N/A A: Available N/A: Not Available Index modifier N/A N/A Explanation of example If the X1 turns on when X2 is in the off state.

. For details. . . or 0 if the data input is off.Basic Instructions 2. During the shift. 8 1 0 0 0 7 . Shift input Reset input Data area (Rn) Reset input is given priority If the internal relay area is specified as a hold type. the contents of WR are shifted one bit to the left. WR (Binary data) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Precautions during programming The SR instruction needs data input. . refer to section 4. the contents of WR are cleared. . . 12 0 0 0 0 11 . 1 is set in the empty bit (least significant bit) if the data input is on.6. . . . . 4 1 0 0 0 3 . . When shift input is turned on: WR3 Bit position Binary data 3F . 30 15 . When the reset input turns on. Binary data 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 Data input (X0) on: set bit to 1. Data input (X0) off: set bit to 0.50 . When the reset input and the shift input are detected simultaneously. the reset input has priority. . and a reset input. . . take care that the data in the area is not reset to “0” when the power turns on. . take care that the syntax is correct.3 Explanation of Basic Instructions FP0 Description Shifts the specified data area (WR) one bit to the left. When the shift input turns on (rises). When combining a shift register instruction with an AND stack instruction or pop stack instruction. 2 . 0 1 1 0 0 Shifts one bit to the left. . a shift input. . When reset input is turned on: WR (Binary data) 0 0 1 1 0 1 0 0 0 0 0 1 1 0 0 1 Contents of WR3 are cleared to 0. . .

on rise of the shift input is detected. RUN (Power: on) Shift input Opration of instruction Does not shift Shifts When used in combination with instructions which change the order of instruction execution such as MC and MCE or JP and LBL (see below). The same type of operation can also be implemented using a data shift instructions (F100 to F113) or a data rotate instructions (F120 to F123). Exercise caution in these cases. shift operation takes place when the off .MC and MCE instructions . there is also a left/right shift register instruction (F119). 2 .3 Explanation of Basic Instructions Cautions on shift input detection With SR instructions. No further shifts will take place. If the shift input remains continuously on. In cases where the shift input is initially on such as when the mode is changed to RUN or when the power is turned on with the mode set to RUN.Step ladder instructions .FP0 Basic Instructions 2. a shift will only take place at the rise.LOOP and LBL instructions . .51 .Subroutine instructions For detailed information section 4. the operation of the instruction may change depending on the timing of instruction execution and the shift input.CNDE instruction .JP and LBL instructions . a shift operation will not take place at the first scan.5 Related instructions In addition to the shift register instruction.

Boolean Address Master control relay number 1 ) Y1 0 1 3 4 Y2 Master control area 5 6 7 8 9 (MCE 1 ) Master control relay number 9 Instruction ST/ MC ST OR OT ST OR OT MCE X Y Y X Y Y X 0 1 1 1 1 2 2 2 1 Program example Ladder Diagram Execution condition (trigger) (MC X0 0 X1 3 Y1 X2 6 Y2 Explanation of example Executes the program from the MC1 instruction to the MCE1 instruction when the execution condition (trigger) turns on. C16.3 Explanation of Basic Instructions Step Availability FP0 MC MCE Outline Master control relay Master control relay end 2 2 FP0 C10. output is turned off without processing being carried out between the MC1 and MCE1 instructions. C14. output between the MC and MCE is turned off. on off on off on off on off on off on off X0 Execution condition (trigger) X1 Y1 X2 Y2 2 . SL1 Executes the program between the MC and MCE when the execution condition (trigger) turns on. T32.52 . 6 When the execution condition (trigger) is off. If the execution condition (trigger) is off.Basic Instructions 2. C32.

Type FP0 all types Number of points 32 points (MC0 to MC31) 2 . Not executed You must be careful when using one of the instructions below.Count input for F118 (UDC) instruction . Holds the state.3 Explanation of Basic Instructions Description Executes program between the MC and MCE instructions when the execution condition (trigger) turns on. which are executed by detecting the leading edge of execution condition such as the differential instruction.FP0 Basic Instructions 2.DF instruction . Holds the state. the instructions operate as follows. For more details.Shift input for SR instruction .53 .Count input for CT instruction . refer to section 4. .5. See next page.Shift input for F119 (LRSR) instruction .NSTP instruction The numbers of points noted below can be used with the MC and MCE instructions. Instruction OT KP SET RST TM CT SR Differential Other instructions Condition of input and output All off Holds the state. Reset Holds the value. When the execution condition (trigger) is in the off state. Holds the value.

therefore differential output is not obtained. the output will vary as follows depending on the timing of the MC execution condition (trigger) and the input of differential instruction. If output is needed. therefore differential output is obtained. on off on off on off Time chart 2 X0 X1 Y0 Execution of previous differential instruction The input X1 of the differential instruction has changed from off to on with respect to the previous execution. X0 MC X0 DF MCE 0 0 Y0 X0 MC X0 0 R0 MCE 0 R0 DF Y0 2 .54 .3 Explanation of Basic Instructions FP0 Operation of differential instructions between MC and MCE If a differential instruction is used between MC and MCE. on off on off on off Output will not be obtained if the same execution condition (trigger) is specified for an MC instruction and a differential instruction.Basic Instructions 2. X0 MC X1 DF MCE 0 0 Y0 Time chart 1 X0 X1 Y0 Execution of previous differential instruction The input X1 of the differential instruction has not changed with respect to the previous execution. enter the differential instruction outside of the MC to MCE instruction sequence.

) X0 MC X1 X2 MC X3 X4 MC X5 2 Y2 1 Y1 0 Y0 MCE 2 MCE 1 MCE 0 The program cannot be executed if: If either MC or MCE is missing The order of the MC and MCE instructions is reversed.55 .MCE instruction pair can be entered (nested) between an initial MC.FP0 Basic Instructions 2. X0 MC X1 MC X2 0 Y0 0 Duplicated use MCE 0 MCE 0 2 . (There is no limit to the number of nestings.3 Explanation of Basic Instructions Precautions during programming A second MC.MCE instruction pair. MCE 0 X1 X0 MC 0 Y0 There are two or more master control instruction sets with the same number.

.. X0 (JP R20 (JP X20 LOOP 1. T32. The numbers of points noted below can be used with the JP and LBL instructions.3 Explanation of Basic Instructions Step Availability FP0 JP LBL Outline Program example Jump Label 2 1 FP0 C10.. C14. (LBL 1 ) 20 LBL 1 Explanation of example When the execution condition (trigger) X1 turns on. SL1 Skips to the LBL instruction with the same number as the JP instruction. the program skips from JP1 to LBL1. the program jumps to the label (LBL) instruction that has the same number as the specified jump number.. Any of these instructions can be used as the starting point for the jump destination.56 . The same label is used for the JP and LOOP instructions. The program then continues with the instructions starting from the address of the label that is the jump destination. X1 Program (JP Program (LBL 1 ) Program 1) X1: on No execution Description When the execution condition (trigger) turns on. Type FP0 all types Number of points 64 points (JP0 to 63) (LBL0 to LBL63) Two or more JP instructions with the same number can be used in a program..Basic Instructions 2. Boolean Address 10 11 Instruction ST JP X 1 1 Ladder Diagram X1 10 Label number 20 (JP 1) . . C32.. C16. DT0 (LBL 1 ) 1) 1) 2 .

SR instruction: If the state of the shift input does not change during the scan. refer to section 4. CT. You cannot perform a jump from a main program to a sub program (a subroutine program or interrupt program after the ED instruction).5.CT instruction: Even if the count input is on. counting is not performed.Count input with CT (counter) . You must be careful when using one of the instructions below. .SR instruction: Even if the shift input is on. no shift is performed. The elapsed value is preserved. For more details. . a syntax error will occur. . If a label for the jump destination is not programmed.TM instruction: The TM instruction is not executed.TM instruction: Because the TM will run several times during a single scan. The contents of the specified register are preserved.FP0 Basic Instructions 2. and SR instruction operation between JP and LBL instructions When the LBL instruction is located after the JP instruction: .Count input with F118 (up/down counter) . it will operate in the usual way. the scan will not terminate and an operation bottleneck error may occur. 1) 2 . the correct time cannot be guaranteed. When the LBL instruction is located before the JP instruction: . . If it is not executed once during a single scan the correct time cannot be guaranteed. it will operate in the usual way. TM.Shift input with SR (shift register) .Shift input with F119 (left/right shift register) . or from a sub program to another sub program.3 Explanation of Basic Instructions Two or more LBL instructions with same number cannot be specified in a program. X1 (JP 1) (LBL 1 ) The program jumps when the execution condition (trigger) turns on.DF (leading edge differential) . . (LBL 1 ) X1 (JP The program is repeated when the execution condition (trigger) turns on. from a sub program to a main program.NSTP (next step) Precautions during programming If the address of the LBL instruction precedes the address of the JP instruction.57 . which are executed by detecting the rise of a execution condition such as the differential instruction. The JP instruction and LBL instruction cannot be used in the step ladder area (the area between SSTP and STPE).CT instruction: If the state of the count input does not change during the scan.

do not write the differential instruction between the JP and LBL instructions. X1 JP X1 DF/ LBL 1 1 Y1 Not executed. be aware that the output will differ as shown below depending on the execution condition (trigger) of the JP and the input timing of differential instruction. If the differential output is required.58 .Basic Instructions 2. X1 DF/ X1 JP LBL Y1 Placed outside of the area between JP and LBL. 1 1 2 . Time chart 2 X0 X1 Y0 on off on off on off Previous execution of differential instruction Since the execution condition (trigger) X1 for the differential instruction changed from on to off from the previous execution.3 Explanation of Basic Instructions FP0 Differential instruction operation between JP and LBL instructions If a differential instruction is used in the area between a JP and LBL instruction. the differential output cannot be obtained. X0 JP X1 DF LBL 1 1 Y0 Time chart 1 X0 X1 Y0 on off on off on off Previous execution of differential instruction Since the execution condition (trigger) X1 for the differential instruction did not change from the previous execution. the differential output can be obtained. the leading edge (or trailing edge) of the execution condition for the differential instruction will not be detected. When the execution condition (trigger) for the JP instruction equals the execution condition (trigger) for the differential instruction.

.3 Explanation of Basic Instructions Step Availability FP0 C10.FP0 Basic Instructions 2. LOOP 1 . C14. DT 0 S Label number 30 31 ST LOOP DT X 1 1 0 S 16-bit area for setting number of times for loop operation Operands Instruction S N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier 2 . DT 0 Label number 11 16 (LBL 1 ) . K5. C16.. SL1 LOOP LBL Outline Loop Label 4 1 Skips to the LBL instruction that has the same number as the LOOP instruction and executes what follows. repeatedly. 7 Boolean Address 10 X1 10 Instruction ST F0 K DT 16 X1 30 Number of timers for loop LBL X 1 (MV) 5 0 1 Program example Ladder Diagram F0 MV. T32. until the data of a specified operand becomes “0”.59 .. C32.

Set the number of times to execute the program with the LOOP instruction. If the contents of memory area specified by S is 0 from the beginning.Basic Instructions 2. Turns on for an instant when the specified value in the data area becomes less than “0” (when the most significant bit (bit position 15) of the specified data area becomes “1”).60 . the jump operation is not executed. the jump will not occur even if the execution condition (trigger) turns on. Type FP0 all types Number of points 64 points (LOOP0 to 63) (LBL0 to LBL63) A label is common for the JP instruction and the LOOP instruction. then after performing the jump 5 times. X0 F0 MV. S Error flag (R9008): 2 . If a label for the loop destination is not programmed. The program then continues with the instructions starting from the address of the label that is the loop destination.3 Explanation of Basic Instructions FP0 Description When the execution condition (trigger) turns on. When the number of times set in S (K constant) reaches 0. a syntax error will occur. DT 0 (LBL 1 ) X1 LOOP 1 . One can be used as the destination for all instructions as many times as required. even if X1 is set to on. DT 0 If the value of DT0 is K5. Flag conditions S Error flag (R9007): Turns on and remains on when the specified value in the data area “S” becomes less than “0” (when the most significant bit (bit position 15) of the specified data area becomes “1”). DT0 1 Two or more LBL instructions with the same number cannot be specified in a program. X0 JP R20 JP 1 1 LBL X20 LOOP 1. the program jumps to the label (LBL instruction) that has the same number as the specified number. 1 is subtracted from the contents of S and if the result is other than 0. K5 . The numbers of points noted below can be used with the LOOP and LBL instructions. the jump operation is not executed (it is ignored).

Set the instructions that will be repeated between LBL and LOOP so that they have the same trigger as the LOOP instruction.61 . WR 0. Precautions during programming When the label is written in an address before the LOOP instruction. Example 1: Execute 5 times of both F0 (MV) instructions when X5 is on. . . (LBL 1 ) The program jumps when the execution condition (trigger) turns on (DT0=1). . it will operate in the usual way. DT 10 F0 MV. IX LBL 10 R0 F0 MV.During repeating. IX LOOP 10. be careful of the following points. the correct time cannot be guaranteed. K 5. If it is not executed once during a single scan. The contents of the specified register are preserved. (LBL 1 ) X0 LOOP 1. no shift is performed. counting is not performed. the correct time cannot be guaranteed.SR instruction: If the state of the shift input does not change during the scan. K 0.TM instruction: Because the timer will run several times during a single scan. .Be sure to have the instruction that sets the number of times for loop operation before the area between the LBL and LOOP instructions.TM instruction: The TM instruction is not executed. DT 0 2 . IXDT200 F35 +1. DT 0 F0 MV. . CT. it is possible that one scan can exceed the surveillance time for operation jams and cause a operation bottleneck error. it will operate in the usual way. X5 F0 MV. DT100.3 Explanation of Basic Instructions TM. DT 0 When the LBL instruction is located after the LOOP instruction: . DT 0 The program is repeated when the execution condition (trigger) turns on (DT0=1). and SR instruction operation between the LOOP and LBL instructions When the LBL instruction is located before the LOOP instruction: . R0 F0 MV. K 20.CT instruction: Even if the count input is on. The elapsed value is preserved.FP0 Basic Instructions 2. DT 0 Example 2: Send the value of DT100 to DT200 through DT219. X0 LOOP 1. . DT 20 LOOP 10.SR instruction: Even if the shift input is on. WR 1.CT instruction: If the state of the count input does not change during the scan. DT 0 LBL 10 X5 F0 MV. .

Count input of CT (counter) .program (a subroutine program or interrupt program after the ED instruction).Shift input of F119 (left/right shift register) . .NSTP (next step) 2 .Count input of F118 (up/down counter) .Basic Instructions 2.program to a main program.program. or from a sub . You cannot perform a jump from a main program to a sub .5.62 . which are executed by detecting the leading edge of execution condition (trigger) such as the differential instruction. For more details.program to another sub . refer to section 4. You must be careful when using one of the instructions below.3 Explanation of Basic Instructions FP0 The LOOP instruction and LBL instruction cannot be used in the step ladder area (the area between SSTP and STPE).DF (leading edge differential) . from a sub .Shift input of SR (shift register) .

FP0 Basic Instructions 2. Enter subroutine programs and interrupt programs after the ED instruction.programs) using this instruction. 2 . C14..3 Explanation of Basic Instructions Step ED Outline Program example End 8 1 Availability FP0 C10. . Program area Address 0 Ordinary program ( ED ) Subroutine program Interrupt program Program areas are divided into an ordinary program area (main program) and “subroutine” and “interrupt program” areas (sub . X2 Y0 96 ( ED ) 97 98 99 ST AN OT ED R X Y 0 2 0 Description Indicates the end of the ordinary program.. T32.. C16.63 . SL1 Indicates the end of the ordinary program.. C32... Ladder Diagram Boolean Address 0 Instruction ST OR AN/ OT X R X R 0 0 1 0 X0 0 R0 R0 96 99 X1 R0 1 2 3 .

.64 . which are executed by detecting the leading edge of a execution condition (trigger) such as the differential instruction.Count input for F118 (UDC) (up/down counter) ..3 Explanation of Basic Instructions Step FP0 CNDE Outline Program example Conditional end 1 Availability FP0 C10. For more details. the program then returns to the starting address. Use the CNDE instruction in the main program area only. and other such operations are performed. C14.Basic Instructions 2... You must be careful when using one of the instructions below.Count input for CT (counter) . When the execution condition (trigger) turns on.5. . When the operations are completed. SL1 Ends one scan of the program when the execution condition (trigger) turns on. 9 Boolean Address 0 1 X0 0 Y0 X3 96 R0 98 X2 Execution condition (Trigger) X1 Y0 2 3 Instruction ST OR AN/ OT X Y X Y 0 0 1 0 Ladder Diagram . output. the program finishes and the input.Shift input for SR (shift register) .programs such as subroutine programs or interrupt programs.Shift input for F119 (LRSR) (left/right shift register) . You can adjust the timing that operations are performed by performing the operations only after a required number of program scans are completed.. ( CNDE ) Y1 96 97 98 99 100 .DF (leading edge differential) . T32. refer to section 4. The CNDE instruction cannot be performed in sub .NSTP (next step) 2 . C32.. ST CNDE ST AN/ OT X 3 R X Y 0 2 1 Description The CNDE instruction enables you to end one scan of the program. C16. Two or more CNDE instructions can be used within the main program.

ED Program execution during normal scanning. 2 . X0 Y0 X1 Y0 X3 CNDE This part of the program is not executed when the CNDE instruction is executed.FP0 Basic Instructions 2.65 .3 Explanation of Basic Instructions Program execution when the CNDE instruction is executed (when X3 turns on).

. CSTP: Resets the specified process. 10 NSTP: Opens a step ladder process. ST CSTP STPE . T32.. STPE: Indicates the end of step ladder area. C16. NSTL: Opens a step ladder process... NSTL is executed every scan if its trigger is on.66 .. C14. Boolean Address (NSTP (SSTP 1) 1) Y0 17 X1 18 22 X3 100 104 (CSTP 50 ) (STPE ) (NSTL (SSTP 2) 2) 10 11 14 14 17 18 19 22 Instruction ST NSTP SSTP OT ST NSTL SSTP Y X X 0 1 1 0 1 2 2 Program example Ladder Diagram X0 10 100 101 104 . SL1 SSTP: Indicates the start of a step ladder process. X 3 50 2 .Basic Instructions 2.3 Explanation of Basic Instructions Step Availability FP0 SSTP NSTP NSTL CSTP STPE Outline Start step Next step (pulse execution type) Next step (scan execution type) Clear step Step end 3 3 3 3 1 FP0 C10. C32.. NSTP is executed when the leading edge of its trigger is detected.

the process starting with the SSTP instruction of the specified number is started and executed. selection branch control. In a step ladder program. Process 2 Process 1 Process 3 Process 4 Note The step ladder of FP0 is not held. After each process is completed. Type FP0 all types Number of points 128 processes (SSTP0 to SSTP127) Example: (SSTP X0 X1 1) Y0 Process 1 F0 MV. The numbers of points noted below can be controled with the SSTP instruction. a process is identified as being from one SSTP instruction to the next SSTP or STPE instruction. 2 . so be sure to take the necessary precautions. DT 0. DT 100 (SSTP 2) Operations such as the sequence control. the next process is executed. Process 1 Process 2 Process 3 Process 4 Selection branch control The processes are selected and executed according to conditions. Sequence control Only the necessary processes are switched and executed in order.FP0 Basic Instructions 2. Process 2 Process 1 Process 3 Process 4 Parallel branch merge control Multiple processes are executed simultaneously.67 . parallel branch control are easily executed.3 Explanation of Basic Instructions Description When the NSTL instruction or the NSTP instruction is executed.

3 Explanation of Basic Instructions FP0 Syntax of step ladder instruction SSTP (start step) instruction: This instruction indicates the start of a process n.program (subroutine or interrupt program area). (R9015: step ladder initial pulse relay. Always have the SSTPn instruction at the head address of the program for process n (n: process number from 0 to 127). The execution condition (trigger) for the next step instruction means the execution condition (trigger) to start the process. No two processes can have the same process number. The area starting from the first SSTP instruction to the STPE instruction is referred to as the step ladder area. Other areas are referred to as ordinary ladder areas.68 . differential (pulse) execution type) instruction: When an NSTPn or NSTLn instruction is executed. NSTL (Next step. Ordinary ladder area SSTP 1 Step ladder area SSTP STPE Ordinary ladder area n There is a special internal relay that turns on for one scan only when a process on the step ladder starts. The programs in this area are all controlled as processes. The OT instruction can be programmed at the address just after the SSTP instruction. The SSTP instruction cannot be programmed in sub . the process with the same process number “n” as the NSTP or NSTL instruction is opened.) This relay is used to perform operations for only one scan for counter reset or other such process starts. scan execution type) instruction: NSTP (Next step. X0 NSTP SSTP R0 NSTL SSTP 2 2 R0: on ↓ SSTP1: Cleared SSTP2: Starts 1 1 X0: off → on ↓ SSTP1: Starts 2 .Basic Instructions 2. SSTP Program Program Program SSTP SSTP 2 Process 2 5 1 Process 1 In a step ladder program. a process n is identified as being from one SSTPn instruction to the next SSTP or STPE instruction.

.Step ladder instructions .6.69 .FP0 Basic Instructions 2. since it only detects if the execution condition (trigger) has changed between on and off. be aware that the operation of the instructions will differ depending on the timing of their execution and their triggers. when you start a process with a next step instruction from within a process. Also. However. RUN (Power: on) Shift input Operations with NSTP Operations with NSTL Not executed Executed Executed Executed When you use the NSTP instruction with one of the following instructions that changes the order of the execution of instructions.MC to MCE instructions . the instruction is not executed. 2 . be careful that the programming is correct.CNDE instruction . the process that is operating and contains the next step instruction is automatically cleared and the specified process starts. refer to section 4.3 Explanation of Basic Instructions Declare the first process to start in the next step instruction in the ordinary ladder area. A process can be started from the ordinary ladder area or from an already started process. For more details. Be aware that the outputs and other processes are actually turned off by the clear operation during the next scan.Subroutine instruction For detailed information section 4.LOOP to LBL instructions .5 When combining the NSTP instruction with an AND stack instruction or POP stack instruction.JP to LBL instructions . so it is executed for only one time when the execution condition (trigger) turns on. when switched to the RUN mode or when the power supply is turned on while in the RUN mode and the execution condition (trigger) is already on. The NSTP instruction is a differential (pulse) execution type instruction.

Interrupt instructions (INT and IRET) .Subroutine instructions (SUB and RET) (*) . 2 .Jump instructions (JP and LBL) . X0 NSTP 50 X1 CSTP 50 X1: on ↓ Process 50: cleared SSTP 50 Program SSTP 51 Process 50 A process can also be cleared from the ordinary ladder area or from a process that is already started.Loop instructions (LOOP and LBL) .Master control instructions (MC and MCE) . In the step ladder area.3 Explanation of Basic Instructions FP0 CSTP (clear step) instruction: When a CSTP instruction is executed.program such as a subroutine program or interrupt program.CNDE instruction (*): The CALL instruction can be used within the step ladder area. This instruction can be used to clear the final process or to clear the processes when the parallel branch merge control is executed. (This instruction cannot be programmed in sub .) Precautions during programming You do not have to program processes in the order of process numbers. you cannot use the following instructions: .Basic Instructions 2.70 . process n is the last process. Thus. The STPE instruction is used only once in the main program. the final process of the step ladder is from SSTP to STPE. Be sure to write this instruction at the end of the last process. the process “n” with the same process number “n” is cleared.ED instruction . Ordinary ladder area SSTP 1 Step ladder area SSTP STPE Ordinary ladder area n Process n In the above situation. STPE (step end) instruction: The STPE instruction indicates the end of the step ladder area.

71 . step ladder internal pulse relay R9015 turns on for an instant only in the first scan of the process. program execution occurs in the ordinary ladder areas and in process 2.3 Explanation of Basic Instructions When you need to clear an entire processes in step ladder program. The moment the step ladder process is opened. Processes that have not been triggered are ignored. use the master control (MC and MCE) instructions as shown below. You can execute two or more processes at the same time. X0 MC SSTP SSTP SSTP STPE MCE ED 0 0 1 2 3 Step ladder area Master control instructions It is not necessary to execute processes in order of process numbers. the output condition is maintained until the process starts even if the forced on and off operation is canceled. program execution proceeds in the ordinary ladder area and in the processes triggered by the next step instructions (NSTL or NSTP). Example: All processes are cleared when X0 becomes on.FP0 Basic Instructions 2. Step ladder operations When the step ladder processes are programmed. You can use R9015 to reset a counter or shift register used in the opened process. Once you force on or off an output that is programmed in a process not yet executed. 2 . Ordinary ladder area SSTP 1 Not executing Not executing process 1 SSTP Executing process 2 SSTP 9 Not executing 2 Executing Executing Not executing process 9 STPE Ordinary ladder area ED Executing In the diagram.

. Holds the state. Refer to the explanation of the MC and MCE instructions. However. Holds the state at the time just before the trigger turns off. 2 . Holds the state.Basic Instructions 2. program with an interlock circuit. 0 Bit position Process number 31 . If you do not want them to be on at the same time. . For the relationship between the register number and process number.up conditions for processes No. 8 7 . Remembers the state of execution condition (trigger).6. 16 to No. Not executed. . (*): Same operation as when the execution condition (trigger) for the MC instruction turns off. . Therefore. Notes on process clear If the next step instruction is executed in an active process. 24 is starting. 20 19 . the actual clear operation does not occur until the next scan. 4 3 . that process is automatically cleared.3 Explanation of Basic Instructions FP0 The execution state (start/stop) for processes are stored in special data registers DT9060 to DT9067. Holds the state at the time just before the trigger turns off.72 . Example: SSTP 0 Y1 X0 NSTP 1 Y0 SSTP 1 Y0 Y1 If the process is cleared. . . . Reset the elapsed value and timer contact output. there will be two simultaneously active processes. adapt hardware processing to take the response delay into account. 31 15 . the instructions in that process operate as follows. 12 11 . Instruction OT KP SET RST TM CT SR Differential instructions (*) Other instructions Operation status All off Holds the state. the process no. 28 27 . If there is a possibility of processes being simultaneously on because of hardware response delays. refer to section 8. . Example: The start . 16 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 DT9061 When bit position 8 of DT9061 is “1”. for one scan during the process transition. 24 23 .

process 11 is cleared and process 12 is executed. It is not necessary to execute in order of process number.5. Program example 1) When the X0 turns on. process 10 is executed.3 Explanation of Basic Instructions You must be careful when using one of the instructions below. 4) When X4 turns on.Count input of F118 (UDC) (up/down counter) .Shift input of F119 (LRSR) (left/right shift register) . the next process is activated. . then switches to be the next process as soon as the work is completed. Program an NSTL instruction to trigger the next process in each process.DF (leading edge differential) . refer to section 4.Count input of CT (counter) . which are executed by detecting the leading edge of execution condition (trigger) such as the differential instruction. When the NSTL instruction is executed. Process flowchart X0: on Process 10 X1: on Process 11 X2: on Process 12 R2 turns on R1 turns on R0 turns on Program X0 (NSTP 10 ) (SSTP 10 ) R0 X1 (NSTL 11 ) (SSTP 11 ) R1 X2 (NSTL 12 ) (SSTP 12 ) R2 X4 (CSTP 12 ) (STPE ) Process 12 Process 11 X4: on END Time chart Process 10 X0 off X1 off X2 off X4 off on on on on Executing Process 10 Process 11 Process 12 R0 Cleared Executing R1 Cleared R2 Executing Cleared 2 . and the currently executing process is cleared.FP0 Basic Instructions 2.73 . 2) When X1 turns on.NSTP (next step) Examples of step ladder instructions 1 Sequence control of a process This program repeats the same process until the work in a particular process is completed. process 12 is cleared and step ladder operation finishes.Shift input of SR (shift register) . You can also program the NSTL instruction to trigger a previous process in response to current conditions. process 10 is cleared and process 11 is executed. For more details. 3) When X2 turns on.

process 52 is executed. 3) When X3 turns on in process 51. process 50 is executed. Process flowchart X0: on Process 50 R0 turns on. process 51 is executed. process 52 is cleared and process 60 is executed. Depending on the execution conditions. X3: on X4: on Process 60 X5: on END R3 turns on. process 51 is cleared and process 60 is executed. triggered and program execution is transferred. When X4 turns on in process 52. process 60 is cleared and step ladder operation finishes.Basic Instructions 2.74 . Program X0 (NSTP (SSTP 50 ) 50 ) R0 Time chart When X1 turns on X0 X1 Process 50 on off on off on off on off on off on off Executing Cleared Executing Cleared Executing Cleared Executing Cleared Process 60 Process 50 Process 51 X1 (NSTL X2 (NSTL (SSTP 52 ) 51 ) R1 Process 51 (NSTL (SSTP 60 ) 52 ) R2 51 ) X2 X3 X4 X5 R0 R1 X3 X4 (NSTL (SSTP 60 ) 60 ) R3 Process 52 R2 R3 Process 60 X5 (CSTP (STPE 60 ) ) 2 . Each process loops until its work is completed. Program example 1) When X0 turns on.3 Explanation of Basic Instructions FP0 2 Selection branch control of a process This program selects and switches to the next process according to the actions and results of a particular process. R1 turns Process 52 on. 2) When X1 turns on in process 50. X1: on Process 51 X2: on R2 turns on. Or when X2 turns on in process 50. 4) When X5 turns on. Program two or more NSTL instructions to trigger the next process in a process. the next process is selected.

Program multiple NSTL instructions for one trigger in a process. process 30 is cleared and initial process 0 is executed again. X3: on Process 30 X4: on R4 turns on.75 . Process flowchart X0: on Process 0 X1: on R2 turns on. Clear process 11 and execute process 30. When they merge and execute the next process. 5) When X4 turns on. (Merge control) Clear process 20 with the clear instruction. R0 turns on.FP0 Basic Instructions 2. they merge again before transferring execution to the next process. process 10 is cleared and process 11 is executed. Process 20 R3 turns on. Program example 1) When X0 turns on. 4) When X3 turns on. process 0 is cleared and process 10 and process 20 are executed simultaneously (Parallel branch control).3 Explanation of Basic Instructions 3 Parallel branch merge control of a process This program triggers multiple processes simultaneously. After each of the branch processes has completed its work. process 11 and process 20 are cleared and process 30 is activated. Process 10 X2: on Process 11 R1 turns on. 2) When X1 turns on. 3) When X2 turns on. process 0 is executed. Program X0 (NSTP (SSTP 0) 0) R0 Process 0 Time chart X0 off X1 off X2 off on on on on X1 (NSTL 10 ) (NSTL 20 ) (SSTP 10 ) R1 X2 (NSTL 11 ) (SSTP 20 ) R2 R100 (SSTP 11 ) R3 X3 R100 (NSTL 30 ) (CSTP 20 ) (SSTP 30 ) R4 X4 (NSTL 0 ) (STPE ) X3 off X4 off Process 10 on Executing Process 0 Executing Process 0 Cleared Executing Process 10 Process 20 Cleared Executing Executing Process 11 Process 30 R0 Cleared R1 Process 20 R2 R3 Cleared R4 Cleared Process 11 Process 30 2 . To merge processes. clear all uncleared processes at the same time. include a flag indicating the state of the other processes in the transfer condition for the next process.

.. C32.. Program example Ladder Diagram Boolean Address 10 (CALL Subroutine program number (ED (SUB (RET 1) ) 1) Subroutine 30 ) 11 Instruction ST CALL X 0 1 X0 10 20 21 20 21 30 .76 . When the subroutine reaches the RET instruction..3 Explanation of Basic Instructions Step Availability FP0 CALL SUB RET Outline Subroutine call Subroutine entry Subroutine return 2 1 1 FP0 C10. X0 Main program CALL Main program ED SUB Subroutine program RET n 2 1 n 3 When CALLn is executed. T32. RET: Indicates the end of the subroutine program. Description When the execution condition (trigger) turns on. the program returns to the address after the CALL instruction of the main program and the execution of the main program resumes.. SL1 CALL: Executes the specified subroutine program...Basic Instructions 2. the CALL instruction is executed and the subroutine program of the specified number is executed starting with the SUB instruction. 11 SUB: Indicates the start of the subroutine program. C16. 3 shown above. 2 . C14. 1 .. RET .. the program is executed in the order 1 .. 2 .. ED SUB ..

3 Explanation of Basic Instructions Subroutine Program Syntax The numbers of points noted below can be used with the subroutines. Turns on for an instant when performing five nestings and executing the CALL instruction for the subroutine of the 5th nesting. Precautions during programming In the interrupt program. Nesting of subroutines is possible until the 5th nesting. 5th nesting example Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when performing five nestings and executing the CALL instruction for the subroutine of the 5th nesting. INT 1 SUB RET IRET 11 Subroutine In the subroutine program. SUB 0 CALL1 RET (Stage 2) SUB 1 CALL2 RET (Stage 3) SUB 2 CALL3 RET (Stage 4) SUB 3 CALL4 RET (Stage 5) SUB 4 RET Called up from inside of the subroutine. SUB INT Interrupt program IRET RET 11 0 Subroutine 2 . an interrupt program cannot be used. interrupt program area. Type FP0 all types Number of points 16 subroutines (SUB0 to SUB15) The subroutine program n (n: 0 to 15) is the program from the SUBn instruction to the RET instruction. or subroutine program area. a subroutine program cannot be used. Two or more CALL instructions with the same program number can be specified in a program.77 . The CALL instruction can be programmed in the main program area.FP0 Basic Instructions 2. Always place the address (subroutine) after the ED instruction.

refer to section 4. Holds the state.78 .DF (leading edge differential) .NSTP (next step) 2 . SUB 0 FP0 SUB 2 Subroutine program Subroutine program RET When the CALL instruction execution condition (trigger) is off When the execution condition (trigger) of a subroutine turns off. . When the execution condition (trigger) for the CALL instruction is in the off state.Basic Instructions 2. You must be careful when you use. Refer to MC/MCE instruction. the operations of that subroutine are not carried out. the subroutine program is not executed.Shift input of SR (shift register) . Holds the state. the instructions in the subroutine operate as follows. Instruction OT KP SET RST TM CT SR Differential instuctions Other instructions Operation status Holds the state. in a subroutine. Holds the elapsed value.3 Explanation of Basic Instructions A subroutine program cannot be written inside another subroutine program. (This is the same for CALL instructions within master controls or step ladders. one of the instructions below that is executed by detecting the leading of execution condition (trigger) such as the differential instruction.Shift input of F119 (left/right shift register) . Not executed. For more details.5. Holds the state. If timing is not performed once per scan.Count input of F118 (up/down counter) . the correct time cannot be guaranteed. Holds the elapsed value.Count input of CT (counter) . Does not perform any timing. Same as when a differential instruction is used between MC and MCE instructions.) If the execution condition (trigger) for the CALL instruction is in the off state.

79 . T32.. IRET . S1.. Interrupt program number INT0 INT1 INT2 INT3 INT4 INT5 INT24 Interrupt input (trigger) setting High . S2 1 Interrupting Main program ED INT Interrupt program n IRET n 2 3 When the interrupt occurs.. The interrupt program must always be placed after the ED instruction. the interrupt program of the number specified is executed starting from the INT instruction. the program is executed in the order 1 - 2 - 3 shown above.3 Explanation of Basic Instructions Step Availability FP0 C10.. the program returns to the address where the interrupt occurred and the main program resumes. Indicates the end of the interrupt program. When the interrupt program reaches the IRET instruction. Boolean Address (ED (INT Interrupt program number (IRET ) 0) ) 20 21 Instruction ED INT 0 Ladder Diagram 20 21 26 26 .. The number of the interrupt program is decided by the type of the interrupt. SL1 INT IRET Outline INT: IRET: Program example Interrupt Interrupt return 1 1 Indicates the start of the interrupt program..FP0 Basic Instructions 2. Description When an interrupt is input. C32. C14. Syntax of interrupt program An interrupt program n is the program between the INTn instruction and the IRET instruction. X0 DF ICTL.speed counter setting <when using F166/F167 instructions> Equal to ch0 target value Equal to ch1 target value  Equal to ch2 target value Equal to ch3 target value  X0 X1 X2 X3 X4 X5 Periodical interrupt 2 . C16.

Main program INT program Interrupt input off on Execution Execution Enabled 2 .initiated interrupts and periodical interrupts. 3 Periodical interrupt (INT24) The interrupt occurs in fixed time intervals.80 . refer to the explanation of the ICTL instruction. 2 Enable the execution of interrupt programs. an interrupt will occur only at the point when interrupts are enabled with the ICTL instruction. INT4) When executing either instruction F166 or instruction F167.5 ms to 1.5 s (ICTL S1 = H3) When the interrupt occurs. Interrupt program execution There are three types of interrupt. that contact cannot be used as the interrupt input (trigger). refer to section 8. the interrupt occurs when the high . INT3. Precaution when rewriting in RUN mode If the program is rewritten in the RUN mode. Notes • • If the high . Refer to the explanations of the F166 instruction and F167 instruction. INT1.speed counter . Enable the execution of interrupt programs with the ICTL instruction.5 ms units ranging from 0. execution will be inhibited for all interrupt programs. and will have to be enabled again after the rewriting has been completed in the RUN mode. it is not necessary to indicate the input (trigger) contact. For more details. Refer to the explanation of the ICTL instruction. 1 Interrupt from the input (trigger) contact (INT0 to INT5) The interrupt occurs when the input (trigger) specified at system register 403 rises (on) or falls (off). 2 High .4. Main program INT program on Interrupt input off Execution Execution Execution If interrupts are disabled. Select the contact point to be used as the interrupt input (trigger) from between X0 to X5 and indicate it at system register 403.speed counter elapsed value equals the set target value.speed counter/pulse catch is set.initiated interrupt (INT0.3 Explanation of Basic Instructions FP0 Before inputting an interrupt program 1 Declare the contact point to be used as the interrupt input (trigger). Set the time interval with the ICTL instruction. For the high speed counter . the interrupt program with the corresponding number is executed.Basic Instructions 2. Set in 10 ms units ranging from 10 ms to 30 s (ICTL S1 = H2) Set in 0. For details. The default conditions are set with interrupt programs disabled.

such as the constantly . should be specified by the input conditions in the interrupt program. a syntax error will result. contacts other than the interrupt input contact. When an interrupt is issued.81 . Main program INT1 program INT2 program INT2 input on off Execution Execution Execution Precautions during programming If either the INT instruction or IRET instruction is missing.3 Explanation of Basic Instructions When another interrupt program is being executed. F0 MV. the operation memory corresponding to the interrupt input contact does not undergo I/O refreshing. DT100 IRET X5 A subroutine program cannot be used in an interrupt program.FP0 Basic Instructions 2.on relay R9010. K10. INT 1 SUB RET IRET 11 Subroutine An interrupt program cannot be used in a subroutine program. an interrupt will occur after the current program is completed. SUB INT Interrupt program IRET RET 11 0 Subroutine 2 . INT 5 Specify R9010 or other contact instead of X5. Therefore.

The other interrupt programs are then placed in the execution waiting state. But. after INT3 program is done. the other programs will be executed in order from the smallest number to the greatest. the other programs will be executed in order from the smallest number to the greatest after the program currently being executed is finished. the INT1 program is executed first and then INT2 is executed.82 .3 Explanation of Basic Instructions An interrupt program cannot be programmed into another interrupt program. 2 .Basic Instructions 2. the INT2 input occured before INT1. When more than one interrupt occurs simultaneously. INT 0 FP0 INT 1 IRET Control when more than one interrupt occurs simultaneously. After the first interrupt program is completed. Example: Main program INT1 program INT2 program INT3 program INT1 input INT2 input INT3 input on off on off on off When more than one interrupt occurs while a interrupt program is being executed. Example: Main program INT1 program INT2 program INT3 program INT4 program INT1 input INT2 input INT3 input INT4 input on off on off on off on off During execution of the INT3 program in the example above. the interrupt program with the smaller number is executed first.

If you do not want to execute the interrupt program placed in the execution waiting state because of this. When the execution is enabled with the ICTL instruction. the interrupt programs of lower preference are placed in the execution waiting state. They are then executed in order of preference when the other interrupt programs are completed.3 Explanation of Basic Instructions Interrupt program execution waiting state and clearing When multiple interrupt programs occur simultaneously or new interrupt programs occur during the execution of another interrupt program. it can be cleared with the ICTL instruction. the waiting interrupt programs will then be executed.83 . interrupts that occur are still placed in the execution waiting state. ICTL (INT2 clear) execution Example: Main program INT1 program INT2 program INT1 input INT2 input on off on off Clear When the execution of interrupt programs is disabled with the ICTL instruction.FP0 Basic Instructions 2. there is a time difference between the time of when the interrupt occurs and when the interrupt program is actually executed. An interrupt program that is cleared will not be executed. 2 . Programs in the execution waiting state can be cleared with the ICTL instruction. Example: Main program INT1 program INT2 program INT1 input INT2 input on off on off Execution waiting state If placed in the execution waiting state.

84 . C16. R9034 H2.3 Explanation of Basic Instructions Step Availability FP0 ICTL Interrupt control 5 FP0 C10. SL1 Outline Performs the interrupt enable or disable and the interrupt clear. the interrupt program enable/disable and interrupt clear are set according to the settings in S1 and S2. H 0. T32. H 1 S1 S2 2 Operands Operand S1 S2 A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A A H A A A A A: Available Index modifier Description When the ICTL instruction is executed. Be sure to use ICTL instructions so that they are executed once at the leading edge of the execution condition (trigger) using the DF instruction. the interrupt function will be disabled. Program example Ladder Diagram Boolean Address 0 X0 0 ( DF ) 1 Instruction ST DF ICTL H H S1 S2 16-bit equivalent constant or 16-bit area for interrupt control data setting 16-bit equivalent constant or 16-bit area for interrupt condition setting 0 1 X 0 ICTL. Example of setting a periodical interrupt every 10ms from the start of operations (enables the interrupt function to be resumed for rewriting in the RUN mode) R9013 ICTL. Before executing an interrupt program.Basic Instructions 2. Two or more ICTL instructions can have the same execution condition (trigger). be sure to execute the ICTL instruction and enable the execution of the interrupt program. The ICTL instruction must be used to enable execution of the interrupt program before it can be resumed. C32. Note If rewriting is done in the RUN mode while the interrupt function is being used. C14. K1 Executes INT24 every 10ms 2 .

INT 0 R0 ICTL.FP0 Basic Instructions 2. 12 11 .3 Explanation of Basic Instructions Input examples Example 1: Setting a periodical interrupt every 10ms from the start of operations R9013 ICTL. H0. Set S1 = H2 (for units of 10ms) or S1 = H3 (for units of 0. . . S1 = H100. H100. .5ms units) Selection of control function H00: Interrupt execution “enabled/disabled” H01: Interrupt clear If execution has been specified as enabled or disabled for INT0 to INT5. K1 Executes INT24 every 10ms The R9013 (initial pulse relay) turns on only for the first scan after operations begin. . 2 . If an interrupt clear has been specified for INT0 to INT5. Example 2: Enable INT0 to INT3 when X0 rises. 4 3 . HF X0: Enables INT0 to INT3 when on Example 3: Clear interrupts other than INT0 after the INT0 program is completed.5ms) to set the time interval for INT24.85 . X0 DF ICTL. S1 = H0. 0 S1 Interrupt type selection H00: INT 0 to INT5 H02: INT24 (10ms units) H03: INT24 (0. H2. H1 IRET Interrupts other than INT0 are cleared when the program of INT0 is finished Specifying control data S1: Specifying the control functions and interrupt types Bit position 15 . 8 7 .

Bit position 15 .5 (ms). . Set the bit corresponding to the number of the program you want to clear to “0. . . 4 3 . .Basic Instructions 2. . 8 7 . 4 3 . Bit position 15 . . 12 11 .” Set the bit corresponding to the number of the program you want to disable to “0. . The time interval = value of S2 × 10 (ms). 0 INT program 5 4 3 2 1 0 number 0: INT program disabled S2 (Enabled/ 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 disabled) 1: INT program enabled 2 Clearing interrupt programs (when S1 = H100 or S1 = H101) Set the control data in the bit corresponding to the number of the interrupt program that you want to control. 8 7 . . . Bit position 15 . .5ms to 1. 12 11 .” Example: Clear interrupt programs INT1 and INT2 and do not clear interrupt programs INT3 through INT5. Set the control data in the bit corresponding to the number of the interrupt program that you want to control. .12 11 . 4 3 .86 . 0 S2 K0 to K3000 Time interval setting: K1 to K3000 (0. 8 7 . . .” Example: Enabling interrupt programs INT1 and INT2 and disabling interrupt programs INT3 through INT5. . 8 7 . Set the bit corresponding to the number of the program you want to enable to “1. 4 3 . 0 INT program 5 4 3 2 1 0 number S2 (Enabled/ 0: INT program disabled disabled) 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1: INT program enabled 3 Specifying periodical interrupt (when S1 = H2) Specify the setting with decimal number.5s) INT24 disabled: K0 2 . . Bit position 15 .” Set the bit corresponding to the number of the program you want to not clear to “1. 0 S2 K0 to K3000 Time interval setting: K1 to K3000 (10ms to 30s) INT24 disabled: K0 4 Specifying periodical interrupt programs (when S1 = H3) The time interval = value of S2 × 0.3 Explanation of Basic Instructions FP0 S2: Specifying the control of interrupts 1 Enabling or disabling interrupt programs (when S1 = H0 or S1 = H1).12 11 . .

87 . S2: H0021 Enable INT0 and INT5 (set bits 0 and 5 to “1”) and disable all others. 0 S2 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 INT No. To enable all interrupts INT0 to INT5. 5 will be executed when their corresponding interrupt inputs occur. . S1 S2 H0. H21 S1: H0000 Specifies enabling or disabling of interrupt programs that correspond to interrupts at specified input (trigger) contact or to target value match interrupts.FP0 Basic Instructions 2. ICTL instruction Main program INT0 program INT5 program INT0 input INT5 input Condition on off on off Execution Execution Execution Execution Disabled Enabled 2 . . 8 7 . Bit position 15 . set S2 = HFF. 4 3 . 1 and No. When this ICTL instruction is executed. interrupt programs No. 12 11 . .3 Explanation of Basic Instructions Example of enabling the execution of interrupt programs Example: DF ICTL. . 5 4 3 2 1 0 Input contact X0 X1 X2 X3 X4 X5 (INT0) (INT1) (INT2) (INT3) (INT4) (INT5) Set the bits to “1” that correspond to the interrupts to be enabled.

ICTL instruction Main program INT0 program INT1 program INT0 input INT1 input Condition on off on off Execution Execution Clear Execution Disabled Enabled Note Since INT0 is cleared. HFE S1: H0100 Clears interrupts from specified input (trigger) contact or target value match interrupts. the ICTL instruction can still be used to clear the INT0 interrupt.88 . 2 . the INT0 program will not be executed even after execution is enabled. refer to page 2 . Since INT1 is not cleared. For the relationship between the set value and the interrupt input (trigger) contact. when the interrupt program is disabled. S2: HFE Clears interrupt INT0 (bit 0 is “0”) and does not clear the other interrupts. the INT1 program will be executed after execution is enabled. S1 S2 H100.Basic Instructions 2.” Even though the INT0 interrupt input occured.87 “Example of enabling the execution of interrupt programs.3 Explanation of Basic Instructions FP0 Example for clearing interrupt programs Example: DF ICTL.

K0 2 . H2. H2.FP0 Basic Instructions 2. the time interval is K1500 x 10ms = 15000ms (15 sec) After this ICTL instruction is executed. ICTL instruction Execution Main program Execution Execution INT24 program 15s 15s To stop the periodical interrupt program (INT24). execute the following program. K1500 S1 S2 S1: H0002 Specifies periodical interrupt S2: K1500 Specifies the time interval for the periodical interrupt. DF ICTL. the periodical interrupt will occur every 15 seconds. With K1500.89 . the INT24 interrupt program will be executed. At these times.3 Explanation of Basic Instructions Example for setting periodical interrupt Example: DF ICTL.

DT 0. The contact goes on or off depending on the result of the comparison. C16. Program example Ladder Diagram Boolean Address 0 S1 0 6 S2 Y0 5 Y1 6 Instruction ST = DT K OT ST > = DT S1 S2 11 S1 S2 16-bit equivalent constant or 16-bit area to be compared 16-bit equivalent constant or 16-bit area to be compared K OT Y 0 60 1 Y 0 50 0 =. SL1 Performs start operation by comparing two word data items with the comparison condition. K 60 Operand Operand S1 S2 A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A A H A A A A A: Available Index modifier 2 .Basic Instructions 2. C32.90 . K 50 > =. DT 0. C14. T32.3 Explanation of Basic Instructions Step Availability FP0 ST = ST <> ST > ST >= ST < ST <= Outline Word compare: Start equal Word compare: Start equal not Word compare: Start larger Word compare: Start equal or larger Word compare: Start smaller Word compare: Start equal or smaller 5 5 5 5 5 5 FP0 C10.

Turns on for an instant when the area specified using the index modifier exceeds the limit.91 . the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. >. ST<>. the external output relay Y0 goes on and if DT0 ≧ K60. 2 . In this case. ST >=. <. and ST <= are programmed from the bus line. the external output relay Y1 turns on.). The ST instruction initiates a logical operation as the liaison contact when the comparison result is a specified status (=.3 Explanation of Basic Instructions Explanation of example Compares the contents of data register DT0 with the constant K50 and K60. If mixed with BCD or other type of data. DT0 60 50 10 on Y0 off on Y1 off Description Compares the word data specified by S1 with the word data specified by S2 according to the comparison condition. ST >. ST <. If DT0 = K50. etc. use an F81 or similar instruction to change the data to binary data before making the comparison. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.FP0 Basic Instructions 2. The result of the comparison operation is as follows: Comparison instruction ST= ST < > ST> ST> = ST< ST< = Condition S1 < S2 off on off off on on S1 = S2 on off off on off on S1 > S2 off on on on off off < > indicates ≠ >= indicates ≧ <= indicates ≦ Precautions concerning usage The start comparison instructions ST =.

DT 0. DT 100 S1 S2 OT STD > DT DT 0 100 Y 1 19 S1 S2 OT 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared Operands Operand S1 S2 A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A A H A A A A A: Available N/A: Not Available Index modifier 2 . C32. C14. The contact goes on or off depending on the result of the comparison.3 Explanation of Basic Instructions Step Availability FP0 STD = STD <> STD > STD >= STD < STD <= Outline Double word compare: Start equal Double word compare: Start equal not Double word compare: Start larger Double word compare: Start equal or larger Double word compare: Start smaller Double word compare: Start equal or smaller 9 9 9 9 9 9 FP0 C10.Basic Instructions 2. DT 0. 12 Program example Ladder Diagram Boolean Address 0 S1 0 10 S2 Y0 Y1 9 10 Instruction STD = DT DT 0 100 Y 0 D =. C16. DT 100 D >. T32.92 . SL1 Performs start operation by comparing two double word data items with the comparison condition.

DT0) with the data registers (DT101. S1) = (S1+1. and STD <= are programmed from the bus line. The specified data area and the following data area are handled together as 32 . >. STD >=.3 Explanation of Basic Instructions Explanation of example Compares the contents of data registers (DT1.FP0 Basic Instructions 2. The result of the comparison operation is as follows: Comparison instruction STD= STD< > STD> STD> = STD< STD< = Condition (S1+1. the external output relay Y1 goes on. the external output relay Y0 goes on and if (DT1.93 .). S2) (S2+2. the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. etc. DT100). S1) < (S1+1. Description Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and S2+1 according to the comparison condition. DT100). In this case.bit data. DT0) = (DT101. S2) are specified. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. S1) > (S2+2. If mixed with BCD or other type of data. STD <. STD <>. 2 . S1+1 S1 Comparison S2+1 S2 Precautions concerning usage The start comparison instructions STD =. use an F83 or similar instruction to change the data to binary data before making the comparison. S2+1) are automatically determined once the lower 16-bit areas (S1. DT0) > (DT101. DT100). If (DT1. The STD instruction initiates a logical operation as the liaison contact when the comparison result is a specified status (=. STD >. S2) off on off off on on on off off on off on off on on on off off < > indicates ≠ >= indicates ≧ <= indicates ≦ When processing 32-bit data. the higher 16-bit areas (S1+1. S2) (S2+2. <. Turns on for an instant when the area specified using the index modifier exceeds the limit.

The contact goes on or off depending on the result of the comparison.Basic Instructions 2. DT 0.3 Explanation of Basic Instructions Step Availability FP0 5 AN = AN <> AN > AN >= AN < AN <= Word compare: AND equal Word compare: AND equal not Word compare: AND larger Word compare: AND equal or larger Word compare: AND smaller Word compare: AND equal or smaller 5 5 5 5 5 5 FP0 C10.94 . 13 Program example Ladder Diagram Boolean Address 0 X0 0 Instruction ST AN > = DT K 6 S1 S2 16-bit equivalent constant or 16-bit area to be compared 16-bit equivalent constant or 16-bit area to be compared OT Y 0 60 0 X 0 > =. K 60 S1 S2 Y0 1 Operand Operand S1 S2 A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A A H A A A A A: Available Index modifier 2 . C32. T32. C14. C16. SL1 Outline Performs AND operation by comparing two word data items with the comparison condition. The contacts are connected in series.

If DT0 < K60 or if X0 is in the off state. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.3 Explanation of Basic Instructions Explanation of example Compares the contents of data register DT0 with the constant K60 when X0 turns on. If mixed with BCD or other type of data. The result of the comparison operation is as follows: Comparison instruction AN= AN< > AN> AN> = AN< AN< = Condition S1 < S2 off on off off on on S1 = S2 on off off on off on S1 > S2 off on on on off off < > indicates ≠ >= indicates ≧ <= indicates ≦ Precautions concerning usage Multiple AND comparison instructions AN =.FP0 Basic Instructions 2. external output relay Y0 goes on. external output relay Y0 goes off. the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. etc.). AN >. AN <>. >. and AN <= can be used consecutively. use an F81 or similar instruction to change the data to binary data before making the comparison. DT0 60 10 X0 off Y0 off on on Description Compares the word data specified by S1 with the word data specified by S2 according to the comparison condition.95 . In this case. AN >=. AN <. Turns on for an instant when the area specified using the index modifier exceeds the limit. The AN instruction results in serial connection as the liaison contact when the comparison result is a specified status (=. 2 . <. If DT0 ≧ K60 in the X0 on state.

C32. DT0) with the data registers (DT101.96 .3 Explanation of Basic Instructions Step Availability FP0 AND = AND <> AND > AND >= AND < AND <= Outline Double word compare: AND equal Double word compare: AND equal not Double word compare: AND larger Double word compare: AND equal or larger Double word compare: AND smaller Double word compare: AND equal or smaller 9 9 9 9 9 9 FP0 C10. DT0) < (DT101. DT0) ≧ (DT101. DT100) when X0 turns on. The contact goes on or off depending on the result of the comparison. the external output relay Y0 goes on. the external output relay Y0 goes off. T32. C16.Basic Instructions 2. If (DT1. DT 0. 14 Boolean Address 0 X0 0 Instruction ST X 0 Program example Ladder Diagram D> =. DT100) or if X0 is in the off state. If (DT1. DT100 S1 S2 Y0 1 AND >= DT DT 0 100 Y 0 10 S1 S2 OT 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared Operand Operand S1 S2 A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A A H A A A A A: Available N/A: Not Available Index modifier Explanation of example Compares the contents of data registers (DT1. 2 . The contacts are connected in series. SL1 Performs AND operation by comparing two double word data items with the comparison condition. C14. DT100) in the X0 on state.

S1+1 S1 Comparison S2+1 S2 Precautions concerning usage Multiple AND comparisons instructions AND =. >. S1) < (S1+1. AND <. etc.). S2+1) are automatically determined once the lower 16-bit areas (S1.bit data.97 . and AND <= can be used consecutively. S2) (S2+1. S2) are specified. S2) off on off off on on on off off on off on off on on on off off < > indicates ≠ >= indicates ≧ <= indicates ≦ When processing 32-bit data.FP0 Basic Instructions 2. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. The result of the comparison operation is as follows: Comparison instruction AND= AND< > AND> AND> = AND< AND< = Condition (S1+1. S1) > (S2+1. S1) = (S1+1. <. The AND instruction results in serial connection as the liaison contact when the comparison result is a specified status (=. The specified data area and the following data area are handled together as 32 . S2) (S2+1. If mixed with BCD or other type of data. use an F83 or similar instruction to change the data to binary data before making the comparison. In this case. AND >=. the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. AND >. AND <>. Turns on for an instant when the area specified using the index modifier exceeds the limit. the higher 16-bit areas (S1+1.3 Explanation of Basic Instructions Description Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and S2+1 according to the comparison condition. 2 .

C32. K 60 16-bit equivalent constant or 16-bit area to be compared 16-bit equivalent constant or 16-bit area to be compared Operand Operand S1 S2 A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A A H A A A A A: Available Index modifier 2 . C14.3 Explanation of Basic Instructions Step Availability FP0 OR = OR <> OR > OR >= OR < OR <= Outline Word compare: OR equal Word compare: OR equal not Word compare: OR larger Word compare: OR equal or larger Word compare: OR smaller Word compare: OR equal or smaller 5 5 5 5 5 5 FP0 C10. The contacts are connected in parallel. T32.98 . C16.Basic Instructions 2. SL1 Performs OR operation by comparing two word data items with the comparison condition. 15 Program example Ladder Diagram Boolean Address Y0 0 1 Instruction ST OR > = DT K S1 S1 S2 S2 6 OT Y 0 60 0 X 0 X0 0 > =. DT 0. The contact goes on or off depending on the result of the comparison.

FP0 Basic Instructions 2. The OR instruction results in parallel connection as the liaison contact when the comparison result is a specified status (=. OR <>. The result of the comparison operation is as follows: Comparison instruction OR= OR< > OR> OR> = OR< OR< = Condition S1 < S2 off on off off on on S1 = S2 on off off on off on S1 > S2 off on on on off off < > indicates ≠ >= indicates ≧ <= indicates ≦ Precautions concerning usage The OR comparison instructions OR =. then Y0 goes off. OR >=. 2 . OR <. <. OR >. use an F81 or similar instruction to change the data to binary data before making the comparison.3 Explanation of Basic Instructions Explanation of example Y0 goes on when X0 is in the on state. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Multiple OR comparison instructions OR =.99 . or when DT0 ≧ K60. >. OR <>. OR <. and OR <= can be used consecutively. and OR<= are programmed from the bus line. If DT0 < K60 and if X0 is in the off state. OR >=.). etc. DT0 60 10 X0 Y0 on off on off Description Compares the word data specified by S1 with the word data specified by S2 according to the comparison condition. OR >. the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained. If mixed with BCD or other type of data. In this case.

2 . SL1 Performs OR operation by comparing two double word data items with the comparison condition. DT100). When X0 turns on or if (DT1. DT0) < (DT101. The contacts are connected in parallel. DT100) and if X0 is in the off state. DT100 S1 S2 10 OT S1 S2 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared Operand Operand S1 S2 A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A A H A A A A A: Available N/A: Not Available Index modifier Explanation of example Compares the contents of data registers (DT1. DT0) ≧ (DT101. C14. C16. DT0) with the data registers (DT101. If (DT1. The contact goes on or off depending on the result of the comparison. DT100). 16 Program example Ladder Diagram Boolean Address Y0 0 1 Instruction ST X 0 X0 0 1 ORD> = DT DT 0 100 Y 0 D> =. the external output relay Y0 goes on.100 . DT 0.Basic Instructions 2. C32.3 Explanation of Basic Instructions Step Availability FP0 ORD = ORD <> ORD > ORD >= ORD < ORD <= Outline Double word compare: OR equal Double word compare: OR equal not Double word compare: OR larger Double word compare: OR equal or larger Double word compare: OR smaller Double word compare: OR equal or smaller 9 9 9 9 9 9 FP0 C10. the external output relay Y0 goes off. T32.

The specified data area and the following data area are handled together as 32 . ORD <. The result of the comparison operation is as follows: Comparison instruction ORD= ORD< > ORD> ORD> = ORD< ORD< = Condition (S1+1. 2 . use an F83 or similar instruction to change the data to binary data before making the comparison. <. Multiple OR comparison instructions ORD =. S2+1) are automatically determined once the lower 16-bit areas (S1.101 . If mixed with BCD or other type of data. S2) off on off off on on (S1+1. ORD >. >. S1) > (S2+1. Turns on for an instant when the area specified using the index modifier exceeds the limit. The ORD instruction results in parallel connection as the liaison contact when the comparison result is a specified status (=. etc. In this case. S1) = (S1+1. ORD<. ORD >=. S1+1 S1 Comparison S2+1 S2 Precautions concerning usage The OR comparison instructions ORD =. the higher 16-bit areas (S1+1. S2) (S2+1. and ORD <= can be used consecutively. ORD >=. and ORD <= are programmed from the bus line. ORD <>. the value will be regarded as negative when the most significant bit is 1 and a correct comparison may not be obtained.). S1)< (S2+1. ORD >. ORD <>. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.bit data. S2) are specified. S2) on off off on off on off on on on off off < > indicates ≠ >= indicates ≧ <= indicates ≦ When processing 32-bit data.FP0 Basic Instructions 2.3 Explanation of Basic Instructions Description Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and S2+1 according to the comparison condition.

102 .Basic Instructions 2.3 Explanation of Basic Instructions FP0 2 .

. . . . . . . . . . . 3 . . . 3 . . .11 Explanation of High .1. . .3 High-level Instruction Numbers and Program Input . .2 3. . . .1. . .1 Composition of High-level Instructions . . . . . . . . . 3 . . . . . . . . . . . . . . . . . .6 Table of High-level Instructions .level Instructions . 3 .22 .1. . . . . . . . . . . . . . . . . . . . .2 3. 3 . . . . . . . . . . . .4 Types of High-level Instructions .1. . . . . 3 . . . . 3 . . . . . . . . .Chapter 3 High-level Instructions 3. . . .3 Composition . . . . . . .4 3. . .1 3.3 3. . . . . . .3 3. . . . . .4 High-level Instructions and Execution Condition (Trigger) . . . . . .

2 .High-level Instructions FP0 3.

Boolean: Boolean indicate the processing content of each instruction.3 . 3.level instruction number: High . The number of operands differ depending on the instruction. Refer to the explanations of the instructions as only certain memory areas (registers) and constants can be used with each instruction.2. Operand: Operands are used to specify the processing method and the storage area for processed data. D (Destination): Location where result of processing is stored.1 Composition of High-level Instructions 3. D (destination) and n (number for specifying control methods). K0 S . n (number): Numeric data which is to be processed or which sets the processing method.1 Composition of High-level Instructions 3. boolean and operands.1 Composition Each high-level instruction is composed of a “F” type high-level instruction number.level instruction numbers are used for inputting high-level instructions. DT 0 D Boolean F type high. Example: F0 (MV) instruction The K0 (S) is copied to DT0 (D) Execution condition (Trigger) Address R0 0 Operand F0 MV .FP0 High-level Instructions 3.level instruction number: “0” High . Operands are specified using constants or memory areas (registers) as explained in section 1.1. etc. Operands are classified into three types: S (source). Operand types S (Source): Data which is to be processed or data which sets the processing method.

K0. Example: F0 (MV) instruction R0 F 0 F0 MV . When the operation result of the relay sequence circuit specified as the execution condition (trigger) is on. the instruction is executed at each scan repeatedly. the F0 (MV) instruction is executed and K0 is transferred to DT0.type High-level Execution instruction [ex. While the execution condition (trigger) is on. K 0 . A high. DT 0 3. R0 F0 MV. Example: When the execution condition (trigger) R0 is on.2 High-level Instruction Numbers and Program Input High-level instruction numbers are assigned to high-level instructions.level instruction is entered by entering its high-level instruction number.1. DT0 Execution condition (Trigger) Execution of high-level instructions The high-level instruction of FP0 is executed once every scan (F type). F0 (MV)] 1 scan 3. the number assigned to the MV instruction (16-bit data transfer instruction) is F0.4 . the high-level instruction is executed.1.1 Composition of High-level Instructions FP0 3. Enter “F” and then the number.High-level Instructions 3. Execution condition (trigger) (R0) on off F . For example.3 High-level Instructions and Execution Condition (Trigger) A high-level instruction is always used in a pair with its execution condition (trigger).

1 Composition of High-level Instructions There is no need to program the same execution condition (trigger) many times when two or more high-level instructions are programmed consecutively with the same execution condition (trigger). DT3. WX3. R0 F81 BIN. K50 3. K50 This execution condition (trigger) is not required. Example: R0 F81 BIN. DT3.FP0 High-level Instructions 3.5 . DT3 R0 F60 CMP. DT3 F60 CMP. WX3.

K50. Example: 16-bit move: [F0 (MV)] 32-bit move: [F1 (DMV)] Hexadecimal digit data move: [F6 (DGT)] Block move: [F10 (BKMV)] Program Example R0 F0 MV.1. BIN arithmetic instructions These instructions add. The value of DT1 will be K50. DT1 An example of transferring K50 to DT1. or divide data. The result is stored in DT20. When DT0 = K12 and DT10 = K13.)] 16-bit data multiplication: [F30 (*)] 16-bit data division: [F32 (%)] Program Example R0 F22 +. 3. DT10. subtract.4 Types of High-level Instructions Data transfer instructions These instructions transfer data to the specified memory area. Example: 16-bit data addition: [F22 (+)] 16-bit data subtraction: [F27 ( .High-level Instructions 3. multiply.6 . DT20 An example of adding the contents of DT0 and DT10.1 Composition of High-level Instructions FP0 3. DT20 = K25. DT0.

DT10. DT20 = H35. Data comparison instructions These instructions compare two data.FP0 High-level Instructions 3. or divide BCD data. multiply. subtract. Example: 4-digit BCD data addition: [F42 (B+)] 4-digit BCD data subtraction: [F47 (B . R900B is a flag which turns on when the result of a comparison is “equal” (=). and turns R1 on if they are equal.7 . DT0. When DT0 = H12 and DT10 = H23. 3. DT20 An example of adding the contents of DT0 and DT10 as BCD data.1 Composition of High-level Instructions BCD arithmetic instructions These instructions add.)] 4-digit BCD data multiplication: [F50 (B*)] 4-digit BCD data division: [F52 (B%)] Program Example R0 F42 B+. K100 R0 R900B R1 This program compares the value in DT0 and K100. DT0. Example: 16-bit data compare: [F60 (CMP)] 32-bit data compare: [F61 (DCMP)] Program Example R0 F60 CMP. The result is stored in DT20.

DT0. Example: AND operation: [F65 (WAN)] OR operation: [F66 (WOR)] Exclusive OR operation: [F67 (XOR)] Exclusive NOR operation: [F68 (XNR)] Program Example R0 F65 WAN. and other data types. BCD. DT10 DT0 : 1 K . ASCII code. DT20 H1 : 0 ··· 0 0 0 1 H3 : 0 ··· 0 0 1 1 DT20 : 0 ··· 0 0 0 1 Logic operation (1 when both are 1) (Operation result) Data conversion instructions These are instructions for converting data to and from binary data.8 . H3. Example: Hexadecimal data → ASCII code: [F71 (HEXA)] ASCII code → Hexadecimal data: [F72 (AHEX)] 16-bit binary data → ASCII code: [F75 (BINA)] 16-bit data invert: [F84 (INV)] Program Example R0 F75 BINA. H4.110 (minus sign) Binary data conversion ASCII code 1 DT10 : H31 DT11 : H20 0 2D 31 3. H1.High-level Instructions 3.1 Composition of High-level Instructions FP0 Logic operation instructions These instructions perform logic operations.

1 Composition of High-level Instructions Data shift instructions These instructions shift data. K4 Example of a program which shifts the content of DT0 to the right (toward the least significant bit) four bits (as specified) at a time. Example: Right shift of n bits: [F100 (SHR)] Right shift of one hexadecimal digit: [F105 (BSR)] Program Example Shift 4 bits R0 F100 SHR. K4 Example of a program which rotates the content of DT0 to the right (toward the least significant bit) four bits (as specified) at a time.FP0 High-level Instructions 3. Example: 16-bit data right rotate: [F120 (ROR)] 16-bit data left rotate: [F121 (ROL)] Program Example R0 F120 ROR. DT0: 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 DT0: 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 3.9 . DT0. DT0: 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 DT0: 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 R9009 (Carry flag) : Data rotate instructions These instructions rotate data within the specified range of the memory area. DT0.

Y5 Example of a program which turns output relay Y5 on when the elapsed value of channel 0 of the built . DT0.High-level Instructions 3. 15 DT0: 12 11 8 7 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 12 11 4 3 0 DT0: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Bit position 15 is turned on (1). Example: On when equals target value: [F166 (HC1S)] Pulse output: [F169 (PLS)] Program Example R0 F166. Example: Bit set: [F130 (BTS)] Bit invert: [F132 (BTI)] Number of on bits: [F135 (BCU)] Program Example R0 F130 BTS. K1. K10000.10 .1 Composition of High-level Instructions FP0 Bit manipulation instructions These are instructions for operating on individual bits of 16-bit data such as data registers. Value of DT0 Elapsed value Y5 on off Time 3 .in high-speed counter reaches the target value (K10000). K15 Example of a program which sets bit position 15 of DT0 to 1. FC1S. Special instructions These consist of a special instruction for use of the high-speed counter or other functions and an instruction which performs operation or control for specific purposes.

S) → (D+1. D S. D2) (D2+1. n. D S. n. 5 5 3 3 . D) (S1) + (S2) → (D) (S1+1. 2. D (D) + (S) → (D) (D+1. (D2) → (D1) (D1+1. S1) + (S2+1.29 16-bit data invert and MV/ move 32-bit data invert and DMV/ move Bit data move BTM F6 Hexadecimal digit (4. The bit is specified by “n”.3 or later) and FP Programmer II (AFP1114V2). D S.49 3 . The data of “S” is transferred to the all area between “D1” and “D2”. D The data specified by “S1” and “S2” 11 are transferred to the EEPROM area starting at “D.42 3 . S) → (D+1. S2. S2. The data between “S1” and “S2” is transferred to the area starting at “D”.2 Table of High-level Instructions 3. S2) → (D+1. D S1.23 3 . The digit is specified by “n”. D 5 7 5 7 7 3 .36 3 .46 Binary arithmetic instructions F20 F21 F22 F23 16-bit data addition 32-bit data addition 16-bit data addition 32-bit data addition + D+ + D+ S. S2.25 3 . Steps Page Data transfer instructions F0 F1 F2 F3 F5 16-bit data move 32-bit data move MV DMV S.53 Note The instruction is available for FP0 T32 and FP0 C10/C14/C16/ C32 CPU Ver. D2 D 3 .1 or later. D 7 The specified one digit in “S” is transferred to the specified one digit in “D”.GR Ver. D) (S) → (D) (S+1.24 3 .bit) data move Block move DGT S. D S1. The instruction should be input using programming tool software (FPWIN GR/NPST. S) → (D+1. D2 S1. D 3 .” (D1) → (D2). D 7 11 3 .40 16-bit data exchange XCH 32-bit data exchange DXCH Higher/lower byte in SWAP 16-bit data exchange D1. 3 .51 3 . D) + (S+1.” 7 3 . S2. D1.34 F11 F12 (* Note) Block copy Data read from EEPROM COPY ICRD S. D2) → (D1+1.27 3 . D1) → (D2+1.FP0 High-level Instructions 3. S2. D) 5 7 7 11 3 . 4. D2 D1. D S. D S. The data stored in the EEPROM specified by “S1” and “S2” are transferred to the area starting at “D.31 F10 BKMV S1. D1) The higher byte and lower byte of “D” are exchanged.2 Number Table of High-level Instructions Name Boolean Operand Description (S) → (D) (S+1.44 3 .38 P13 (* Note) F15 F16 F17 Data write to EEPROM PICWT S1.47 3 .11 . D) The specified one bit in “S” is transferred to the specified one bit in “D”.

S1) .95 3 . S) → (D+1. D+1.(S) → (D) (D+1. D S1. D) (S1) .(S+1. D S1. D+1. D Description (D) . S2.67 3 . S2.87 3 . D S. S2. D+2.61 3 . D) (S1) × (S2) → (D+1. S2) → (D+3. D) (S1) × (S2) → (D+1.(S) → (D) (D+1. S2. D) Steps Page 5 7 7 11 7 11 7 11 3 .63 3 .59 3 . D S1. D) (S1) ÷ (S2) → quotient (D) remainder (DT9015) 5 7 7 11 5 7 7 11 7 11 7 3 .79 3 . S1) × (S2+1. S1) ÷ (S2+1.55 3 .75 3 . S2) → quotient (D+1. D) (S1) + (S2) → (D) (S1+1. S) → (D+1. S2.83 3 . S2.(S2+1. D) +1 → (D+1.97 3 . D S.2 Table of High-level Instructions FP0 Number F25 F26 F27 F28 F30 F31 F32 F33 Name 16-bit data subtraction 32-bit data subtraction 16-bit data sutraction 32-bit data subtraction 16-bit data multiplication 32-bit data multiplication 16-bit data division 32-bit data division Boolean DD* D* % D% Operand S.(S2) → (D) (S1+1. D) (S1+1. D) . S2. S2. D) (D) . S) → (D+1. D S. S2. D S1.65 3 .(S2+1. S2.81 3 . DT9015) (D) + 1 → (D) (D+1.12 .99 3 . D S1. D) remainder (DT9016. S2. S2) → (D+1. D S1. D (D) + (S) → (D) (D+1. D) (S1+1. D+2. D) . S1) .93 3 .73 3 . D S1. S2) → (D+1.57 3 .71 3 . S2) → (D+1.1 → (D) (D+1.89 3 .1 BCD arithmetic instructions F40 F41 F42 F43 F45 F46 F47 F48 F50 F51 F52 4-digit BCD data addition 8-digit BCD data addition 4-digit BCD data addition 8-digit BCD data addition 4-digit BCD data subtraction 8-digit BCD data subtraction 4-digit BCD data subtraction 8-digit BCD data subtraction 4-digit BCD data multiplication 8-digit BCD data multiplication 4-digit BCD data division B+ DB+ B+ DB+ BDBBDBB* DB* B% S.(S2) → (D) (S1+1. S2.(S+1. D) (D) .85 3 . S1) × (S2+1.77 32-bit data increment D+1 16-bit data decrement 32-bit data decrement -1 D. D S1. S1) + (S2+1. D S1. S2) → (D+3.1 → (D+1.High-level Instructions 3. D S1. S2. D S1. D S1. D) .69 F35 F36 F37 F38 16-bit data increment +1 D D D D 3 3 3 3 3 . D S.91 3 . D) (S1) . D S1. D) + (S+1. D) (S1) ÷ (S2) → quotient (D) remainder (DT9015) (S1+1.

D Description (S1+1. S1) > (S2+1.121 F64 Block data compare BCMP S1.107 3 .1 DB.126 3 . S2. The operation method is specified by “S1”.101 F55 F56 F57 F58 B+1 DB+1 B. S2. S2) → R900C:on 7 3 . S2. Example: HABCD → H 42 41 44 43 B A D C 9 3 . S1) < (S2+1.132 Data conversion instructions F70 Block check code calculation BCC S1.1 → (D) (D+1. S2 9 3 .109 Data comparison instructions F60 16-bit data compare CMP S1. S1) < (S2+1.115 F62 16-bit data band compare 32-bit data band compare WIN S1. D) Steps Page 11 3 . S2.137 3 . S2)→ R900A:on (S1+1. D) remainder (DT9015.130 3 . S2 (S1) > (S2) → R900A:on (S1) = (S2) → R900B:on (S1) < (S2) → R900C:on (S1+1. S1) ÷ (S2+1. D) .13 . 3 . S3 Compares the two blocks beginning 7 with “S2” and “S3” to see if they are equal. S1) ≦ (S3+1. D S1. D S1.123 Logic operation instructions F65 F66 F67 F68 16-bit data AND 16-bit data OR 16-bit data exclusive OR 16-bit data exclusive NOR WAN WOR XOR XNR S1.FP0 High-level Instructions 3. S2. S2. S2.128 3 . S2. S2)→ R900C:on 5 3 .111 F61 32-bit data compare DCMP S1. S3) → R900B:on (S1+1. S3) → R900A:on (S2+1. D Creates the code for checking the data specified by “S2” and “S3” and stores it in “D”.1 D D D D 3 3 3 3 3 . DT9016) (D) + 1 → (D) (D+1. S2. S2) ≦ (S1+1.105 3 . S2. D) + 1 → (D+1. S2) → quotient (D+1. D S1. D 7 3 . S3. S2)→ R900B:on (S1+1.1 → (D+1. D) (D) . S3 (S1+1.119 F63 DWIN 13 3 . S3 (S1) > (S3) → R900A:on (S2) ≦ (S1) ≦ (S3) → R900B:on (S1) < (S2) → R900C:on S1. S1) = (S2+1.134 F71 Hexadecimal data → ASCII code HEXA S1.2 Table of High-level Instructions Number F53 Name 8-digit BCD data division 4-digit BCD data increment 8-digit BCD data increment 4-digit BCD data decrement 8-digit BCD data decrement Boolean DB% Operand S1.103 3 . S1) > (S3+1. Converts the hexadecimal data specified by “S1” and “S2” to ASCII code and stores it in “D”. D (S1) ∧ (S2) → (D) (S1) ∨ (S2) → (D) {(S1) ∧ (S2)} ∨ {(S1) ∧ (S2)} → (D) {(S1) ∧ (S2)} ∨ {(S1) ∧ (S2)} → (D) 7 7 7 7 3 .

D). 11 3 .169 F83 8-digit BCD data → 32-bit binary data DBIN S. S2. D 5 3 . S2. S2.155 F77 32-bit binary data → ASCII code ASCII code → 32-bit binary data DBIA S1.140 F73 4 .144 F74 ASCII code → 4 . S1) to ASCII code and stores it in (D+1. D Description Converts the ASCII code specified by “S1” and “S2” to hexadecimal data and stores it in “D”. Inverts each bit of data of “D”. S) to 32 bits of binary data and stores it in (D+1.165 F81 4-digit BCD data → 16-bit binary data BIN S. Converts the ASCII code specified by “S1” and “S2” to 32 bits of binary data and stores it in (D+1. Example: H 44 43 42 41 → HCDAB D C B A Steps Page 7 3 . Converts the eight digits of BCD data specified by (S+1.161 F80 16-bit binary data → 4-digit BCD data BCD S. Example: H 30 30 31 2D 20 20 → K-100 0 0 1 Converts the 32 bits of binary data of (S1+1. Example: K100 → H100 Converts the four digits of BCD data specified by “S” to 16 bits of binary data and stores it in “D”.171 3 . S2.digit BCD data → ASCII code BCDA S1. Example: H1234 → H 32 31 34 33 2 1 4 3 Converts the ASCII code specified by “S1” and “S2” to four digits of BCD data and stores it in “D”. D 3 . S2. D Converts the 16 bits of binary data 7 specified by “S1” to ASCII code and stores it in “D” (area of “S2” bytes).172 3 . S2. D 9 3 .167 F82 32-bit binary data → 8-digit BCD data DBCD S. D 7 3 . S) to eight digits of BCD data and stores it in (D+1. D). Example: H100 → K100 Converts the 32 bits of binary data specified by (S+1.170 F84 F85 16-bit data invert 16-bit data complement of 2 INV NEG D D 3 3 3 . S2. D Converts the four digits of BCD data specified by “S1” and “S2” to ASCII code and stores it in “D”. D 3 . Example: H 34 33 32 31 → H3412 4 3 2 1 7 3 . Inverts each bit of data of “D” and adds 1 (inverts the sign).digit BCD data ABCD S1. D).2 Table of High-level Instructions FP0 Number F72 Name ASCII code → Hexadecimal data Boolean AHEX Operand S1. D 5 3 .High-level Instructions 3. D 7 3 . D 11 3 .158 F78 DABI S1. Example: K-100 → H 30 30 31 2D 20 20 0 0 1 Converts the ASCII code specified 7 by “S1” and “S2” to 16 bits of binary data and stores it in “D”.148 F75 16-bit binary data → ASCII code BINA S1. D). Converts the 16 bits of binary data specified by “S” to four digits of BCD data and stores it in “D”.152 F76 ASCII code → 16-bit binary data ABIN S1.14 .

3 3 .190 F96 16. n Shifts the “n” bits of “D” to the right. Shifts the one digit of data of “D” to the left.193 Data shift instructions F100 Right shift of multiple bits (n bits) in a 16-bit data Left shift of multiple bits (n bits) in a 16-bit data Right shift of one hexadecimal digit (4.181 F92 Encode ENCO S. S2. Decodes part of the data of S and stores it in “D”.2 Table of High-level Instructions Number F86 F87 F88 F89 F90 Name 32-bit data complement of 2 16-bit data absolute 32-bit data absolute 16-bit data sign extension Decode Boolean DNEG ABS DABS EXT DECO Operand D D D D S.197 F105 BSR D Shifts the one digit of data of “D” to the right.188 F95 Character → ASCII code ASC S. Each of the digits of the data of “S” are stored in (distributed to) the least significant digits of the areas beginning at “D”.201 F110 F111 F112 WSHR WSHL WBSR D1. Steps Page 3 3 3 3 7 3 . Encodes part of the data of “S” and stores it in “D”. D 7 3 .174 3 . D 5 3 . Converts the data of “S” for use in a 7 . Gives the absolute value of the data of “D”. D 7 3 . D2 D1. D2 D1. n.15 . n Shifts the “n” bits of “D” to the left.bit) Right shift of one hexadecimal digit (4. D2 5 5 5 3 . D Description Inverts each bit of data of (D+1. Shifts the one word of the areas by “D1” and “D2” to the left. Extends the 16 bits of data in “D” to 32 bits in (D+1. n. D) and adds 1 (inverts the sign). S3 The data of “S1” is searched for in the areas in the range “S2” to “S3” and the result is stored in DT9037 and DT9038.bit) SHR D.175 3 . Twelve characters of the character constants of “S” are converted to ASCII code and stored in “D” to “D+5”.195 F101 SHL D.199 F106 BSL D 3 3 .bit) Right shift of one word (16.segment display and stores it in (D+1.178 F91 7-segment decode SEGT S. Shifts the one digit of the areas by “D1” and “D2” to the right. D 15 3 . Gives the absolute value of the data of (D+1. D 7 3 . The part is specified by “n”. Shifts the one word of the areas by “D1” and “D2” to the right.183 F93 16-bit data combine UNIT S. n.FP0 High-level Instructions 3.186 F94 16-bit data distribute DIST S.207 3 .176 3 .bit) Left shift of one hexadecimal digit (4. D). 5 3 . 5 3 .bit table data search SRC S1.bit) Left shift of one word (16. The least significant digit of each of the “n” words of data beginning at “S” are stored (united) in order in “D”. n. The part is specified by “n”.173 3 .203 3 . D).205 3 . D). 7 3 .

bit area consisting of “D” plus the carry flag (R9009) data to the right. D2 5 3 .214 Data rotate instructions F120 F121 F122 16-bit data right rotate 16-bit data left rotate 16-bit data right rotate with carry flag (R9009) data 16-bit data left rotate with carry flag (R9009) data ROR ROL RCR D. Only possible for I/O numbers X0 to XF and Y0 to YF.01 sec. Rotate the “n” bits in 17.225 3 . D2 3 . 5 3 .223 Bit manipulation instructions F130 F131 F132 F133 16-bit data bit set 16-bit data bit reset 16-bit data bit invert 16-bit data bit test BTS BTR BTI BTT D. Rotate the “n” bits in data of “D” to the left. 1 1 5 3 . n D. 5 5 5 5 3 . n D.227 3 . Turns on the carry flag (R9009).229 3 .High-level Instructions 3.bit) Boolean WBSL Operand D1. 5 5 5 3 . Shifts one bit to the left or right with the area between “D1” and “D2” as the register.16 .bit) STMR S.bit area consisting of “D” plus the carry flag (R9009) data to the left. n Rotate the “n” bits in data of “D” to the right. Invert the value of bit position “n” of the data of “D”.2 Table of High-level Instructions FP0 Number F113 Name Left shift of one hexadecimal digit (4. × set value.209 Basic function instructions F118 UP/DOWN counter UDC S. D 5 7 3 .219 3 .238 3 .234 Basic function instruction F137 Auxiliary timer (16. Steps Page 5 3 .221 F123 RCL D. Turns off the carry flag (R9009).239 3 . D S. D Counts up or down from the value preset in “S” and stores the elapsed value in “D”. S) in ”D”.240 3 . Set the value of bit position “n” of the data of “D” to 0.217 3 . n 5 3 .235 Special instructions F140 F141 F143 Carry flag (R9009) set Carry flag (R9009) reset Partial I/O update STC CLC IORF   D1. Store the number of on bits in the data of “S” in ”D”. Store the number of on bits in the data of (S+1. Updates the I/O from the number specified by “D1” to the number specified by “D2”. n D. n D.231 F135 F136 Number of on (1) bits in 16-bit data Number of on (1) bits in 32-bit data BCU DBCU S.233 3 . Test the value of bit position “n” of the data of “D” and output the result to R900B. Rotate the “n” bits in 17. D 5 Turn on the specified output and R900D after 0. n D. D2 Description Shifts the one digit of the areas by “D1” and “D2” to the left.211 F119 Left/right shift register LRSR D1. n Set the value of bit position “n” of the data of “D” to 1.

speed (* Note 2) counter elapsed value area.diagnostic error number “n” in DT9000.254 F1 Change and read of p the elapsed value of high . ch3. “n” bytes of the data registers are sent from the RS232C port.247 F148 Self . and outputs it to the word external output relay WY specified by “D”. ch0. S) to high..speed counter DMV 7 7 3 . D).253 Special instructions (High . ch2. and turns on the ERROR/ ALARM LED. ch1. Beginning at “S”.241 F147 Printout PR S.speed counter control MV S.2 Table of High-level Instructions Number F144 (* Note 1) Name Serial data communication control for RS232C port Boolean TRNS Operand S..17 . S. 5 3 . Steps Page 5 3 .FP0 High-level Instructions 3.257 Notes 1) This instruction is available for FP0 T32 and FP0 C10/C14/C16/ C32 CPU Ver.. 1. turns R9000 on. Displays the character constant of “S” in the connected programming tool. Converts the ASCII code data in the area starting with “S” for printing. n Description The reception flag (R9038) is set to off to enable reception.2 or later..speed counter control according to the control code specified by “S”.speed counter instructions) F0 High . DT9044.DT9048.257 3 .. The control code is stored in DT9052.D (* Note 2) Transfers value in high.DT9044..DT9104.DT9108 3 . 13 3 ..251 F149 Message display MSG 3 .diagnostic error set ERR n (n: K100 to K299) S 3 Stores the self . DT9052 Performs high. DT9044 Transfers (S+1.speed counter elapsed value area to (D+1. D 5 3 . 2) Specify one of the following values for the elapsed value area depending on the channel used..

S.18 .2 or later or FP Programmer II (AFP1114V2) is necessary.270 Basic function instruction F183 Auxiliary timer (32.High-level Instructions 3. 3 . Steps Page 11 3 .01 sec. Performs PWM output from the specified output (Y0 or Y1) according to the contents of the data table beginning at “S”. Yn 5 3 . 3 . n 5 3 .in highspeed counter reaches the target value of (S+1.bit) (* Note) DSTM S. Yn 11 3 .272 Note To input instructions F166 to F170 and F183.268 F170 (* Note ) PWM S.S). S.S). Turns output Yn off when the elapsed value of the built .262 F168 (* Note ) SPD1 n.2 Table of High-level Instructions FP0 Number F166 (* Note ) Name Target value match on instruction (with channel specification) Target value match off instruction (with channel specification) Positioning control (with channel specification) Pulse output instruction (with channel specification) PWM output instruction (with channel specification) Boolean HC1S Operand n. 4. S.260 F167 (* Note ) HC1R n. Outputs a pulse from the specified output (Y0 or Y1) according to the contents of the data table beginning at “S”. Yn Description Turns output Yn on when the elapsed value of the built-in highspeed counter reaches the target value of (S+1.GR Ver. n 5 3 . NPST .264 F169 (* Note ) PLS S. × set value. Outputs a positioning pulse from the specified output (Y0 or Y1) according to the contents of the data table beginning at “S”. D 7 Turn on the specified output and R900D after 0.

D S. D S.303 3 . D) LOG (S+1.283 3 . D SIN . S1)÷(S2+1.2 Table of High-level Instructions Number Name Boolean Operand Description Steps Page Floating point type real number operation instructions F309 (* Note ) F310 (* Note ) F311 (* Note ) F312 (* Note ) F313 (* Note ) F314 (* Note ) F315 (* Note ) F316 (* Note ) F317 (* Note ) F318 (* Note ) F319 (* Note ) F320 (* Note ) F321 (* Note ) F322 (* Note ) F323 (* Note ) F324 (* Note ) F325 (* Note ) Floating point type data move Floating point type data addition Floating point type data subtraction Floating point type data multiplication Floating point type data division Floating point type data sine operation Floating point type data cosine operation Floating point type data tangent operation Floating point type data arcsine operation Floating point type data arccosine operation Floating point type data arctangent operation Floating point type data natural logarithm Floating point type data exponent Floating point type data logarithm Floating point type data power Floating point type data square root FMV F+ FF* F% SIN COS S. D) 14 ( S1+1.275 3 . D S1. D TAN (S+1. D) 14 ( S1+1. S1) ^ (S2+1. D COS .299 3 . D S. D S. D) COS (S+1. S2. S) → (D+1. D) 10 3 . S) → (D+1. S2)→(D+1. S) → (D+1. D S1. S2. D LN (S+1. D S1. D S1. S) → (D+1.281 3 .277 3 .287 ( S1+1. and the converted data is stored in “D.289 ASIN S. D) 10 10 3 .291 ACOS S.(S2+1. D) Converts the 16-bit integer datawith sign specified by “S” to real number data. S) → (D+1. D) 8 3 . D S. D) 10 10 TAN S.1 (S+1. S) → (D+1.285 3 .293 ATAN S.295 LN S.305 3 .1 (S+1. S) → (D+1. S1)×(S2+1.297 EXP LOG PWR FSQR S. S2)→ (D+1. D (S+1. S2)→(D+1.D) 14 ( S1+1. D) 10 3 . S2)→(D+1. S) → (D+1.” 16-bit integer data to FLT floating point type data conversion Note The instruction is available for FP0 T32 and FP0 C10/C14/C16/C32 CPU Ver. S) → (D+1. S2. D S1. S2)→ (D+1. S1) + (S2+1. 3 . 2.1 (S+1. S2. D) 10 3 . D) 10 3 .279 3 .301 3 . S) → (D+1. D TAN . D) 14 10 6 (S+1.1 or later. S1) . D) 14 SIN (S+1. S2. S) → (D+1. D) 10 3 . D EXP (S+1.307 (S1+1.19 .FP0 High-level Instructions 3.

and the result is stored in (D+1. and the converted data is stored in “D. and the converted data is stored in (D+1.309 32-bit integer data to DFLT floating point type data conversion Floating point type data to 16-bit integer conversion (the largest integer not exceeding the floating point type data) Floating point type data to 32-bit integer conversion (the largest integer not exceeding the floating point type data) Floating point type data to 16-bit integer conversion (rounding the first decimal point down to integer) Floating point type data to 32-bit integer conversion (rounding the first decimal point down to integer) Floating point type data to 16-bit integer conversion (rounding the first decimal point off to integer) Floating point type data to 32-bit integer conversion (rounding the first decimal point off to integer) Floating point type data rounding the first decimal point down Floating point type data rounding the first decimal point off INT F327 (* Note ) S. D 8 3 . 3 . Converts real number data specified by (S+1. D). and the converted data is stored in “D. D 8 3 .2 Table of High-level Instructions FP0 Number F326 (* Note ) Name Boolean Operand S. D 8 3 .317 F331 (* Note ) ROFF S.319 F332 (* Note ) DROFF S. S) to the 16-bit integer data with sign (rounding the first decimal point down). and the converted data is stored in (D+1. and the converted data is stored in (D+1. S) to the 32-bit integer data with sign(rounding the first decimal point off).313 F329 (* Note ) FIX S. D). Converts real number data specified by (S+1. S) is rounded down.325 Note The instruction is available for FP0 T32 and FP0 C10/C14/C16/C32 CPU Ver. The decimal part of the real number data specified in (S+1. and the converted data is stored in “D. D 8 3 . D). and the converted data is stored in (D+1. 2. S) to the 16-bit integer data with sign (the largest integer not exceeding the floating point data). The decimal part of the real number data stored in (S+1.323 F334 (* Note ) FRINT S.321 F333 (* Note ) FINT S. and the result is stored in (D+1. D).20 . S) is rounded off. D 8 3 . D 8 3 . D Description Converts the 32-bit integer data with sign specified by (S+1. S) to real number data.” Converts real number data specified by (S+1. D).1 or later.” Converts real number data specified by (S+1. D 8 3 . S) to the 32-bit integer data with sign (rounding the first decimal point down).315 F330 (* Note ) DFIX S. S) to the 32-bit integer data with sign (the largest integer not exceeding the floating point data). D). S) to the 16-bit integer data with sign (rounding the first decimal point off). Steps Page 8 3 .” Converts real number data specified by (S+1. Converts real number data specified by (S+1. D 8 3 .High-level Instructions 3.311 F328 (* Note ) DINT S.

D).335 Note The instruction is available for FP0 T32 and FP0 C10/C14/C16/C32 CPU Ver. D Description The real number data stored in (S+1. and the result is stored in (D+1. S) is converted to radians (real number data).1 or later. D 8 3 . and the result is stored in the (S+3). and the result (absolute value) is stored in (D+1. The angle data in radians (real number data) specified in (S+1. D).331 F338 (* Note ) DEG S. and the result is stored in (D+1.327 FABS S. and the result is stored in (D+1. D). Steps Page 8 3 .21 . D). D 8 3 . 4 3 . D 8 3 .FP0 High-level Instructions 3. 2. Takes the absolute value of real number data specified by (S+1.2 Table of High-level Instructions Number F335 (* Note ) F336 (* Note ) Name Floating point type data sign changes Floating point type data absolute Boolean F+/ - Operand S. S) is changed the sign.333 Time series processing instruction F355 (* Note ) PID processing PID S PID processing is performed depending on the control value (mode and parameter) specified by (S to S+2) and (S+4 to S+10). 3 . The data in degrees of an angle specified in (S+1.329 F337 (* Note ) Floating point type data degrees → radians Floating point type data radians → degrees RAD S. S) is converted to angle data in degrees. S).

22 .2. as well as types of flags and the conditions under which they go on and off. Boolean This indicates how codes are used when data is entered using boolean entry with the programming tool software (NPST GR/FPWIN GR).3 Explanation of High . Data is also entered in this format when using the FP Programmer II. Explanation of program example and flag conditions Using the program shown in the above ladder diagram as an example.level Instructions Layout of instruction explanations Ladder diagram This indicates the ladder diagram screen displayed when data is entered using the programming tool software (NPST . Available operands This indicates types of registers and constants which can be used as operands.level Instructions FP0 3. refer to section 1. changes in movements and stored values are shown.3 Explanation of High .High .GR/ FPWIN GR).level Instructions 3. Number of steps This is the number of steps used with this instruction. For information on types of memory areas. 3 .

T32. C32. Application example Example 1: Transfer K30 to timer set value area SV0 when R1 turns on.23 . R2 F0 MV.FP0 High. SL1 Copies 16-bit data to the specified 16-bit area.3 Explanation of High . SV 0 Example 2: Transfer the timer elapsed value EV0 to data register DT0 when R2 turns on. C14.level Instructions 3. S S D 11 DT 1 D DT 16-bit equivalent constant or 16-bit area (source) 16-bit area (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data register DT0 are copied to data register DT1 when execution condition (trigger) R0 turns on. DT 0 Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. R1 F0 MV. 3 .level Instructions Step Availability F0 (MV) Outline Program example 16-bit data move 5 FP0 C10. Description The 16-bit data or 16-bit equivalent constant specified by S is copied to the area specified by D. K 30. EV 0. C16. Boolean Address 10 Instruction ST F 0 DT R 0 (MV) 0 1 Ladder Diagram Trigger R0 10 F0 MV . Turns on for an instant when the area specified using the index modifier exceeds the limit. DT 0 .

bit data. C16.. The content (16 bits) of DT0 and the content (16 bits) of DT1 are joined and treated as 32. 3 . C14.bit data and the lower 16.bit data. SL1 Copies 32-bit data to the specified 32-bit area. DT 0 . Turns on for an instant when the area specified using the index modifier exceeds the limit. C32. When processing 32-bit data.. and stored in DT101 and DT100. DT100 S D DT DT S D 32-bit equivalent constant or lower 16-bit area of 32-bit data (source) Lower 16-bit area for 32-bit area (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data registers DT1 and DT0 are copied to data registers DT101 and DT100 when execution condition (trigger) R0 turns on. D+1) are automatically determined once the lower 16-bit areas (S. T32.level Instructions 3. D) are specified.24 .level Instructions Step Availability FP0 F1 (DMV) Outline Program example 32-bit data move 7 FP0 C10. 32.High .. Content for DT1 Content for DT0 .. Higher 16.bit area Lower 16. To DT101 To DT100 Description The 32-bit data or 32-bit equivalent constant specified by S is copied to the 32-bit area specified by D. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.. Boolean Address 10 11 Instruction ST F R 1 (DMV) 0 100 0 Ladder Diagram Trigger R0 10 F1 DMV .bit area ..bit data is separated into the higher 16. the higher 16-bit areas (S+1.3 Explanation of High .

C16. T32. S S D 11 DT 0 D DT 16-bit equivalent constant or 16-bit area to be inverted (source) 16-bit area (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data register DT1 are inverted and transferred to data register DT0 when execution condition (trigger) R0 turns on. DT 1 .25 . 0 1 2 H DT 3F [S] 0 1 2 H H DT 1111 23A [D] H 5555 H 1234 H FFFF Source [S]: H5555 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Invert and transfer R0: on “F2 (MV/)” execution 0 1 2 DT H 3F H 5555 H 1234 Invert and transfer 0 1 [S] 2 Destination [D]: HAAAA DT H AAAA H 23A H FFFF Bit position 15 [D] DT0 · · 1211 · · 8 7 · · 4 3 · · 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 3 .FP0 High.level Instructions 3. SL1 Inverts 16-bit data and transfers it to the specified 16-bit area.3 Explanation of High . Boolean Address 10 Instruction ST F 2 DT R 0 (MV/) 1 0 Ladder Diagram Trigger R0 10 F2 MV/ .level Instructions Step Availability F2 (MV/) Outline Program example 16-bit data invert and move 5 FP0 C10. C32. C14.

3 . Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 1 1 1 1 1 0 1 1 0 0 1 0 1 1 0 1 Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.High .level Instructions FP0 Description The 16-bit data or 16-bit equivalent constant specified by S is inverted and transferred to the 16-bit area specified by D.level Instructions 3.26 .3 Explanation of High .

level Instructions 3. SL1 Inverts 32-bit data and transfers it to the specified 32-bit area. T32. C16. C32.level Instructions 5 Step Availability F3 (DMV/) Outline Program example 32-bit data invert and move 7 FP0 C10.3 Explanation of High . C14.FP0 High. DT100 .27 . DT 0 S S D 11 DT D 32-bit equivalent constant or lower 16-bit area of 32-bit data to be inverted (source) Lower 16-bit area of 32-bit data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data registers DT101 and DT100 are inverted and transferred to data registers DT1 and DT0 when execution condition (trigger) R0 turns on. Boolean Address 10 Instruction ST F 3 DT R 0 (DMV/) 100 0 Ladder Diagram Trigger R0 10 F3 DMV/ . DT DT 99 100 101 H 25AC H 2 [S] H FFFF 0 1 2 H 1111 H 34A H FFFF [D] R0: on “F3 (DMV/)” execution DT 99 100 101 Invert and transfer DT H 25AC H 2 [S] H FFFF 0 1 2 H FFFD H 0 H FFFF [D] 3 .

3 .level Instructions 3. S S+1 1 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1 D D+1 0 0 1 1 0 0 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 0 0 0 1 0 1 0 0 1 0 0 Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.28 .3 Explanation of High . Turns on for an instant when the area specified using the index modifier exceeds the limit.High .level Instructions FP0 Description The 32-bit data or 32-bit equivalent constant specified by S is inverted and transferred to the 32-bit area specified by D.

level Instructions Step Availability F5 (BTM) Outline Bit data move 7 FP0 C10. C14. C16. Source [S] Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 1 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 DT1 Destination [D] Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 DT0 R0: on Destination [D] Bit position 15 DT0 “F5 (BTM)” execution · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 3 . DT 0 S S n D n D DT 16-bit equivalent constant or 16-bit area (source) 16-bit equivalent constant or 16-bit area (specifies source and destination bit positions) 16-bit area (destination) Operands Operand S n D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example The data at bit position 4 in data register DT1 is copied to bit position 12 in data register DT0 when execution condition (trigger) R0 turns on.FP0 High.3 Explanation of High . H C04 . T32. C32.29 .level Instructions 3. SL1 Copies bit data of one 16-bit area to the specified bit of another 16-bit area Program example Ladder Diagram Boolean Address 10 11 Instruction ST F 5 DT H R 0 (BTM) 1 C04 0 Trigger R0 10 F5 BTM . DT 1 .

3 . If bit position 4 of S is being transferred to bit position 12 of D. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.30 .3 Explanation of High . when bit position 10 is specified.level Instructions FP0 Description A single bit in the 16-bit data or the 16-bit equivalent constant specified by S is copied to a bit of the 16-bit area specified by D. “HA” should be specified.High .level Instructions 3. Turns on for an instant when the area specified using the index modifier exceeds the limit. How to specify n The “n” specifies the source and destination bit positions using hexadecimal data as follows: n:H j 0 j Bit position of source “S” (set range: H0 to HF) Bit position of destination “D” (set range: H0 to HF) Bit position specification for S and D Bit position Set value 15 HF 14 HE 13 HD 12 HC 11 HB 10 HA 9 H9 8 H8 7 H7 6 H6 5 H5 4 H4 3 H3 2 H2 1 H1 0 H0 For example. as specified by n. n = HC04.

T32. SL1 Copies hexadecimal digits at one 16-bit area to the specified digit position in another 16-bit area Boolean Address 10 11 Instruction ST F 6 DT H R 0 (DGT) 100 0 0 Ladder Diagram Trigger R0 10 F6 DGT .FP0 High. 3 . the upper 12 bits of DT0 do not change. C14. Hexadecimal digit position 3 2 1 0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 In this example. C32. DT 100 .3 Explanation of High . H 0 .31 . C16.level Instructions Step Availability F6 (DGT) Outline Program example Hexadecimal digit move 7 FP0 C10.level Instructions 3. DT 0 S S n D n D DT 16-bit equivalent constant or 16-bit area (source) 16-bit equivalent constant or 16-bit area (specifies source and destination hexadecimal digit position and number of hexadecimal digits) 16-bit area (destination) Operands Operand S n D A A N/A Relay WX WY WR A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Hexadecimal digit position 3 2 1 0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT100 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 The lower four bits in the data register DT100 is copied.

16 . the 2 number of digits and the hexadecimal digit position to be copied using hexadecimal data as follows: n:H j j j 3 1 destination Source: Starting hexadecimal digit position H0: Hexadecimal digit 0 H1: Hexadecimal digit 1 H2: Hexadecimal digit 2 H3: Hexadecimal digit 3 2 Number of hexadecimal digits to be copied H0: Copies 1 hexadecimal digits (4 bits) H1: Copies 2 hexadecimal digits (8 bits) H2: Copies 3 hexadecimal digits (12 bits) H3: Copies 4 hexadecimal digits (16 bits) 1 Destination: Starting hexadecimal digit position H0: Hexadecimal digit 0 H1: Hexadecimal digit 1 H2: Hexadecimal digit 2 H3: Hexadecimal digit 3 1 If the value for form.3 Explanation of High . use the short 3 . With this instruction. digit 2 and digit 3. How to specify n The n specifies the 3 source hexadecimal digit position. “H0. as specified by n. The digits are called in order hexadecimal digit 0.bit data is separated into four digits. 2 and 3 is 0.” .level Instructions 3. Turns on for an instant when the area specified using the index modifier exceeds the limit.High .level Instructions FP0 Description The hexadecimal digits in the 16-bit data or in the 16-bit equivalent constant specified by S are copied to the 16-bit area specified by D. Digits Digits are units of 4 bits used when handling data. beginning from the least significant four bits 16-bit data 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 Hexadecimal Hexadecimal digit 3 digit 1 Hexadecimal Hexadecimal digit 2 digit 0 Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. such as “H000” in the example program on the previous page.32 . digit 1.

level Instructions 3.level Instructions Examples of hexadecimal digit copy The following patterns of digit transfer are possible based on the specification of n. (1) When hexadecimal digit 1 of the source is copied to hexadecimal digit 1 of the destination: digit S 3 2 1 0 Specify n: H 1 0 1 D digit 3 2 1 0 (2) When hexadecimal digit 3 of the source is copied to hexadecimal digit 0 of the destination: digit S 3 2 1 0 Specify n: H 0 0 3 (Short form: H3) D digit 3 2 1 0 (3) When multiple hexadecimal digits (hexadecimal digits 2 and 3) of the source are copied to multiple hexadecimal digits (hexadecimal digits 2 and 3) of the destination: digit S 3 2 1 0 Specify n: H 2 1 2 D digit 3 2 1 0 (4) When multiple hexadecimal digits (hexadecimal digits 0 and 1) of the source are copied to multiple hexadecimal digits (hexadecimal digits 2 and 3) of the destination: digit S 3 2 1 0 Specify n: H 2 1 0 D digit 3 2 1 0 (5) When 4 hexadecimal digits (hexadecimal digits 0 to 3) of the source are copied to 4 hexadecimal digits (hexadecimal digits 0 to 3) of the destination: digit S 3 2 1 0 Specify n: H 1 3 0 D digit 3 2 1 0 3 .3 Explanation of High .33 .FP0 High.

T32.34 . DT 0 . C32.3 Explanation of High . C16.High . C14. DT 3 .level Instructions 3. 4 Boolean Address 10 11 Instruction ST F 10 DT DT DT R 0 Ladder Diagram Trigger R0 10 F10 BKMV . DT 11 S1 S1 S2 D (BKMV) 0 3 11 S2 D Starting 16-bit area (source) Ending 16-bit area (source) Starting 16-bit area (destination) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX N/A N/A N/A IY N/A N/A N/A Constant K N/A N/A N/A H N/A N/A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example The data of data register “DT0 to DT3” is copied to the data registers “DT11 to DT14” when execution condition (trigger) R0 turns on. [S1] 0 1 2 [S2] 3 4 K K K K K DT 10 11 12 13 14 Source DT 10 11 12 13 14 K K K K K 0 0 0 0 0 R0: on DT 10 11 12 13 14 “F10 (BKMV)” execution DT 10 11 12 13 14 K K K K K 0 10 11 12 13 [D] [S1] 0 1 2 [S2] 3 4 K K K K K 3 .level Instructions Step Availability FP0 F10 (BKMV) Outline Program example Block move 7 FP0 C10. SL1 Copies block data to the specified area.

and the number of the higher address should be specified by S2.level Instructions 3. S Error flag (R9008): Precautions if the same type of memory area is specified for S1.S1 > S2 . and D The instruction is not executed if the address and type of memory area is the same for S1 and D. the source data is copied starting from the lower address to the higher address in order (DT0 → DT1 → DT2). Flag conditions S Error flag (R9007): Turns on and stays on when: . . Precautions during programming The starting area S1 and ending area S2 should be the same type of operand. an operation error will occur. DT 0 1 [S1] 2 3 [S2] 4 K K K K K 10 11 12 13 14 0 1 2 3 4 K K K K K DT 12 13 14 13 14 [D] 3 . [S1] 0 1 2 [S2] 3 4 K K K K K DT 10 11 12 13 14 0 1 2 3 4 K K K K K DT 10 10 11 12 13 [D] If S1 > D.The area specified using the index modifier exceeds the limit. Turns on for an instant when: .3 Explanation of High .FP0 High. .The area specified using the index modifier exceeds the limit. S2. If S1 < D.The data block to be copied exceeds the limit of the destination area. the transfer results will be overwritten. If S1 is specified as higher than S2 and the instruction is executed. The number of the lower address should be specified by S1.level Instructions Description The data block specified by S1 and S2 is copied to the block starting from the 16-bit area specified by D. the source data is copied starting from the higher address to the lower address in order (DT4 → DT3 → DT2 → DT1). If the block being transferred overlaps the transfer destination.The data block to be copied exceeds the limit of the destination area.35 .S1 > S2 .

3 Explanation of High .level Instructions 3. Boolean Address 10 11 Instruction ST F 11 DT DT R 0 Ladder Diagram Trigger R0 10 F11 COPY . C14. DT10 . T32. 0 [S] 1 2 3 4 K K K K K DT 10 11 12 13 14 DT 10 11 12 13 14 K K K K K 0 0 0 0 0 [D2] [D1] R0: on DT 10 11 12 13 14 “F11 (COPY)” execution DT 11 11 11 11 11 [D2] 0 [S] 1 2 3 4 K K K K K 10 11 12 13 14 K K K K K [D1] 3 .High .36 . SL1 Copies the specified 16-bit data to a block with one or more 16-bit areas. DT 1 .level Instructions Step Availability FP0 F11 (COPY) Outline Program example Block copy 7 FP0 C10. C16. DT14 S S D1 D2 (COPY) 1 10 14 D1 D2 DT 16-bit equivalent constant or 16-bit area (source) Starting 16-bit area (destination) Ending 16-bit area (destination) Operands Operand S D1 D2 A N/A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A N/A N/A IY A N/A N/A Constant K A N/A N/A H A N/A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data register DT1 are copied to the block ranging from data register DT10 to DT14 when execution condition (trigger) R0 turns on. C32.

Flag conditions S Error flag (R9007): Turns on and stays on when: .37 .The area specified using the index modifier exceeds the limit.3 Explanation of High .The area specified using the index modifier exceeds the limit.level Instructions Description The 16-bit equivalent constant or 16-bit area specified by S is copied to all 16-bit areas of the block specified by D1 and D2. When the same number as D1 and D2 is specified.bit data will be copied to the 16 . S Error flag (R9008): 3 . . If D1 is specified as higher than D2 and the instruction is executed.D1 > D2.level Instructions 3.bit area of that number. an operation error will occur. and the higher address should be specified by D2.D1 > D2.FP0 High. Precautions during programming The starting area D1 and ending area D2 should be the same type of operand. The area of the lower address for the block being copied should be specified by D1. the 16 . Turns on for an instant when: . .

S1 S1 S2 D K10 . K 0 .38 . 2.3 Explanation of High . C32. DT0 S2 D DT Constant for specifying the starting address of EEPROM (for source data) 32.1 or later/FP0 T32 Reads data from the EEPROM area.bit equivalent constant or lower 16.level Instructions Step Availability FP0 F12 (ICRD) Outline Program example Data read from EEPROM 11 FP0 C10.High .bit data for specifying number of words to be read Starting 16. C14.level Instructions 3.bit area of 32.bit area for storing data read from EEPROM (for destination) Operands Operand S1 S2 D Relay WX WY WR WL N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter SV N/A N/A N/A EV N/A N/A N/A Register DT LD FL Index Constant register IX IY K A A H N/A N/A N/A N/A N/A A: Available N/A: Not Available Index modifier N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A A N/A N/A N/A N/A N/A N/A Explanation of example 10 blocks of data stored in blocks 0 to 9 of the EEPROM are transferred to data registers DT0 to DT639 when execution condition (trigger) R0 turns on. C16. Boolean Non-ladder Address 10 11 Instruction ST F 12 K K R 0 (ICRD) 0 10 0 Ladder Diagram Trigger R0 10 F12 ICRD . EEPROM area [S1] 0 64 words 1 64 words [S2] 2 64 words Data register DT [D] 0 64 128 9 64 words Address (Block) 576 3 . SL1 CPU ver.

S2 and D Type yp FP0 C10. . .39 .The area is exceeded when blocks specified by D and subsequent parameters are transferred. T32. SL1 Volume that can be read 640 words 6144 words Because the initial data in the EEPROM is not fixed. caution is required when reading data that has not been written to the EEPROM. C14.level Instructions Description S2 blocks of data stored in the EEPROM starting from S1 are transferred into the data register specified by D.The area is exceeded when blocks specified by D and subsequent parameters are transferred. C16 FP0 C32.The address specified by S1 does not exist in the EEPROM area. the transferred data is handled in units of 1 block/64 words. .3 Explanation of High . .The area specified by S2 exceeds the limit of the EEPROM area. Precautions during programming Values that can be specified by S1. Flag conditions S Error flag (R9007): Turns on and stays on when: .The area specified by S2 exceeds the limit of the EEPROM area. C14.FP0 High. At this time. S Error flag (R9008): 3 .The address specified by S1 does not exist in the EEPROM area. SL1 Memory area S1 K0 to K9 K0 to K95 S2 K1 to K10 K0 to K96 D DT0 to DT1595 DT0 to DT6080 Volume of data held in the EEPROM Type FP0 C10. C16 FP0 C32.level Instructions 3. T32. Turns on for an instant when: .

C32. C14. and should be specified with a “P” in front of the instruction number. S1 S2 D Starting 16-bit area for storing source data 32. K10 . Boolean Non-ladder Address 10 11 Instruction ST P 13 DT K K R 0 Ladder Diagram Trigger R0 10 P13 PICWT .bit equivalent constant or lower 16. SL1 CPU ver.level Instructions Step Availability FP0 P13 (PICWT) Outline Program example Data write to EEPROM 11 FP0 C10. 2. Data register DT [S1] 0 64 words 64 64 words [S2] 128 64 words EEPROM area 0 1 2 [D] 576 64 words 9 Address (Block) 3 .1 or later/FP0 T32 Writes data to the EEPROM area.bit data for specifying number of words to be write Starting address (constant) of EEPROM area for storing received data (for destination) Operands Operand S1 S2 D Relay WX WY WR WL N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A Timer/Counter SV N/A N/A N/A EV N/A N/A N/A Register DT A LD FL Index register IX IY N/A N/A N/A Constant K N/A A A H N/A N/A N/A N/A N/A N/A A: Available N/A: Not Available Index modifier N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A Explanation of example 10 blocks (640 words) of data stored in data registers DT0 to DT576 are transferred to blocks 0 to 9 in the EEPROM area when execution condition (trigger) R0 turns on.bit area of 32.level Instructions 3. DT 0 . C16.3 Explanation of High .40 .High . S1 S2 K0 D (PICWT) 0 10 0 This instruction is a differential execution type of instruction.

SL1 Memory area S1 DT0 to DT1595 DT0 to DT6080 S2 K1 to K10 K0 to K96 D K0 to K9 K0 to K95 Volume of data that can be held in the EEPROM Type FP0 C10. . the operation execution time will be approximately 5 ms longer for each block (64 words). S2 and D Type yp FP0 C10. At this time.level Instructions 3.3 Explanation of High . C16 FP0 C32.level Instructions Description S2 blocks of data stored in the data register starting from S1 are transferred into the EEPROM area specified by D. SL1 Volume that can be read 640 words 6144 words Data can be written to the EEPROM up to 10. C14.The area is exceeded when blocks specified by D and subsequent parameters are transferred.The area specified by S2 exceeds the limit of the memory area.The area is exceeded when blocks specified by D and subsequent parameters are transferred. When the instruction is executed. .The area specified by S2 exceeds the limit of the memory area. C16 FP0 C32.The number specified by S1 does not exist in the memory area. When setting up the program.FP0 High.000 times. . Flag conditions S Error flag (R9007): Turns on and stays on when: . it has been set up as a differential execution type of instruction (P13).41 . Precautions during programming Values that can be specified by S1. S Error flag (R9008): 3 . C14. T32. Turns on for an instant when: . the transferred data is handled in units of 1 block/64 words. however. This instruction should not be used in interrupt programs. . please make sure that this instruction is not written to the EEPROM numerous times. In order to prevent this instruction from being written to the EEPROM numerous times through erroneous programming.The number specified by S1 does not exist in the memory area. T32.

C16. Boolean Address 10 Instruction ST F 15 DT R 0 (XCH) 0 12 Ladder Diagram Trigger R0 10 F15 XCH .level Instructions 3.42 .3 Explanation of High . T32.level Instructions Step Availability FP0 F15 (XCH) Outline Program example 16-bit data exchange 5 FP0 C10. DT 0 .High . SL1 Exchanges two 16-bit data items. C14. DT 12 D1 D1 D2 11 DT D2 16-bit area to be exchanged 16-bit area to be exchanged Operands Operand D1 D2 N/A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A N/A H N/A N/A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data register DT0 and data register DT12 are exchanged when execution condition (trigger) R0 turns on. DT [D1] 0 1 2 3 4 K K K K K 10 11 12 13 14 10 11 12 13 14 K K K K K DT 20 21 22 23 24 [D2] R0: on DT [D1] 0 1 2 3 4 K K K K K 22 11 12 13 14 “F15 (XCH)” execution DT 10 11 12 13 14 K K K K K 20 21 10 23 24 [D2] 3 . C32.

43 . Turns on for an instant when the area specified using the index modifier exceeds the limit.3 Explanation of High .level Instructions Description The contents in the 16-bit areas specified by D1 and D2 are exchanged.level Instructions 3.FP0 High. 3 . Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.

44 . SL1 Exchanges two 32-bit data items. Boolean Address 10 11 Instruction ST F 16 DT R 0 Ladder Diagram Trigger R0 10 F16 DXCH .level Instructions FP0 5 Step Availability F16 (DXCH) Outline Program example 32-bit data exchange 5 FP0 C10. T32. DT12 D1 D2 (DXCH) 0 12 DT D1 D2 Lower 16-bit area of 32-bit data to be exchanged Lower 16-bit area of 32-bit data to be exchanged Operands Operand D1 D2 N/A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K N/A N/A H N/A N/A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data registers DT1 and DT0 and data registers DT13 and DT12 are exchanged when execution condition (trigger) R0 turns on.High .3 Explanation of High . C32. C16. DT 0 . C14.level Instructions 3. DT [D1] 0 1 2 3 H H H H 2 FFFD 25AC F23 10 11 12 13 H H H H DT 1234 5678 9ABC [D2] DEF1 R0: on “F16 (DXCH)” execution [D1] 0 1 2 3 H H H H DT 9ABC DEF1 25AC F23 10 11 12 13 DT 1234 5678 2 [D2] FFFD H H H H 3 .

level Instructions Description The contents in the 32-bit areas specified by D1 and D2 are exchanged.45 . Turns on for an instant when the area specified using the index modifier exceeds the limit. 3 .FP0 High. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.3 Explanation of High .level Instructions 3.

T32.level Instructions 3. Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 DT0 Hexadecimal 0 4 D 2 Higher byte (8-bit) Lower byte (8-bit) R0: on “F17 (SWAP)” execution Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 DT0 Hexadecimal D 2 0 4 Description The higher order byte (higher 8-bit) and lower order byte (lower 8-bit) of the 16-bit area specified by D are exchanged. C32. Turns on for an instant when the area specified using the index modifier exceeds the limit. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.3 Explanation of High . SL1 Exchanges higher and lower order bytes of the specified 16-bit data. 3 . DT 0 D D 11 F 17 (SWAP) DT 0 16-bit area to be exchanged higher and lower bytes Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register EV A DT A Index register IX A IY A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example The higher and lower bytes of data register DT0 are exchanged when execution condition (trigger) R0 turns on.High . C16. Boolean Address 10 Instruction ST R 0 Ladder Diagram Trigger R0 10 F17 SWAP . C14.46 .level Instructions FP0 5 Step Availability F17(SWAP) Outline Program example Higher/lower byte in 16-bit data exchange 3 FP0 C10.

T32.level Instructions 5 Step Availability F20 (+) Outline Program example 16-bit data addition [D + S → D] 5 FP0 C10. as shown below. Augend [D]: K8 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 DT2 Addend [S]: K4 + Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 DT0 Result [D]: K12 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT2 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 Description The 16-bit equivalent constant or 16-bit area specified by S and the 16-bit area specified by D are added together. C14. C16. C32.level Instructions 3.FP0 High. SL1 Adds two 16-bit data items. DT 0 . Boolean Address 10 11 Instruction ST F 20 DT DT R 0 (+ ) 0 2 Ladder Diagram Trigger R0 10 F20 +. DT 2 S S D D 16-bit equivalent constant or 16-bit area (for addend) 16-bit area (for augend and result) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data register DT2 and data register DT0 are added together when execution condition (trigger) R0 turns on. When the decimal number 4 is in DT0 and the decimal number 8 is in DT2.3 Explanation of High .47 . Augend data (D) + Addend data (S) Trigger turns on Result (D) 3 .

do not allow an overflow or underflow to occur. be sure to convert the 16-bit addend and augend into 32-bit data using the F89 (EXT) instruction. When you use the F21 (D+) instruction instead of F20 (+). If an overflow or underflow occurs.High . an overflow or underflow will result. Turns on for an instant when the area specified using the index modifier exceeds the limit. For detailed information section 1.3 Explanation of High . use of the F21 (D+) instruction (32-bit data addition) is recommended.level Instructions FP0 Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. 3 . the carry flag (special internal relay R9009) will turn on. Turns on for an instant when the calculated result is recognized as “0.” Turns on for an instant when the calculated result exceeds the range of 16-bit data (overflows or underflows).2 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. Under normal circumstances.4. If the calculated result accidentally overflows or underflows.48 .level Instructions 3.

3 Explanation of High . DT 0 . C32.level Instructions 5 F21(D+) Outline Program example 32-bit data addition [(D+1. Store to DT3 Store to DT2 3 .FP0 High.) ← The lower 16 bits of added result is stored in DT2 and the higher 16 bits of the result is stored in DT3. S S D 11 DT 2 D DT 32-bit equivalent constant or lower 16-bit area of 32-bit area (for addend) Lower 16-bit area of 32-bit data (for augend and result) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example The contents (32 bits) of data registers DT3 and DT2 and the contents (32 bits) of data registers DT1 and DT0 are added together when execution condition (trigger) R0 turns on. Boolean Address 10 Instruction ST F 21 DT R 0 (D+) 0 2 Ladder Diagram Trigger R0 10 F21 D+ . T32.bit data. C16. SL1 Adds two 32-bit data items.49 . S) → (D+1. Higher 16 bits Lower 16 bits Contents of DT3 Contents of DT2 (Addition) The specified data area and the following data area are handled together as 32. Contents of DT1 Contents of DT0 (Result is stored.level Instructions 3. D)] Step 7 Availability FP0 C10. D) + (S+1. C14.

D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.50 . Turns on for an instant when the calculated result is recognized as “0. S) Result (D+1. Turns on for an instant when the area specified using the index modifier exceeds the limit. For detailed information section 1.level Instructions FP0 Description The 32-bit equivalent constant or the 32-bit area specified by S and the 32-bit data specified by D are added together. do not allow an overflow or underflow to occur.2 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. Under normal circumstances. the carry flag (special internal relay R9009) will turn on.High . Augend data (D+1.3 Explanation of High . If an overflow or underflow occurs.4. an overflow or underflow will result.” Turns on for an instant when the calculated result exceeds the range of 32-bit data (overflows or underflows). 3 .level Instructions 3. D) + Addend data (S+1.

C32. as shown below. S1 S1 S2 D DT 1 .level Instructions Step Availability F22 (+) Outline Program example 16-bit data addition [S1 + S2 → D] 7 FP0 C10. C16. DT 0 . The added result is stored in data register DT100. DT 100 S2 D DT 16-bit equivalent constant or 16-bit area (for augend) 16-bit equivalent constant or 16-bit area (for addend) 16-bit area (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data registers DT0 and DT1 are added when execution condition (trigger) R0 turns on. SL1 Adds two 16-bit data items and stores the result in the specified area. T32. Ladder Diagram Boolean Address 10 11 Instruction ST F 22 DT DT R 0 (+ ) 0 1 100 Trigger R0 10 F22+. C14. when the decimal number 8 is in DT0 and the decimal number 4 is in DT1.3 Explanation of High .51 .FP0 High. Augend [S1]: K8 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 DT0 Addend [S2]: K4 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 + (Addition) Result [D]: K12 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT100 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 3 .level Instructions 3.

level Instructions FP0 Description The 16-bit data or 16-bit equivalent constant specified by S1 and S2 are added together.2 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. use of the F23 (D+) instruction (32-bit data addition) is recommended.52 . If an overflow or underflow occurs. The added result is stored in D. Turns on for an instant when the calculated result is recognized as “0”. Augend data (S1) + Addend data (S2) Result (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.4. When you use the F23 (D+) instruction instead of F22 (+). the carry flag (special internal relay R9009) will turn on. Under normal circumstances. If the calculated result accidentally overflows or underflows.High . Turns on for an instant when the area specified using the index modifier exceeds the limit. be sure to convert the 16-bit addend and augend into 32-bit data using the F89 (EXT) instruction.3 Explanation of High .level Instructions 3. For detailed information section 1. 3 . an overflow or underflow will result. Turns on for an instant when the calculated result exceeds the range of 16-bit data (overflows or underflows). do not allow an overflow or underflow to occur.

Boolean Address 10 11 Instruction ST F 23 DT DT DT R 0 (D+) 0 100 200 Ladder Diagram Trigger R0 10 F23 D+ .level Instructions 3. S1) + (S2+1. Higher 16 bits Lower 16 bits Contents of DT1 Contents of DT0 (Addition) The specified data area and the following data area are handled together as 32.53 . SL1 Adds two 32-bit data items and stores the result in the specified area.) ← The lower 16 bits of added result is stored in DT200 and the higher 16 bits Store to DT201 Store to DT200 of the result is stored in DT201. T32.FP0 High.level Instructions F23 (D+) Outline Program example 32-bit data addition [(S1+1.bit data. C16. DT 0 . S2) → (D+1. Contents of DT101 Contents of DT100 (Result is stored. C14.3 Explanation of High . 3 . DT 100 . C32. The added result is stored in data registers DT201 and DT200. DT 200 S1 S1 S2 D S2 D 32-bit equivalent constant or lower 16-bit area of 32-bit data (for augend) 32-bit equivalent constant or lower 16-bit area of 32-bit data (for addend) Lower 16-bit area of 32-bit data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY N/A N/A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data registers DT1 and DT0 and the contents of data registers DT101 and DT100 are added when execution condition (trigger) R0 turns on. D)] Step 11 Availability FP0 C10.

3 Explanation of High . Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. Under normal circumstances. Turns on for an instant when the calculated result exceeds the range of 32-bit data (overflows or underflows). Augend data (S1+1. D) are specified.level Instructions FP0 Description The 32-bit data or 32-bit equivalent constant specified by S1 and S2 are added together. Turns on for an instant when the calculated result is recognized as “0”. S2. For detailed information section 1. D) When processing 32-bit data. Turns on for an instant when the area specified using the index modifier exceeds the limit.High . the higher 16-bit areas (S1+1. The added result is stored in D+1 and D. S2) Result (D+1. the carry flag (special internal relay R9009) will turn on.2 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. an overflow or underflow will result. D+1) are automatically determined once the lower 16-bit areas (S1. S2+1.4.54 .level Instructions 3. If an overflow or underflow occurs. do not allow an overflow or underflow to occur. S1) + Addend data (S2+1. 3 .

.3 Explanation of High .) Outline Program example 16-bit data subtraction [D . DT2 D: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 K3 K5 = D: DT2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 (Subtraction) S: DT0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 K-2 3 .55 .FP0 High. T32.level Instructions 5 F25 ( . C16. Boolean Address 10 11 Instruction ST F 25 DT DT R 0 (. DT2 D: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 K16 (Subtraction) DT0 S: K4 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 = D: DT2 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 K12 Example 2: When the decimal number 3 is in DT2 and the decimal number 5 is in DT0.S → D] Step 5 Availability FP0 C10.level Instructions 3. C32. DT 0 . SL1 Subtracts 16-bit data from the minuend. C14. DT 2 S S D D 16-bit equivalent constant or 16-bit area (for subtrahend) 16-bit area (for minuend and result) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts the contents of data register DT0 from the contents of data register DT2 when execution condition (trigger) R0 turns on.) 0 2 Ladder Diagram Trigger R0 10 F25 . Example 1: When the decimal number 16 is in DT2 and the decimal number 4 is in DT0.

For detailed information section 1. do not allow an overflow or underflow to occur. Turns on for an instant when the area specified using the index modifier exceeds the limit.56 .). If the calculated result accidentally overflows or underflows. Turns on for an instant when the calculated result exceeds the range of 16-bit data (overflows or underflows). be sure to convert the 16-bit subtrahend and minuend into 32-bit data using the F89 (EXT) instruction.High . use of the F26 (D .) instruction instead of F25 ( . the carry flag (special internal relay R9009) will turn on. 3 . Turns on for an instant when the calculated result is recognized as “0”.3 Explanation of High .level Instructions 3.4.2 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit.level Instructions FP0 Description Subtracts the 16-bit equivalent constant or 16-bit area specified by S from the 16-bit area specified by D. Under normal circumstances. an overflow or underflow will result. Minuend data (D) - Subtrahend data (S) Result (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. When you use the F26 (D .) instruction (32-bit data subtraction) is recommended. If an overflow or underflow occurs.

Boolean Address 10 Instruction ST F 26 DT R 0 (D. T32.. Higher 16 bits Lower 16 bits Contents of DT3 Contents of DT2 (Subtraction) The specified data area and the following data area are handled together as 32.) Outline Program example 32-bit data Subtraction [(D+1. Contents of DT1 Contents of DT0 (Result is stored.(S+1. C16.57 . SL1 Subtracts 32-bit data from the minuend. C14. D) . S) → (D+1.level Instructions 3.) ← The lower 16 bits of subtracted result is stored in DT2 and the higher 16 bits of the result is stored in DT3.level Instructions F26 (D . Store to DT3 Store to DT2 3 .) 0 2 Ladder Diagram Trigger R0 10 F26 D .bit data.3 Explanation of High . C32. S S D 11 DT 2 D DT 32-bit equivalent constant or lower 16-bit area of 32-bit area (for subtrahend) Lower 16-bit area of 32-bit data (for minuend and result) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts the contents (32 bits) of data registers DT1 and DT0 from the contents (32 bits) of data registers DT3 and DT2 when execution condition (trigger) R0 turns on. DT 0 . D)] Step 7 Availability FP0 C10.FP0 High.

do not allow an overflow or underflow to occur.58 . D) — Subtrahend data (S+1.High . If an overflow or underflow occurs. Turns on for an instant when the area specified using the index modifier exceeds the limit. D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.4.level Instructions 3. Turns on for an instant when the calculated result is recognized as “0”. For detailed information section 1. 3 .3 Explanation of High . the carry flag (special internal relay R9009) will turn on. Under normal circumstances.2 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. Minuend data (D+1. an overflow or underflow will result. S) Result (D+1.level Instructions FP0 Description Subtracts the 32-bit equivalent constant or the 32-bit data specified by S from the 32-bit data specified by D. Turns on for an instant when the calculated result exceeds the range of 32-bit data (overflows or underflows).

C32.) 0 1 100 Ladder Diagram Trigger R0 10 F27 . DT 1 . DT 0 ..level Instructions Step Availability F27 ( . DT 100 S1 S1 S2 D S2 D DT 16-bit equivalent constant or 16-bit area (for minuend) 16-bit equivalent constant or 16-bit area (for subtrahend) 16-bit area (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts the contents of data register DT1 from the contents of data register DT0 when execution condition (trigger) R0 turns on.S2 → D] 7 FP0 C10. C16. Minuend [S1]: K16 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 Subtrahend [S2]: K4 .(Subtraction) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 Result [D]: K12 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT100 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 3 .59 . Example 1: When the decimal nmber 16 is in DT0 and the decimal number 4 is in DT1. T32.FP0 High. SL1 Subtracts 16-bit data from the minuend and stores the result in the specified area. The subtracted result is stored in data register DT100. C14.3 Explanation of High . Boolean Address 10 11 Instruction ST F 27 DT DT R 0 (.level Instructions 3.) Outline Program example 16-bit data subtraction [S1 .

an overflow or underflow will result.High .4. Minuend data (S1) - Subtrahend data (S2) Result (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. The subtracted result is stored in D.(Subtraction) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 Result [D]: K .60 . When you use the F28 (D . the carry flag (special internal relay R9009) will turn on. do not allow an overflow or underflow to occur. For detailed information section 1.level Instructions 3.2 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. If the calculated result accidentally overflows or underflows. Turns on for an instant when the calculated result is recognized as “0”.2 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 Description Subtracts the 16-bit data or 16-bit equivalent constant specified by S2 from the 16-bit data or 16-bit equivalent constant specified by S1.) be sure to convert the 16-bit subtrahend and minuend into 32-bit data using the F89 (EXT) instruction.level Instructions FP0 Example 2: When the decimal nmber 3 is in DT0 and the decimal number 5 is in DT1. Minuend [S1]: K3 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 Subtrahend [S2]: K5 . use of the F28 (D .) instruction (32-bit data subtraction) is recommended. 3 .) instruction instead of F27 ( . Under normal circumstances. Turns on for an instant when the calculated result exceeds the range of 16-bit data (overflows or underflows).3 Explanation of High . Turns on for an instant when the area specified using the index modifier exceeds the limit. If an overflow or underflow occurs.

C16.. Higher 16 bits Lower 16 bits Contents of DT101 Contents of DT100 (Subtraction) The specified data area and the following data area are handled together as 32. C32.FP0 High. DT 0 S1 S1 S2 D S2 D DT 32-bit equivalent constant or lower 16-bit area of 32-bit data (for minuend) 32-bit equivalent constant or lower 16-bit area of 32-bit data (for subtrahend) Lower 16-bit area of 32-bit data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY N/A N/A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts the contents of data registers DT201 and DT200 from the contents of data registers DT101 and DT100 when execution condition (trigger) R0 turns on.level Instructions 3. D)] Step 11 Availability FP0 C10.level Instructions F28 (D . S1) . DT 200 .61 .(S2+1. S2) → (D+1.) ← The lower 16 bits of subtracted result is stored in DT0 and the higher 16 bits of the result is stored in DT1. Store to DT1 Store to DT0 3 . SL1 Subtracts 32-bit data from the minuend and stores the result in the specified area. Boolean Address 10 11 Instruction ST F 28 DT DT R 0 (D.3 Explanation of High . T32.bit data. C14. DT 100 .) Outline Program example 32-bit data subtraction [(S1+1.) 100 200 0 Ladder Diagram Trigger R0 10 F28 D . The subtracted result is stored in data registers DT1 and DT0. Contents of DT201 Contents of DT200 (Result is stored.

level Instructions FP0 Description Subtracts the 32-bit data or 32-bit equivalent constant specified by S2 from the 32-bit data or 32-bit equivalent constant specified by S1. S2+1 D+1) are automatically determined once the lower 16-bit areas (S1.2 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. an overflow or underflow will result. Minuend data (S1+1. If an overflow or underflow occurs.4.62 . Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. S2) Result (D+1. For detailed information section 1. Turns on for an instant when the calculated result is recognized as “0”. S1) — Subtrahend data (S2+1. D) are specified.level Instructions 3. The subtracted result is stored in D+1 and D.3 Explanation of High . D) When processing 32-bit data. the higher 16-bit areas (S1+1. Under normal circumstances. do not allow an overflow or underflow to occur.High . the carry flag (special internal relay R9009) will turn on. Turns on for an instant when the calculated result exceeds the range of 32-bit data (overflows or underflows). S2. 3 . Turns on for an instant when the area specified using the index modifier exceeds the limit.

D]: K16 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT101 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Higher 16-bit area Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT100 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 Lower 16-bit area The lower 16 bits of the 32 .level Instructions 3.FP0 High. D)] 7 FP0 C10. SL1 Multiplies two 16-bit data items. S1 S1 S2 D DT 100 D DT DT DT S2 16-bit equivalent constant or 16-bit area (for multiplicand) 16-bit equivalent constant or 16-bit area (for multiplier) Lower 16-bit area of 32-bit data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Multiplies the contents of data register DT0 and DT10 when execution condition (trigger) R0 turns on.63 . C32.3 Explanation of High . 3 . DT 0 . Ladder Diagram Boolean Address 10 11 Instruction ST F 30 R 0 (*) 0 10 100 Trigger R0 10 F30 *. C16.bit multiplication result are stored in the specified memory area (DT100). DT 10 .level Instructions Step Availability F30 (*) Outline Program example 16-bit data multiplication [S1 × S2 → (D+1. T32. and the higher16 bits are stored in the area following the specified area (DT101). C14. Multiplicand [S1]: K8 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 Multiplier [S2]: K2 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 Result [D+1. The result is stored in data registers DT101 and DT100. When the decimal number 8 is in DT0 and the decimal number 2 is in DT10.

level Instructions FP0 Description Multiplies the 16-bit data or 16-bit equivalent constant specified by S1 and the 16-bit data or 16-bit equivalent constant specified by S2. 3 .level Instructions 3. Turns on for an instant when the area specified using the index modifier exceeds the limit. The multiplied result is stored in D+1 and D (32-bit area).3 Explanation of High . D) The multiplied result is stored in the 32-bit area. Multiplicand data (S1) × Multiplier data (S2) Result (D+1. Turns on for an instant when the calculated result is recognized as “0”.64 . Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): Turns on and stays on when the area specified using the index modifier exceeds the limit. The higher 16-bit area (D+1) is automatically determined once the lower 16-bit area (D) is specified.High .

T32. DT 200 S1 S1 S2 D S2 D DT 32-bit equivalent constant or lower 16-bit area of 32-bit data (for multiplicand) 32-bit equivalent constant or lower 16-bit area of 32-bit data (for multiplier) Lower 16-bit area of 64-bit data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A N/A IY N/A N/A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example 16 bits Contents of DT1 16 bits Contents of DT101 16 bits Store to DT203 16 bits Store to DT202 16 bits Store to DT201 16 bits Contents of DT0 16 bits Contents of DT100 16 bits Store to DT200 ← The 64 bits of multiplication result are stored in order in DT200 to DT203 beginning from the lowest 16 bits. The specified data area and the following data area are handled together as 32. DT 0 .level Instructions F31(D*) Outline Program example 32-bit data multiplication [(S1+1. C32.bit data. S2) → (D+3. C14. C16.65 . D+1. D+2.3 Explanation of High . DT 100 .level Instructions 3. Boolean Address 10 11 Instruction ST F 31 DT DT R 0 (D*) 0 100 200 Ladder Diagram Trigger R0 10 F31 D* .FP0 High. SL1 Multiplies two 32-bit data items. 3 . S1) ¢ (S2+1. D)] Step 11 Availability FP0 C10.

level Instructions 3. S2) Result (D+3. D+1. The areas (D+3. D+1) other than the lowest 16-bit area (D) are automatically determined once the lowest 16-bit area is specified. S2+1) are automatically determined once the lower 16-bit areas (S1. the higher 16-bit areas (S1+1. Multiplicand data (S1+1. Turns on for an instant when the calculated result is recognized as “0”. D+2. D+2. D+1 and D.66 . Turns on for an instant when the area specified using the index modifier exceeds the limit. D+2. S2) are specified. 3 . Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): Turns on and stays on when the area specified using the index modifier exceeds the limit.High . The multiplied result is stored in D+3. D) The multiplied result is stored in the 64-bit area. When processing 32-bit data.level Instructions FP0 Description Multiplies the 32-bit data or 32-bit equivalent constant specified by S1 and the one specified by S2.3 Explanation of High . S1) × Multiplier data (S2+1.

Boolean Address 10 11 Instruction ST F 32 DT DT R 0 (% ) 100 10 0 Ladder Diagram Trigger R0 10 F32 % .) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Divides the contents of data register DT100 by decimal constant DT10 when execution condition (trigger) R0 turns on. SL1 Divides 16-bit data by the divisor. Dividend [S1]: K15 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 DT100 Divisor [S2]: K4 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 Quotient [D]: K3 Remainder: K3 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 DT9015 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 .FP0 High.67 . C14. DT10 ..level Instructions 3. T32. C32.level Instructions Step Availability F32 (%) Outline Program example 16-bit data division [S1/S2 → D… (DT9015)] 7 FP0 C10. DT 100 . When the decimal number 15 is in DT100 and the decimal number 4 is in DT10. as shown below. (Remainder is stored in special data register DT9015. The quotient is stored in data register DT0 and the remainder is stored in special data register DT9015..3 Explanation of High . C16. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 3 . DT 0 S1 S1 S2 D S2 D DT 16-bit equivalent constant or 16-bit area (for dividend) 16-bit equivalent constant or 16-bit area (for divisor) 16-bit area (for quotient).

The area specified using the index modifier exceeds the limit. Flag conditions S Error flag (R9007): Turns on and stays on when: . .68 . Turns on for an instant when the calculated result is recognized as “0”. Remainder (DT9015) Precautions during programming The operation error occurs and the error flag (special internal relay R9007 or R9008) turns on when the divisor (specified by S2) is “0”. Turns on for an instant when the negative minimum value K-32768 (H8000) is divided by K-1 (HFFFF)..level Instructions FP0 Description The 16-bit data or 16-bit equivalent constant specified by S1 is divided by the 16-bit data or 16-bit equivalent constant specified by S2. Turns on for an instant when: .High . The quotient is stored in D and the remainder is stored in the special data register DT9015.3 Explanation of High . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .The area specified using the index modifier exceeds the limit...level Instructions 3.The divisor (specified by S2) is “0”. .The divisor (specified by S2) is “0”. Dividend data (S1) ÷ Divisor (S2) Quotient (D) .

Boolean Address 10 11 Instruction ST F 33 DT DT R 0 (D%) 200 100 0 Ladder Diagram Trigger R0 10 F33 D% . DT 0 S1 S1 S2 D S2 D DT 32-bit equivalent constant or lower 16-bit area of 32-bit data (for dividend) 32-bit equivalent constant or lower 16-bit area of 32-bit data (for divisor) Lower 16-bit area of 32-bit data (for quotient) (Remainder is stored in special data registers DT9016 and DT9015. DT9015)] Step 11 Availability FP0 C10. C16. D)…(DT9016.3 Explanation of High . C32. S1)/(S2+1. To DT9016 To DT9015 3 .69 . S2) → (D+1. DT 200 . SL1 Divides 32-bit data by the divisor.) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY N/A N/A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Higher 16 bits Lower 16 bits Contents of DT201 ÷ Contents of DT200 (Division) Contents of DT101 Contents of DT100 ← Quotient is stored in DT1 and DT0.FP0 High. DT 100 . To DT1 To DT0 ← The lower 16 bits of the remainder is stored in DT9015 and the higher 16 bits of the remainder is stored in DT9016. T32. C14.level Instructions F33 (D%) Outline Program example 32-bit data division [(S1+1.level Instructions 3.

3 Explanation of High . Dividend data Divisor S1: lower 16-bit S2: lower 16-bit ÷ S1+1: higher 16-bit S2+1: higher 16-bit Quotient D: lower 16-bit D+1: higher 16-bit Remainder DT9015 DT9016 When processing 32-bit data.High . Turns on for an instant when negative minimum value K-2147483648 (H80000000) is divided by K-1 (HFFFFFFFF).The divisor (specified by S2) is “0”.70 . . Turns on for an instant when the calculated result is recognized as “0”. the higher 16-bit areas (S1+1. Flag conditions S Error flag (R9007): Turns on and stays on when: . The quotient is stored in D+1 and D and the remainder is stored in the special data registers DT9016 and DT9015.level Instructions 3. D) are specified. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .level Instructions FP0 Description The 32-bit data or 32-bit equivalent constant specified by S1 is divided by the 32-bit data or 32-bit equivalent constant specified by S2.The area specified using the index modifier exceeds the limit. Precautions during programming The operation error occurs and the error flag (special internal relay R9007 or R9008) turns on when the divisor (specified by S2) is “0”.The area specified using the index modifier exceeds the limit. Turns on for an instant when: . D+1) are automatically determined once the lower 16-bit areas (S1. S2+1. . S2.The divisor (specified by S2) is “0”.

level Instructions 3. do not allow an overflow to occur. Original data [D]: K9 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 +1 Result [D]: K10 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 Description Adds 1 to the 16-bit data specified by D. If an overflow occurs. If the operation result accidentally overflows. C16.FP0 High. C14. Under normal circumstances.4. T32. use of the F36 (D+1) instruction (32-bit data increment) is recommended.3 Explanation of High . DT 0 D D 16-bit area to be increased by 1 11 Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example Adds 1 to the contents of data register DT0 when execution condition (trigger) R0 turns on. Original data (D) + 1 Result (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. For detailed information section 1.2 3 . the carry flag (special internal relay R9009) will turn on.71 . C32. SL1 Adds 1 to 16-bit data.level Instructions Step Availability F35 (+1) Outline Program example 16-bit data increment [D + 1 → D] 3 FP0 C10. The result is stored in D. an overflow will result. Boolean Address 10 Instruction ST F 35 DT R 0 (+1) 0 Ladder Diagram Trigger R0 10 F35 +1 .

72 .3 Explanation of High .High . 3 . Turns on for an instant when the calculated result is recognized as “0”.level Instructions 3. Turns on for an instant when the calculated result exceeds the range of 16-bit data (overflows). Turns on for an instant when the area specified using the index modifier exceeds the limit.level Instructions FP0 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit.

bit data.2 3 . For detailed information section 1. The result is stored in D+1 and D.4.level Instructions Step Availability F36 (D+1) Outline Program example 32-bit data increment [(D + 1. the carry flag (special internal relay R9009) will turn on. do not allow an overflow to occur. D) + 1 → (D + 1. D) + 1 Result (D+1. DT 0 D D 11 Lower 16-bit area of 32-bit data to be increased by 1 Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY N/A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example Adds 1 to the content of data registers DT1 and DT0 when execution condition (trigger) R0 turns on. D)] 3 FP0 C10.FP0 High. If an overflow occurs. Higher 16 bits Lower 16 bits The specified data area and the following data area are handled together as 32. an overflow will result. Boolean Address 10 Instruction ST F 36 DT R 0 (D+1) 0 Ladder Diagram Trigger R0 10 F36 D+1 . Original data (D+1. T32.3 Explanation of High . Under normal circumstances. Contents of DT1 Contents of DT0 +1 Store to DT1 Store to DT0 Description Adds 1 to the 32-bit data specified by D. SL1 Adds 1 to 32-bit data. D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. C16.73 . C14. C32.level Instructions 3.

level Instructions 3.High . Turns on for an instant when the calculated result is recognized as “0”.3 Explanation of High .74 . Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result exceeds the range of 32-bit data (overflows).level Instructions FP0 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. 3 .

do not allow an underflow to occur. the carry flag (special internal relay R9009) will turn on.FP0 High.1) instruction (32-bit data decrement) is recommended. C14. DT 0 D D 16-bit area to be decreased by 1 Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts 1 from the contents of data register DT0 when execution condition (trigger) R0 turns on.1) Outline Program example 16-bit data decrement [D . Original data (D) 1 Result (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.2 3 . For detailed information section 1.3 Explanation of High . T32. SL1 Subtracts 1 from 16-bit data.4.1 → D] 3 FP0 C10. an underflow will result.level Instructions 3. use of the F38 (D . If an underflow occurs. If the operation result accidentally underflows. Under normal circumstances. Boolean Address 10 11 Instruction ST F 37 DT R 0 (.75 .level Instructions Step Availability F37 ( .1 ) 0 Ladder Diagram Trigger R0 10 F37 .1 . The result is stored in D. C32. C16. Original data [D]: K10 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 -1 Result [D]: K9 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 Description Subtracts 1 from the 16-bit data specified by D.

Turns on for an instant when the calculated result exceeds the range of 16-bit data (underflows).level Instructions FP0 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit.76 .3 Explanation of High . 3 . Turns on for an instant when the calculated result is recognized as “0”.level Instructions 3. Turns on for an instant when the area specified using the index modifier exceeds the limit.High .

If an underflow occurs. SL1 Subtracts 1 from 32-bit data. T32.level Instructions Step Availability F38 (D . the carry flag (special internal relay R9009) will turn on. C14. For detailed information section 1.1 → (D+1. Original data (D+1.3 Explanation of High . D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. an underflow will result. D)] 3 FP0 C10. C32. Boolean Address 10 11 Instruction ST F 38 DT R 0 (D. Higher 16 bits Lower 16 bits The specified data area and the following data area are handled together as 32. Under normal circumstances. D) 1 Result (D+1.level Instructions 3. Contents of DT1 Contents of DT0 -1 Store to DT1 Store to DT0 Description Subtracts 1 from the 32-bit data specified by D.1 .77 . do not allow an underflow to occur. C16. The result is stored in D+1 and D.bit data.1) Outline Program example 32-bit data decrement [(D+1.2 3 .FP0 High. D) .1) 0 Ladder Diagram Trigger R0 10 F38 D . DT 0 D D Lower 16-bit area of 32-bit data to be decreased by 1 Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY N/A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts 1 from the content of data registers DT1 and DT0 when execution condition (trigger) R0 turns on.4.

3 Explanation of High . Turns on for an instant when the calculated result is recognized as “0”.level Instructions 3. Turns on for an instant when the area specified using the index modifier exceeds the limit.level Instructions FP0 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result exceeds the range of 32-bit data (underflows).78 .High . 3 .

level Instructions 3. as shown below. Augend [D]: H8 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 BCD H code 0 0 0 8 Addend [S]: H4 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 BCD H code 0 0 0 4 + (Addition) Result [D]: H12 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 DT2 BCD H code 0 0 1 2 3 . Boolean Address 10 Instruction ST F 40 DT R 0 (B+ ) 0 2 Ladder Diagram Trigger R0 10 F40 B+.3 Explanation of High . DT 0 .level Instructions 5 Step Availability F40 (B+) Outline Program example 4-digit BCD data addition [D + S → D] 5 FP0 C10.FP0 High. C14.79 . When H4 (BCD)is in DT0 and H8 (BCD) is in DT2. C32. C16. T32. SL1 Adds two BCD data items that express 4-digit decimal numbers (4-digit BCD H codes). S S D 11 DT 2 D DT 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for addend) 16-bit area for 4-digit BCD data (for augend and result) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data register DT2 and data register DT0 are added together when execution condition (trigger) R0 turns on.

.The area specified using the index modifier exceeds the limit.2 Flag conditions S Error flag (R9007): Turns on and stays on when: . use of the F41 (DB+) instruction (8-digit BCD data addition) is recommended.4.level Instructions FP0 Description The 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S and the 16-bit area for 4-digit BCD data specified by D are added together.The area specified using the index modifier exceeds the limit. If the calculated result accidentally overflows.level Instructions 3. Under normal circumstances. Turns on for an instant when: .3 Explanation of High . Turns on for an instant when the calculated result is recognized as “0”.80 . For detailed information section 1. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (overflows). the carry flag (special internal relay R9009) will turn on. . an overflow will result.The data is not BCD data.The data is not BCD data. Augend data (D) + Addend data (S) Result (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. do not allow an overflow to occur. If an overflow occurs.High .

FP0 High. D) + (S+1. D)] 7 FP0 C10. Higher 16 bits Lower 16 bits Contents of DT3 Contents of DT2 (Addition) The specified data area and the following data area are handled together as 32.level Instructions 3. DT 0 .3 Explanation of High . S) → (D+1. Boolean Address 10 Instruction ST F 41 DT R 0 (DB+) 0 2 Ladder Diagram Trigger R0 10 F41 DB+ . T32. Store to DT3 Store to DT2 3 . C14. DT 2 S S D 11 DT D 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for addend) Lower 16-bit area for 8-digit BCD data (for augend and result) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data registers DT3 and DT2 and the contents of data registers DT1 and DT0 are added together when execution condition (trigger) R0 turns on. C32. SL1 Adds two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes). Contents of DT1 Contents of DT0 (Result is stored. C16.level Instructions 5 Step Availability F41(DB+) Outline Program example 8-digit BCD data Addition [(D+1.bit data.81 .) ← The lower 16 bits of added result is stored in DT2 and the higher 16 bits of the result is stored in DT3.

Turns on for an instant when the calculated result is recognized as “0”. Turns on for an instant when: . . .High .level Instructions FP0 Description The 8-digit BCD equivalent constant or 8-digit BCD data specified by S and the 8-digit BCD data specified by D are added together.82 .The data is not BCD data.3 Explanation of High .2 Flag conditions S Error flag (R9007): Turns on and stays on when: . For detailed information section 1. do not allow an overflow to occur.level Instructions 3. Augend data Addend data Result D: lower 4-digit S: lower 4-digit + D+1: higher 4-digit S+1: higher 4-digit D: lower 4-digit D+1: higher 4-digit Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.The data is not BCD data. Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (overflows). If an overflow occurs. an overflow will result. Under normal circumstances. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .The area specified using the index modifier exceeds the limit.The area specified using the index modifier exceeds the limit.4. the carry flag (special internal relay R9009) will turn on.

The added result is stored in data register DT100. SL1 Adds two BCD data items that express 4-digit decimal numbers (4-digit BCD H codes) and stores the result in the specified area. Boolean Address 10 11 Instruction ST F 42 DT DT R 0 (B+) 0 1 100 Ladder Diagram Trigger R0 10 F42 B+.level Instructions 3. DT100 S1 S1 S2 D S2 D DT 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for augend) 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for addend) 16-bit area for 4-digit BCD data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data register DT0 and data register DT1 are added together when execution condition (trigger) R0 turns on.3 Explanation of High .FP0 High. T32. C14. C32. Augend [S1]: H8 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 BCD H code 0 0 0 8 Addend [S2]: H4 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 BCD H code 0 0 0 4 + (Addition) Result [D]: H12 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT100 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 BCD H code 0 0 1 2 3 . C16. When H (BCD) 8 is in DT0 and H (BCD) 4 is in DT1.83 . DT 1 . as shown below.level Instructions Step Availability F42 (B+) Outline Program example 4-digit BCD data Addition [S1 + S2 → D] 7 FP0 C10. DT 0 .

The area specified using the index modifier exceeds the limit. Under normal circumstances.level Instructions FP0 Description The 4-digit BCD equivalent constants or 16-bit areas for 4-digit BCD data specified by S1 and S2 are added together. For detailed information section 1. Augend data (S1) + Addend data (S2) Result (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.The data is not BCD data.84 . Turns on for an instant when the calculated result is recognized as “0”. the carry flag (special internal relay R9009) will turn on.3 Explanation of High . The added result is stored in D.High . If the calculated result accidentally overflows. Turns on for an instant when: .The area specified using the index modifier exceeds the limit.2 Flag conditions S Error flag (R9007): Turns on and stays on when: . Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (overflows).level Instructions 3. If an overflow occurs. an overflow will result.The data is not BCD data. . . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . do not allow an overflow to occur. use of the F43 (DB+) instruction (8-digit BCD data addition) is recommended.4.

SL1 Adds two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes) and stores the result in the specified area. DT 0 .3 Explanation of High . 3 .85 . DT100 S1 S1 S2 D S2 D DT 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for augend) 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for addend) Lower 16-bit area for 8-digit BCD data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY N/A N/A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example The contents of data registers DT1 and DT0 and the contents of data registers DT3 and DT2 are added together when execution condition (trigger) R0 turns on. The added result is stored in data registers DT101 and DT100. T32.level Instructions 3. DT 2 . Boolean Address 10 11 Instruction ST F 43 DT DT R 0 (DB+) 0 2 100 Ladder Diagram Trigger R0 10 F43 DB+ . D)] Step 11 Availability FP0 C10. C14. S2) → (D+1.bit data. Contents of DT3 Contents of DT2 (Result is stored. S1) + (S2+1. C32. Higher 16 bits Lower 16 bits Contents of DT1 Contents of DT0 (Addition) The specified data area and the following data area are handled together as 32. C16.FP0 High.) ← The lower 16 bits of added result is stored in DT100 and the higher 16 bits Store to DT101 Store to DT100 of the result is stored in DT101.level Instructions F43 (DB+) Outline Program example 8-digit BCD data Addition [(S1+1.

Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (overflows).High . For detailed information section 1.The data is not BCD data. . Under normal circumstances.level Instructions FP0 Description The 8-digit BCD equivalent constants or 8-digit BCD data specified by S1 and S2 are added together.2 Flag conditions S Error flag (R9007): Turns on and stays on when: .3 Explanation of High . do not allow an overflow to occur. the higher 16-bit areas for 8-digit BCD data (S+1.The area specified using the index modifier exceeds the limit. . Turns on for an instant when the calculated result is recognized as “0”.level Instructions 3. If an overflow occurs. Turns on for an instant when: . D) are specified. Augend data Addend data S1: lower 4-digit + S2: lower 4-digit S1+1: higher 4-digit S2+1: higher 4-digit Result D: lower 4-digit D+1: higher 4-digit When processing 8-digit BCD data.4.86 . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .The area specified using the index modifier exceeds the limit. an overflow will result. Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.The data is not BCD data. the carry flag (special internal relay R9009) will turn on. The added result is stored in D+1 and D. D+1) are automatically determined once the lower 16-bit areas (S.

Minuend [D]: H16 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT2 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 BCD H code 0 0 1 6 Subtrahend [S]: H4 (BCD) - (Subtraction) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 BCD H code 0 0 0 4 Result [D]: H12 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 DT2 BCD H code 0 0 1 2 Description Subtracts the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S from the 16-bit area for 4-digit BCD data specified by D. DT 0 . Minuend data (D) - Subtrahend data (S) Result (D) 3 .) 0 2 Ladder Diagram Trigger R0 10 F45 B . SL1 Subtracts one BCD data item that expresses a 4-digit decimal number (4-digit BCD H codes) from another (minuend).. as shown below.87 . C14.level Instructions 3. C16.FP0 High. T32.) Outline Program example 4-digit BCD data Subtraction [D .3 Explanation of High . C32. DT 2 S S D D 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for subtrahend) 16-bit area for 4-digit BCD data (for minuend and result) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts the contents of data register DT0 from the contents of data register DT2 when execution condition (trigger) R0 turns on.level Instructions Step Availability F45 (B . Boolean Address 10 11 Instruction ST F 45 DT DT R 0 (B .S → D] 5 FP0 C10. When H (BCD) 16 is in DT2 and H (BCD) 4 is in DT0.

Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (underflow). use of the F46 (DB .level Instructions FP0 Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.The area specified using the index modifier exceeds the limit.The area specified using the index modifier exceeds the limit.2 Flag conditions S Error flag (R9007): Turns on and stays on when: . For detailed information section 1.88 .level Instructions 3. Turns on for an instant when: . Turns on for an instant when the calculated result is recognized as “0”. . an underflow will result. do not allow an underflow to occur.The data is not BCD data.High .digit BCD data subtraction) is recommended. .) instruction (8 .The data is not BCD data.3 Explanation of High . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . the carry flag (special internal relay R9009) will turn on. If the calculated result accidentally underflows. If an underflow occurs.4. Under normal circumstances.

bit data. Store to DT3 Store to DT2 3 .) 0 2 Ladder Diagram Trigger R0 10 F46 DB . DT 0 . C14.. Boolean Address 10 Instruction ST F 46 DT R 0 (DB. SL1 Subtracts one BCD data item that expresses an 8-digit decimal number (8-digit BCD H code) from another (minuend). S) → (D+1. C32.89 . Contents of DT1 Contents of DT0 (Result is stored.level Instructions Step Availability F46 (DB . T32.) ← The lower 16 bits of subtracted result is stored in DT2 and the higher 16 bits of the result is stored in DT3.) Outline Program example 8-digit BCD data Subtraction [(D+1. S S D 11 DT 2 D DT 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for subtrahend) Lower 16-bit area for 8-digit BCD data (for minuend and result) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts the contents of data registers DT1 and DT0 from the contents of data registers DT3 and DT2 when execution condition (trigger) R0 turns on.level Instructions 3.(S+1.FP0 High. D)] 7 FP0 C10. Higher 16 bits Lower 16 bits Contents of DT3 Contents of DT2 (Subtraction) The specified data area and the following data area are handled together as 32.3 Explanation of High . C16. D) .

The area specified using the index modifier exceeds the limit.level Instructions FP0 Description Subtracts the 8-digit BCD equivalent constant or 8-digit BCD data specified by S from the 8-digit BCD data specified by D.High .90 . .The data is not BCD data. For detailed information section 1. Turns on for an instant when the calculated result is recognized as “0”. Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (underflows). the carry flag (special internal relay R9009) will turn on.The area specified using the index modifier exceeds the limit. an underflow will result.2 Flag conditions S Error flag (R9007): Turns on and stays on when: . .3 Explanation of High .The data is not BCD data. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . Turns on for an instant when: .level Instructions 3. Augend data Addend data Result D: lower 4-digit D+1: higher 4-digit - S: lower 4-digit S+1: higher 4-digit D: lower 4-digit D+1: higher 4-digit Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. Under normal circumstances. If an underflow occurs. do not allow an underflow to occur.4.

. Minuend [S1]: H16 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 BCD H code 0 0 1 6 Subtrahend [S2]: H4 (BCD) .) 0 2 100 Program example Ladder Diagram Trigger R0 10 F47 B . When H (BCD) 16 is in DT0 and H (BCD) 4 is in DT2. T32.FP0 High. DT 0 . DT100 S1 S1 S2 D S2 D 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for minuend) 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (for subtrahend) 16-bit area for 4-digit BCD data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts the contents of data register DT2 from the contents of data register DT0 when execution condition (trigger) R0 turns on.3 Explanation of High . The subtracted result is stored in data register DT100. as shown below.S2 → D] 7 FP0 C10. Boolean Address 10 11 Instruction ST F 47 DT DT DT R 0 (B . SL1 Subtracts one BCD data item that expresses a 4-digit decimal number (4-digit BCD H code) from another (minuend) and stores the result in the specified area.(Subtraction) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 DT2 BCD H code 0 0 0 4 Result [D]: H12 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT100 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 BCD H code 0 0 1 2 3 .level Instructions 5 Step Availability F47 (B . DT 2 .91 .level Instructions 3. C14. C16.) Outline 4-digit BCD data Subtraction [S1 . C32.

2 Flag conditions S Error flag (R9007): Turns on and stays on when: . an underflow will result. Minuend data (S1) - Subtrahend data (S2) Result (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. The subtracted result is stored in D. For detailed information section 1. Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (underflows). the carry flag (special internal relay R9009) will turn on. Turns on for an instant when the calculated result is recognized as “0”.The area specified using the index modifier exceeds the limit. Turns on for an instant when: .The data is not BCD data. .92 .High . If the calculated result accidentally underflows. do not allow an underflow to occur.3 Explanation of High .4.level Instructions FP0 Description Subtracts the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S2 from the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S1.) instruction (8 . . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .The area specified using the index modifier exceeds the limit. use of the F48 (DB .level Instructions 3.digit BCD data subtraction) is recommended. If an underflow occurs.The data is not BCD data. Under normal circumstances.

C14. SL1 Subtracts one BCD data item that expresses an 8-digit decimal number (8-digit BCD H code) from another (minuend) and stores the result in the specified area. The subtracted result is stored in data registers DT101 and DT100.level Instructions 3.) 0 2 100 Program example Ladder Diagram Trigger R0 10 F48 DB . D)] Step 11 Availability FP0 C10. S2) → (D+1. S1) .3 Explanation of High .93 . DT100 S1 S1 S2 D S2 D DT 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for minuend) 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for subtrahend) Lower 16-bit area for 8-digit BCD data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY N/A N/A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts the contents of data registers DT3 and DT2 from the contents of data registers DT1 and DT0 when execution condition (trigger) R0 turns on.) Outline 8-digit BCD data Subtraction [(S1+1.bit data..FP0 High. DT 2 . T32. Boolean Address 10 11 Instruction ST F 48 DT DT R 0 (DB. Contents of DT3 Contents of DT2 (Result is stored. C32. DT 0 . Store to DT101 3 .) ← The lower 16 bits of subtracted result is stored in DT100 and the higher 16 Store to DT100 bits of the result is stored in DT101.level Instructions 5 F48 (DB . Higher 16 bits Lower 16 bits Contents of DT1 Contents of DT0 (Subtraction) The specified data area and the following data area are handled together as 32.(S2+1. C16.

Turns on for an instant when: . Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.4.The data is not BCD data. The subtracted result is stored in D+1 and D. If an underflow occurs.94 .level Instructions FP0 Description Subtracts the 8-digit BCD equivalent constant or 8-digit BCD data specified by S2 from the 8-digit BCD equivalent constant or the 8-digit BCD data specified by S1. D+1) are automatically determined once the lower 16-bit areas (S.2 Flag conditions S Error flag (R9007): Turns on and stays on when: .High .The area specified using the index modifier exceeds the limit. the carry flag (special internal relay R9009) will turn on. D) are specified.The area specified using the index modifier exceeds the limit. . the higher 16-bit areas for 8-digit BCD data (S+1.The data is not BCD data. Under normal circumstances. Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (underflows). .3 Explanation of High . an underflow will result. Turns on for an instant when the calculated result is recognized as “0”. Minuend data Subtrahend data Result S1: lower 4-digit S1+1: higher 4-digit S2: lower 4-digit S2+1: higher 4-digit D: lower 4-digit D+1: higher 4-digit When processing 8-digit BCD data. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . do not allow an underflow to occur. For detailed information section 1.level Instructions 3.

DT 100 S1 S1 S2 D S2 D 4-digit BCD equivalent constant or 16-bit area for BCD data (for multiplicand) 4-digit BCD equivalent constant or 16-bit area for BCD data (for multiplier) Lower 16-bit area for 8-digit BCD data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example When H (BCD) 8 is in DT0 and H (BCD) 2 is in DT2. DT 0 .FP0 High. 3 . Multiplicand [S1]: H8 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 DT0 BCD H code 0 0 0 8 Multiplier [S2]: H2 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 DT2 0 0 0 2 BCD H code R0: on Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 DT100 BCD H code 0 0 1 6 Result [D+1. and the higher16 bits are stored in the area following the specified area (DT101). D)] 7 FP0 C10. SL1 Multiplies two BCD data items that express 4-digit decimal numbers (4-digit BCD H codes).bit multiplication result are stored in the specified memory area (DT100). as shown below.level Instructions 3.3 Explanation of High . DT 2. T32. Boolean Address 10 11 Instruction ST F 50 DT DT DT R 0 (B*) 0 2 100 Ladder Diagram Trigger R0 10 F50 B*. C32.level Instructions Step Availability F50 (B*) Outline Program example 4-digit BCD data Multiplication [S1 × S2 → (D+1. C14.95 . C16. D]: H16 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DT101 BCD H code 0 0 0 0 Higher 4-digit area Lower 4-digit area The lower 16 bits of the 32 .

The area specified using the index modifier exceeds the limit.level Instructions 3.High .The data is not BCD data.level Instructions FP0 Description Multiplies the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S1 and S2.96 . Turns on for an instant when the calculated result is recognized as “0”. The higher 16-bit area (D+1) is automatically determined once the lower 16-bit area (D) is specified. Flag conditions S Error flag (R9007): Turns on and stays on when: . .The data is not BCD data. Multiplicand data Multiplier data (S1) (S2) × Multiplied result (D+1. D) The multiplied result is stored in the 8-digit area (32 . Turns on for an instant when: . .3 Explanation of High . The multiplied result is stored in D+1 and D.bit area). S Error flag (R9008): S = flag (R900B): 3 .The area specified using the index modifier exceeds the limit.

FP0 High. C14. The specified data area and the following data area are handled together as 32. DT 0 . C32.level Instructions F51(DB*) Outline Program example 8-digit BCD data Multiplication [(S1+1. S1) ¢ (S2+1.3 Explanation of High .bit data. D)] Step 11 Availability FP0 C10. T32. C16. D+2. SL1 Multiplies two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes).97 . D+1. 3 .level Instructions 3. DT 2 . S2) → (D+3. DT 100 S1 S1 S2 D S2 D 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for multiplicand) 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for multiplier) Lowest 16-bit area for 16-digit BCD data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A N/A IY N/A N/A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example 16 bits Contents of DT1 16 bits Contents of DT3 16 bits Store to DT103 16 bits Store to DT102 16 bits Store to DT101 16 bits Contents of DT0 16 bits Contents of DT2 16 bits Store to DT100 ← The 64 bits of multiplication result are stored in order in DT100 to DT103 beginning from the lowest 16 bits. Boolean Address 10 11 Instruction ST F 51 DT DT DT R 0 (DB*) 0 2 100 Ladder Diagram Trigger R0 10 F51 DB* .

D+1) other than the lowest 16-bit area (D) are automatically determined when the lowest 16-bit area is specified. D) The multiplied result is stored in the 64-bit area (16 . D+1. . The multiplied result is stored in D+3. D+2.digit BCD). When processing 8-digit BCD data. Flag conditions S Error flag (R9007): Turns on and stays on when: .98 . S2) Result (D+3. S Error flag (R9008): S = flag (R900B): 3 .level Instructions FP0 Description Multiplies the 8-digit BCD equivalent constant or 8-digit BCD data specified by S1 and the one specified by S2.The area specified using the index modifier exceeds the limit. D+2.The area specified using the index modifier exceeds the limit. D+2. S2) are specified. and D. .The data is not BCD data. Turns on for an instant when the calculated result is recognized as “0”.3 Explanation of High . the higher 16-bit areas (S1+1. D+1. S1) × Multiplier data (S2+1.High . S2+1) are automatically determined once the lower 16-bit areas (S1.The data is not BCD data. Multiplicand data (S1+1. Turns on for an instant when: .The areas (D+3.level Instructions 3.

3 Explanation of High .FP0 High. C16. DT 100 S1 S1 S2 D S2 D 4-digit BCD equivalent constant or 16-bit area for BCD data (for dividend) 4-digit BCD equivalent constant or 16-bit area for BCD data (for divisor) 16-bit area for BCD data (for quotient) (Remainder is stored in special data register DT9015.) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier 3 . SL1 Divides one BCD data item that expresses a 4-digit decimal number (4-digit BCD H code) by another (divisor). Boolean Address 10 11 Instruction ST F 52 DT DT DT R 0 (B%) 0 2 100 Ladder Diagram Trigger R0 10 F52 B% . C14.level Instructions 3. T32.level Instructions Step Availability F52 (B%) Outline Program example 4-digit BCD data Division [S1/S2 → D… (DT9015)] 7 FP0 C10. DT 2 . C32.99 . DT 0 .

.The 4-digit BCD equivalent constant or 4-digit BCD data for the divisor (specified by S2) is 0. .100 .The data is not BCD data. Remainder (DT9015) (S1) (S2) (D) Flag conditions S Error flag (R9007): Turns on and stays on when: .The 4-digit BCD equivalent constant or 4-digit BCD data for the divisor (specified by S2) is 0.3 Explanation of High ..The area specified using the index modifier exceeds the limit.level Instructions FP0 Explanation of example Divides the contents of data register DT0 by the contents of data register DT2 when execution condition (trigger) R0 turns on.. The quotient is stored in data register DT100 and the remainder is stored in special data register DT9015. Dividend data Divisor ÷ Quotient .High . .level Instructions 3.The area specified using the index modifier exceeds the limit. When H (BCD) 15 is in DT0 and H (BCD) 4 is in DT2. Turns on for an instant when: . Dividiend [S1]: H15 (BCD) Bit position 15 · DT0 BCD H code · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 5 Divisor [S2]: H4 (BCD) Bit position 15 · DT2 BCD H code · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 R0: on 0 4 Quotient [D]: H3 (BCD) Bit position 15 · DT100 BCD H code · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 3 Remainder: H3 (BCD) Bit position 15 · DT9015 BCD H code · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 3 Description The 4-digit BCD equivalent constant or the 16-bit area for 4-digit BCD data specified by S1 is divided by the 4-digit BCD equivalent constant or the 16-bit area for 4-digit BCD data specified by S2. as shown below. The quotient is stored in the area specified by D and the remainder is stored in a special data register DT9015. .The data is not BCD data. S Error flag (R9008): S = flag (R900B): 3 .. Turns on for an instant when the calculated result (quotient) is recognized as “0”.

Boolean Address 10 11 Instruction ST F 53 DT DT DT R 0 (DB%) 0 2 100 Ladder Diagram Trigger R0 10 F53 DB% . DT9015)] Step 11 Availability FP0 C10. S2) → (D+1. S1)/(S2+1. DT 0 . SL1 Divides one BCD data item that expresses an 8-digit decimal number (8-digit BCD H code) by another (divisor). C16.FP0 High.level Instructions 3. T32.101 .level Instructions F53 (DB%) Outline Program example 8-digit BCD data Division [(S1+1. DT100 S1 S1 S2 D S2 D 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for dividend) 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD data (for divisor) Lower 16-bit area for 8-digit BCD data (for quotient) (Remainder is stored in special data registers DT9016 and DT9015) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY N/A N/A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier 3 . C32. D)… (DT9016.3 Explanation of High . C14. DT 2 .

Turns on for an instant when the calculated result (quotient) is recognized as “0”..The area specified using the index modifier exceeds the limit. D: lower 4-digit D+1: higher 4-digit Remainder DT9015 DT9016 S1: lower 4-digit S2: lower 4-digit ÷ S1+1: higher 4-digit S2+1: higher 4-digit When processing 8-digit BCD data. Dividend data Divisor Quotient . . The quotient is stored in the areas specified by D+1 and D. and the remainder is stored in special data registers DT9016 and DT9015. S2+1. To DT101 To DT100 ← The lower 16 bits of the remainder is stored in DT9015 and the higher 16 bits of the remainder is stored in DT9016. D+1) are automatically determined once the lower 16-bit areas (S1.High .102 .. . Turns on for an instant when: . Flag conditions S Error flag (R9007): Turns on and stays on when: .level Instructions 3. D) are specified. S2. .The 8-digit BCD equivalent constant or the 8-digit BCD data for the divisor (specified by S2) is 0.level Instructions FP0 Explanation of example Higher 16 bits Lower 16 bits Contents of DT1 Contents of DT0 ÷ (Division) Contents of DT3 Contents of DT2 ← Quotient is stored in DT101 and DT100.The data is not BCD data. .The area specified using the index modifier exceeds the limit.3 Explanation of High . the higher 16-bit areas (S1+1..The 8-digit BCD equivalent constant or the 8-digit BCD data for the divisor (specified by S2) is 0. To DT9016 To DT9015 Description The 8-digit BCD equivalent constant or the 8-digit BCD data specified by S1 is divided by the 8-digit BCD equivalent constant or the 8-digit BCD data specified by S2. S Error flag (R9008): S = flag (R900B): 3 .The data is not BCD data.

C16. SL1 Adds 1 to BCD data that expresses a 4-digit decimal number (4-digit BCD H code). C32. Original data [D]: H9 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 DT0 BCD H code 0 0 0 9 +1 Result [D]: H10 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 DT0 BCD H code 0 0 1 0 Description Adds 1 to the 4-digit BCD data specified by D. C14. T32. The result is stored in D.FP0 High. Boolean Address 10 Instruction ST F 55 DT R 0 (B+1) 0 Ladder Diagram Trigger R0 10 F55 B+1 .103 .level Instructions Step Availability F55 (B+1) Outline Program example 4-digit BCD data increment [D + 1 → D] 3 FP0 C10.level Instructions 3.3 Explanation of High . DT 0 D D 11 16-bit area for 4-digit BCD data to be increased by 1 Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example Adds 1 to the contents of data register DT0 when execution condition (trigger) R0 turns on. Original data (D) + 1 Result (D) 3 .

do not allow an overflow to occur.2 Flag conditions S Error flag (R9007): Turns on and stays on when: . Turns on for an instant when the calculated result is recognized as “0”. Turns on for an instant when: . Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (overflows).The area specified using the index modifier exceeds the limit. . For detailed information section 1.4.The data is not BCD data.level Instructions FP0 Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. If the calculated result accidentally overflows.The data is not BCD data. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . use of the F56 (DB+1) instruction (8-digit BCD data increment) is recommended.3 Explanation of High .level Instructions 3.104 . . an overflow will result. the carry flag (special internal relay R9009) will turn on. If an overflow occurs.High . Under normal circumstances.The area specified using the index modifier exceeds the limit.

digit BCD data) of data registers DT1 and DT0 when execution condition (trigger) R0 turns on. Boolean Address 10 Instruction ST F 56 DT R 0 (DB+1) 0 Ladder Diagram Trigger R0 10 F56 DB+1 . D)] 3 FP0 C10. D) 3 .105 . The result is stored in D+1 and D. DT 0 D D 11 Lower 16-bit area for 8-digit BCD data to be increased by 1 Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY N/A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example Adds 1 to the contents (8 .bit data. Contents of DT1 Contents of DT0 +1 Store to DT1 Store to DT0 Description Adds 1 to the 8-digit BCD data specified by D.level Instructions 3. SL1 Adds 1 to BCD data that expresses an 8-digit decimal number (8-digit BCD H code).level Instructions Step Availability F56 (DB+1) Outline Program example 8-digit BCD data increment [(D+1. Original data (D+1. D) + 1 → (D+1. C16. Higher 16 bits Lower 16 bits The specified data area and the following data area are handled together as 32. D) + 1 Result (D+1. T32.FP0 High. C32. C14.3 Explanation of High .

the carry flag (special internal relay R9009) will turn on.2 Flag conditions S Error flag (R9007): Turns on and stays on when: . Under normal circumstances. . Turns on for an instant when: .The data is not BCD data. do not allow an overflow to occur.level Instructions FP0 Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.The data is not BCD data.The area specified using the index modifier exceeds the limit. .106 . For detailed information section 1.4. If an overflow occurs. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .The area specified using the index modifier exceeds the limit.3 Explanation of High .High . Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (overflows). Turns on for an instant when the calculated result is recognized as “0”. an overflow will result.level Instructions 3.

T32.1) 0 Ladder Diagram Trigger R0 10 F57 B .level Instructions Step Availability F57(B .107 . C32. Original data [D]: H10 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 BCD H code 0 0 1 0 -1 Result [D]: H9 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 DT0 BCD H code 0 0 0 9 Description Subtracts 1 from the 4-digit BCD data specified by D.1 → D] 3 FP0 C10.1) Outline Program example 4-digit BCD data decrement [D .3 Explanation of High . DT 0 D D 16-bit area for BCD data to be decreased by 1 Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts 1 from the contents of data register DT0 when execution condition (trigger) R0 turns on. Boolean Address 10 11 Instruction ST F 57 DT R 0 (B . Original data (D) 1 Result (D) 3 . C14. C16.level Instructions 3.FP0 High. SL1 Subtracts 1 from BCD data that expresses a 4-digit decimal number (4-digit BCD H code). The result is stored in D.1 .

The data is not BCD data. .108 . the carry flag (special internal relay R9009) will turn on. use of the F58 (DB . If the calculated result accidentally underflow.High .The area specified using the index modifier exceeds the limit. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .2 Flag conditions S Error flag (R9007): Turns on and stays on when: . Turns on for an instant when: . .The data is not BCD data.3 Explanation of High . For detailed information section 1.1) instruction (8-digit BCD data decrement) is recommended.The area specified using the index modifier exceeds the limit.level Instructions 3.4. Turns on for an instant when the calculated result exceeds the range of 4-digit BCD data (underflows). an underflow will result. Turns on for an instant when the calculated result is recognized as “0”. Under normal circumstances.level Instructions FP0 Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled. do not allow an underflow to occur. If an underflow occurs.

T32. D) .1) Outline Program example 8-digit BCD data decrement [(D+1. Original data (D+1.level Instructions Step Availability F58 (DB . Higher 16 bits Lower 16 bits The specified data area and the following data area are handled together as 32. Boolean Address 10 11 Instruction ST F 58 DT R 0 (DB.level Instructions 3.3 Explanation of High .FP0 High. C32.1) 0 Ladder Diagram Trigger R0 10 F58 DB . DT 0 D D Lower 16-bit area for 8-digit BCD data to be decreased by 1 Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY N/A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example Subtracts 1 from the contents (8 . SL1 Subtracts 1 from BCD data that expresses an 8-digit decimal number (8-digit BCD H code).1 → (D+1. D) 3 . C14. D)] 3 FP0 C10.109 .bit data.1 . D) 1 Result (D+1.digit BCD data) of data registers DT1 and DT0 when execution condition (trigger) R0 turns on. Contents of DT1 Contents of DT0 -1 Store to DT1 Store to DT0 Description Subtracts 1 from the 8-digit BCD data specified by D. The result is stored in D+1 and D. C16.

High . Under normal circumstances. Turns on for an instant when the calculated result is recognized as “0”. Turns on for an instant when: .4. . Turns on for an instant when the calculated result exceeds the range of 8-digit BCD data (underflows).3 Explanation of High . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . the carry flag (special internal relay R9009) will turn on. .The data is not BCD data.The data is not BCD data.level Instructions 3. an underflow will result.The area specified using the index modifier exceeds the limit. For detailed information section 1.2 Flag conditions S Error flag (R9007): Turns on and stays on when: . do not allow an underflow to occur. If an underflow occurs.110 .level Instructions FP0 Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled.The area specified using the index modifier exceeds the limit.

FP0

High- level Instructions
3.3 Explanation of High - level Instructions
Step Availability

F60 (CMP)
Outline Program example

16-bit data compare

5

FP0 C10, C14, C16, C32, T32, SL1

The two specified 16 - bit data are compared and the result is output to the special internal relay.
Boolean Address 40 41 Instruction ST F 60 DT R 0 (CMP) 0 100 R 0

Ladder Diagram

Trigger S1 R0 40 46 R0 R900B 49 R0 R900C 52 Y2 Y1 F60 CMP , DT 0 , K 100 R0 R900A Y0 S2
46 47 48 49 50 51 52 53 54 S1 S2 16-bit equivalent constant or 16-bit area to be compared 16-bit equivalent constant or 16-bit area to be compared

K ST AN OT ST AN OT ST AN OT

R 900A Y R 0 0

R 900B Y R 1 0

R 900C Y 2

Operands
Operand S1 S2 A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A A H A A A A A: Available Index modifier

Explanation of example
Compares decimal constant K100 with the contents of data register DT0 when execution condition (trigger) R0 turns on. When DT0 > K100, R900A turns on and external output relay Y0 turns on. When DT0 = K100, R900B turns on and external output relay Y1 turns on. When DT0 < K100, R900C turns on and external output relay Y2 turns on.

3 - 111

High - level Instructions
3.3 Explanation of High - level Instructions

FP0

Description
Compares the 16-bit data specified by S1 with that specified by S2. The comparison result is output to the special internal relays R9009, R900A, R900B and R900C. The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag (R900C), depending on the relative sizes of S1 and S2.
Flag Comparison between S1 and S2 S1 < S2 S1 = S2 S1 > S2 R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) off off off on on off off ↕ off ↕

on off “↕”: turns on or off according to the conditions

Execution condition (Trigger)
In this program example, the comparison will be performed only when R0 turns on. If ongoing comparison is necessary, relay R9010, which is always on, should be used in the execution conditions (trigger).
Always on relay. R9010 R9010 R9010 R9010

R9010 can be eliminated in this case.

You can also program the above using the PSHS, RDS, and POPS instructions.

R0 PSHS Y0 Y1 Y2 F60 CMP, DT 0, K 100 R900A R900B R900C

RDS

POPS

This is a program in which operation is the same as the program example on page 3 - 111.

3 - 112

F60 CMP, DT 0, K 100 R900A Y0 R900B R900C Y1 Y2

↗ ↗

FP0

High- level Instructions
3.3 Explanation of High - level Instructions

Precautions when using two or more comparison instructions
The comparison instruction flags R900A to R900C are updated with each execution of the comparison instruction. If you use two or more comparison instructions in your program, be sure to use the flags immediately after each comparison instruction, by employing output relays or internal relays.

Example:

Compares DT0 with K100, and DT1 with K200.
R0 1 R0 R0 2 R0 R900C Y2 F60 CMP, DT 0, K 100 R900A R900B Y0 Y1

R1 3 R1 R1 4 R1 R900C Y5 F60 CMP, DT 1, K 200 R900A R900B Y3 Y4

The comparison result for 1 is output to the output relays (Y0, Y1, and Y2) of program 2 . The comparison result for 3 is output to the output relays (Y3, Y4, and Y5) of program 4 . Precautions when comparing BCD or external data
When comparing special data, such as BCD or unsigned binary (0 to FFFF), construct your program as shown in the program example below, using special internal relays R900B and R9009.

Example:

Compares BCD data in DT0 and DT1.
R1 R1 R1 R1 F60 CMP, DT 0, DT 1 R9009 R900B R900B R9009 R2 R3 R4

....When DT0 < DT1, internal relay R2 turns on 2 ....When DT0 = DT1, internal relay R3 turns on 3 ....When DT0 > DT1, internal relay R4 turns on
1

3 - 113

High - level Instructions
3.3 Explanation of High - level Instructions Flag operation when comparing BCD data or unsigned 16 - bit data (0 to FFFF)
Flag Comparison between S1 and S2 S1 < S2 S1 = S2 S1 > S2 R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) ↕ off ↕ off on off ↕ off ↕ on off off

FP0

“↕”: turns on or off according to the conditions

For example, when S1 = H8000 and S2 = H1000, R900A will turn off and R900C will turn on. For this reason, the correct comparison result will not be obtained in a program which uses R900A and R900C.
S1 BCD 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0

S2 BCD

0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

Flag conditions
S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 - 114

FP0

High- level Instructions
3.3 Explanation of High - level Instructions
Step Availability

F61(DCMP)
Outline Program example

32-bit data compare

9

FP0 C10, C14, C16, C32, T32, SL1

The two specified 32 - bit data are compared and the result is output to the special internal relay.
Boolean Address 50 51 Instruction ST R 0

Ladder Diagram

F 61(DCMP) DT 0 100 R 0

Trigger S1 R0 50 56 R0 R900B 59 R0 R900C 62 Y2 Y1 F61 DCMP , DT 0 , DT 100 R0 R900A Y0 S2
56 57 58 59 60 61 62 63 64 S1 S2

DT ST AN OT ST AN OT ST AN OT

R 900A Y R 0 0

R 900B Y R 1 0

R 900C Y 2

32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared 32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared

Operands
Operand S1 S2 A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A A H A A A A A: Available N/A: Not Available Index modifier

Explanation of example
Compares the content (32 - bit data) of data registers DT101 and DT100 with the content (32 - bit data) of data registers DT1 and DT0 when execution condition (trigger) R0 turns on. When (DT1 and DT0) > (DT101 and DT100), R900A turns on and external output relay Y0 turns on. When (DT1 and DT0) = (DT101 and DT100), R900B turns on and external output relay Y1 turns on. When (DT1 and DT0) < (DT101 and DT100), R900C turns on and external output relay Y2 turns on.

3 - 115

High - level Instructions
3.3 Explanation of High - level Instructions

FP0

Description
Compares the 32-bit data or 32-bit equivalent constant specified by S1 with that specified by S2. The comparison result is output to special internal relays R9009, R900A, 900B, and R900C. The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag (R900C), depending on the relative sizes of (S1+1, S1) and (S2+1, S2).
Flag Comparison between (S1+1, S1) and (S2+1, S2) (S1+1, S1) < (S2+1, S2) (S1+1, S1) = (S2+1, S2) (S1+1, S1) > (S2+1, S2) R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) off off off on on off off ↕ off ↕

on off “↕”: turns on or off according to the conditions

When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified.

Execution condition (Trigger)
In this program example, the comparison will be performed only when R0 turns on. If ongoing comparison is necessary, relay R9010, which is always on, should be used in the execution conditions.
Always on relay. R9010 R9010 R9010 R9010

R9010 can be eliminated in this case.

You can also program the above using the PSHS, RDS, and POPS instructions.

R0 PSHS F61 DCMP, DT 0, DT100 R900A Y0 R900B R900C Y1 Y2

RDS

POPS

This is a program in which operation is the same as the program example on page 3 - 115.

3 - 116

F61 CMP, DT 0, K100 R900A R900B R900C

Y0 Y1 Y2

↗ ↗

FP0

High- level Instructions
3.3 Explanation of High - level Instructions

Precautions when using two or more comparison instructions
The comparison instruction flags R900A to R900C are updated with each execution of the comparison instruction. If you use two or more comparison instructions in your program, be sure to use the flags immediately after each comparison instruction, by employing output relays or internal relays.

Example:

Compares DT1 and DT0 with DT101 and DT100, and DT3 and DT2 with DT201 and DT200.
R0 1 R0 R0 2 R0 R900C Y2 F61 DCMP, DT 0, DT 100 R900A Y0 R900B Y1

R1 3 R1 R1 4 R1 R900C Y5 F61 DCMP, DT 2, DT 200 R900A Y3 R900B Y4

The comparison result for Y1, and Y2) of program 2 . The comparison result for Y4, and Y5) of program 4 .

1 3

is output to the output relays (Y0, is output to the output relays (Y3,

Precautions when comparing BCD or external data
When comparing special data, such as BCD or unsigned binary (0 to FFFFFFFF), flags R9009, R900A, R900B, and R900C work as shown in the table below. In this case, construct your program as shown in the program example below, using special internal relays R900B and R9009.

Example:

Compares BCD data in (DT1, DT0) and (DT3, DT2).
R1 R1 R1 R1 F61 DCMP, DT 0, DT 2 R9009 R2 R900B R900B R9009 R3 R4

....When (DT1, DT0) < (DT3, DT2), internal relay R2 turns on 2 ....When (DT1, DT0) = (DT3, DT2), internal relay R3 turns on 3 ....When (DT1, DT0) > (DT3, DT2), internal relay R4 turns on
1

3 - 117

High - level Instructions
3.3 Explanation of High - level Instructions Flag operation when comparing BCD data or unsigned 32 - bit data (0 to FFFFFFFF)
Flag Comparison between (S1+1, S1) and (S2+1, S2) (S1+1, S1) < (S2+1, S2) (S1+1, S1) = (S2+1, S2) (S1+1, S1) > (S2+1, S2) R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) ↕ off ↕ off on off ↕ off ↕ on off off

FP0

“↕”: turns on or off according to the conditions

For example, if an F61 (DCMP) instruction is executed when S1 = H80000000 (K - 2147483648) and S2 = H10000001 (K+268435457), the result will be S1<S2. Thus R900A will turn off and R900C will turn on. In a program which uses R900A and R900C, the correct comparison result will not be obtained.

Flag conditions
S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 - 118

FP0

High- level Instructions
3.3 Explanation of High - level Instructions
Step Availability

F62 (WIN)
Outline

16-bit data band compare

7

FP0 C10, C14, C16, C32, T32, SL1

Compares one 16-bit data item with the data band specified by two other 16-bit data items and the comparison result is output to the special internal relay.
Boolean Address 50 51 Lower limit value Upper limit value Instruction ST F 62 DT DT DT R 0 (WIN) 0 2 3 R 0

Program example
Ladder Diagram

Trigger S1 R0 50 R0 58 R0 61 R0 64 R900C R900B S2

S3
58

F62 WIN , DT 0 , DT 2 , DT 3 R900A Y0 Y1 Y2

ST AN OT ST AN OT ST AN OT

59 60 61 62 63 64 65 66

R 900A Y R 0 0

R 900B Y R 1 0

R 900C Y 2

S1 S2 S3

16-bit equivalent constant or 16-bit area to be compared 16-bit equivalent constant or 16-bit area for lower limit 16-bit equivalent constant or 16-bit area for upper limit

Operands
Operand S1 S2 S3 A A A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A A H A A A A A A A: Available Index modifier

3 - 119

High - level Instructions
3.3 Explanation of High - level Instructions

FP0

Explanation of example
Compares the contents of data register DT0 with the contents of data register DT2 (lower limit of the data band) and data register DT3 (upper limit of the data band) when execution condition (trigger) R0 turns on.

Example:

When K - 500 is in DT2 and K500 is in DT3, as shown below.
R900A : on R900B : on R900C : on - 500 +500

When DT0 is K - 680, R900C turns on and external output relay Y2 goes on. When DT0 is K - 500, R900B turns on and external output relay Y1 goes on. When DT0 is K256, R900B turns on and external output relay Y1 goes on. When DT0 is K680, R900A turns on and external output relay Y0 goes on.

Description
Compares the 16-bit equivalent constant or 16-bit data specified by S1 with the data band specified by S2 and S3. This instruction checks whether S1 is in the data band between S2 (lower limit) and S3 (upper limit), larger than S3, or smaller than S2. The comparison result is output to special internal relays R9009, R900A, R900B, and R900C. The following table lists the states of the R9009, R900A, R900B and R900C.
Flag Comparison between S1, S2 and S3 S1 < S2 S2≦S1≦S3 S3 < S1 R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) off off on off on off on off off ——— ——— ———

Precautions during programming
Set it so that the value of the lower limit is less than the value of the upper limit (S2 ≦ S3).

Flag conditions
S Error flag (R9007): Turns on and stays on when: - The area specified using the index modifier exceeds the limit. - S2 > S3. Turns on for an instant when: - The area specified using the index modifier exceeds the limit. - S2 > S3.

S Error flag (R9008):

3 - 120

FP0

High- level Instructions
3.3 Explanation of High - level Instructions
Step Availability

F63 (DWIN)
Outline

32-bit data band compare

13

FP0 C10, C14, C16, C32, T32, SL1

Compares one 32-bit data item with the data band specified by two other 32-bit data items and the comparison result is output to the special internal relay.
Boolean Address 50 51 Lower limit value Upper limit value Instruction ST F 63 DT DT DT R 0 (DWIN) 0 2 4 R 0

Program example
Ladder Diagram

Trigger S1 R0 50 R0 64 R0 67 R0 70 R900C R900B S2

S3
64

F63 DWIN , DT 0 , DT 2 , DT 4 R900A Y0 Y1 Y2

ST AN OT ST AN OT ST AN OT

65 66 67 68 69 70 71 72

R 900A Y R 0 0

R 900B Y R 1 0

R 900C Y 2

S1 S2 S3

32-bit equivalent constant or lower 16-bit area of 32-bit data to be compared 32-bit equivalent constant or lower 16-bit area of 32-bit data for lower limit 32-bit equivalent constant or lower 16-bit area of 32-bit data for upper limit

Operands
Operand S1 S2 S3 A A A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY N/A N/A N/A Constant K A A A H A A A A A A A: Available N/A: Not Available Index modifier

3 - 121

High - level Instructions
3.3 Explanation of High - level Instructions

FP0

Explanation of example
Compares the contents of data registers DT1 and DT0 with the contents of data registers DT3 and DT2 (lower limit of the data band) and data registers DT5 and DT4 (upper limit of the data band), when execution condition (trigger) R0 turns on.

Example:

When K - 50000 is in DT3 and DT2 and K50000 is in DT5 and DT4, as shown below.
R900A : on R900B : on R900C : on - 50000 +50000

When (DT1, DT0) is K - 68000, R900C turns on and external output relay Y2 goes on. When (DT1, DT0) is K - 50000, R900B turns on and external output relay Y1 goes on. When (DT1, DT0) is K25600, R900B turns on and external output relay Y1 goes on. When (DT1, DT0) is K68000, R900A turns on and external output relay Y0 goes on.

Description
Compares the 32-bit equivalent constant or 32-bit data specified by S1 with the data band specified by S2 and S3. This instruction checks whether S1 is in the data band between S2 (lower limit) and S3 (upper limit), larger than S3, or smaller than S2. The comparison result is output to the special internal relays R9009, R900A, R900B, and R900C. The following table lists the states of the R9009, R900A, R900B and R900C.
Comparison between (S1+1, S1), (S2+1, S2) and (S3+1, S3) (S1+1, S1) < (S2+1, S2) (S2+1, S2)≦(S1+1, S1) ≦(S3+1, S3) (S3+1, S3) < (S1+1, S1) Flag R9009 R900A R900B R900C (> flag) (= flag) (< flag) (carry flag) off off on off on off on off off ——— ——— ———

Precautions during programming
Set it so that the value of the lower limit (S2 + 1, S2) is less than the value of the upper limit (S3 + 1, S3) [(S2+1, S2) ≦ (S3+1, S3)].

Flag conditions
S Error flag (R9007): Turns on and stays on when: - The area specified using the index modifier exceeds the limit. - (S2+1, S2) > (S3+1, S3). Turns on for an instant when: - The area specified using the index modifier exceeds the limit. - (S2+1, S2) > (S3+1, S3). 3 - 122

S Error flag (R9008):

FP0

High- level Instructions
3.3 Explanation of High - level Instructions
Step Availability

F64 (BCMP)
Outline Program example

Block data compare

7

FP0 C10, C14, C16, C32, T32, SL1

Compares one specified data block with another in byte units.
Boolean Address 10 Instruction ST F 64 DT R 0

Ladder Diagram

Trigger S1 R0 10 F64 BCMP , DT 0 , DT 10 , DT 20 S2 S3

11

(BCMP) 0 10 20 R 0

DT DT 18 ST AN OT

R0 18

R900B

R1

19 20

R 900B R 1

S1 S2 S3

16-bit equivalent constant or 16-bit area (specifies starting byte positions and number of bytes to be compared) Starting 16-bit area to be compared Starting 16-bit area to be compared

Operands
Operand S1 S2 S3 A A A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A N/A N/A IY A N/A N/A Constant K A N/A N/A H A N/A N/A A A A A: Available N/A: Not Available Index modifier

3 - 123

High - level Instructions
3.3 Explanation of High - level Instructions

FP0

Explanation of example
Compares the data block of data register DT10 (4 bytes from DT10 lower order byte) with data register DT20 (4 bytes from DT20 higher order byte) according to the comparison condition in data register DT0 when execution condition (trigger) R0 turns on. When the contents of the two data blocks are the same, internal relay R1 turns on. If H1004 is entered in DT0, the two blocks are as follows.
Higher byte Data block specified by S2 DT10 DT11 2 4 Lower byte 1 3
·

Data block specified by S3

Comparation DT20 DT21 DT22 1 3 2 4

Area compared

Description
Compares the contents of the data block specified by S2 with the contents of the data block specified by S3 according to content specified by S1. When the comparison result is S2 = S3, special internal relay R900B (=flag) turns on. S1 is the control data that determines factors such as the size of the comparison.

How to specify control data “S1”
S1 specifies the starting byte position and the number of bytes to be compared using 4-digit BCD data as follows:

S1 = H j j j j
  

Number of bytes to be compared range: H01 to H99 (BCD) Starting byte position for data block specified by S2 1: Starting from higher order byte 0: Starting from lower order byte Starting byte position for data block specified by S3 1: Starting from higher order byte 0: Starting from lower order byte

Setting example:
To specify the 4 bytes beginning with the lower byte of the data block specified by S2 and the 4 bytes beginning with the upper byte of the data block specified by S3, set S1 to H1004.

3 - 124

FP0

High- level Instructions
3.3 Explanation of High - level Instructions

Flag conditions
S Error flag (R9007): Turns on and stays on when: - The area specified using the index modifier exceeds the limit. - The data specified by S1 is not BCD data. - The specified data block area exceeds the limit. Turns on for an instant when: - The area specified using the index modifier exceeds the limit. - The data specified by S1 is not BCD data. - The specified data block area exceeds the limit.

S Error flag (R9008):

Precautions during programming
The flag R900B used for the compare instruction is renewed each time a compare instruction is executed. Accordingly: - The program that uses R900B should be just after the F64 (BCMP) instruction. - Output to an output relay or internal relay and save the result.
R0 F64 BCMP, R0 R900B DT 0, DT 1, WR 5 Y0

Result of F64 R1 F60 CMP, R1 R900B DT 2, K 100 R2

Result of F60

Note
As shown in the above program, be sure to have the trigger (R0 or R1) before flag R900B. However, if you are using R9010 (on all the time), then it is unnecessary to have the trigger before R900B.

3 - 125

High - level Instructions
3.3 Explanation of High - level Instructions
Step Availability

FP0

F65 (WAN)
Outline Program example

16-bit data AND

7

FP0 C10, C14, C16, C32, T32, SL1

Performs bit-wise AND operation on two 16-bit data items.
Boolean Address 10 11 Instruction ST F 65 DT DT DT R 0 (WAN) 0 2 1

Ladder Diagram

Trigger R0 10 F65 WAN , DT 0 , DT 2 , DT 1 S1
S1 S2 D

S2

D

16-bit equivalent constant or 16-bit area 16-bit equivalent constant or 16-bit area 16-bit area for storing AND operation result

Operands
Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier

Explanation of example
Performs AND operation on each bit in data registers DT0 and DT2 when trigger R0 turns on. The AND operation result is stored in data register DT1.
Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0

[S1]

DT0

0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 · 12 11 · · 8 7 · · 4 3 · · 0

Bit position 15 ·

[S2]

DT2

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R0: on

Bit position 15 ·

· 12 11 ·

· 8 7

·

· 4 3

·

· 0

[D]

DT1

0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1

3 - 126

FP0

High- level Instructions
3.3 Explanation of High - level Instructions

Description
Performs AND operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. The AND operation result is stored in the 16-bit area specified by D. (S1) ∧ (S2) → (D) You can use this instruction to turn off certain bits of the 16-bit data.

AND operation
The AND operation is shown below.
S1 0 0 1 1 S2 0 1 0 1 D 0 0 0 1

Flag conditions
S Error flag (R9007): S Error flag (R9008): S = flag (R900B): Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the calculated result is recognized as “0”.

3 - 127

High . C16. C14. DT 1 S1 S1 S2 D S2 D 16-bit equivalent constant or 16-bit area 16-bit equivalent constant or 16-bit area 16-bit area for storing OR operation result Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Performs OR operation on each bit in data registers DT0 and DT2 when execution condition (trigger) R0 turns on.128 . C32.level Instructions 3.3 Explanation of High . Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 [S1] DT0 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 · 12 11 · · 8 7 · · 4 3 · · 0 Bit position 15 · [S2] DT2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R0: on Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 [D] DT1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 3 . Boolean Address 10 11 Instruction ST F 66 DT DT DT R 0 (WOR) 0 2 1 Ladder Diagram Trigger R0 10 F66 WOR . SL1 Performs bit-wise OR operation on two 16-bit data items.level Instructions Step Availability FP0 F66 (WOR) Outline Program example 16-bit data OR 7 FP0 C10. The OR operation result is stored in data register DT1. DT 2 . DT 0 . T32.

OR operation The OR operation is shown below. S1 0 0 1 1 S2 0 1 0 1 D 0 1 1 1 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): Turns on and stays on when the area specified using the index modifier exceeds the limit. (S1) ∨ (S2) → (D) You can use this instruction to turn on certain bits of the 16-bit data.level Instructions 3. Turns on for an instant when the calculated result is recognized as “0”.3 Explanation of High . Turns on for an instant when the area specified using the index modifier exceeds the limit. 3 .FP0 High.129 .level Instructions Description Performs OR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. The OR operation result is stored in the 16-bit area specified by D.

C32.130 . DT 1 S1 S1 S2 D DT DT S2 D 16-bit equivalent constant or 16-bit area 16-bit equivalent constant or 16-bit area 16-bit area for storing exclusive OR operation result Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Performs exclusive OR operation on each bit in data registers DT0 and DT2 when execution condition (trigger) R0 turns on. C16.High . C14. SL1 Performs bit-wise exclusive OR operation on two 16-bit data items. Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 [S1] DT0 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 · 12 11 · · 8 7 · · 4 3 · · 0 Bit position 15 · [S2] DT2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R0: on Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 [D] DT1 0 1 0 0 1 1 0 1 0 1 0 0 0 1 1 0 3 . DT 0 . Boolean Address 10 11 Instruction ST F 67 DT R 0 (XOR) 0 2 1 Ladder Diagram Trigger R0 10 F67 XOR .level Instructions 3.level Instructions Step Availability FP0 F67 (XOR) Outline Program example 16-bit data exclusive OR 7 FP0 C10. The exclusive OR operation result is stored in data register DT1. DT 2 . T32.3 Explanation of High .

3 Explanation of High .level Instructions Description Performs exclusive OR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. all the bits of the data specified by D become 0. Turns on for an instant when the calculated result is recognized as “0”. S1 0 0 1 1 S2 0 1 0 1 D 0 1 1 0 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): Turns on and stays on when the area specified using the index modifier exceeds the limit.FP0 High.131 . Turns on for an instant when the area specified using the index modifier exceeds the limit. 3 . If the values of S1 and S2 are equal.level Instructions 3. Exclusive OR operation The exclusive OR operation is shown below. The exclusive OR operation result is stored in the 16-bit area specified by D. (S1) ∧ (S2) ∨ (S1) ∧ (S2) → (D) Detects the bits whose on and off states do not match.

C16. the bit for that position is turned on (1) for data register DT1. DT 0 .High .level Instructions Step Availability FP0 F68 (XNR) Outline Program example 16-bit data exclusive NOR 7 FP0 C10. SL1 Performs bit-wise exclusive NOR operation on two 16-bit data items. C14. Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 [S1] DT0 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 · 12 11 · · 8 7 · · 4 3 · · 0 Bit position 15 · [S2] DT2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R0: on Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 [D] DT1 1 0 1 1 0 0 1 0 1 0 1 1 1 0 0 1 3 . T32. Boolean Address 10 11 Instruction ST F 68 DT R 0 (XNR) 0 2 1 Ladder Diagram Trigger R0 10 F68 XNR .level Instructions 3.3 Explanation of High . if the values of the bits for the same positions with regard to the contents of data registers DT0 and DT2 are equal. DT 2 .132 . If the values are not equal. C32. DT 1 S1 S1 S2 D DT DT S2 D 16-bit equivalent constant or 16-bit area 16-bit equivalent constant or 16-bit area 16-bit area for storing exclusive NOR operation result Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example When the execution condition (trigger) R0 is on. the bit is turned off (0).

3 Explanation of High .FP0 High.133 . Exclusive NOR operation The exclusive NOR operation is shown below. Turns on for an instant when the calculated result is recognized as “0”.level Instructions 3. S1 0 0 1 1 S2 0 1 0 1 D 1 0 0 1 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): Turns on and stays on when the area specified using the index modifier exceeds the limit.level Instructions Description Performs exclusive NOR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. 3 . all the bits of the data specified by D become 1. (S1) ∧ (S2) ∨ (S1) ∧ (S2) → (D) Detects the bits whose on and off states match. The exclusive NOR operation result is stored in the 16-bit area specified by D. If the values of S1 and S2 are equal. Turns on for an instant when the area specified using the index modifier exceeds the limit.

The Block Check Code (BCC) is stored in the lower byte of data register DT6. DT 6 S1 S1 S2 S3 D 11 DT K DT S2 S3 D 16-bit equivalent constant or 16-bit area (specifies BCC calculation method) Starting 16-bit area to calculate BCC 16-bit equivalent constant or 16-bit area (specifies number of bytes for BCC calculation) 16-bit area for storing BCC Operands Operand S1 S2 S3 D A A A N/A Relay WX WY WR A A A A A A A A Timer/Counter Register SV A A A A EV A A A A DT A A A A Index register IX A N/A A N/A IY A N/A A N/A Constant K A N/A A N/A H A N/A A N/A A A A A A: Available N/A: Not Available Index modifier Explanation of example Calculates the Block Check Code (BCC) of 12 bytes of ASCII data starting from data register DT0. DT 0 . K 12 .High .134 . when execution condition (trigger) R0 turns on. K 2 . C32. C14. SL1 Calculates Block Check Code (BCC). T32.3 Explanation of High . 3 . C16. Boolean Address 10 Instruction ST F 70 K R 0 (BCC) 2 0 12 6 Ladder Diagram Trigger R0 10 F70 BCC .level Instructions 3.level Instructions Step Availability FP0 F70 (BCC) Outline Program example Block check code calculation 9 FP0 C10. via an exclusive OR operation.

FP0 High. The Block Check Code (BCC) is stored in the lower byte of the 16-bit area specified by D. 3 . K 12 . the block check code of the message being sent.The area specified using the index modifier exceeds the limit.level Instructions Description Calculates the Block Check Code (BCC) of S3 bytes of ASCII data starting from the 16-bit area specified by S2. DT 0 . K 2 .3 Explanation of High . . according to the calculation method specified by S1. ”%01#RCSX0000”. The higher byte of D does not change. (BCC is one byte. BCC is calculated as an exclusive logical OR. 12 bytes R0 10 F70 BCC. BCC (H 1D) is stored in the last byte of DT6 of D.The number of specified bytes for the target data exceeds the limit of the specified data area.The area specified using the index modifier exceeds the limit.135 . Data register ASCII HEX code ASCII character DT6 DT5 0 0 DT4 0 0 DT3 X S DT2 C R DT1 # 1 DT0 0 % 3 0 3 0 3 0 3 0 5 8 5 3 4 3 5 2 2 3 3 1 3 0 2 5 Block Check Code (BCC) The F70 (BCC) instruction is as shown below. DT 6 S1: Exclusive logical OR S2: Start of target data S3: Length of target data D: Calculation results When this is executed.The number of specified bytes for the target data exceeds the limit of the specified data area. Transmission is done using ASCII codes. The message should be stored in the memory area as shown below.) S1: Specifying the Block Check Code (BCC) calculation method K0: Addition K1: Subtraction K2: Exclusive OR operation S2 and S3: Specifying the target data For instance. Turns on for an instant when: .level Instructions 3. . the following applies: S2: DT0 S3: K12 (specified as a decimal number) Flag conditions S Error flag (R9007): Turns on and stays on when: . is calculated and is added after the message. S Error flag (R9008): Application example In this example. if 12 bytes of data from DT0 are to be targeted.

level Instructions 3. ASCII BIN code 0 0 0 1 1 1 0 1 3 . % 0 1 # R C S X 0 0 0 0 ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code ASCII HEX code ASCII BIN code 2 5 0 0 1 0 0 1 0 1 3 0 0 0 1 1 0 0 0 0 3 1 0 0 1 1 0 0 0 1 2 3 Exclusive ORing Exclusive ORing Exclusive ORing Exclusive ORing 0 0 1 0 0 0 1 1 5 2 0 1 0 1 0 0 1 0 4 3 Exclusive ORing 0 1 0 0 0 0 1 1 5 3 Exclusive ORing Exclusive ORing 0 1 0 1 0 0 1 1 5 8 0 1 0 1 1 0 0 0 3 0 Exclusive ORing 0 0 1 1 0 0 0 0 3 0 Exclusive ORing 0 0 1 1 0 0 0 0 3 0 Exclusive ORing 0 0 1 1 0 0 0 0 3 0 Exclusive ORing 0 0 1 1 0 0 0 0 calculation Block Check Code (BCC) ASCII HEX code 1 D This calculation result (H1D) is stored in the lower byte of DT6.3 Explanation of High .High .level Instructions FP0 How to calculate the Block Check Code (BCC) Exclusive ORing calculates the Block Check Code (BCC) with each ASCII character.136 .

DT 0 . C32.137 . SL1 Converts 16-bit data to ASCII code that expresses the equivalent hexadecimals.level Instructions 3. C14. T32. DT 10 S1 S1 S2 D (HEXA) 0 2 10 S2 D DT Starting 16-bit area for hexadecimal number (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted Starting 16-bit area for storing ASCII code (destination) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX N/A A N/A IY N/A A N/A Constant K N/A A N/A H N/A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Converts 2 bytes of data stored in data register DT0 to ASCII codes that express the equivalent hexadecimals when execution condition (trigger) R0 turns on. Boolean Address 10 11 Instruction ST F 71 DT K R 0 Ladder Diagram Trigger R0 10 F71 HEXA . DT0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 Hexadecimal A B C D DT11 ASCII HEX code ASCII character DT10 4 A 1 4 D 4 4 C 3 4 B 2 3 . C16.3 Explanation of High .level Instructions 5 F71 (HEXA) Outline Program example Hexadecimal data → ASCII code Step 7 Availability FP0 C10.FP0 High. The converted data is stored in data registers DT11 and DT10. K 2 .

. . .High . . Turns on for an instant when: .The converted result exceeds the area specified by D.The data specified by S2 is recognized as “0”.3 Explanation of High .level Instructions FP0 Description Converts the data starting from the 16-bit area specified by S1 to ASCII codes that express the equivalent hexadecimals. Since ASCII code requires eight bits (one byte) to express one hexadecimal character. the data length when converted to ASCII code becomes double the source data. Hexadecimal data A B C D Converted result 4 B 2 4 A 1 4 D 4 4 C D 3 D+1 S1 S1+1 1 2 5 6 3 4 7 8 6 2 1 4 3 D+3 5 8 D+2 7 Hexadecimal data Converted result Flag conditions S Error flag (R9007): Turns on and stays on when: .The number of bytes specified by S2 exceeds the area specified by S1. Two bytes are converted as one segment of data.The data specified by S2 is recognized as “0”. S2 specifies the number of source data bytes to be converted.level Instructions 3.138 . . S Error flag (R9008): 3 . The converted result is stored in the area starting from the 16-bit area specified by D.The converted result exceeds the area specified by D.The area specified using the index modifier exceeds the limit. .The number of bytes specified by S2 exceeds the area specified by S1.The area specified using the index modifier exceeds the limit. Precautions during programming The two characters that make up one byte are interchanged when stored.

it is possible to convert only the last byte of the data for one word if desired.level Instructions 3. Hexadecimal data S1+1 12 S1 AB 3 bytes F71 (HEXA) instruction execution Converted result D+2 32 2 31 1 D+1 42 B 41 A 44 D D 43 C CD Hexadecimal number to express ASCII code Hexadecimal number 0 1 2 3 4 5 6 7 8 9 A B C D E F ASCII code H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 H41 H42 H43 H44 H45 H46 3 .level Instructions Conversion example The following shows conversion of hexadecimal data to ASCII codes. Conversion of four bytes of data (S2 = K4) Hexadecimal data S1+1 EF 12 S1 AB CD 4 bytes F71 (HEXA) instruction execution Converted result D+3 46 F 45 E D+2 32 2 31 1 D+1 42 B 41 A 44 D D 43 C Result of S1 + 1 conversion Result of S1 conversion Conversion of three bytes of data (S2 = K3) Since “byte” is specified as the unit.139 .FP0 High.3 Explanation of High .

High . C16.level Instructions 3. K 4 . DT 40 S1 S1 S2 D (AHEX) 0 4 40 S2 D Starting 16-bit area for ASCII code (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted Starting 16-bit area for storing converted data (destination) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX N/A A N/A IY N/A A N/A Constant K N/A A N/A H N/A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Converts 4 ASCII codes stored in data registers DT0 and DT1 to hexadecimal numbers when execution condition (trigger) R0 turns on. DT 0 . T32.3 Explanation of High . C32.level Instructions FP0 5 F72 (AHEX) Outline Program example ASCII code → Hexadecimal data Step 7 Availability FP0 C10.140 . SL1 Converts ASCII code that expresses hexadecimal characters to hexadecimal data. The converted data is stored in data register DT40. C14. DT1 ASCII HEX code ASCII character DT0 4 C 3 4 B 2 4 A 1 4 D 4 DT40 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 1 1 0 0 1 1 0 1 1 0 1 0 1 0 1 1 C D A B Hexadecimal 3 . Boolean Address 10 11 Instruction ST F 72 DT K DT R 0 Ladder Diagram Trigger R0 10 F72 AHEX .

ASCII code. The converted result is stored in the area starting from the 16-bit area specified by D. . is specified.level Instructions 3. . the characters of the upper and lower bytes are interchanged. Four characters are converted as one segment of data. Turns on for an instant when: .141 . ASCII code character 4 4 4 3 4 2 4 1 Converted result C D A B Flag conditions S Error flag (R9007): Turns on and stays on when: . .The data specified by S2 is recognized as “0”.3 Explanation of High . . The volume of the results (hexadecimal numeric data) is half that of the converted ASCII code.The area specified using the index modifier exceeds the limit.FP0 High.The converted result exceeds the area specified by D.The converted result exceeds the area specified by D. Conversion of eight characters (S2 = K8) ASCII code S1+3 32 2 31 1 S1+2 46 F 45 E S1+1 44 D 43 C 42 B S1 41 A 8 characters (8 bytes) F72 (AHEX) instruction execution Converted result 12 D+1 EF CD D AB Result of S1 + 3.The data specified by S2 is recognized as “0”. is specified. .The number of bytes specified by S2 exceeds the area specified by S1. starting from the 16-bit area specified by S1. . When this takes place. to hexadecimal numbers as specified by S2. Precautions during programming The data for two ASCII code characters is converted to two numeric digits for one word.ASCII code.The area specified using the index modifier exceeds the limit. . S1 + 2 conversion Result of S1 + 1. not a hexadecimal number (0 to F). .level Instructions Description Converts ASCII code that expresses hexadecimal characters.The number of bytes specified by S2 exceeds the area specified by S1. S1 conversion 3 . not a hexadecimal number (0 to F). S Error flag (R9008): Conversion Example The following shows conversion of ASCII codes to hexadecimal data.

S1+2 S1 conversion conversion Note In the conversion results.142 . and does not change. The data for the higher byte is left as it is. only the data for the lower byte is stored in D + 1 word.3 Explanation of High .level Instructions 3.High . 3 .level Instructions Conversion of 7 characters (S2 = K7) ASCII code S1+3 31 1 S1+2 46 F 45 E S1+1 44 D 43 C 42 B S1 41 A FP0 7 characters (7 bytes) This position is filled with “0”. Converted result D+1 10 EF CD F72 (AHEX) instruction execution D AB Conversion of 6 characters (S2 = K6) ASCII code S1+2 46 F 45 E S1+1 44 D 43 C 42 B S1 41 A 6 characters (6 bytes) F72 (AHEX) instruction execution Converted result D+1 EF D CD AB Result of Result of S1+1.

(odd number) ASCII code to express hexadecimal number ASCII code H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 H41 H42 H43 H44 H45 H46 Hexadecimal number 0 1 2 3 4 5 6 7 8 9 A B C D E F 3 . “0” will be entered for bit position 0 to 3 of the final data (byte) of the converted results.3 Explanation of High .143 . n = S2.FP0 High. ASCII code Converted result 44 n n-1 n-2 Converted result n 0 n-1 n-2 This position is filled with “0”. If an odd number of characters is being converted.level Instructions 3.level Instructions The converted results are stored in byte units.

3 Explanation of High .High .digit BCD code to ASCII code that expresses the equivalent decimals. S2 DT 10 D Starting 16-bit area for BCD data (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted and direction of the converted data Starting 16-bit area for storing conversion result (destination) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX N/A A N/A IY N/A A N/A Constant K N/A A N/A H N/A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Converts BCD code that express a 4-digit decimal number (4-digit BCD H code) stored in data register DT0 to ASCII code when execution condition (trigger) R0 turns on. SL1 Converts 4 . 2 bytes convertion) DT0 BCD H code 1 2 3 4 DT11 ASCII HEX code ASCII character DT10 1 1 3 4 4 3 3 3 3 2 2 3 3 . When S2 = H2 (normal direction.144 . S1 S1 S2 D (BCDA) 0 4 10 H4 .level Instructions 3. C16. The converted data is stored in data registers DT10 and DT11. DT 0 . C14. C32. Boolean Address 10 11 Instruction ST F 73 DT H DT R 0 Ladder Diagram Trigger R0 10 F73 BCDA .level Instructions FP0 5 Step Availability F73 (BCDA) Outline Program example BCD data → ASCII code 7 FP0 C10. T32.

level Instructions 3. A maximum of four bytes (eight characters of data) can be converted. 2 bytes convertion) DT0 BCD data 1 2 3 4 DT11 ASCII HEX code ASCII character DT10 3 3 3 2 2 3 1 1 3 4 4 3 Description Converts the BCD code starting from the 16-bit area specified by S1 to ASCII code that expresses the equivalent decimals as specified by S2. For information on the direction of conversion.3 Explanation of High . How to specify S2 S2 = H j 0 0 j Number of bytes for BCD data H1: 1 byte (BCD code that expresses a 2-digit decimal) H2: 2 bytes (BCD code that expresses a 4-digit decimal) H3: 3 bytes (BCD code that expresses a 6-digit decimal) H4: 4 bytes (BCD code that expresses a 8-digit decimal) Direction of converted data H0: Normal direction H1: Reverse direction Since you can specify source data in byte units.level Instructions When S2 = H1002 (reverse direction. The converted result is stored in the area starting from the 16-bit area specified by D. it is possible to convert only the lower byte of S1 to ASCII code.145 . 3 . refer to ”Explanation of example”. S2 specifies the number of source data bytes and the direction of converted data (normal/reverse). The data length when converted to ASCII code becomes double the BCD data.FP0 High.

The area specified using the index modifier exceeds the limit. .The converted result exceeds the area specified by D. . Normal direction S1 1 2 3 4 Reverse direction S1 1 2 3 4 2 1 4 3 D+1 D Converted result 4 3 2 1 D+1 D Flag conditions S Error flag (R9007): Turns on and stays on when: . Two bytes are converted as one segment of data. Turns on for an instant when: .The data specified by S2 is recognized as “0”. .3 Explanation of High .The data specified by S1 is not BCD data.High . . .The number of bytes specified by S2 exceeds the area specified by S1. .level Instructions FP0 Precautions during programming The two characters that make up one byte are interchanged when stored. . S Error flag (R9008): Conversion Example The following shows conversion from BCD data to ASCII codes. .level Instructions 3.146 .The number of bytes specified S2 is more than H4.The area specified using the index modifier exceeds the limit. . .The converted result exceeds the area specified by D.The number of bytes specified by S2 is more than H4.The data specified by S1 is not BCD data. Normal direction convertion of 4 bytes (S2 = H0004) BCD data S1+1 BCD H code 12 34 S1 56 78 4 bytes F73 (BCDA) instruction execution Converted result D+3 D+2 ASCII HEX 32 31 34 33 code ASCII 2 1 4 3 character Result of S1 + 1 conversion D+1 36 6 35 5 38 8 D 37 7 Result of S1 conversion 3 .The data specified by S2 is recognized as “0”.The number of bytes specified by S2 exceeds the area specified by S1.

3 Explanation of High .level Instructions Reverse direction convertion of 4 bytes (S2 = H1004) BCD data S1+1 BCD H code 12 34 56 S1 78 4 bytes F73 (BCDA) instruction execution Converted result D+3 D+2 ASCII HEX 38 37 36 35 code ASCII 8 7 6 5 character Result of S1 conversion D+1 34 4 33 3 32 2 D 31 1 Result of S1 + 1 conversion BCD code to express ASCII code BCD code 0 1 2 3 4 5 6 7 8 9 ASCII code H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 3 .FP0 High.level Instructions 3.147 .

SL1 Converts ASCII code that expresses decimal characters to BCD code.148 . When S2 = H4 (normal direction. 4 bytes) DT1 ASCII HEX code ASCII character DT0 3 3 3 3 2 2 3 1 1 3 4 4 DT40 BCD H code 3 4 1 2 3 .level Instructions 3. Boolean Address 10 11 Instruction ST F 74 DT H R 0 Ladder Diagram Trigger R0 10 F74 ABCD . C14. T32. C16. The converted data is stored in data register DT40. S2 DT 40 D DT Starting 16-bit area for storing ASCII code (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted and to arrange converted data Starting 16-bit area for storing converted data (destination) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX N/A A N/A IY N/A A N/A Constant K N/A A N/A H N/A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Converts ASCII codes stored in data registers DT1 and DT0 to BCD data when execution condition (trigger) R0 turns on.3 Explanation of High . S1 S1 S2 D (ABCD) 0 8 40 H8 .High .level Instructions FP0 5 Step Availability F74 (ABCD) Outline Program example ASCII code → BCD data 9 FP0 C10. DT 0 . C32.

to BCD data as specified by S2. The data length when converted to a BCD number becomes half the ASCII code source data. A maximum of eight characters of data can be converted.FP0 High.149 . starting from the 16-bit area specified by S1. The converted result is stored in the area starting from the 16-bit area specified by D.level Instructions 3. How to specify S2 S2 = H j 0 0 j Number of bytes for ASCII character H1: 1 byte (1 ASCII character) H2: 2 bytes (2 ASCII characters) H3: 3 bytes (3 ASCII characters) H4: 4 bytes (4 ASCII characters) H5: 5 bytes (5 ASCII characters) H6: 6 bytes (6 ASCII characters) H7: 7 bytes (7 ASCII characters) H8: 8 bytes (8 ASCII characters) Direction converted data H0: Normal direction H1: Reverse direction 3 . 4 bytes): DT1 ASCII HEX code ASCII character DT0 3 3 3 2 2 3 1 1 3 4 4 3 DT40 BCD H code 1 2 3 4 Description Converts ASCII codes that express decimal characters.3 Explanation of High . S2 specifies the number of source data bytes and the direction of converted data (normal/reverse).level Instructions When S2 = H1004 (reverse direction.

the characters of the upper and lower bytes are interchanged. Converted result BCD H code D+1 01 23 45 F74 (ABCD) instruction execution D 67 3 .level Instructions FP0 Precautions during programming The data for two ASCII code characters is converted to two numeric digits for one byte. If an odd number of characters is being converted. Normal direction 2 1 4 3 Reverse direction ASCII code 4 3 2 1 1 2 3 4 BCD data 1 2 3 4 Conversion Example The following shows conversion from ASCII codes to BCD data. The converted results are stored in byte units.High . When this takes place. Four characters are converted as one segment of data. “0” will be entered for bit position 0 to 3 of the final data (byte) of the converted results if data is sequenced in the normal direction.150 . 8 ASCII characters convertion (S2=H0008) ASCII code S1+3 ASCII HEX code ASCII character 38 8 37 7 S1+2 36 6 35 5 S1+1 34 4 33 3 S1 32 2 31 1 8 ASCII characters (8 bytes) F74 (ABCD) instruction execution Converted result BCD H code D+1 78 56 34 D 12 7 ASCII characters (S2=H1007) ASCII code S1+3 ASCII HEX code ASCII character 37 7 S1+2 36 6 35 5 S1+1 34 4 33 3 32 2 S1 31 1 7 ASCII characters (7 bytes) This position is filled with “0”. and “0” will be entered for bit position 4 to 7 if data is being sequenced in the reverse direction.level Instructions 3.3 Explanation of High .

. S Error flag (R9008): 3 .The number of bytes for ASCII characters in S2 is more than H8. .The converted result exceeds the area specified by D.ASCII code not corresponding to decimal numbers (0 to 9) is specified.level Instructions ASCII code to express BCD code ASCII code H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 BCD code 0 1 2 3 4 5 6 7 8 9 Flag conditions S Error flag (R9007): Turns on and stays on when: .The area specified using the index modifier exceeds the limit.level Instructions 3.FP0 High. . . Turns on for an instant when: .3 Explanation of High .151 . . .The number of bytes specified by S2 exceeds the area specified by S1.The converted result exceeds the area specified by D. .The number of bytes specified by S2 exceeds the area specified by S1.The area specified using the index modifier exceeds the limit.ASCII code not corresponding to decimal numbers (0 to 9) is specified.The number of bytes for ASCII characters in S2 is more than H8. . .The data specified by S2 is recognized as “0”. .The data specified by S2 is recognized as “0”.

T32. DT 50 S1 S1 S2 D S2 D 16-bit equivalent constant or 16-bit area to be converted (source) 16-bit equivalent constant or 16-bit area to specify number of bytes used to express destination data (ASCII codes) Starting 16-bit area for storing ASCII codes (destination) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A N/A IY A A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Converts the 16-bit data stored in data register DT0 to ASCII codes that express the equivalent decimals when execution condition (trigger) R0 turns on.High .100 Decimal data Destination ASCII HEX code ASCII character 3 0 0 DT52 3 0 0 3 1 1 DT51 2 D 2 0 DT50 2 0 6 bytes SPACE 3 . Source DT0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 K . C14.152 . C16. SL1 Converts 16-bit data to ASCII code that expresses the equivalent decimals.level Instructions 3. Boolean Address 10 11 Instruction ST F 75 DT K DT R 0 (BINA) 0 6 50 Ladder Diagram Trigger R0 10 F75 BINA .3 Explanation of High . C32. K 6 .level Instructions FP0 5 Step Availability F75 (BINA) Outline Program example 16-bit data → ASCII code 7 FP0 C10. The converted data is stored in data registers DT52 to DT50. DT 0 .

depending on the size of the data storage area. When S2=K8 (8 bytes) D+3 30 0 30 0 D+2 31 1 2D D+1 20 20 20 D 20 (Space) (Space) (Space) (Space) ASCII code Extra bytes Range specified by S2 If the number of bytes of ASCII codes following conversion (including the minus sign) is larger than the number of bytes specified by the S2.3 Explanation of High . When a negative number is converted 16.level Instructions Description Converts the 16-bit data specified by S1 to ASCII codes that express the equivalent decimals. The converted result is stored in the area starting from the 16-bit area specified by D as specified by S2. If the area specified by S2 is more than that required by the converted data. (This specification cannot be made with BCD data.bit decimal data to ASCII codes. so the position of the ASCII code may change. the “+” sign is not converted.) Precautions during programming If a positive number is converted. Specify the number of bytes in decimal number in the S2.FP0 High.” sign is also converted to ASCII code (ASCII HEX code: H2D). the ASCII code for “SPACE” (ASCII HEX code: H20) is stored in the extra area. Data is stored in the direction towards the final address.level Instructions 3.bit data FF S1 9C K . an operation error occurs. Conversion Example The following shows conversion from 16 .100 F75 (BINA) instruction execution Converted result 0 D+2 30 30 0 D+1 31 1 2D 20 D 20 (Space) (Space) ASCII code Extra bytes Range specified by S2 (6 bytes) 3 . the “ . When a negative number is converted. Make sure the sign is taken into consideration when specifying the object of conversion for the S2.153 .

level Instructions When a positive number is converted 16.154 . .The converted result exceeds the area specified by D. S Error flag (R9008): 3 . .High .The data specified by S2 is recognized as “0”. . .level Instructions 3.The number of bytes specified by S2 exceeds the area specified by D.The converted result exceeds the area specified by D.The data specified by S2 is recognized as “0”.The area specified using the index modifier exceeds the limit. . .The area specified using the index modifier exceeds the limit. .bit data 04 S1 D2 FP0 K1234 F75 (BINA) instruction execution Converted result 4 D+2 34 33 3 D+1 32 2 21 1 20 D 20 (Space) (Space) ASCII code Extra bytes Range specified by S2 (6 bytes) Decimal characters to express ASCII HEX code Decimal characters SPACE 0 1 2 3 4 5 6 7 8 9 ASCII HEX code H20 H2D H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 Flag conditions S Error flag (R9007): Turns on and stays on when: .3 Explanation of High .The number of bytes specified by S2 exceeds the area specified by D.The number of bytes of converted result exceeds the number of bytes specified by S2. Turns on for an instant when: .

K 6 . C16.3 Explanation of High .level Instructions 3. DT 0 . T32.100 Decimal data 3 . Destination DT50 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 K . DT 50 S1 S1 S2 D S2 D DT Starting 16-bit area for ASCII code (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted 16-bit area for storing converted data (destination) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX N/A A N/A IY N/A A N/A Constant K N/A A N/A H N/A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Converts ASCII codes (6 bytes) that express decimal digits in data registers DT2 to DT0 to 16-bit data when execution condition (trigger) R0 turns on. C32.155 .FP0 High. C14. Boolean Address 10 11 Instruction ST F 76 DT K R 0 (ABIN) 0 6 50 Ladder Diagram Trigger R0 10 F76 ABIN . SL1 Converts ASCII code that expresses decimal digits to 16-bit data that expresses the equivalent number.level Instructions Step Availability F76 (ABIN) Outline Program example ASCII code → 16-bit data 7 FP0 C10. The converted data is stored in data register DT50. this position should be set to “SPACE” or “0”. Source ASCII HEX code ASCII character 3 0 0 DT2 3 0 0 3 1 1 DT1 2 D 3 0 DT0 3 0 — 6 bytes In this case.

. ASCII codes with signs (such as +: H2B and . and SPACE) is specified. S2 specifies the number of source data bytes to be converted using decimal number. ASCII code not corresponding to decimal numbers (0 to 9) or ASCII characters (+. - S Error flag (R9008): Conversion Example The following shows conversion from ASCII codes to decimal data in a 16 . The + codes can be omitted.level Instructions FP0 Description Converts the ASCII codes that express the decimal digits.bit configuration.: H2D) are also converted.level Instructions 3. The converted result exceeds the 16 . .156 . The converted result exceeds the 16-bit area specified by D. ASCII code not corresponding to decimal numbers (0 to 9) or ASCII characters (+. If the area specified by S1 and S2 is more than that required for the data you want to convert. (This specification cannot be made with BCD data. and SPACE) is specified. . The number of bytes specified by S2 exceeds the area specified by S1. Turns on for an instant when: The area specified using the index modifier exceeds the limit.bit area.3 Explanation of High . The converted result is stored in the area specified by D. The data specified by S2 is recognized as “0”.) Precautions during programming The ASCII codes being converted should be stored in the direction of the last address in the specified area.High . The number of bytes specified by S2 exceeds the area specified by S1. Flag conditions S Error flag (R9007): Turns on and stays on when: The area specified using the index modifier exceeds the limit.100 3 .. Example of converting an ASCII code indicating a negative number ASCII code S1+2 30 0 30 0 S1+1 31 1 2D 30 (0) S1 30 (0) ASCII code Extra bytes Range specified by S2 F76 (ABIN) instruction execution Converted result FF D 9C K .bit area. The data specified by S2 is recognized as “0”. The converted result exceeds the 16 . starting from the 16-bit area specified by S1 to 16-bit data as specified by S2. The converted result exceeds the 16-bit area specified by D. place “0” (ASCII HEX code: H30) or “SPACE” (ASCII HEX code: H20) into the extra bytes.

level Instructions 3.157 .3 Explanation of High .level Instructions Example of converting an ASCII code indicating a positive number Example 1: ASCII code S1+2 30 0 30 0 S1+1 31 1 2B + 20 S1 20 (Space) (Space) ASCII code Extra bytes Range specified by S2 Example 2: ASCII code S1+2 30 0 30 0 S1+1 31 1 20 20 S1 20 (Space) (Space) (Space) ASCII code Extra bytes Range specified by S2 F76 (ABIN) instruction execution Converted result of example 1 or 2 00 D 64 K100 ASCII code to express decimal characters ASCII code H20 H2B H2D H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 Decimal characters SPACE + 0 1 2 3 4 5 6 7 8 9 3 .FP0 High.

High . C32.158 . DT 50 S1 S1 S2 D DT K S2 D DT 32-bit equivalent constant or lower 16-bit area of 32-bit data to be converted (source) 16-bit equivalent constant or 16-bit area to specify number of bytes used to express destination data (ASCII codes) Starting 16-bit area for storing ASCII codes (destination) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A N/A IY N/A N/A N/A Constant K A A N/A H A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Converts the 32-bit data stored in data registers DT1 and DT0 to ASCII code that expresses the equivalent decimals when execution condition (trigger) R0 turns on. Source Decimal DT1 DT0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 15 · · 1211 · · 8 7 · · 4 3 · · 0 K12345678 Destination ASCII HEX code ASCII character DT54 DT53 DT52 DT51 3 3 3 2 2 3 1 1 2 DT50 3 8 8 3 7 7 3 6 6 3 5 5 3 4 4 3 0 2 0 Number of bytes specified by S2 (10 bytes) SPACE 3 .level Instructions 3. T32. C14.level Instructions FP0 5 Step Availability F77 (DBIA) Outline Program example 32-bit data → ASCII code 11 FP0 C10.3 Explanation of High . DT 0 . Boolean Address 10 11 Instruction ST F 77 R 0 (DBIA) 0 10 50 Ladder Diagram Trigger R0 10 F77 DBIA . The converted data is stored in data registers DT54 to DT50 (10 bytes). C16. K 10 . SL1 Converts 32-bit data to ASCII code that expresses the equivalent decimals.

Data is stored in the direction of the last address. The number of bytes specified by S2 exceeds the area specified by D. the “ . S2 specifies the number of bytes used to express the destination data using decimal. The number of bytes specified by S2 exceeds the area specified by D. .FP0 High. Precautions during programming When a positive number is converted. an operation error occurs. The number of bytes of converted result exceeds the number of bytes specified by S2. The number of bytes of converted result exceeds the number of bytes specified by S2.3 Explanation of High . The converted result is stored in the area starting from the 16-bit area specified by D as specified by S2. If the area specified by S2 is more than that required by the converted data. the “+” sign is not converted.level Instructions Description Converts the 32-bit data specified by S1 to ASCII code that expresses the equivalent decimals. The converted result exceeds the area specified by D. The data specified by S2 is recognized as “0”.” sign is also converted to ASCII code (ASCII HEX code: H2D). The converted result exceeds the area specified by D. Flag conditions S Error flag (R9007): Turns on and stays on when: The area specified using the index modifier exceeds the limit. If the number of bytes of ASCII codes following conversion (including the minus sign) is larger than the number of bytes specified by the S2.Number of bytes specified by S2 < Number of bytes specified by S1.159 . .Number of bytes specified by S2 < Number of bytes specified by S1. so the position of the ASCII code may change depending on the size of the data storage area. - S Error flag (R9008): 3 . the ASCII code for “SPACE” (ASCII HEX code: H20) is stored in the extra area. When a negative number is converted. Make sure the sign is taken into consideration when specifying the object of conversion for the S2. Turns on for an instant when: The area specified using the index modifier exceeds the limit. The data specified by S2 is recognized as “0”.level Instructions 3.

level Instructions FP0 Conversion Example The following shows conversion from 32 .level Instructions 3. Example of converting a negative number 32.bit data S1+1 00 BC 61 S1 4E K12345678 F77 (DBIA) instruction execution Converted result 8 D+3 38 37 7 6 D+2 36 35 5 4 D+1 34 33 3 32 2 D 31 1 ASCII code Range specified by S2 (8 bytes) Decimal characters to express ASCII code Decimal characters SPACE + 0 1 2 3 4 5 6 7 8 9 ASCII code H20 H2B H2D H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 3 .3 Explanation of High .bit decimal format data to ASCII codes.160 .High .12345678 Converted result D+4 38 8 37 7 F77 (DBIA) instruction execution D+3 36 6 35 5 D+2 34 4 33 3 D+1 32 2 31 1 2D D 20 (Space) ASCII code Range specified by S2 (10 bytes) Extra byte Example of converting a positive number 32.bit data S1+1 FF 43 9E S1 B2 K .

DT 50 S1 S1 S2 D S2 D Starting 16-bit area for ASCII code (source) 16-bit equivalent constant or 16-bit area to specify number of source data bytes to be converted Lower 16-bit area of 32-bit data for storing converted data (destination) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX N/A A N/A IY N/A N/A N/A Constant K N/A A N/A H N/A A N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Converts ASCII codes (10 bytes) that express decimal digits in data registers DT4. C32. Source ASCII HEX code ASCII character DT4 DT3 DT2 DT1 3 3 3 3 2 2 3 1 1 2 DT0 3 8 8 3 7 7 3 6 6 3 5 5 3 4 4 0 2 0 ASCII codes (10 bytes) specified by S2 SPACE Destination DT51 DT50 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 15 · · 12 11 · · 8 7 · · 4 3 · · 0 · Decimal K12345678 3 . SL1 Converts ASCII code that expresses decimal digits to 32-bit data that expresses the equivalent number. The converted data is stored in data registers DT51 and DT50. C16. DT2.level Instructions 5 Step Availability F78 (DABI) Outline Program example ASCII code → 32-bit data 11 FP0 C10. DT1 and DT0 to 32-bit data when execution condition (trigger) R0 turns on.161 .FP0 High.level Instructions 3. Boolean Address 10 11 Instruction ST F 78 DT K DT R 0 (DABI) 0 10 50 Ladder Diagram Trigger R0 10 F78 DABI . T32. K 10 . DT 0 . DT3. C14.3 Explanation of High .

. The + codes can be omitted. If the area specified by S1 and S2 is more than that required by the data you want to convert. The number of bytes specified by S2 exceeds the area specified by S1. place “0” (ASCII HEX code: H30) or “SPACE” (ASCII HEX code: H20) in the extra bytes. The converted result exceeds the area specified by D. and SPACE) is specified. and SPACE) is specified. . S2 specifies the number of bytes used to express the destination data using decimals..level Instructions 3. Flag conditions S Error flag (R9007): Turns on and stays on when: The area specified using the index modifier exceeds the limit..High . starting from the 16-bit area specified by S1 to 32-bit data as specified by S2. The data specified by S2 is recognized as “0”. The converted result exceeds the 32-bit area. Turns on for an instant when: The area specified using the index modifier exceeds the limit. Precautions during programming The ASCII codes being converted should be stored in the direction of the last address in the specified area. The converted result is stored in the area starting from the 16-bit area specified by D. The converted result exceeds the area specified by D.: H2D) are also converted.level Instructions FP0 Description Converts ASCII code that expresses the decimal digits. The number of bytes specified by S2 exceeds the area specified by S1. ASCII code not corresponding to decimal numbers (0 to 9) or ASCII characters (+.3 Explanation of High . The converted result exceeds the 32-bit area.162 . ASCII codes with signs (such as +: H2B and . ASCII code not corresponding to decimal numbers (0 to 9) or ASCII characters (+. - S Error flag (R9008): 3 . The data specified by S2 is recognized as “0”.

level Instructions 3.163 .12345678 Example of converting an ASCII code indicating a positive number Example 1: ASCII code S1+3 38 7 37 8 S1+2 36 6 35 5 S1+1 34 4 33 3 32 2 S1 31 1 ASCII code Range specified by S2 (8 bytes) Example 2: ASCII code S1+4 38 8 37 7 S1+3 36 6 35 5 S1+2 34 4 33 3 S1+1 32 2 31 1 2B + S1 20 (Space) ASCII code Range specified by S2 (10 bytes) Extra byte F78 (DABI) instruction execution Converted result of example 1 or 2 D+1 00 BC 61 D 4E K12345678 3 .level Instructions Conversion Example The following shows conversion from ASCII codes to decimal data in a 32 . Example of converting an ASCII code indicating a negative number ASCII code S1+4 38 8 37 7 S1+3 36 6 35 5 S1+2 34 4 33 3 S1+1 32 2 31 1 2D S1 20 (Space) ASCII code Range specified by S2 (10 bytes) Extra byte F78 (DABI) instruction execution Converted result D+1 FF 43 9E D B2 K .FP0 High.3 Explanation of High .bit configuration.

3 Explanation of High .164 .level Instructions FP0 ASCII code to express decimal characters ASCII code H20 H2B H2D H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 Decimal characters SPACE + 0 1 2 3 4 5 6 7 8 9 3 .level Instructions 3.High .

FP0 High. T32. C14.3 Explanation of High . If DT10 is 16 using decimal number conversion. DT10 .level Instructions Step Availability F80 (BCD) Outline Program example 16-bit data → 4-digit BCD data 5 FP0 C10. Source [S]: K16 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 DT10 Decimal K16 Conversion (to BCD code) Destination [D]: H16 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 DT20 0 0 1 6 BCD H code 3 . C16.level Instructions 3. the following will be stored in DT20. The converted data is stored in data register DT20. SL1 Converts 16-bit binary data to BCD code the expresses a 4-digit decimal. C32. Boolean Address 10 Instruction ST F 80 DT R 0 (BCD) 10 20 Ladder Diagram Trigger R0 10 F80 BCD .bit binary data (source) 16-bit area for 4-digit BCD data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available Explanation of example Converts the contents of data register DT10 to BCD code that expresses a 4-digit decimal when execution condition (trigger) R0 turns on. DT20 S S D 11 DT D 16-bit equivalent constant or 16-bit area for storing 16.165 .

. Precautions during programming The maximum value of 16 .level Instructions FP0 Description Converts the 16-bit binary data specified by S to BCD code that expresses a 4-digit decimal.166 .16-bit binary data outside the range of K0 (H0) to K9999 (H270F) is converted.16-bit binary data outside the range of K0 (H0) to K9999 (H270F) is converted. .The area specified using the index modifier exceeds the limit. For detailed information about the BCD data section 4. S Error flag (R9008): 3 . The converted data is stored in D.The area specified using the index modifier exceeds the limit.High . Turns on for an instant when: .level Instructions 3.2.bit binary data that can be converted to BCD code is K9999 (H270F).3 Explanation of High . Flag conditions S Error flag (R9007): Turns on and stays on when: .

T32. The converted data is stored in data register DT0.2.level Instructions Step Availability F81 (BIN) Outline Program example 4-digit BCD data → 16-bit data 5 FP0 C10. Boolean Address 10 Instruction ST F 81 DT R 0 (BIN) 10 0 Ladder Diagram Trigger R0 10 F81 BIN . DT10 .167 .FP0 High. C14. The converted data is stored in D. C16. C32.3 Explanation of High . If DT10 is BCD data consisting of H15. the following will be stored in DT0. SL1 Converts BCD code that expresses a 4-digit decimal to 16-bit binary data. DT0 S S D 11 DT D 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data (source) 16-bit area for storing 16-bit binary data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available Explanation of example Converts the contents of data register DT10 to 16-bit binary data when execution condition (trigger) R0 turns on.level Instructions 3. For detailed information about the BCD data section 4. Source [S]: H15 (BCD) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 DT10 BCD H code 0 0 1 5 Conversion (to binary data) Destination [D]: K15 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 DT0 Decimal K15 Description Converts BCD code that expresses a 4-digit decimal specified by S to 16-bit binary data. 3 .

The data specified by S is not BCD data.The data specified by S is not BCD data.level Instructions FP0 Flag conditions S Error flag (R9007): Turns on and stays on when: .level Instructions 3. .168 .High .The area specified using the index modifier exceeds the limit. S Error flag (R9008): 3 .The area specified using the index modifier exceeds the limit. .3 Explanation of High . Turns on for an instant when: .

S Error flag (R9008): 3 . C14.2.The area specified using the index modifier exceeds the limit. For detailed information about the BCD data section 4.level Instructions 3. The converted data is stored in D+1 and D. DT 0 . Turns on for an instant when: . C32. T32. DT 2 S S D (DBCD) 0 2 DT D 32-bit equivalent constant or lower 16-bit area of 32-bit data (source) Lower 16-bit area for 8-digit BCD code (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available Explanation of example Converts the contents of data registers DT1 and DT0 to BCD code that expresses an 8-digit decimal when execution condition (trigger) R20 turns on. SL1 Converts 32-bit binary data to BCD code that expresses an 8-digit decimal. .The area specified using the index modifier exceeds the limit.169 .3 Explanation of High . Precautions during programming The maximum value of binary data that can be converted to BCD code is K99999999 (H5F5E0FF). The converted data is stored in data registers DT3 and DT2. C16.32-bit data specified by S outside the range of K0 (H0) to K99999999 (H5F5E0FF) is converted.32-bit data specified by S outside the range of K0 (H0) to K99999999 (H5F5E0FF) is converted. .level Instructions 5 Step Availability F82 (DBCD) Outline Program example 32-bit data → 8-digit BCD data 7 FP0 C10. Boolean Address 10 11 Instruction ST F 82 DT R 20 Ladder Diagram Trigger R20 10 F82 DBCD. Description Converts the 32-bit data specified by S to BCD code that expresses an 8-digit decimal. Flag conditions S Error flag (R9007): Turns on and stays on when: .FP0 High.

digit decimal of data registers DT1 and DT0 to 32-bit binary data when execution condition (trigger) R10 turns on. . C14.The data specified by S is not BCD data. The converted data is stored in data registers DT3 and DT2.The area specified using the index modifier exceeds the limit. Boolean Address 10 11 Instruction ST F 83 DT R 10 (DBIN) 0 2 Ladder Diagram Trigger R10 10 F83 DBIN. For detailed information about the BCD data section 4.170 . T32. DT 0 . C32. Flag conditions S Error flag (R9007): Turns on and stays on when: . S Error flag (R9008): 3 . Turns on for an instant when: .High .2. DT 2 S S D DT D 8-digit BCD equivalent constant or lower 16-bit area for 8-digit BCD code (source) Lower 16-bit area for 32-bit data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available Explanation of example Converts BCD code that expresses an 8 .The area specified using the index modifier exceeds the limit. C16. Description Converts BCD code that expresses an 8-digit decimal specified by S to 32-bit binary data.The data specified by S is not BCD data. SL1 Converts BCD code that expresses an 8-digit decimal to 32-bit binary data.level Instructions FP0 5 Step Availability F83 (DBIN) Outline Program example 8-digit BCD data → 32-bit data 7 FP0 C10.3 Explanation of High .level Instructions 3. . The converted data is stored in D+1 and D.

C14.segment display) that uses negative logic operation. C16. This instruction is useful for controlling an external device (7 . Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. Destination Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 1 0 1 1 1 1 0 1 0 1 1 1 1 0 1 DT0 Destination R20: on (inversion) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 DT0 Description Inverts each bit (0 or 1) of the 16-bit data specified by D.171 .level Instructions 3. T32. Boolean Address 10 11 Instruction ST F 84 DT R 20 (INV) 0 Ladder Diagram Trigger R20 10 F84 INV . C32. Turns on for an instant when the area specified using the index modifier exceeds the limit.3 Explanation of High .level Instructions 5 Step Availability F84 (INV) Outline Program example 16-bit data invert 3 FP0 C10. 3 .FP0 High. SL1 Inverts all bits in the 16-bit area. DT 0 D D 16-bit area to be inverted Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available Explanation of example Inverts the contents of data register DT0 when execution condition (trigger) R20 turns on.

Destination Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 DT0 Decimal data K3 R20: on Destination Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 DT0 Decimal data K-3 Description Takes two’s complement of 16-bit data specified by D.172 .3 Explanation of High .High . SL1 Takes two’s complement of 16-bit data.level Instructions FP0 5 Step Availability F85 (NEG) Outline Program example 16-bit data two’s complement 3 FP0 C10. The two’s complement is obtained by inverting all bits and adding 1 to the inverted result. C32. DT 0 D D 11 16-bit area for storing original data and its two’s complement Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available Explanation of example Takes two’s complement of data register DT0 when execution condition (trigger) R20 turns on. Boolean Address 10 Instruction ST F 85 DT R 20 (NEG) 0 Ladder Diagram Trigger R20 10 F85 NEG . C14. 3 . T32. This instruction is useful for changing the sign of 16-bit data from positive to negative or from negative to positive. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.level Instructions 3. C16. Turns on for an instant when the area specified using the index modifier exceeds the limit.

3 Explanation of High . SL1 Takes two’s complement of 32-bit data Boolean Address 10 11 Instruction ST F 86 DT R 20 Ladder Diagram Trigger R20 10 F86 DNEG . C14.level Instructions 3. The two’s complement is obtained by inverting all bits and adding 1 to the inverted result.173 . Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.FP0 High. DT 0 D D (DNEG) 0 Lower 16-bit area of 32-bit data for storing original data and its two’s complement Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available Explanation of example Takes two’s complement of data registers DT1 and DT0 when execution condition (trigger) R20 turns on. T32. C32. Destination DT1 DT0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 Decimal data K-3 Higher 16-bit area Lower 16-bit area R20: on Destination DT1 DT0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 Decimal data K3 Higher 16-bit area Lower 16-bit area Description Takes two’s complement of 32-bit data specified by D. C16. 3 . This instruction is useful for changing the sign of 32-bit data from positive to negative or from negative to positive.level Instructions 5 Step Availability F86 (DNEG) Outline Program example 32-bit data two’s complement 3 FP0 C10. Turns on for an instant when the area specified using the index modifier exceeds the limit.

it will be K1 when the instruction is executed.The area specified using the index modifier exceeds the limit. SL1 Outline Takes absolute value of signed 16-bit data.” Turns on for an instant when 16-bit data is the negative value “range: K-1 to K-32767 (HFFFF to H8001).” Turns on for an instant when: . Flag conditions S Error flag (R9007): Turns on and stays on when: .High .The 16-bit data is the negative minimum value “K-32768 (H8000).) changes. .level Instructions 3.1.The 16-bit data is the negative minimum value “K-32768 (H8000). Description Takes absolute value of signed 16-bit data specified by D.The area specified using the index modifier exceeds the limit. This is effective for processing data in which the polarity (+ or . C14. DT 0 D D 16-bit area for storing original data and its absolute value Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available Explanation of example Takes absolute value of data register DT0 when execution condition (trigger) R20 turns on.3 Explanation of High . The absolute value of the signed 16-bit data is stored in D. C16.level Instructions FP0 5 Step Availability F87 (ABS) 16-bit data absolute 3 FP0 C10.” S Error flag (R9008): S Carry flag (R9009): 3 . regardless of whether the value of DT0 is K1 or K . For instance. . T32.174 . Boolean Address 10 11 Instruction ST F 87 DT R 20 (ABS) 0 Program example Ladder Diagram Trigger R20 10 F87 ABS . C32.

Boolean Address 10 11 Instruction ST F 88 DT R 20 Ladder Diagram Trigger R20 10 F88 DABS .The area specified using the index modifier exceeds the limit. T32.level Instructions 5 Step Availability F88 (DABS) Outline Program example 32-bit data absolute 3 FP0 C10. .” S Error flag (R9008): S Carry flag (R9009): 3 .) changes. This is effective for processing data in which the polarity (+ or .175 .The 32-bit data is the negative minimum value “K-2147483648 (H80000000). C16.3 Explanation of High . C32.” Turns on for an instant when: . Flag conditions S Error flag (R9007): Turns on and stays on when: .The 32-bit data is the negative minimum value “K-2147483648 (H80000000).FP0 High. . DT 0 D (DABS) 0 D Lower 16-bit area of 32-bit data for storing original data and its absolute value Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available Explanation of example Takes absolute value of data registers DT1 and DT0 when execution condition (trigger) R20 turns on.The area specified using the index modifier exceeds the limit.level Instructions 3. Description Takes the absolute value of signed 32-bit data specified by D.” Turns on for an instant when 32-bit data is negative value “range K-1 to K-2147483647 (HFFFFFFFF to H80000001). The absolute value of DT1 and DT0 is stored in data registers DT1 and DT0. The absolute value of the 32-bit data is stored in D+1 and D. SL1 Takes absolute value of signed 32-bit data. C14.

level Instructions 3. DT 0 D 11 D 16-bit area for storing original 16-bit binary data Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY N/A Constant K N/A H N/A Index modifier A A: Available N/A: Not Available Explanation of example Copies the sign bit (bit position 15) of data register DT0 to all the bits of data register DT1 when execution condition (trigger) R20 turns on. SL1 Copies the sign bit of the specified 16-bit data to all the bits of the higher 16-bit area (extended 16-bit area).High . C14.176 . the data will be as follows. If K . Boolean Address 10 Instruction ST F 89 DT R 20 (EXT) 0 Ladder Diagram Trigger R20 10 F89 EXT . Sign bit (0: positive. C32.2 is stored in DT0.3 Explanation of High . C16. 1: negative) DT0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 Decimal data K-2 16-bit data R20: on DT1 DT0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary data 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 Decimal data K-2 Higher 16-bit area (extended 16-bit area) 32-bit data Lower 16-bit area 3 .level Instructions FP0 5 Step Availability F89 (EXT) Outline Program example 16-bit data sign extension 3 FP0 C10. T32.

FP0 High. 3 . Double word data with D as the first data can be used as the operand of 32 .bit data specified by D is 0. If the sign bit is 1. If the sign bit (bit position 15) of the 16 .level Instructions Description 16 .3 Explanation of High . Turns on for an instant when the area specified using the index modifier exceeds the limit.bit data is converted to 32 . all 16 bits will be set to 1.bit data.bit operation instructions following execution of the F89 (EXT) instruction.177 . Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. without signs and values being changed.level Instructions 3. all 16 bits of the next area of D will be set to 0.

3 . DT20 The bits except bit position 7 become 0.High . Boolean Address 10 11 Instruction ST F 90 DT R 20 Ladder Diagram Trigger R20 10 F90 DECO. DT10. H404. The decoded result is stored in the area starting from 16-bit area specified by D. When n: H404 Bit position 4 Source Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 4 bits from bit position 4 to 7 of DT10 are decoded.level Instructions Step Availability FP0 F90 (DECO) Outline Program example Decode 7 FP0 C10. Description Decodes the contents of 16-bit data specified by S according to the contents of n.178 . SL1 Decodes the specified data. The decoded result is stored in data register DT20. C14.3 Explanation of High . C16. 0 1 0 0 0 1 1 0 0 1 1 1 1 0 0 1 [Binary: 0111 (decimal: K7)] DT10 4 bits Destination R20: on Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 The decoded data “1 (on)” is stored in bit position 7 of 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 DT20. C32. T32. The length of the area required to store decoding results changes depending on the length of the data being decoded. DT20 S S n D (DECO) 10 404 20 H DT n D 16-bit equivalent constant or 16-bit area to be decoded (source) 16-bit area equivalent constant or 16-bit area to specify starting bit position and number of bits to be decoded Starting 16-bit area for storing decoded data (destination) Operands Operand S n D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A A IY A A A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available Explanation of example Decodes data register DT10 according to the contents of n “H404” when execution condition (trigger) R20 turns on.level Instructions 3.

” mark are invalid.level Instructions 3.3 Explanation of High .179 .FP0 High. 3 . Starting bit position to be decoded (set range: H0 to HF) Set value H0 H1 H2 H3 H4 H5 H6 H7 H8 H9 HA HB HC HD HE HF Starting bit position 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Number of bits to be decoded (set range: H1 to H8) Set value Number of bits 1 2 3 4 5 6 7 8 H1 H2 H3 H4 H5 H6 H7 H8 Relationship between number of bits and occupied data area for decoded result Number of bits to be decoded 1 2 3 4 5 6 7 8 Data area required for the result 1-word 1-word 1-word 1-word 2-word 4-word 8-word 16-word Valid bits in the area for the result 2-bit* 4-bit* 8-bit* 16-bit 32-bit 64-bit 128-bit 256-bit * Invalid bits in the data area required for the result are set to “0”.level Instructions How to specify control data “n” n specifies the starting bit position and the number of bits to be decoded using hexadecimal data. 16-bit data Bit position 15 · n · 12 11 · · 8 7 · · 4 3 · · 0 ———— 0 1 0 0 ———— 0 1 0 0 The bits of “ .

Turns on for an instant when: . 16-bit data for the decoded result is shown below.The area specified using the index modifier exceeds the limit. Decoding conditions (n) Starting bit position: H0 (bit position 0) Number of bits to be decoded: H4 (4 bits) Data to be decoded [Binary (decimal)] 0000 (K0) 0001 (K1) 0010 (K2) 0011 (K3) 0100 (K4) 0101 (K5) 0110 (K6) 0111 (K7) 1000 (K8) 1001 (K9) 1010 (K10) 1011 (K11) 1100 (K12) 1101 (K13) 1110 (K14) 1111 (K15) Decoded result 15 S 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 S 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 11 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 S 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 S 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 S 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 S 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 S 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 S 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Flag conditions S Error flag (R9007): Turns on and stays on when: .High . .The area specified using the index modifier exceeds the limit.3 Explanation of High . . .The sum of the number of bits to be decoded and the starting bit position to be decoded is outside the range of 1 to 16.The number of bits to be decoded is outside the range of 1 to 8.level Instructions 3.The last data area for the decoded result exceeds the limit. .The sum of the number of bits to be decoded and the starting bit position to be decoded is outside the range of 1 to 16.level Instructions FP0 Decoded example When decoding 4-bit data.180 . .The last data area for the decoded result exceeds the limit. . S Error flag (R9008): 3 .The number of bits to be decoded is outside the range of 1 to 8.

level Instructions 3. the following would be entered. C16. The converted data is stored in word internal relays DT11 and DT10. DT10 S S D D DT R 0 Ladder Diagram (SEGT) 0 10 10 16-bit equivalent constant or 16-bit area to be converted to the 7-segment indication (source) Starting 16-bit area for storing 4-digit data for 7-segment indication (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A N/A Constant K A N/A H A N/A Index modifier A A A: Available N/A: Not Available Explanation of example Converts the contents of data register DT0 to 4-digit data for 7-segment indication when execution condition (trigger) R0 turns on. Boolean Address 10 Trigger R0 11 Instruction ST F 91 DT F91 SEGT .FP0 High. Source Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 DT0 Hexadecimal A B C D Destination Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT11 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 0 7-segment A B indication Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT10 0 0 1 1 1 0 0 1 0 1 0 1 1 1 1 0 7-segment C D indication 3 . to display ”ABCD”. SL1 Converts 16-bit data to 4-digit data for 7-segment indication. C32.181 .3 Explanation of High . T32. For example. DT 0 .level Instructions Step Availability F91(SEGT) Outline Program example 16-bit data 7-segment decode 5 FP0 C10. C14.

level Instructions 3. .The last data area for the converted result exceeds the limit.182 . S Error flag (R9008): 3 . and the data of the 7 .The area specified using the index modifier exceeds the limit.The last data area for the converted result exceeds the limit. Turns on for an instant when: .The area specified using the index modifier exceeds the limit. One digit data to be converted Hexadecimal H0 H1 H2 H3 H4 H5 H6 H7 H8 H9 HA HB HC HD HE HF Binary 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 8-bit data for 7-segment indication g f e d c b a 1 1 1 1 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 0 1 MSB LSB a b c d e f g 7-segment indication Organization of 7-segment 7 segment indication 0 0 1 1 0 0 0 0 0 1 0 1 0 1 0 0 0 1 1 0 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 1 a f e d g b c Flag conditions S Error flag (R9007): Turns on and stays on when: . . The relationship between the displayed contents and the contents specified for S. The converted data is stored in the area starting from the 16-bit area specified by D.High .3 Explanation of High .segment display is shown below.level Instructions FP0 Description Converts the 16-bit equivalent constant or 16-bit data specified by S to 4-digit data for 7-segment indication.

Encoded result:K8 The encoded result K8 (decimal) is stored in DT1. Boolean Address 10 11 Instruction ST F 92 DT R 0 Ladder Diagram Trigger R0 10 F92 ENCO. Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 [S] DT11 DT10 Destination [D] Starting bit position Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 Decimal K8 Bit position 8 to 15 are filled with 0. C14.level Instructions Step Availability F92 (ENCO) Outline Program example Encode 7 FP0 C10.183 . C32. DT10.3 Explanation of High . T32.level Instructions 3.FP0 High. C16. SL1 Encodes the specified data. When DT0: H0005 Number of bits to be encoded: 25 = 32 bits Starting bit position to be encoded for destination data: bit position 0 Source 32 bits specified by H5 The 8th bit of 32-bit data is in the on state. 3 . The encoded result is stored in 8 bits of data register DT1 starting from bit position 0. DT 1 S S n D (ENCO) 10 0 1 DT DT n D Starting 16-bit area to be encoded (source) 16-bit equivalent constant or 16-bit area to specify starting bit position and number of bits to be encoded 16-bit area for storing encoded data (destination) Operands Operand S n D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX N/A A A IY N/A A A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available Explanation of example Encodes contens of data register DT11 and DT10 according to the contents of DT0 when execution condition (trigger) R0 turns on. DT 0 .

level Instructions FP0 Description Encodes the contents of data specified by S according to the contents of n. Invalid bits in the specified area for the result are set to 0. The encoded result is stored in the 16-bit area specified by D starting from the specified bit position. the uppermost bit is effective.3 Explanation of High . The contents of the 2nL segment at the beginning of the area specified by the S are encoded. Number of bits to be encoded (set range: H1 to H8) Starting bit position of destination data to be encoded (set range: H0 to HF) Set value H0 H1 H2 H3 H4 H5 H6 H7 H8 H9 HA HB HC HD HE HF Starting bit position 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Set value H1 H2 H3 H4 H5 H6 H7 H8 Number of bits 2 4 8 (1 byte) 16 (1 word) 32 (2 words) 64 (4 words) 128 (8 words) 256 (16 words) 3 .High . in the eight bits starting from the bit specified as the nH bit. The encoded results are stored as decimal data. If more than one bit is on in a segment being decoded. 16-bit data Bit position 15 · n · 12 11 · · 8 7 · · 4 3 · · 0 ———— 0 0 0 0 ———— 0 1 0 1 The bits of “ .level Instructions 3. How to specify control data “n” n specifies the starting bit position of destination data and the number of bits to be decoded using hexadecimal data.184 .” mark are invalid.

level Instructions 3. .The area specified using the index modifier exceeds the limit.level Instructions Encoded example When encoding 16-bit data (nL=4). .The area specified using the index modifier exceeds the limit.The sum of the number of bits to be decoded and the starting bit position to be decoded is outside the range of 1 to 16. Data to be encoded 15 S 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 S 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 11 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 S 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 S 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 S 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 S 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 S 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 S 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Encoded result [Binary (decimal)] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 (K0) (K1) (K2) (K3) (K4) (K5) (K6) (K7) (K8) (K9) (K10) (K11) (K12) (K13) (K14) (K15) Flag conditions S Error flag (R9007): Turns on and stays on when: .The sum of the number of bits to be encoded and the starting bit position to be encoded is outside the range of 1 to 16. the encoded results are shown below. S Error flag (R9008): 3 . .3 Explanation of High .The data to be encoded is 0. . . .FP0 High.The number of bits to be encoded is outside the range of 1 to 8.The data to be encoded is 0.185 .The number of bits to be decoded is outside the range of 1 to 8. Turns on for an instant when: .

C32.level Instructions 3.level Instructions Step Availability FP0 F93 (UNIT) Outline Program example 16-bit data combine 7 FP0 C10. combines the extracted data. Bit position 15 · DT0 DT1 DT2 · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 Bit position 15 · DT100 · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 When the n < K4.186 . 3 .3 Explanation of High . Boolean Address 10 11 Instruction ST F 93 DT R 0 (UNIT) 0 3 100 Ladder Diagram Trigger R0 10 F93 UNIT. DT 100 S S n D K DT n D Starting 16-bit area to be extracted (source) 16-bit equivalent constant or 16-bit area to specify number of data to be extracted 16-bit area for storing combined data (destination) Operands Operand S n D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX N/A A A IY N/A A A Constant K N/A A N/A H N/A A N/A Index modifier A A A A: Available N/A: Not Available Explanation of example Extracts lower 4 bits of data registers DT2 to DT0. T32. SL1 Extracts the lower 4 bits (bit positions 0 to 3) of the specified 16-bit areas and combines them into one word. and stores it in data register DT100 when execution condition (trigger) R0 turns on.High . C14. C16. DT 0. K 3 . “0” is set to bit position 12 to 15.

FP0 High. this instruction is not executed. The result is stored in the 16-bit area specified by D. S Error flag (R9008): 3 . . “0” is automatically set to positions at D where the corresponding 16-bit source data does not exist. .The area specified using the index modifier exceeds the limit. Digit 2 Digit 3 Digit 4 Destination Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Digit 4 Digit 3 Digit 2 Digit 1 D Flag conditions S Error flag (R9007): Turns on and stays on when: .level Instructions Description Extracts the lower 4 bits (bit positions 0 to 3) of each specified area. n specifies the number of data areas to be extracted (range of n: K0 to K4). Source Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 S Digit 1 n S+1 S+2 S+3 Bit positions 4 to 15 of each data area are invalid. When K0 is specified for n.3 Explanation of High .level Instructions 3. When n < K4.The area specified using the index modifier exceeds the limit.The number of data areas to be combined “n” is K5 or more.187 . starting from the 16-bit area specified by S and combines the extracted data into one word.The number of data areas to be combined “n” is K5 or more. Turns on for an instant when: .

C14. DT 0 S S n D DT K DT n D 16-bit equivalent constant or 16-bit area to be divided (source) 16-bit equivalent constant or 16-bit area to specify number of data to be divided Starting 16-bit area for storing divided data (destination) Operands Operand S n D A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A A N/A IY A A N/A Constant K A A N/A H A A N/A Index modifier A A A A: Available N/A: Not Available Explanation of example Divides the 16-bit data of data register DT100 into 4-bit units and the divided data is stored in the lower 4 bits (bit positions 0 to 3) of data registers DT0 to DT3 when execution condition (trigger) R0 turns on.188 . K 4 . DT100. Bit position 15 · DT100 · 12 11 · · 8 7 · · 4 3 · · 0 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 Bit position 15 · DT0 DT1 DT2 DT3 · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 3 . C32. Boolean Address 10 11 Instruction ST F 94 R 0 (DIST) 100 4 0 Ladder Diagram Trigger R0 10 F94 DIST. C16.3 Explanation of High .level Instructions Step Availability FP0 F94 (DIST) Outline Program example 16-bit data distribute 7 FP0 C10. T32.High . SL1 Divides the specified 16-bit data into four 4-bit units and distributes the divided data into the lower 4 bits of the specified 16-bit areas.level Instructions 3.

· 12 11 · · 8 7 · · 4 3 · · 0 Digit 1 Digit 2 Digit 3 Digit 4 Flag conditions S Error flag (R9007): Turns on and stays on when: .Transferring address specified by D to n data.3 Explanation of High .Transferring address specified by D to n data. this instruction is not executed. S Error flag (R9008): 3 . and when area is exceeded. Source Bit position 15 · S · 12 11 · Digit 4 Digit 3 n · 8 7 · · 4 3 · · 0 Digit 2 Digit 1 Destination Bit position 15 · D D+1 D+2 D+3 Bit positions 4 to 15 are filled with 0s. . and when area is exceeded.189 .(range of n: K0 to K4) When K0 is specified for n. .level Instructions 3.The number n is 5 or more. .The area specified using the index modifier exceeds the limit. n specifies the number of data divisions.level Instructions Description Divides the 16-bit data specified by S into 4-bit units and distributes the divided data into the lower 4 bits (bit positions 0 to 3) of 16-bit areas starting from D. .The area specified using the index modifier exceeds the limit.The number n is 5 or more.FP0 High. Turns on for an instant when: .

SL1 Converts character constants to ASCII code. C16. T32. C14. Character constant [S] Character constants M ABC1230 DEF R20: on Data register [D] DT7 DT6 DT5 DT4 DT3 DT2 ASCII HEX code 2 0 4 6 4 5 4 4 2 0 3 0 3 3 3 2 3 1 4 3 4 2 4 1 ASCII character SPACE F E D 0 3 2 1 C B A When the number of character constants specified by S is less than 12.level Instructions 3. the ASCII code H20 (SPACE) is stored in the extra destination area. this will be blank. In actuality.High . Description Converts the character constants specified by S to ASCII code.level Instructions Step Availability FP0 F95 (ASC) Outline Program example Character → ASCII code 15 FP0 C10. M ABC1230_DEF. 12 letters) (source) Starting 16-bit area for storing 6-word ASCII code (destination) Operands Operand S D Relay WX WY WR N/A N/A N/A N/A A A Timer/Counter Register SV N/A A EV N/A A DT N/A A Index register IX IY K Constant H M A Index modifier N/A N/A A: Available N/A: Not Available N/A N/A N/A N/A A N/A N/A N/A N/A Explanation of example Converts the character constants “ABC1230_DEF” to ASCII code when execution condition (trigger) R20 turns on. The ASCII code is stored in data registers DT7 to DT2. 4 Boolean Address 10 11 Instruction ST F 95 R 20 (ASC) Ladder Diagram Trigger R20 10 F95 ASC. 3 . DT 2 S D M ABC1230_DEF DT 2 “_” indicates a space. C32.190 . The converted ASCII code is stored in 6 words starting from the 16-bit area specified by D.3 Explanation of High . S D Character constants (max.

level Instructions 3. DT 2 R20: on DT2: DT3: DT4: DT5: DT6: DT7: H20 H20 H20 H20 H20 H20 ( ( ( ( ( ( ) ) ) ) ) ) H41 H20 H20 H20 H20 H20 ( ( ( ( ( (A) ) ) ) ) ) [ [ [ [ [ [ [ [ [ [ [ Higher byte S: M Lower byte A S: M A ] ] ] ] ] ] ] ] ] ] ] R20 F95 ASC.191 .FP0 High. MA . M 5 spaces A .level Instructions Precautions during programming The character constant M can be input with the programming tool software.3 Explanation of High . DT 2 DT2: DT3: DT4: DT5: DT6: DT7: [ [ [ H20 H20 H20 H20 H41 ( ( ( ( ) ) ) ) H20 H20 H20 H20 H20 ( ( ( ( ( ) ) ) ) ) DT3: DT4: DT5: DT6: DT7: H20 H20 H20 H20 H20 ( ( ( ( ( ) ) ) ) ) H20 H20 H41 H20 H20 ( ( [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ (A) [ [ Higher byte Lower byte Higher byte [ ] ] ] ] ] ] ] ] ] ] ] 11 spaces R20 6 spaces F95 ASC. DT 2 R20: on H20 ( ) H20 ( ) DT2: H20 ( ) R20: on H20 ( ) ) ) (A) ( ( ) ) Lower byte 3 . Convertion example of one character constant “A” S: MA ] ] ] ] ] ] ] ] ] ] ] 11 spaces R20 F95 ASC. M A .

Turns on for an instant when the last area for ASCII code exceeds the limit (6 words: six 16-bit areas). < = > ? 4 @ A B C D E F G H I J K L M N O 5 P Q R S T U V W X Y Z [ \ ] ^ _ 6 7 p NUL DLE SOH DC1 STX DC2 ETX DC3 EOT DC4 ENQ NAK ACK SYN BEL ETB BS CAN HT EM ! ” # $ % & ’ ( ) * + .level Instructions 3. . / a b c d e f g h i j k l m n o q r s t u v w x y z {  } ~ DEL LF SUB VT ESC FF CR SO SI FS GS RS US 3 .3 Explanation of High .level Instructions FP0 Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the last area for ASCII code exceeds the limit (6 words: six 16-bit areas).192 . ASCII code b7 b6 b5 b4 b7 b6 b5 b4 b3 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 b2 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 b1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 b0 0 1 0 1 0 Least significant digit 1 0 1 0 1 0 1 0 1 0 1 ASCII HEX code 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Most significant digit 0 1 2 SPACE 3 0 1 2 3 4 5 6 7 8 9 : .High .

C16. DT 0 .3 Explanation of High .193 . C32. T32.level Instructions 3. DT100 .FP0 High. SL1 Searches for a specified value in a block of 16-bit areas. C14. DT 20 S1 S1 S2 S3 S2 S3 16-bit equivalent constant or 16-bit area to store the searched value Starting 16-bit area of the block Ending 16-bit area of the block Operands Operand S1 S2 S3 A A N/A Relay WX WY WR A A A A A A Timer/Counter Register SV A A A EV A A A DT A A A Index register IX A N/A N/A IY A N/A N/A Constant K A N/A N/A H A N/A N/A Index modifier A A A A: Available N/A: Not Available 3 .level Instructions Step Availability F96 (SRC) Outline Program example Table data search 7 FP0 C10. Boolean Address 10 11 Instruction ST F 96 DT DT DT R 10 (SRC) 100 0 20 Ladder Diagram Trigger R10 10 F96 SRC .

Description Searches for values matching S1 in the block of 16-bit areas specified by S2 (starting area) through S3 (ending area). and DT20 match the search data. .level Instructions 3.S2 > S3. the search results are stored as follows. For example.Be the same type of operand. .3 Explanation of High . DT19.The position of the first matching data item. Flag conditions S Error flag (R9007): Turns on and stays on when: .The number of data items that match S1 is stored in special data register DT9037. Starting area S2 and ending area S3 should: . counting from the starting 16-bit area S2.S2 > S3. .level Instructions FP0 Explanation of example Searches for the value given in data register DT100 in the block of data register DT0 through DT20 when execution condition (trigger) R10 turns on.Satisfy S2 ≦ S3. the following occurs. is stored in special data register DT9038. . Searched data DT100: 1 2 3 4 [S1] Block of 16.194 . “H1234” would be written to DT100.If the number of registers matching the search data = 3 “K3” is stored in DT9037. When the search operation is performed.High . .The area specified using the index modifier exceeds the limit. S Error flag (R9008): 3 .If the position of the first matching data (the relative position number) = 2 “K2” is stored in DT9038. Data is searched from S2 to S3.bit areas DT0: DT1: DT2: DT3: 1 2 1 1 0 [S2] 1 2 F F 1 1 2 3 4 2 7 F F F 3 Searching DT19: 1 2 3 4 19 DT20: 1 2 3 4 20 [S3] Relative position number If DT2.The area specified using the index modifier exceeds the limit. to search the area of the value called H1234. . Turns on for an instant when: . .

T32.3 Explanation of High . The data in bit position 3 is transferred to special internal relay R9009 (carry flag). K 4 D D n K n 16-bit area to be shifted to the right 16-bit equivalent constant or 16-bit area (specifies number of shifted bits) Operands Operand D n N/A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A A H N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Shifts 4 bits in data register DT0 to the right when execution condition (trigger) R0 turns on.level Instructions 3. DT 0 . Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 1 DT0 R0: on Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 · 0 0 0 0 1 0 1 0 0 1 1 0 1 1 0 0 DT0 The data in bit position 3 is transferred to R9009 (carry flag).195 . C16. C32.FP0 High.level Instructions Step Availability F100 (SHR) Outline Program example Right shift of 16-bit data in bit units 5 FP0 C10. In this case. Ladder Diagram Boolean Address 10 11 Instruction ST F100 DT R 0 (SHR) 0 4 Trigger R0 10 F100 SHR . SL1 Shifts a specified number of bits to the right in bit units. 3 . the higher 4 bits of DT0 are filled with 0s. C14.

The n is effective only for the lower 8 bits of the 16 . 15 · · 1211 · · 8 7 · · 4 3 · · 0 n ———— ———— 0 0 0 0 0 0 0 0 K0 to K255 (H00 to HFF) Upper 8 bits are invalid Flag conditions S Error flag (R9007): S Error flag (R9008): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit.level Instructions FP0 Description Shifts n bits of the 16-bit data area specified by D to the right (to the lower bit position). The amount of the shift can be specified within a range of 1 bit to 255 bits. . . Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 D The higher n bits of D are filled with 0s. Turns on for an instant when the area specified using the index modifier exceeds the limit.The data in the n th bit is transferred to special internal relay R9009 (carry flag). Turns on for an instant when the content of bit transferred to R9009 (n th bit) is recognized as 1.High .196 . When n bits are shifted to the right.bit data. 3 .The higher n bits of the 16-bit data area are filled with 0s. n Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 D The data in the n th bit is transferred to R9009 (carry flag).level Instructions 3.3 Explanation of High .

T32. C32.level Instructions 3.level Instructions Step Availability F101(SHL) Outline Program example Left shift of 16-bit data in bit units 5 FP0 C10. D D n K4 n K 16-bit area to be shifted to the left 16-bit equivalent constant or 16-bit area (specifies number of shifted bits) Operands Operand D n N/A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A A H N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Shifts 4 bits in data register DT0 to the left when execution condition (trigger) R0 turns on. 3 .3 Explanation of High . DT0 · 0 1 1 0 1 1 0 0 1 0 1 1 0 0 0 0 In this case. Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 1 The data in bit position 12 is transferred to R9009 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 (carry flag).197 . SL1 Shifts a specified number of bits to the left in bit units. C16. The data in bit position 12 is transferred to special internal relay R9009 (carry flag).FP0 High. the lower 4 bits of DT0 are filled with 0s. DT 0 . Ladder Diagram Boolean Address 10 11 Instruction ST F101 DT R 0 (SHL) 0 4 Trigger R0 10 F101 SHL . C14.

3 .The n bits starting from bit position 0 are filled with 0s.level Instructions FP0 Description Shifts n bits of the 16-bit area specified by D to the left (to the higher bit position).The data in the n th bit is transferred to special internal relay R9009 (carry flag).High . The amount of the shift can be specified within a range of 1 bit to 255 bits.level Instructions 3.bit data. . 15 · · 1211 · · 8 7 · · 4 3 · · 0 n ———— ———— 0 0 0 0 0 0 0 0 K0 to K255 (H00 to HFF) Upper 8 bits are invalid Flag conditions S Error flag (R9007): S Error flag (R9008): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit.198 . The n is effective only for the lower 8 bits of the 16 . n Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 D The data in the n th bit is transferred to R9009 (carry flag). When the n bits are shifted to the left. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the content of bit transferred to R9009 (n th bit) is recognized as 1. .3 Explanation of High . Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 D n bits starting from bit position 0 are filled with 0s.

DT 0 D D 16-bit area to be shifted to the right Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example Shifts one hexadecimal digit (4 bits) in data register DT0 to the right when execution condition (trigger) R0 turns on. T32. Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 Hexadecimal R0: on Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 1 0 0 1 1 0 0 1 1 0 0 1 Binary DT0 (H999) Hexadecimal 9 0 9 9 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 9 (H9) 9 9 9 9 (H9999) DT0 Binary DT9014 Hexadecimal 3 .199 . SL1 Shifts one hexadecimal digit (4 bits) of the specified 16-bit data to the right. C14.level Instructions 3.3 Explanation of High .level Instructions Step Availability F105 (BSR) Outline Program example Right shift of one hexadecimal digit (4 bits) of 16-bit data 3 FP0 C10. C16. C32.FP0 High. Ladder Diagram Boolean Address 10 11 Instruction ST F105 DT R 0 (BSR) 0 Trigger R0 10 F105 BSR . The data in hexadecimal digit position 1 (bit positions 0 to 3) is shifted out and transferred to the lower digit position (bit positions 0 to 3) of special data register DT9014.

3 .High .200 . Turns on for an instant when the area specified using the index modifier exceeds the limit.3 Explanation of High .level Instructions 3. .The data in hexadecimal digit position 1 (bit positions 0 to 3) of the 16 . .The hexadecimal digit 4 (bit positions 12 to 15) of the 16-bit area specified by D becomes 0. D Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Hexadecimal Digit 4 Digit 3 Digit 2 Digit 1 D Hexadecimal Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 Digit 4 Digit 3 Digit 2 This hexadecimal digit position becomes 0.bit area specified by D is shifted out and is transferred to the lower digit (bit positions 0 to 3) of special data register DT9014. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT9014 Hexadecimal 0 0 0 Digit 1 When one hexadecimal digit (4 bits) is shifted to the right.level Instructions FP0 Description Shifts one hexadecimal digit (4 bits) of the 16-bit area specified by D to the right (to the lower digit position).

FP0 High. SL1 Shifts one hexadecimal digit (4 bits) of the specified 16-bit data to the left. Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 DT0 Hexadecimal 8 1 0 0 (H8100) R0: on Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 Binary DT0 Hexadecimal 1 0 0 0 (H1000) Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Binary 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 DT9014 Hexadecimal 0 0 0 8 (H8) 3 .level Instructions Step Availability F106 (BSL) Outline Program example Left shift of one hexadecimal digit (4 bits) of 16-bit data 3 FP0 C10. C32. C14. DT 0 D D 16-bit area to be shifted to the left Operands Operand D N/A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K N/A H N/A A A: Available N/A: Not Available Index modifier Explanation of example Shifts one hexadecimal digit (4 bits) in data register DT0 to the left when execution condition (trigger) R0 turns on. Ladder Diagram Boolean Address 10 11 Instruction ST F106 DT R 0 (BSL) 0 Trigger R0 10 F106 BSL. T32.3 Explanation of High . C16.201 .The data in hexadecimal digit position 4 (bit positions 12 to 15) is shifted out and transferred to the lower digit position (bit positions 0 to 3) of special data register DT9014.level Instructions 3.

3 Explanation of High . .level Instructions FP0 Description Shifts one hexadecimal digit (4 bits) of the 16-bit area specified by D to the left (to the higher digit position). D Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Hexadecimal Digit 4 Digit 3 Digit 2 Digit 1 D Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 Digit 2 Digit 1 Hexadecimal Digit 3 This hexadecimal digit position becomes 0.202 . .level Instructions 3. Turns on for an instant when the area specified using the index modifier exceeds the limit. 3 .The data in hexadecimal digit position 4 (bit positions 12 to 15) of the 16 .High . Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 DT9014 Hexadecimal 0 0 0 Digit 4 When one hexadecimal digit (4 bits) is shifted to the left.bit data specified by D is shifted out and is transferred to the lower digit (bit positions 0 to 3) of special data register DT9014.The hexadecimal digit position 1 (bit positions 0 to 3) of the 16-bit data specified by D becomes 0. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.

Ladder Diagram Boolean Address 10 11 Instruction ST F110 DT R 0 Trigger R0 10 F110 WSHR . DT 0 . Specified data range (3 words) Data register Hexadecimal DT2 0 2 1 2 DT1 0 0 3 0 DT0 0 2 3 2 The data in DT0 is shifted out.3 Explanation of High . C16. SL1 Shifts one word (16 bits) of a specified 16-bit data range to the right. Data register Hexadecimal DT2 0 0 0 0 DT1 0 2 1 2 DT0 0 0 3 0 3 . C32.level Instructions Step Availability F110 (WSHR) Outline Program example Right shift of one word (16 bits) of 16-bit data range 5 FP0 C10.FP0 High. T32. DT 2 D1 D1 D2 (WSHR) 0 2 DT D2 Starting 16-bit area Ending 16-bit area Operands Operand D1 D2 N/A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX N/A N/A IY N/A N/A Constant K N/A N/A H N/A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Shifts one word (16 bits) of the data range (3 words) from DT0 through DT2 to the right when execution condition (trigger) R0 turns on.203 .level Instructions 3. C14.

Flag conditions S Error flag (R9007): Turns on and stays on when: .High . .The area specified using the index modifier exceeds the limit.The starting word (D1) is shifted out.204 .D1 > D2. . .The area specified using the index modifier exceeds the limit. S Error flag (R9008): 3 . Turns on for an instant when: . .The same type of operand. When one word (16 bits) is shifted to the right.level Instructions FP0 Description Shifts one word (16 bits) of the data range specified by D1 (starting) and D2 (ending) to the right (to the lower word address).The data in the ending word (D2) becomes 0. . D2 0 The data in the ending word becomes 0. D1 Starting area D1 and ending area D2 should be: .3 Explanation of High .D1 > D2.D1 ≦ D2. Specified data range D2 D1 The starting word is shifted out.level Instructions 3.

FP0 High. Data register Hexadecimal DT2 0 0 3 0 DT1 0 2 3 2 DT0 0 0 0 0 DT2 0 2 1 2 DT1 0 0 3 0 DT0 0 2 3 2 3 . T32. C32.205 .level Instructions 3.3 Explanation of High . C14. SL1 Shifts one word (16 bits) of a specified 16-bit data range to the left. C16. DT 0 . Specified data range (3 words) Data register Hexadecimal The data in DT2 is shifted out. Ladder Diagram Boolean Address 10 11 Instruction ST F111 DT R 0 Trigger R0 10 F111 WSHL . DT 2 D1 D1 D2 (WSHL) 0 2 DT D2 Starting 16-bit area Ending 16-bit area Operands Operand D1 D2 N/A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX N/A N/A IY N/A N/A Constant K N/A N/A H N/A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Shifts one word (16 bits) of the data range (3 words) from DT0 through DT2 to the left when execution condition (trigger) R0 turns on.level Instructions Step Availability F111(WSHL) Outline Program example Left shift of one word (16 bits) of 16-bit data range 5 FP0 C10.

The same type of operand.The ending word (D2) is shifted out.The data in the starting word (D1) becomes 0. D2 D1 0 The data in the starting word becomes 0.level Instructions FP0 Description Shifts one word (16 bits) of the data range specified by D1 (starting) and D2 (ending) to the left (to the higher word address).D1 > D2. .High .The area specified using the index modifier exceeds the limit. Flag conditions S Error flag (R9007): Turns on and stays on when: .D1 > D2. S Error flag (R9008): 3 . . When one word (16 bits) is shifted to the left.level Instructions 3. Specified data range D2 The ending word is shifted out. .The area specified using the index modifier exceeds the limit.3 Explanation of High .D1 ≦ D2. .206 . D1 Starting area D1 and ending area D2 should be: . . Turns on for an instant when: .

Ladder Diagram Boolean Address 10 11 Instruction ST F112 DT R 0 Trigger R0 10 F112 WBSR . DT 0 . T32.level Instructions Step Availability F112 (WBSR) Outline Program example Right shift of one hexadecimal digit (4 bits) of 16-bit data range 5 FP0 C10. C32. Specified data range (10 words = 40 digits) DT9 DT0 15 · · 1211 · · 8 7 · · 4 3 · · 0 15 · · · · 0 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 2 1 2 0 0 2 3 2 R0: on DT9 DT0 15 · · 1211 · · 8 7 · · 4 3 · · 0 15 · · · · 0 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 2 1 2 0 0 2 3 The higher hexdecimal digit (bit position 12 to 15) becomes 0. C16. C14.3 Explanation of High . 3 . DT 9 D1 D1 D2 (WBSR) 0 9 DT D2 Starting 16-bit area Ending 16-bit area Operands Operand D1 D2 N/A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX N/A N/A IY N/A N/A Constant K N/A N/A H N/A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Shifts one hexadecimal digit (4 bits) of the data range (10 words) from DT0 through DT9 to the right when execution condition (trigger) R0 turns on.207 . The data “2” in the lower hexadecimal digit (bit positions 0 to 3) is shifted out. SL1 Shifts one hexadecimal digit (4 bits) of a specified 16-bit data range to the right.level Instructions 3.FP0 High.

Turns on for an instant when: . When the hexadecimal digit (4 bits) is shifted to the right.The area specified using the index modifier exceeds the limit.208 . .3 Explanation of High .D1 ≦ D2.D1 > D2. . Starting area D1 and ending area D2 should be: . The data in the lower hexadecimal digit (bit position 0 to 3) is shifted out. .D1 > D2. Flag conditions S Error flag (R9007): Turns on and stays on when: . Specified data range D2 D1 15· ·1211 · · 8 7 · · 4 3 · · 0 15· · · · 0 15· ·1211 · · 8 7 · · 4 3 · · 0 D2 D1 15· ·1211 · · 8 7 · · 4 3 · · 0 15· · · · 0 15· ·1211 · · 8 7 · · 4 3 · · 0 0 The higher hexadecimal digit (bit position 12 to 15) becomes 0. .The data at the lower hexadecimal digit (bit positions 0 to 3) of the 16-bit data specified by D1 is shifted out.The area specified using the index modifier exceeds the limit.The same type of operand.The data at the higher hexadecimal digit (bit positions 12 to 15) in the 16-bit data specified by D2 becomes 0.High . S Error flag (R9008): 3 .level Instructions FP0 Description Shifts one hexadecimal digit (4 bits) of the data range specified by D1 (starting) and D2 (ending) to the right (to the lower digit position).level Instructions 3. .

SL1 Shifts one hexadecimal digit (4 bits) of a specified 16-bit data range to the left.FP0 High. DT9 DT0 15 · · 1211 · · 8 7 · · 4 3 · · 0 15 · · · · 0 15 · 1211 · · 8 7 · · 4 3 · · 0 1 2 2 1 0 2 3 2 0 The lower hexadecimal digit (bit position 0 to 3) becomes 0.level Instructions Step Availability F113 (WBSL) Outline Program example Left shift of one hexadecimal digit (4 bits) of 16-bit data range 5 FP0 C10. T32. DT 9 D1 D1 D2 (WBSL) 0 9 DT D2 Starting 16-bit area Ending 16-bit area Operands Operand D1 D2 N/A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX N/A N/A IY N/A N/A Constant K N/A N/A H N/A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Shifts one hexadecimal digit (4 bits) of the data range (10 words) from DT0 through DT9 to the left when execution condition (trigger) R0 turns on. Ladder Diagram Boolean Address 10 11 Instruction ST F113 DT R 0 Trigger R0 10 F113 WBSL . C16. 3 . DT 0 . Specified data range (10 words = 40 digits) DT9 DT0 15 · · 1211 · · 8 7 · · 4 3 · · 0 15 · · · · 0 15 · ·1211 · · 8 7 · · 4 3 · · 0 0 2 1 2 1 0 2 3 2 R0: on The data “0” in the higher hexadecimal digit (bit positions 12 to 15) is shifted out. C32.level Instructions 3. C14.209 .3 Explanation of High .

210 .level Instructions 3.D1 ≦ D2.The area specified using the index modifier exceeds the limit. Flag conditions S Error flag (R9007): Turns on and stays on when: . . .The data at the lower hexadecimal digit (bit positions 0 to 3) in the 16-bit data specified by D1 becomes 0. Turns on for an instant when: . S Error flag (R9008): 3 . .D1 > D2.3 Explanation of High . .High . .The data at the higher hexadecimal digit (bit positions 12 to 15) of the 16-bit data specified by D2 is shifted out.The area specified using the index modifier exceeds the limit. Specified data range D2 D1 15· ·1211 · · 8 7 · · 4 3 · · 0 15· · · · 0 15· ·1211 · · 8 7 · · 4 3 · · 0 The data in the higher hexadecimal digit (bit position 12 to 15) is shifted out. When the hexadecimal digit (4 bits) is shifted to the left.The same type of operand.level Instructions FP0 Description Shifts one hexadecimal digit (4 bits) of the data range specified by D1 (starting) and D2 (ending) to the left (to the higher digit position). Starting area D1 and ending area D2 should be: .D1 > D2. D2 D1 15· ·1211 · · 8 7 · · 4 3 · · 0 15· · · · 0 15· ·1211 · · 8 7 · · 4 3 · · 0 0 The lower hexadecimal digit (bit positions 0 to 3) becomes 0.

When the trailing edge of rest input R2 is detected (on → off). C16.211 . C14.3 Explanation of High . (Up counter operation) If DT0 = K0. This can be used.level Instructions Step Availability F118 (UDC) Outline Program example UP/DOWN counter 5 FP0 C10. special internal relay R900B (= flag) turns on and then internal relay R50 turns on. 17 Ladder Diagram Boolean Address 50 51 Instruction ST ST ST F118 DT DT R R R 0 1 2 (UDC) 10 0 R 900B R 50 50 51 52 R0 UP/DOWN input R1 Count input R2 R900B Reset input S D F118 UDC DT 10 DT 0 R50 52 53 58 58 59 ST OT S D 16-bit equivalent constant or 16-bit area for counter preset value 16-bit area for counter elapsed value Operands Operand D1 D2 A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX N/A N/A IY N/A N/A Constant K A N/A H A N/A N/A N/A A: Available N/A: Not Available Index modifier Explanation of example The program shows an example in which initial values are set. C32. and when the target value is 0. for example. R50 goes on. (DOWN counter operation) One is added to DT0 when the count input R1 turns off while the R0 is in the on state. 3 .level Instructions 3. SL1 Sets the UP/DOWN counter. data in data register DT10 is transferred to DT0. T32.FP0 High. One is subtracted from value of DT0 when the count input R1 turns on while R0 is in the off state. in programs such as those that cause a display lamp to light when the work being added or subtracted has reached a certain quantity.

For detailed information section 4. be careful that the programming is correct.1) is effective. The results of the counting operation can be determined by comparing the elapsed value of D with the specified value. The elapsed value is stored in the area specified by the D.High . The preset value in S is transferred to D when the trailing edge of the reset input is detected (on → off). the reset input must be switched from the “on” to the “off” state. When combining the F118 (UDC) instruction with an AND stack instruction or POP stack instruction. the elapsed value acts in accordance with the contents being retained. the incremental counter (+1) is effective. Turns on for an instant when the elapsed value area D value is “K . the decremental counter ( . Flag conditions S = flag (R900B): S Carry flag (R9009): Turns on for an instant when the elapsed value area D is recognized as “0”.level Instructions 3. when an operation is begun. using the data comparison instruction. the set values are not automatically preset to the elapsed value area. and the counting operation begins. Precautions during programming If the elapsed value area has been specified as a hold type memory area. the value specified for the D is initialized. The elapsed value area of D is cleared when the reset input turns on. To preset these values.1”.level Instructions on R2 off on R0 off on R1 off on R50 off Value of DT0 FP0 Time Reset Preset Description The counter is switched between an incremental count (addition) or decremental count (subtraction) by turning the relay specified for up/down input on or off. The data comparison instruction should be executed immediately following execution of this instruction. Be aware that. Set value range K-32768 to K32767 (H8000 to H7FFF) When the count input is switched from off to on (the reset input is in “Off” state).6 3 .3 Explanation of High .212 . When the up/down input is on. and when it is off.32768 to K .

be aware that the operation of the instructions will differ depending on the timing of their execution and their count input.MC to MCE instructions .LOOP to LBL instructions .Step ladder instructions .5 3 . If the count input remains continuously on.3 Explanation of High . RUN (Power: on) Count intput Operation of instruction No count done Count done When you use the F118 (UDC) instruction with one of the following instructions that changes the order of the execution of instructions. .level Instructions Cautions on count input detection In a F118 (UDC) instruction.213 .CNDE instruction .Subroutine instruction For detailed information section 4.JP to LBL instructions . the increment or decrement takes place when the rise of the count input from off to on is detected. In cases where the count input is initially on such as when the mode is changed to RUN or the power is turned on with the mode set to RUN. since counting will only take place at the rise.FP0 High.level Instructions 3. no further counting will take place. increment or decrement operation will not take place at the first scan.

off: right) R1 Data input R2 R3 Shift input Reset input D1 D2 F119 LRSR DT 0 DT 9 51 52 53 54 (LRSR) 0 9 53 D1 D2 DT Starting 16-bit area whose one bit is shifted to the left or to the right Ending 16-bit area whose one bit is shifted to the left or to the right Operands Operand D1 D2 N/A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX N/A N/A IY N/A N/A Constant K N/A N/A H N/A N/A N/A N/A A: Available N/A: Not Available Index modifier 3 .level Instructions 3.3 Explanation of High . C32.High . C14. SL1 Shifts one bit of the 16-bit data range to the left or right. T32. C16.214 . 18 Ladder Diagram Boolean Address 50 Instruction ST ST ST ST F119 DT R R R R 0 1 2 3 50 51 52 Left/right input R0 (on: left.level Instructions Step Availability FP0 F119 (LRSR) Outline Program example Left/right shift register 5 FP0 C10.

. “0” is shifted into bit position 15. 4 3 . . . When data input R1 turns on. 8 7 . 12 11 . 0 Data 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 DT9 15 . 8 7 . Also. . 12 11 . . 12 11 . 4 3 . 12 11 . .FP0 High. . . . 4 3 .3 Explanation of High . either left (direction of MSB) or right (direction of LSB). 8 7 . . 3 . .12 11 . . 8 7 . . based on the on/off status of the relay specified by the left/right shift input. . 4 3 . and the lowermost bit for a shift to the right) will be set in the special internal relay R9009 (carry flag). “1” is shifted into bit position 0. 8 7 .level Instructions Explanation of example Left shift operation DT9 DT0 Bit position 15 . . . . the contents of the specified area are cleared to 0.215 . 4 3 . 0 1000 1000 1000 1100 R0: off R2: off → on Bit position 15 . 0 Data 0001 0001 0001 0001 15 . and to the right when off. the contents of the area specified by D1 and D2 are shifted one bit to the left or right. 1211 . . . . 8 7 . . 0 1000 1000 1000 1000 Data DT9 15 . “1” is shifted into bit position 15. 1 will be set in the empty bit left by the shift (the uppermost or lowermost bit) if the data input is on. 4 3 . When the shift input changes from off to on (the reset input is off). 4 3 . 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 DT0 When data input R1 turns on. When data input R1 turns off. If the reset input is on.level Instructions 3. and 0 if the data input is off. in which a shift of one bit is made. .12 11 . Description This shift register changes direction. Specify D1 and D2 so they are in the same type data area and be sure to set the data area addresses so that D1 ≦ D2. . 8 7 . 8 7 . . 0 0100 0100 0100 0110 DT0 Shifted-out bit is transferred to R9009 (carry flag). . 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 R0: on R2: off → on Shifted-out bit is transferred to R9009 (carry flag). the bit extracted by the shift (the uppermost bit for a shift to the left. . “0” is shifted into bit position 0.12 11 . . The shift operation is made to the left when the left/right shift input is on. . When the data is shifted. 4 3 . Right shift operation DT9 DT0 Bit position 15 . Bit position 15 . . 0 Data 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 15 . . When data input R1 turns off. . .

5 Precautions during programming When combining the F119 (LRSR) instruction with an AND stack instruction or POP stack instruction.level Instructions FP0 Flag conditions S Error flag (R9007): Turns on and stays on when the area specified using the starting 16-bit area (D1) is larger than the area specified by the ending 16-bit area (D2) (when D1 > D2). Turns on for an instant when the bit shifted-out is “1”. shift takes place when the off .JP to LBL instructions .3 Explanation of High .level Instructions 3.LOOP to LBL instructions . Turns on for an instant when the area specified using the starting 16-bit area (D1) is larger than the area specified by the ending 16-bit area (D2) (when D1 > D2).CNDE instruction .MC to MCE instructions .on rise of the shift input is detected. In cases where the shift input is initially on such as when the mode is changed to RUN or when the power is turned on with the mode set to RUN. For detailed information section 4. be aware that the operation of the instructions will differ depending on the timing of their execution and their shift input.6 3 . a shift will only take place at the rise. If the shift input remains continuously on.Step ladder instructions . be careful that the programming is correct. .216 . S Error flag (R9008): S Carry flag (R9009): Precautions on shift input detection In a F119 (LRSR) instruction.Subroutine instruction For detailed information section 4. a shift will not take place at the first scan. RUN (Power: on) Shift input Operation of instruction No shift made Shift made When you use the F119 (LRSR) instruction with one of the following instructions that changes the order of the execution of instructions.High . No further shifts will take place.

T32. C16. DT 0 .level Instructions Step Availability F120 (ROR) Outline Program example 16-bit data right rotate 5 FP0 C10.3 Explanation of High . C14.FP0 High. Ladder Diagram Boolean Address 10 11 Instruction ST F120 DT R 0 (ROR) 0 4 Trigger R0 10 F120 ROR . C32.level Instructions 3. Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 R0: on Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 DT0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 Special internal relay R9009 (carry flag) 0 Data in bit position 3 3 . SL1 Rotates a specified number of bits in specified 16-bit data to the right. K 4 D D n 16-bit area K n 16-bit equivalent constant or 16-bit area to specify number of bits to be rotated Operands Operand D n N/A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available Explanation of example Rotates 4 bits in data register DT0 to the right when execution condition (trigger) R0 turns on.217 .

.g. e. Example: Rotates 1 bit to the right Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 D Special internal relay R9009 (carry flag) Data in bit position 0 1 When n bits are rotated to the right. n = K16: same operation as n = K0 (The carry flag does not change. . For n.) n = K17: same operation as n = K1   n = K32: same operation as n = K0 (The carry flag does not change. Turns on for an instant when the area specified using the index modifier exceeds the limit.The data in bit position n-1 (n th bit starting from bit position 0) is transferred to special internal relay R9009 (carry flag). only the lower 8 bits in the 16 bits data are valid.) n = K33: same operation as n = K1 Flag conditions S Error flag (R9007): S Error flag (R9008): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit.3 Explanation of High . 15 n ———— ———— 0 0 0 0 00 0 0 0 Range of n: K0 to K255 (H00 to HFF) Upper 8 bits are invalid Precaution during programming If the specified n is a multiple of 16 bits. either.level Instructions 3.n bits starting from bit position 0 are shifted out to the right and then shifted into the higher bit positions of the 16-bit data specified by D.level Instructions FP0 Description Rotates n bits of the 16-bit data specified by D to the right.218 . . Turns on for an instant when the data in bit position n-1 is recognized as 1. the data will be the same as that before the operation. 3 .High . either.

DT 0 .level Instructions Step Availability F121(ROL) Outline Program example 16-bit data left rotate 5 FP0 C10. Ladder Diagram Boolean Address 10 11 Instruction ST F121 DT R 0 (ROL) 0 4 Trigger R0 10 F121 ROL . Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 DT0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 R0: on Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 DT0 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 Special internal relay R9009 (carry flag) 1 Data in bit position 12 3 . K 4 D D n 16-bit area K n 16-bit equivalent constant or 16-bit area to specify number of bits to be rotated Operands Operand D n N/A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available Explanation of example Rotates 4 bits in data register DT0 to the left when execution condition (trigger) R0 turns on.219 .level Instructions 3.3 Explanation of High . SL1 Rotates a specified number of bits in specified 16-bit data to the left. T32. C16. C14. C32.FP0 High.

High . 15 n ———— ———— 0 0 0 0 00 0 0 0 Range of n: K0 to K255 (H00 to HFF) Upper 8 bits are invalid Precaution during programming If the specified n is a multiple of 16 bits.220 . 3 . e.The data in bit position 16-n (n th bit starting from bit position 15) is transferred to special internal relay R9009 (carry flag).. the data will be the same as that before the operation. . n = K16: same operation as n = K0 (The carry flag does not change. For n. either. Example: Rotates 1 bit to the left Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 D 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 Special internal relay R9009 (carry flag) 0 Data in bit position 15 When n bits are rotated to the left. only the lower 8 bits in the 16 bits data are valid.level Instructions FP0 Description Rotates n bits of the 16-bit data specified by D to the left.level Instructions 3. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the data in bit position 16-n is recognized as 1.) n = K17: same operation as n = K1   n = K32: same operation as n = K0 (The carry flag does not change.) n = K33: same operation as n = K1 Flag conditions S Error flag (R9007): S Error flag (R9008): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. either.g. .n bits starting from bit position 15 are shifted out to the left and then shifted into the lower bit positions of the 16-bit data specified by D.3 Explanation of High .

T32. C14.level Instructions 3. C32. K 4 D D n 16-bit area K n 16-bit equivalent constant or 16-bit area to specify number of bits to be rotated Operands Operand D n N/A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available Explanation of example Rotates 4 bits in data register DT0 together with carry flag data “1” to the right when execution condition (trigger) R0 turns on.3 Explanation of High . Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 DT0 R0: on n-1: 3 bits Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 DT0 Carry flag data “1” Special internal relay R9009 (carry flag) 0 Data in bit position 3 3 .FP0 High. DT 0 .level Instructions Step Availability F122 (RCR) Outline Program example 16-bit data right rotate with carry flag data 5 FP0 C10.221 . C16. SL1 Rotates a specified number of bits in the specified 16-bit data to the right together with carry flag data. Ladder Diagram Boolean Address 10 11 Instruction ST F122 DT R 0 (RCR) 0 4 Trigger R0 10 F122 RCR .

15 n ———— ———— 0 0 0 0 00 0 0 0 Range of n: K0 to K255 (H00 to HFF) Upper 8 bits are invalid Precaution during programming If the specified n is a multiple of 17 bits. including carry flag data. the data will be the same as that before the operation.The data in bit position n-1 (n th bit starting from bit position 0) is transferred to special internal relay R9009 (carry flag)..level Instructions 3.3 Explanation of High .222 . Turns on for an instant when the data in bit position n-1 is recognized as 1. For n. n = K17: same operation as n = K0 n = K18: same operation as n = K1   n = K34: same operation as n = K0 n = K35: same operation as n = K1 Flag conditions S Error flag (R9007): S Error flag (R9008): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. only the lower 8 bits in the 16 bits data are valid.level Instructions FP0 Description Rotates n bits of the 16-bit data specified by D.High .g.n bits starting from bit position 0 are shifted out to the right and then carry flag data and the n-1 bits starting from bit position 0 are shifted into the higher bit positions of the 16-bit data specified by D. . to the right. Turns on for an instant when the area specified using the index modifier exceeds the limit. e. 3 . Example: Rotates 1 bit to the right Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 D 0 0 1 0 1 0 1 0 1 0 1 0 1 0 10 Carry flag data “0” Special internal relay R9009 (carry flag) 1 When n bits with carry flag data are rotated to the right. .

DT 0 . C14.223 . SL1 Rotates a specified number of bits in the specified 16-bit data to the left together with carry flag data. T32.level Instructions Step Availability F123 (RCL) Outline Program example 16-bit data left rotate with carry flag data 5 FP0 C10. Ladder Diagram Boolean Address 10 11 Instruction ST F123 DT R 0 (RCL) 0 4 Trigger R0 10 F123 RCL .FP0 High. Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 DT0 R0: on Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 DT0 0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0 Carry flag data “1” Special internal relay R9009 (carry flag) Data in bit position 12 1 3 .3 Explanation of High . K 4 D D n 16-bit area K n 16-bit equivalent constant or 16-bit area to specify number of bits to be rotated Operands Operand D n N/A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available Explanation of example Rotates 4 bits in data register DT0 together with carry flag data “1” to the left when execution condition (trigger) R0 turns on. C32.level Instructions 3. C16.

g.level Instructions FP0 Description Rotates n bits of the 16-bit data specified by D. only the lower 8 bits in the 16 bits data are valid. n = K17: same operation as n = K0 n = K18: same operation as n = K1   n = K34: same operation as n = K0 n = K35: same operation as n = K1 Flag conditions S Error flag (R9007): S Error flag (R9008): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. 15 n ———— ———— 0 0 0 0 00 0 0 0 Range of n: K0 to K255 (H00 to HFF) Upper 8 bits are invalid Precaution during programming If the specified n is a multiple of 17 bits.. including carry flag data.level Instructions 3.3 Explanation of High .High . 3 .n bits starting from bit position 15 are shifted out to the left and then carry flag data and the n-1 bits starting from bit position 15 are shifted into the lower bit positions of the 16-bit data specified by D. Turns on for an instant when the area specified using the index modifier exceeds the limit. to the left. Turns on for an instant when the data in bit position 16-n is recognized as 1. . For n.The data in bit position 16-n (n th bit starting from bit position 15) is transferred to special internal relay R9009 (carry flag). Example: Rotates 1 bit to the left Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 D 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 Carry flag data “0” Special internal relay R9009 (carry flag) 0 When n bits with carry flag data are rotated to the left.224 . e. the data will be the same as that before the operation. .

(Bits other than the specified bit do not change.) 3 . C14.3 Explanation of High . C32. Ladder Diagram Boolean Address 10 11 Instruction ST F130 DT R 0 (BTS) 0 2 Trigger R0 10 F130 BTS . C16.level Instructions 3. as shown below. DT 2 D D n 16-bit area DT n 16-bit equivalent constant or 16-bit area to specify bit position Operands Operand D n N/A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available Explanation of example Turns on bit position specified by DT2 in data register DT0 when execution condition (trigger) R0 turns on.level Instructions Step Availability F130 (BTS) Outline Program example 16-bit data bit set 5 FP0 C10. SL1 Turns on a specified bit of 16-bit data.FP0 High. When the DT2 = K7. T32.225 . DT 0 . [n] DT2: K7 [D] Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 DT0 R0: on Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 DT0 [D] Bit position 7 is turned on (1) when R0 turns on.

Bits other than the specified bit do not change. n is decimal data specifying the bit position to be turned on. Range of n: K0 to K15 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 n ———— ———— ———— The data in bit positions 4 through 15 are invalid. Turns on for an instant when the area specified using the index modifier exceeds the limit. Range of n: K0 to K15 (H0 to HF) Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. 3 .High .level Instructions 3.226 .3 Explanation of High .level Instructions FP0 Description Turns on the bit of 16-bit data specified by D and n.

level Instructions 3. DT 0 .3 Explanation of High . C16. (Bits other than the specified bit do not change. as shown below. DT 2 D D n 16-bit area DT n 16-bit equivalent constant or 16-bit area to specify bit position Operands Operand D n N/A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available Explanation of example Turns off the bit specified by DT2 of data register DT0 when execution condition (trigger) R0 turns on. C32.) [D] 3 . Ladder Diagram Boolean Address 10 11 Instruction ST F131 DT R 0 (BTR) 0 2 Trigger R0 10 F131 BTR . SL1 Turns off a specified bit of 16-bit data. When the DT2 = K7.227 .level Instructions Step Availability F131(BTR) Outline Program example 16-bit data bit reset 5 FP0 C10. T32.FP0 High. C14. [n] DT2: K7 Bit position 15 [D] DT0 · · 12 11 · · 8 7 · · 4 3 · · 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0 R0: on Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 1 1 0 1 1 1 0 0 0 0 1 1 1 0 1 0 · DT0 Bit position 7 is turned off (0) when R0 turns on.

High . n is decimal data specifying the bit position to be turned off.3 Explanation of High .228 .level Instructions FP0 Description Turns off the bit of 16-bit data specified by D and n. Range of n: K0 to K15 (H0 to HF) Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.level Instructions 3. Range of n: K0 to K15 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 ———— ———— ———— n The data in bit positions 4 through 15 are invalid. 3 . Turns on for an instant when the area specified using the index modifier exceeds the limit. Bits other than the specified bit do not change.

[D] (Bits other than the specified bit are not changed. C32. T32. When the DT10 = K7.229 .FP0 High. as shown below.3 Explanation of High . DT 0 . SL1 Inverts a specified bit in 16-bit data.) 3 .level Instructions Step Availability F132 (BTI) Outline Program example 16-bit data bit invert 5 FP0 C10. DT 10 D D n 16-bit area DT n 16-bit equivalent constant or 16-bit area to specify bit position Operands Operand D n N/A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available Explanation of example Inverts the state of bit specified by DT10 in data register DT0 when execution condition (trigger) R0 turns on. Ladder Diagram Boolean Address 10 11 Instruction ST F132 DT R 0 (BTI) 0 10 Trigger R0 10 F132 BTI . C16. C14. [n] DT10: K7 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 DT0 R0: on [D] Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 0 DT0 Condition of bit position 7 is inverted [off (0) → on (1)] when R0 turns on.level Instructions 3.

3 .High .level Instructions 3. Range of n: K0 to K15 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 n ———— ———— ———— 0 0 0 0 The data in bit positions 4 through 15 are invalid. Range of n: K0 to K15 (H0 to HF) Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.230 . Turns on for an instant when the area specified using the index modifier exceeds the limit. Bits other than the specified bit are not inverted.level Instructions FP0 Description Inverts [off (0) → on (1) or on (1) → off (1)] the state at bit position specified by n in the 16-bit area specified by D. The n is decimal data specifying the bit position to be inverted.3 Explanation of High .

level Instructions 3. DT 2 R900B R10 n 11 16 17 18 ST AN OT R 900B R 10 D n 16-bit area 16-bit equivalent constant or 16-bit area to specify bit position Operands Operand D n N/A A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K N/A A H N/A A A A A: Available N/A: Not Available Index modifier Explanation of example Checks the state [on (1) or off (0)] of bit specified by DT2 in data register DT0 when execution condition (trigger) R0 turns on. T32. If bit position 7 is in the off state (0). [n] DT2:K7 [D] Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 DT0 The state of bit position 7 is checked. 3 . C16. C14. If bit specified by DT2 is in the off (0) state.level Instructions 5 Step Availability F133 (BTT) 16-bit data bit test 5 FP0 C10. SL1 Outline Checks the state [on (1) or off (0)] of the specified bit in 16-bit data. R900B turns on and internal relay R10 goes on. Boolean Address 10 Instruction ST F133 DT DT R 0 (BTT) 0 2 R 0 Program example Ladder Diagram Trigger D R0 10 R0 16 F133 BTT .231 . as shown below.3 Explanation of High . C32. DT 0 . When the DT2 = K7.FP0 High. internal relay R10 goes on.

Range of n: K0 to K15 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 ———— ———— ———— 0 0 0 0 n The data in bit positions 4 through 15 are invalid. .When the specified bit is off (0).level Instructions FP0 Description Checks the state [on (1) or off (0)] of bit position specified by n in the 16-bit data specified by D. special internal relay R900B (= flag) turns off. .When the specified bit is on (1).High . The judgment result is output to special internal relay R900B (=flag). . Turns on for an instant when the specified bit to be checked is in the off (0) state.232 . Turns on for an instant when the area specified using the index modifier exceeds the limit. The specified bit is checked by special internal relay R900B. .the program in which the judgment flag is used should be input immediately following the instruction which executes the judgment. special internal relay R900B (= flag) turns on. 3 . If the judgment flag is used two or more times. Range of n: K0 to K15 (H0 to HF) Precaution when the judgement flag R900B is used two or more times The judgment flag R900B is updated each time an operation instruction or comparison instruction is executed.level Instructions 3. Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): Turns on and stays on when the area specified using the index modifier exceeds the limit. n is decimal data specifying the bit position to be checked.the flag should be output to output relays or internal relays for each separate instruction.3 Explanation of High .

C14. Turns on for an instant when the area specified using the index modifier exceeds the limit. C16. The results are stored in decimal number. C32. Boolean Address 10 11 Instruction ST F135 DT DT R 0 (BCU) 10 20 Ladder Diagram Trigger R0 10 F135 BCU . T32.3 Explanation of High .233 .level Instructions 5 Step Availability F135 (BCU) Outline Program example Number of on bits in 16-bit data 5 FP0 C10. The number of on (1) bits is stored in data register DT20. DT10 . SL1 Counts the number of bits in the on (1) state in the specified 16-bit data. The counted result (number of on (1) bits) is stored in the 16-bit area specified by D.level Instructions 3.FP0 High. 3 . Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. Description Counts the number of bits in the on (1) state in the 16-bit data specified by S. The K5 is stored in data register DT20 when R0 turns on. DT 20 S S D D 16-bit equivalent constant or 16-bit area (source) 16-bit area (destination) for storing the number of bits in the on (1) state Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY A A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Counts the number of bits in the on (1) state in data register DT10 when execution condition (trigger) R0 turns on. DT10 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 Binary data 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 1 The number of on (1) bits is “5”.

level Instructions 3.level Instructions FP0 5 Step Availability F136 (DBCU) Outline Program example Number of on bits in 32-bit data 7 FP0 C10. C32.234 . C14.3 Explanation of High . DT10 . DT20 S S D (DBCU) 10 20 D 32-bit equivalent constant or lower 16-bit area of 32-bit data (source) 16-bit area (destination) for storing the number of bits in the on (1) state Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Counts the number of bits in the on (1) state in data register DT11 and DT10 when execution condition (trigger) R0 turns on. The K9 is stored in data register DT20 when R0 turns on. The number of on (1) bits is stored in data register DT20. Boolean Address 10 11 Instruction ST F136 DT DT R 0 Ladder Diagram Trigger R0 10 F136 DBCU . T32. C16. Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit. 3 . The results are stored in decimal number.High . DT11 DT10 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 15 · · 12 11 · · 8 7 · · 4 3 · · 0 Binary data 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0 The number of on (1) bits is “9”. SL1 Counts the number of bits in the on (1) state in specified 32-bit data. Description Counts the number of bits in the on (1) state in the 32-bit data specified by S. The counted result (number of on (1) bits) is stored in the 16-bit area specified by D. Turns on for an instant when the area specified using the index modifier exceeds the limit.

DT20 R900D R5 Operation is the same as that in the program example. DT20 S S D (STMR) 10 20 5 R5 D 16-bit equivalent constant or 16-bit area for timer set value 16-bit area for timer elapsed value Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A N/A IY A N/A Constant K A N/A H A N/A N/A N/A A: Available N/A: Not Available Index modifier Explanation of example When the execution condition (trigger) has been fulfilled. and relays being used are turned off by the OT instruction. T32. SL1 Outline Sets the 16 .) R0 F137 STMR. Description This functions as a 0.01 to 327. DT10. DT10 . the auxiliary timer is activated. When the time set for the special internal relay R900D has elapsed.67 s) Boolean Address 10 11 Instruction ST F137 DT DT 16 OT R R 0 Program example Ladder Diagram Trigger R0 10 F137 STMR . (The relay is off when the execution condition (trigger) is off. When the execution condition (trigger) is off.FP0 High. relays which are being used are turned on by the OT instruction which follows in the program. C16.bit on . the relay is turned on. C32.second unit on delay timer. and when the elapsed value D reaches 0. and when the value stored in DT10 x 0. 3 .3 Explanation of High . R5 goes on. the elapsed value area is cleared to 0. and while subtraction is being carried out.delay timer for 0. subtraction is carried out for the specified time.01 seconds has elapsed. C14.01 s units (0. R900D can also be used as a timer contact.level Instructions 3.235 .01 . When the execution condition (trigger) is on.level Instructions 5 Step Availability F137(STMR) 16-bit auxilialy timer 5 FP0 C10.

DT40 3 Subtraction completed 3 .) Consecutive OT instructions may be used in the program. DT30. where several operations are carried out during one scan. How the auxiliary timer works 1 When the execution condition (trigger) changes from off to on. or memory areas used for high . The timer set time is set between 0. DT30.level instruction operations. DT20 R5 DT20 K500 2 Subtraction 499 498 497 R900D F0 MV. DT10. the value in the elapsed value area D is subtracted. DT40 3 If the value in the elapsed value area D reaches 0.3 Explanation of High . R0 F137 STMR. DT20 DT10 K500 1 R0 S Sent to D. DT10. R0 F137 STMR. relay being used is turned on by the OT instruction which comes next in the program. Because subtraction is carried out when operations are carried out.01 x 500 = 5 seconds. or where it was not possible to carry out any operation during the scan. R900D F0 MV.67 seconds. (In cases such as programs where interrupt operation is carried out.High . the set value specified by the S is sent to the elapsed value area D. the program should be set up so that operations are carried out every scan. correct results cannot be obtained. DT20 R5 DT20 0 R900D F0 MV. Precautions during programming The area in which the set value is stored must be set so that the area specified for the elapsed value does not overlap any areas reserved for other timer or counter instructions.01 second. every scan. DT30. or for jump or loop instructions. R5 F137 STMR. The timer set value is specified as a K constant within the range of K1 to K32767. DT40 DT20 K500 2 If the execution condition (trigger) stays on. If the set value is K500.01 x (timer set value). The special internal relay R900D also goes on at this point.01 and 327.level Instructions FP0 Timer set time The timer setting is entered as a value of 0. DT10.level Instructions 3. the set time will be 0. in units of 0.236 .

R0 F137 STMR.level Instructions Precautions when using R900D If R900D is used and multiple auxiliary timers are being used. DT20 R900D Y0 Pair R1 F137 STMR. Y0 goes on.FP0 High. which is activated by R1 turns on. always use R900D in the line following the auxiliary timer instruction. DT10. DT20 R1 F137 STMR. Y1 goes on. expires. DT30. Describe the program as shown below will result in incorrect operation. DT40 R900D Y1 Pair When timer (a). DT40 R900D R900D Y0 Y1 3 . When timer (b). DT10.237 . expires. which is activated by R0 turns on. DT30. R0 F137 STMR.level Instructions 3.3 Explanation of High .

level Instructions FP0 5 Step Availability F140 (STC) Outline Program example Carry flag (R9009) set 1 FP0 C10. 3 . C16. C32. Flag condition Carry flag (R9009): Turns on when this instruction is executed. C14.3 Explanation of High . SL1 Turns on special internal relay R9009 (carry flag).level Instructions 3. T32. Boolean Address 10 Instruction ST F140 R 0 (STC) Ladder Diagram Trigger R0 10 F140 STC 11 Description Special internal relay R9009 (carry flag) goes on.238 .High .

C32. Flag condition Carry flag (R9009): Turns off when this instruction is executed. T32. C14.level Instructions 5 Step Availability F141(CLC) Outline Program example Carry flag (R9009) reset 1 FP0 C10. C16. Boolean Address 10 Instruction ST F141 R 0 (CLC) Ladder Diagram Trigger R0 10 F141 CLC 11 Description Special internal relay R9009 (carry flag) goes off.239 .FP0 High.level Instructions 3. 3 .3 Explanation of High . SL1 Turns off special internal relay R9009 (carry flag).

Description Updates the inputs and outputs specified by D1 and D2 immediately even in the program execution stage. With the FP0.High .level Instructions FP0 5 Step Availability F143 (IORF) Partial I/O update 1 FP0 C10. C14.level Instructions 3. C32. WY 0 .240 . refreshing initiated by the F143 (IORF) instruction is done only for the control unit. Program example Ladder Diagram Boolean Address 10 Instruction ST F143 WX R 10 (IORF) 0 0 ⋮ R 20 (IORF) 0 0 Input update Trigger D1 R10 10 F143 IORF . WY 0 20 D1 D1 D2 D2 Starting word address Ending word address Operands Operand D1 D2 A A Relay WX WY WR A A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT N/A N/A Index register IX N/A N/A IY N/A N/A Constant K N/A N/A H N/A N/A A A A: Available N/A: Not Available Index modifier Explanation of example Updates external input relays WX0 (X0 to XF) immediately when execution condition (trigger) R10 turns on and updates external output relays WY0 (Y0 to YF) immediately when execution condition (trigger) R20 turns on. C16. With output refreshing. T32. 3 . WY0 should be specified for [D1] and [D2]. WX0 should be specified for [D1] and [D2]. SL1 Outline Updates specified partial I/O points. WX 0 D2 11 WX 20 21 ST F143 WY WY Output update R20 F143 IORF . I/O refreshing is not possible with expansion units.3 Explanation of High . WX 0 . With input refreshing.

level Instructions Step Availability F144 (TRNS) Outline Program example Serial data communication control for RS232C port 5 FP0 T32C/FP0 C10.When the value is negative.level Instructions 3. measuring instrument.241 . an end code is not added.When the value is H8000. A start code and end code can be automatically added before transmission. reception completed flag (R9038) goes off. the transmission mode of the RS232C port is changed.2 or later Communicates with an external device using the RS232C port. For an overview of serial communications section 6.FP0 High. When an F144 (TRNS) instruction is executed. C16. Reception page 3 .) is connected to the RS232C port. Transmission page 3 . 1. an end code is added.3 Explanation of High . Operands Operand S n Relay WX WY WR N/A N/A N/A A A A Timer/Counter SV N/A A EV N/A A Register DT A A Index register IX N/A A IY N/A A Constant K N/A A H N/A A Index modifier A A A: Available N/A: Not Available Description Use this instruction for transmission and reception of command data when an external device (personal computer. K 8 S n S n Starting 16-bit area for storing data to be sent 16-bit equivalent constant or 16-bit area to specify number of bytes to be sent . the data sent to the RS232C port is stored in the reception buffer selected in system registers 417 and 418. C14. DT 100. There is no restriction on the number of bytes that can be transmitted.When the value is positive. etc. C32 CPU Ver. Transmission is possible within the usage range of the data register. . When reception completed flag (R9038) is off. Ladder Diagram Boolean Address 10 11 Instruction ST DF F144 DT K (TRNS) 100 8 R 0 Trigger R0 10 DF 1 12 1 F144 TRNS.245 Reception is controlled by the reception completed flag (R9038) being turned on and off. .1 3 . bar code reader.243 The n bytes of the data stored in the data table with the starting area specified by S are transmitted from the RS232C port to an external device by serial transmission.

Flag conditions S Error flag (R9007): Turns on and stays on when. Note When the power is turned on. Also. the parameter is disabled regardless of the number. . When executed when “general purpose port” is selected. Set to H8000. the setting will change to “computer link.level Instructions FP0 Setting the use of the RS232C port To switch between “computer link communication” and “serial data communication” (general purpose port). the setting will change to “general purpose port. H8000 R9032 1 R9032: RS232C port selection flag This flag turns on when “General purpose port” is selected. and then execute the instruction.The number of bytes specified by n exceeds the source data area range.High . . but in an emergency it can also be used for transmissions from the PLC to a higher . .” R0 DF 1 F144 TRNS. S Error flag (R9008): 3 . DT100.The area specified using the index modifier exceeds the limit.” R0 DF 1 F144 TRNS. the port use will revert to the setting of system register 412.The number of bytes specified by n exceeds the source data area range.) Set n (the number of transmission bytes) to H8000. Turns on for an instant when .level computer.level Instructions 3. DT100.242 . H8000 R9032 1 In this case. When executed when “computer link” is selected. execute an F144 (TRNS) instruction.3 Explanation of High .The area specified using the index modifier exceeds the limit. (Example: This can be used to establish a computer link after complex modem settings have been entered. it is normally used with a computer link.

. F. transmission is possible up to the data range that can be used by the data register. G and H (8 bytes of data) In this example. .3 Explanation of High . DT100 DT101 DT102 DT103 DT104 H42 (B) H44 (D) H46 (F) H48 (H) K8 H41 (A) H43 (C) H45 (E) H47 (G) Data is transmitted in order from the lower byte. the data table is DT100 to DT104. Data table before transmission 3 . 2 1 4 3 Storage area for transmission data (the circled numbers indicate the order of transmission). Data table for transmission Data register areas beginning with the area selected by S are used as the data table for transmission. Following the initial area of the data [S]. select it with an F144 (TRNS) instruction. D. When the F144 (TRNS) instruction is executed.level Instructions Program and Operation during Transmission To transmit. the number of data bytes not yet transmitted is stored in the starting area of the data table. [S+n] 2n 2n . The number of bytes not yet transmitted is stored at each transmission. and execute. . do not include a start code in the transmission data as it will be added automatically. Example: Transmitting the eight characters A.1 Write the transmission data to the transmission data storage area selected with S (from the second word on) using an F0 (MV) or F95 (ASC) instruction. C . write the transmission data to the data table. Note Take care that the transmission data table and reception buffer areas (set in system registers 417 and 418) do not overlap. B.243 . E.FP0 High. [S] [S+1] [S+2] The number of bytes not yet transmitted is stored here.level Instructions 3.If the start code is set to “Yes” in system register 413.Do not include an end code in the transmission data as it will be added automatically.There is no restriction on the number of bytes [n] that can be transmitted.

3 . K . H44434241.244 . DT101 F1 DMV. reception completed flag (R9038) is turned off and the reception data number is cleared to zero. If the start code STX is set to “Yes” in system register 413.level Instructions FP0 Program Select the starting address of the transmission data table with S and the number of transmission data bytes with n. 2) The data in the data table is transmitted in order from the lower byte in S+1.) 3) When the specified quantity of data has been transmitted. As each byte is transmitted. the start code will be automatically added to the beginning of the data. operation will proceed as follows: 1) n is preset in S (the number of bytes not yet transmitted). During transmission. set the end code to “None” in system register 413. For transmission and reception without an end code. H48474645. R0 F1 DMV.High . DT100. Transmission without an end code Specify the number of transmission bytes with a negative number. Furthermore. the sending completed flag (R9039) goes off. K 8 1 Write the transmission data to the data table Transmit the data in the data table Operation If the execution condition (trigger) for the F144 (TRNS) instruction is on when sending completed flag (R9039) goes on. Example: Program for transmitting eight bytes of data without an end code R0 DF 1 F144 TRNS. the value in S (the number of bytes not yet transmitted) decrements by 1. DT103 R1 DF 1 F144 TRNS.8. DT100.level Instructions 3. DT101 DT102 DT103 DT104 Sending data Number of bytes not 8 yet transmitted (DT100) R9039 Execution condition (trigger) R1 F144 (TRNS) execution A 7 B 6 C 5 D 4 E 3 F 2 G 1 H (CR) 0 on off on off During transmission (F144 (TRNS) instruction cannot be executed.8 1 Set to K . the value in S (the number of bytes not yet transmitted) will be zero and the sending completed flag (R9039) will go on. The end code selected in system register 413 is automatically added to the end of the data.3 Explanation of High .

level Instructions Program and Operation during Reception Data sent from the external device connected to the RS232C port will be stored in the data register areas set as the reception buffer. B.1 Each time data is received.level Instructions 3.System register 417: K200 . The initial value is zero.245 . C. F. E. and H (eight bytes of data) from an external device The reception buffer is DT200 to DT204 in this example. D. Reception buffer Word (address) 0 1 2 2 1 Area used for number of bytes received 4 3 Area used for storing received data (the circled numbers indicate the order of reception) n 2n 2n . The data received is stored in order in the reception data storage area beginning from the lower byte of the second word of the area.3 Explanation of High . The reception data is stored in order from the lower byte. Example: Reception of the eight characters A. the amount of data received (number of bytes) is stored as a count in the leading address of the reception buffer. System register settings are as follows: . the number of bytes received is stored. Reception buffer when reception is completed 3 .System register 418: K4 DT200 DT201 DT202 DT203 DT204 H42 (B) H44 (D) H46 (F) H48 (H) K8 H41 (A) H43 (C) H45 (E) H47 (G) Each time data is received. G.FP0 High.

Reception operation Reopening start Received data Number of bytes 0 received on R9038 off Execution condition (trigger) R0 F144 (TRNS) execution on off A 1 B … T (CR) 2 … 20 0 U 1 V … 2 … Reception: Reception: Reception: possible impossibility possible 2) When an end code is received. Receive further data 3 . Execute F144 (TRNS) instruction (R9038: off. Further data received is stored in order in the reception data storage area beginning from the lower byte of the second word of the area. Receive data 2. R9038 is off during the first scan. the value in the leading address of the reception buffer is incremented by 1. Start and end codes will not be stored. reception not allowed) 3. the reception completed flag (R9038) goes on. 3) When an F144 (TRNS) instruction is executed. operation will proceed as follows. S R9038 will also go off when the number of transmission bytes is set and transmission is carried out. 1. (After RUN. Process received data 4. To receive more data. With each one byte received. Note For repeated reception of data.level Instructions 3. the reception completed flag (R9038) goes off and the number of received data bytes is cleared to zero. K 0 S To repeat reception only.3 Explanation of High . refer to the following procedure. After this.High . R0 F144 TRNS. Reception completed (R9038: on. DT100. Operation When the reception completed flag (9038) is off and data is sent from an external device. set to K0. an F144 (TRNS) instruction must be executed to turn off the reception completed flag (R9038) and clear the byte number to zero. no further reception of data is allowed. the reception completed flag (R9038) goes on and further reception of data is not allowed.level Instructions FP0 Program When reception of data from an external device has been completed.) 1) The data received is stored in order in the reception data storage area of reception buffer beginning from the lower byte of the second word of the area.246 . reception) 5.

C.level Instructions 5 Step Availability F147 (PR) Outline Program example Parallel printout 5 FP0 C10.FP0 High.247 . D.) Y8: for strobe signal of printer Y9 to YF: not used 3 . T32. C14. C16. G. F. WY 0 S D 12 14 S D Starting 16-bit area for storing 12 bytes (6 words) of ASCII codes (source) Word external output relay used for output of ASCII codes (destination) Operands Operand S D A N/A Relay WX WY WR A A A N/A Timer/Counter SV A N/A EV A N/A Register DT A N/A Index register IX N/A N/A IY N/A N/A Constant K N/A N/A H N/A N/A Index modifier N/A N/A A: Available N/A: Not Available Explanation of example The ASCII codes stored in data registers DT5 to DT0 are output through word external output relay WY0 when execution condition (trigger) R0 turns on.3 Explanation of High .level Instructions 3. E. H. Ladder Diagram Boolean Address 10 11 Instruction ST DF OR F147 DT WY R 9033 (PR) 0 0 R 0 Trigger R0 10 12 R9033 Printout flag (DF ) F147 PR . I and J Data register ASCII HEX code ASCII character DT5 0A 0D LF CR DT4 4A J 49 I DT3 48 H 47 G DT2 46 F 45 E DT1 44 D 43 C DT0 42 B 41 A Control data for printer R0: on ASCII codes Destination YF YE YD YC YB YA Y9 Y8 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 WY0 Y0 to Y7: for data signals of printer (Y0 to Y7 correspond to DATA1 to DATA8 of printer. SL1 Outputs ASCII codes to the printer. DT 0 . B. Source: ASCII code for 12 character A. C32.

the characters corresponding to the output ASCII code are printed. Flag conditions S Error flag (R9007): Turns on and stays on when: . .The ending area for storing ASCII codes exceeds the limit. The program should be set up so that the printout flag (R9033) is used during execution of F147 (PR) instruction to inhibit simultaneous execution.) Precautions during programming Multiple F147 (PR) instructions cannot be executed at the same time. 3 . Be sure to set the control code (LF and CR) for the printer as the final word of the data. Therefore. (See “Time chart” on the next page.The trigger of another F147 (PR) instruction turns on while one F147 (PR) instruction is being executed. . Character constants (M) can be input only with programming tool software. 37 scans are required until 12 character constants are output. 15 S S+1 S+2 S+3 S+4 S+5 0 ! WY (DATA1 to DATA8.248 . Turns on for an instant when: S Error flag (R9008): . zero <off> is set for Y_9 to Y_F. Three scans are required for 1 character constant output.) Y8: for strobe signal of printer Y9 to YF: not used ASCII code is output in order starting from the lower byte of the starting area. YF YE YD YC YB YA Y9 Y8 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 WY0 Y0 to Y7: for data signals of printer (Y0 to Y7 correspond to DATA1 to DATA8 of printer. of the WY area specified by D. The ASCII code conversion instruction F95 (ASC) can be used to convert character constants (M) to ASCII codes.The ending area for storing ASCII codes exceeds the limit. When this instruction is executed. S Printout flag (R9033):Turns on and stays on while a F147 (PR) instruction is being executed.level Instructions 3.The trigger of another F147 (PR) instruction turns on while one F147 (PR) instruction is being executed.High . STROBE) If the specified output is connected to a commercial printer.3 Explanation of High . Only bit positions 0 to 8 of WY are used in the actual printout.level Instructions FP0 Description Outputs the ASCII codes for 12 characters stored in the 6-word area specified by S through the word external output relay WY specified by D.

I and J Data register DT5 DT4 4A J 49 I DT3 48 H 47 G DT2 46 F 45 E DT1 44 D 43 C DT0 42 B 41 A ASCII HEX code 0A 0D ASCII character LF CR Control data for printer ASCII codes Time chart A Signal of output unit ASCII HEX code (Y0 to Y7) Strobe signal (Y8) R9033 Number of scans on off on off B H42 C H43 D H44 E H45 CR H0D LF H0A H41 F147 (PR) instruction execution 0 1 2 3 4 5 6 7 8 9 10 11 121314 151617 3233 34353637 3 . B.level Instructions 3. E. C. G.249 .C32T Printer (centronics interface) Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 : COM DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 STROBE GND Data setting Example: ASCII code for 10 character A. F. D.FP0 High. H.level Instructions Connection example FP0 .3 Explanation of High .

connections should be made as shown below. DT0.level Instructions FP0 Using printer output during 8 . 3 . and the program should be set up so that the strobe signal is output from Y7.3 Explanation of High .point output When only eight output points are being used.250 .High . Connection example Printer (centronics interface) FP0 .level Instructions 3.C16T/C32T Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 STROBE GND COM Program example R0 F147 PR. WY0 R9033 Y8 Y7 Strobe signal is output from Y7.

the self .diagnostic error flag (R9000) is turned on. self . Ladder Diagram Boolean Address 10 Instruction ST F148 K ⋮ 20 ST F148 K R 1 (ERR) 0 21 R 0 (ERR) 100 Self . Also.level Instructions 3. and operation stops.diagnosis error 100 is set when the execution condition (trigger) R0 turns on. C32. The ERROR/ALARM LED on the controller lights.diagnostic error clear R1 F148 ERR . K 100 11 Self .3 Explanation of High . The specified value “n” is what determines whether operation stops or continues when the instruction is executed.diagnosis error 100. (If a situation occurs in which you wish to set the self . C16.FP0 High.level Instructions 5 Step Availability F148 (ERR) Outline Program example Self-diagnostic error set 3 FP0 C10.) When the execution condition (trigger) R1 turns on.diagnostic error codes specified by n being stored in the special data register DT9000. Description Along with self . T32. “n” setting K100 to K199 K200 to K299 Operation when error occurs Operation stops Operation continues 3 .diagnostic error set Trigger n R0 10 F148 ERR .251 . set up the program so that input R0 turns on. SL1 Sets the specified condition as a self-diagnostic error. C14. the ERROR/ALARM LED on the controller is turned on. K 0 20 Trigger n n Self-diagnostic error code number Range: 0 and 100 to 299 Operands Operand n Relay WX WY WR N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT N/A Index register IX N/A IY N/A Constant K A H A Index modifier N/A A: Available N/A: Not Available Explanation of example The self .diagnostic errors of error codes 43 and higher are cleared.

R9007. DT9018: Cleared to 0 F148 (ERR) instructions which specify the same error code can be notated in duplicate in the program. . starting with the lowest number.High . R9006. or K100 to K299. DT9017.” 3 .level Instructions 3.3 Explanation of High .R9000.diagnostic errors with error codes of 43 and higher are cleared. If n is set to 0 and the F148 (ERR) instruction is executed. codes are received in sequential order. self .7) Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the value of n exceeds the limit of specified range “K0.level Instructions FP0 If n is set to a value between K200 and K299. if several F148 (ERR) instructions are processed at one time.DT9000. R9008: Off .” Turns on and stays on when the value of n exceeds the limit of specified range “K0. Confirmation of self .ERROR/ALARM LED: turned off .diagnostic error Self . or K100 to K299.252 . R9005.diagnostic errors are checked in the normal way (see section 8.

SL1 Displays the specified character constant on the screen of the FP programmer II. When the F149 (MSG) instruction is executed. T32. C16. Once the message is set in the special data registers. The character constants (M) can be input only with programming tool software. the message flag (R9026) turns on and the message specified by S is set in special data registers DT9030 to DT9035. Ladder Diagram Boolean Address 10 11 Instruction ST F149 R 0 (MSG) Trigger R0 10 F149 MSG .FP0 High.253 .level Instructions 5 Step Availability F149 (MSG) Outline Program example Message display 13 FP0 C10. 3 . To clear the message in the special data registers. the message cannot be changed even if the F149 (MSG) instruction is executed again.3 Explanation of High . press ACLR (. M TEST PROGRAM S S Character constant for message M TEST PROGRAM Operands Operand S Relay WX WY WR N/A N/A N/A Timer/Counter SV N/A EV N/A Register DT N/A Index register IX N/A IY N/A K N/A Constant H N/A M A Index modifier N/A A: Available N/A: Not Available Explanation of example Displays the message “TEST PROGRAM” on the screen of the FP programmer II when execution condition (trigger) R0 turns on.level Instructions 3. Description This instruction is used for displaying message specified by S on the screen of the FP programmer II.) OP 1 1 1 ENT SHIFT SC WRT using the FP programmer II. C14. C32.

3 .High . F168. F169.speed counter. H 1111 .speed counter instructions F166. F167. disabling of the counter and stops pulse outputs. DT9052 D S 12 1 High speed counter control register 16-bit equivalent constant or 16-bit area to specify high-speed counter operation Operands Operand S A Relay WX WY WR A A Timer/Counter Register SV A EV A DT A Index register IX A IY A Constant K A H A A A: Available Index modifier Description Controls the high . S When disabling the count. C14. it is saved until the next time it is programmed. S When clearing the controls executed with the high .speed counter control 5 FP0 C10. SL1 Controls the software reset.” This instruction is used when performing the following operations while using the high . S When temporarily disabling the hard reset by the external inputs X2 and X5. S When stopping the positioning and pulse outputs.254 . C32. Ladder Diagram Boolean Address 10 11 Instruction ST DF F0 H DT (MV) 1111 9052 R 3 Trigger R3 10 1 DF F0 MV .speed counter according to the control code specified at “S. and F170. S When setting the near home input during home return operations for decelerating the speed of movement. S When performing a software reset. T32.level Instructions Step Availability FP0 F0 (MV) Outline Program example High . C16.level Instructions 3.3 Explanation of High . When a control code is programmed once.

. . Turns on for an instant when: . . . . .level Instructions 3. 3 . . . . . .speed counter. . . . . . .speed counter control flag The control code program area DT9052/DT90052 divides 4 bits to each channel of the high . 12 11 ch2 8 7 ch1 4 3 ch0 0 For more details on how to use the high . . .255 . . .level Instructions High . .The area specified using the index modifier exceeds the limit. . . . . S Error flag (R9008): Specifying the control code “S” Specify the controls in the four bits and convert it to H notation. . . . . .The value of S exceeds the limit of specified range. . . . ch3 15 DT9052/ DT90052: Control code H0 to HF entered by F0 (MV) instruction. H8(1000) Turn off pulse output and reset elapsed value . . . . H2(0010) Stop pulse output . .speed counter instruction 0: Continuous 1: Clear (pulse output stopped during pulse output control) Hardware reset 0: Enabled 1: Disabled (near home input effective during pulse output control) Software reset 0: Does not perform software reset 1: Does perform software reset Counting 0: Enable 1: Disable Example: Perform software reset . . . . .The value of S exceeds the limit of specified range. . . . . . . H9(1001) Enter the control code into the area DT9052/DT90052 of the corresponding channel. . . . .3 Explanation of High . . . The control code entered in the F0 (MV) instruction is stored in special data register DT9052/DT90052. . . . .speed counter mode setting Chapter 5 Flag conditions S Error flag (R9007): Turns on and stays on when: . . . . . .FP0 High. . . . . . . . . . Control code “S” = H V V V V (binary) Clears high. . . .The area specified using the index modifier exceeds the limit. . . . . H1(0001) Count disable . . .

H0. H1. The near home bit is saved. DT9052 F0 MV. Count disable and software reset during home return operations does not allow near home processing. H4. DT9052 Precautions during programming The hard reset disable is only effective when using reset inputs X2 and X5.256 . to cause near home processing during home return operations. it is necessary to enter 1 to the corresponding bit each cycle. however. X3 DF F0 MV.High . DT9052 Example 2: Enable the near home inputting during pulse output control and decelerate movement. DT9052 F0 MV.speed counter CH0.level Instructions FP0 Programming example Example 1: Soft reset the high . 3 .level Instructions 3. H0. R0 DF F0 MV.3 Explanation of High .

bit area (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A A IY N/A N/A Constant K A N/A H A N/A A A A: Available N/A: Not Available Index modifier 3 .level Instructions 3.speed counter : : 20 21 22 : : ST DF F1 DT (DMV) 9044 6 R 10 D DT 32-bit equivalent constant or lower 16-bit area of 32-bit data for storing a new elapsed value of high-speed counter to be changed (source) Lower 16. Ladder Diagram Boolean Address 10 11 12 Instruction ST DF F1 K DT (DMV) 3000 9044 R 0 Setting Trigger R0 10 DF F1 DMV .level Instructions Step Availability F1 (DMV) Outline Program example Set and read of elapsed value of high . DT9044 .speed counter. C14.FP0 High.speed counter 7 FP0 C10. K 3000 . C32. DT9044 S Reading Trigger R10 20 DF F1 DMV . C16.speed counter S D Elapsed value area of high. SL1 Sets or reads elapsed value of the high.3 Explanation of High .257 . T32.bit area of 32. DT 6 Elapsed value area of high.

High .The area specified using the index modifier exceeds the limit.level Instructions 3.speed counter used inside the system. Set the value of the 32 bits data written into the elapsed value so that it falls within the following range.speed counter is transferred to data registers DT6 and DT7. K3000 is written into the high . Turns on for an instant when: . . Writing with other high .3 Explanation of High .388.” Explanation of example When the execution condition (trigger) R10 turns on.The value of S exceeds the limit of specified range. DT9045 and the area specified in the “D.388.The area specified using the index modifier exceeds the limit. Specify the memory area for “S” and the memory area for “D” during reading with the memory area number of the lower 16 bits.608 to K8. Flag conditions S Error flag (R9007): Turns on and stays on when: .speed counter. or arithmetic operation instructions is not possible.8.speed counter mode setting Chapter 5 Reading the Elapsed Value The elapsed value of the high .speed counter is read from the special data registers DT9044.The value of S exceeds the limit of specified range. Allowable range: K . . the elapsed value of the high . Explanation of example When execution condition (trigger) R0 turns on.speed counter elapsed value area DT9044 and DT9045.258 .speed counter used and sets the elapsed value area of the high . S Error flag (R9008): 3 . the elapsed value is read to elapsed value area when the ED instruction is executed during each scan regardless of this instruction. When using the high .level instructions. For more details on how to use the high .607 (H FF800000 to H 007FFFFF) The writing is only possible with the F1 (DMV) instruction. such as the transfer instruction F0 (MV).level Instructions FP0 Setting the Elapsed Value Simultaneously writes the 32 bits data specified in “S” to the elapsed value area corresponding to the channel of the high .

speed counter at the input of R0. DT0.259 .speed counter channel no. R1 DF F1 DMV. DT4.speed counter into data register DT100 at the input of R1. DT100 Example 3: Internal relay R0 turns on when the elapsed value of the high . DT9044 Down input X0 R0 Value in DT4 0 Setting set value Time Example 2: Store the elapsed value of the high . DT9044.3 Explanation of High . R9010 F1 DT9044.speed counter exceeds K10000.FP0 High. K10000 R900A R0 Channel number and elapsed value chart High . DT0 F61 DCMP.level Instructions Application examples Example 1: Set the set value of the data register DT4 for the high . ch0 ch1 ch2 ch3 Elapsed value area DT9044 to DT9045/DT90044 to DT90045 DT9048 to DT9049/DT90048 to DT90049 DT9104 to DT9105/DT90104 to DT90105 DT9108 to DT9109/DT90108 to DT90109 3 .level Instructions 3. R0 DF F1 DMV.

The high. K10000 . C16. T32. C14. For detailed information section 5. The output coil that is turned on when the values match (Yn n: 0 to 7) Operands Operand n S D Relay WX WY WR N/A N/A N/A A A A Timer/Counter Register SV N/A A N/A EV N/A A N/A DT N/A A N/A Index register IX N/A A N/A IY N/A N/A N/A Constant K A A N/A H A A N/A A A N/A A: Available N/A: Not Available Index modifier N/A N/A N/A Explanation of example Target value 10000 0 Elapsed value R0 R903A Y0 Completion (clear) of F166 (HC1S) instruction control Turns on when target value is matched The special internal relay varies within the range of R903A to R903D.260 .level Instructions FP0 F166(HC1S) Outline Program example Target value match on instruction (with channel specification) Step 11 Availability FP0 C10.2 3 .High .3 Explanation of High . of the high. K 0 . Y0 n n S D 12 S D Y The channel No. SL1 When the elapsed value of the specified channel (HSC0 to HSC3) matches the target value. this instruction turns the specified output on. depending on the channel being used.level Instructions 3. C32.speed counter that corresponds to the matching output (n: K0 to K3). Ladder Diagram Boolean Address 10 11 Instruction ST DF F166 K K (HC1S) 0 10000 0 R 0 Trigger R0 10 DF F166 HC1S .speed counter target value data or the starting address of the area that contains the data.

3 Flag conditions S Error flag (R9007): Turns on and stays on when: . For the output Y specified for the target value match output.2) at the time of execution of the instruction.8388608 to K8388607 (H FF800000 to H 007FFFFF) The value S is stored in the target value area (refer to section 5. Before the elapsed value matches the target value. When the elapsed value matches this target value. or use it together with the F167 (HC1R) instruction.The value of S exceeds the limit of specified range.speed counter mode. For detailed information section 5.speed counter control flag for the corresponding channel (refer to section 5. To turn off the target value match output turned on by this instruction.n is number except 0 to 3. Precautions during programming After the execution condition (trigger) for the F166 (HC1S) instruction turns on and until the target value match output turns on. To execute this instruction. Turns on for an instant when: . S Error flag (R9008): 3 .The value of S exceeds the limit of specified range. .261 .The area specified using the index modifier exceeds the limit. KP instruction. even if a hard reset is performed (the elapsed value is cleared to 0).speed counter control flag for the specified channel is on. the high . The control of the target value setting and target value match output is cleared when the target value is matched. other high . . either execute a reset with the RST instruction or F0 (MV) instruction.bit specified by the target value S within the range given below. the target value and target value match output settings will not be cleared. the specified output Yn turns on (executed as an interrupt process).speed counter. .speed counter instructions (F166 to F170) for the same channel cannot be executed. there is no check whether the output is doubled up with that of a OT instruction. Set the value of the 32 .The area specified using the index modifier exceeds the limit. The range that can be specified by Yn is from Y0 to Y7. or other such high . K . it is necessary to set the high .level instructions.level Instructions 3.level Instructions Description Sets the numerical value specified by S as the target value for the high .2) is on.n is number except 0 to 3. .FP0 High.3 Explanation of High . When the high .

SL1 When the elapsed value of the specified channel (HSC0 to HSC3) matches the target value. depending on the channel being used.3 Explanation of High . Y0 n n S D 12 S D Y The channel No. of the high.speed counter that corresponds to the matching output (n: K0 to K3).200 R0 R903A Y0 Turns off when target value is matched Completion (clear) of F167 (HC1R) instruction control The special internal relay varies within the range of R903A to R903D. K0 . K .262 . The high. C14.High . For detailed information section 5.level Instructions 3. C16.level Instructions FP0 F167(HC1R) Outline Program example Target value match off instruction (with channel specification) Step 11 Availability FP0 C10. The output coil that is turned off when the values match (Yn n: 0 to 7) Operands Operand n S D Relay WX WY WR N/A N/A N/A A A A Timer/Counter Register SV N/A A N/A EV N/A A N/A DT N/A A N/A Index register IX N/A A N/A IY N/A N/A N/A Constant K A A N/A H A A N/A A A N/A A: Available N/A: Not Available Index modifier N/A N/A N/A Explanation of example Elapsed value 0 Target value . C32. this instruction turns the specified output off.200 . T32.2 3 . Ladder Diagram Boolean Address 10 11 Instruction ST DF F167 K K (HC1R) 0 200 0 R 0 Trigger R0 10 DF F167 HC1R .speed counter target value data or the starting address of the area that contains the data.

Turns on for an instant when: . or other such high . even if a hard reset is performed (the elapsed value is cleared to 0).263 . Precautions during programming After the execution condition (trigger) for the F167 (HC1R) instruction turns on and until the target value match output turns off. . . For the output Y specified for the target value match output.The value of S exceeds the limit of specified range.The value of S exceeds the limit of specified range.n is number except 0 to 3.level Instructions 3. . Before the elapsed value matches the target value.speed counter instructions (F166 to F170) for the same channel cannot be executed. KP instruction. other high . For detailed information section 5. S Error flag (R9008): 3 . the target value and target value match output settings will not be cleared. K . The range that can be specified by Yn is from Y0 to Y7. To execute this instruction.FP0 High.The area specified using the index modifier exceeds the limit.2) at the time of execution of the instruction.speed counter control flag for the corresponding channel (refer to section 5.The area specified using the index modifier exceeds the limit. the high .level Instructions Description Sets the numerical value specified by S as the target value for the high . When the high .n is number except 0 to 3.2) is on. To turn on the target value match output turned off by this instruction. Set the value of the 32 .level instructions.8388608 to K8388607 (H FF800000 to H 007FFFF7) The value S is stored in the target value area (refer to section 5. the specified output Yn turns off (executed as an interrupt process). it is necessary to set the high .3 Explanation of High . . The control of the target value setting and target value match output is cleared when the target value is matched.3 Flag conditions S Error flag (R9007): Turns on and stays on when: . When the elapsed value matches this target value. or use it together with the F166 (HC1S) instruction.bit specified by the target value S within the range given below.speed counter mode. either execute a reset with the SET instruction or F0 (MV) instruction.speed counter.speed counter control flag for the specified channel is on. there is no check whether the output is doubled up with that of a OT instruction.

.4 By performing rewrite during RUN during pulse output.3 Explanation of High . acceleration/deceleration time. The frequency is switched by the acceleration/deceleration time specified for changing from the initial speed to the maximum speed.264 When this instruction is used. Channel no. and target value.High . For detailed information section 8. Output Yn that corresponds to the pulse output (n: K0 or K1). Operands Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register IX N/A N/A IY N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available Description When the corresponding control flag is off and the execution condition (trigger) is in the on state. DT9047/ DT90044. K 0 S S n 12 n Starting address for the area that contains the data table. T32. a pulse is output from the specified output (Y0 or Y1). SL1 Outline Outputs a pulse from the specified output (Y0 or Y1) according to the specified parameter. maximum speed. DT90045 DT90046. DT90051 Notes • • 3 . DT100 . DT9049/ DT9050. Boolean Address 10 11 Instruction ST DF F168 DT K (SPD1) 100 0 R 10 Program example Ladder Diagram Trigger R10 10 DF F168 SPD1 . DT9045/ DT9046. C14. initial speed. DT9051/ DT90048. DT90049 DT90050. the setting for the channel corresponding to system register 400 should be set to “High . See below for the corresponding areas. C32.level Instructions FP0 5 F168(SPD1) Positioning control (trapezoidal control/home return: with channel specification) Step 5 Availability FP0 C10.level Instructions 3. are specified by a user program with a data table as shown on the following page.speed counter not used”. The control code. more than the set number of pulses may be output. ch0 ch1 Control flag R903A R903B Elapsed value area Target value area Directional output Y2 Y3 Near home DT9052/DT90052 <bit2> DT9052/DT90052 <bit6> Home input X0 X1 DT9044. DT90047 DT9048. C16.

By setting H13 in the control code. When the target value is negative.speed counter increases. initial speed. reverse: on) in the control code. the elapsed value will become 0. the directional output turns on and the elapsed value of the high . and acceleration/deceleration time of the data table. when the current value is less than the target value. forward: off.3 Explanation of High . the directional output turns on and the elapsed value of the high . At the completion of operations.level Instructions Description of operating mode Incremental (relative value control) Outputs the pulse set by the target value.speed counter increases. the directional output is turned off and the elapsed value of the high . the elapsed value area and set value area will become insufficient. Absolute (absolute value control) Outputs the pulse set by the difference between the current value and the target value. the pulse is continuously output. reverse: on) in the control code.speed counter decreases. Data table settings [S] through [S + 6] S S+1 S+2 S+3 S+4 S+5 S+6 f Fmax Output pulse number Fmin t t Acceleration time t Deceleration time Control code *1 Initial speed Fmin (Hz) K40 to K5000 (Hz) Maximum speed Fmax (Hz) K40 to K9500 (Hz) *2 Acceleration/ deceleration time t (ms) K30 to K32767 (ms) Target value (pulse number) K0 K-8388608 to K8388607 *3 Specify “K0” *3 3 . the directional output is turned off and the elapsed value of the high . refer to only the control code. To return to the home. set the bit corresponding to DT9052/DT90052 to off → on → off → with the near home input.) By setting H12 (absolute. By setting H03 in the control code.FP0 High. when the target value is positive. To decelerate the movement when near the home.level Instructions 3. the directional output is the reverse of that above. When the current value is greater than the target value. the directional output is the reverse of that above.265 . (The difference between the current value and the target value is the output pulse number. During operation. Home return Until the home input (X0 or X1) is entered.speed counter decreases. By setting H02 (incremental. forward: off. maximum speed.

*3: The (S + 4) to (S + 6) specification is not necessary when an home return is carried out.32 Flag conditions S Error flag (R9007): Turns on and stays on when: .The area specified using the index modifier exceeds the limit. Hjjj FP0 Pulse width specification 0: Duty 50% 1: Fixed pulse width (approx. .The value of S exceeds the limit of specified range. S+4” exceeds the limit of specified range. 26. n is number except 0 and 1.n is number except 0 and 1.) 27: Home return output on (Home input valid only after near home input. 80µs). The value of S exceeds the limit of specified range.3 Explanation of High .) 26: Home return output off (Home input valid only after near home input. . *2: When the pulse width is set to duty 50%.) 24.“S+1” is less than K40 . . Turns on for an instant when: The area specified using the index modifier exceeds the limit. the maximum is 6kHz. 2.266 .level Instructions 3. 80µs) Operation mode and directional output theory 00: Does not use incremental directional output 02: Incremental forward off/reverse on 03: Incremental forward on/reverse off 10: Does not use absolute directional output 12: Absolute forward off/reverse on 13: Absolute forward on/reverse off 20: No home return directional output 22: Home return directional output off 23: Home return directional output on 24: No home return directional output (Home input valid only after near home input.1 or later. For details on troubleshooting procedures when no pulse is output when F168(SPD1) instruction is executed page 5 . S Error flag (R9008): 3 . S+4” exceeds the limit of specified range.The value of “S+5.High .“S+1” > “S+2” . the maximum is 9. “S+1” is less than K40 “S+1” > “S+2” The value of “S+5.5kHz. When the pulse width is set to fixed pulse width (approx. and 27 are supported by CPU Ver.level Instructions *1: Specify the control code by setting the constant H.

3 Explanation of High . K1000.267 . K7000. DT 0. K300. DT 4 F0 MV.FP0 High.level Instructions Application example R0 F0 MV. DT 1 F0 MV. K100000. DT 6 R1 F168 SPD1. DT 2 F0 MV.000 1kHz 300ms 300ms f f = (7000 . H 2. DT 3 F1 DMV. DT 0 F0 MV. K 0.level Instructions 3. K 0 DT 0 DT 1 DT 2 DT 3 DT 4 DT 5 DT 6 7kHz K K K 2 1000 7000 300 K100000 0 Number of output pulse: 100.1000) ÷ 30 steps = 200 (Hz) t = 300ms ÷ 30 steps = 10ms t 3 .

When using the decremental counting mode. set the control code with combinations such as H12 (incremental. T32. ch0 ch1 Control flag R903A R903B Data register for elapsed value DT9044.level Instructions 3.High . Boolean Address 10 11 Instruction ST F169 DT K R 10 (PLS) 10 0 Program example Ladder Diagram Trigger R10 10 F169 PLS . DT90049 When using the incremental counting mode. . this instruction can be used as an instruction for JOG operations. The frequency and duty can be changed each scan. K 0 S S n n Starting address for the area that contains the data table. SL1 Outline Outputs the pulse of the specified parameter from the specified output (Y0 or Y1). C16.268 When this instruction is used. Output Yn that corresponds to the pulse output (n: K0 or K1). the pulse stops when the elapsed value exceeds H7FFFFF. a pulse is output from the specified channel. (This becomes effective with the next pulse output after this instruction is executed. Notes • • 3 . Channel no. directional output on). C14. directional output off) and H22 (decremental. DT9045/DT90044. DT10 . the setting for the channel corresponding to system register 400 should be set to “High . The pulse is output while the execution condition (trigger) is in the on state.) See below for the corresponding areas. For that situation. For detailed information section 8. C32. the pulse output will stop during rewriting. DT9049/DT90048.level Instructions FP0 5 F169(PLS) Pulse output instruction (JOG operation: with channel specification) Step 5 Availability FP0 C10. By specifying either incremental counting or decremental counting in the control code.4 By performing a rewrite during RUN while operating. Operands Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register IX N/A N/A IY N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available Description When the corresponding control flag is off and the execution condition (trigger) is in the on state. DT90045 DT9048. the pulse stops when the elapsed value exceeds HFF800000.speed counter not used”.3 Explanation of High .

269 . S Error flag (R9008): 3 .n is number except 0 and 1.The area specified using the index modifier exceeds the limit.level Instructions Data table settings S S+1 Control code Frequency (Hz) *1 K40 to K10.3 Explanation of High .level Instructions 3. Hjjj Pulse width specification 0: Fixed pulse width (approx.000 (Hz) *1: Specify the control code by setting the constant H.1 or later) 1 to 9: Duty ration approx.The area specified using the index modifier exceeds the limit. 2.n is number except 0 and 1. Turns on for an instant when: . 10 to 90% (10% increments) Operation mode and directional output 00: No counting mode 10: Incremental counting mode with no directional output 12: Incremental counting mode with directional output off 13: Incremental counting mode with directional output on 20: Decremental counting mode with no directional output 22: Decremental counting mode with directional output on 23: Decremental counting mode with directional output off Flag conditions S Error flag (R9007): Turns on and stays on when: . 80μs) (CPU ver. .FP0 High. .

C14. Output Yn that corresponds to the PWM output (n: K0 or K1). See below for the corresponding areas.4 By performing a rewrite during RUN while operating. Operands Operand S n Relay WX WY WR N/A N/A N/A N/A N/A N/A Timer/Counter Register SV N/A N/A EV N/A N/A DT A N/A Index register IX N/A N/A IY N/A N/A Constant K N/A A H N/A A Index modifier A N/A A: Available N/A: Not Available Description When the corresponding control flag is off and execution condition (trigger) is in the on state.speed counter not used”. C16. 3 . K 1 S S n n Starting address for the area that contains the data table. the pulse output will stop during rewriting. a PWM is output from the specified channel. The frequency and duty are specified with the data table on the right made by a user program.High . Boolean Address 10 11 Instruction ST F170 DT K R 10 (PWM) 20 1 Program example Ladder Diagram Trigger R10 10 F170 PWM . T32.level Instructions 3. For detailed information section 8. SL1 Outline Outputs the PWM of the specified parameter from the specified output (Y0 or Y1). the set duty ratio will differ. C32. Channel no. The PWM is output while the execution condition (trigger) is in the on state. The frequency settings is only effective at the start of the execution of the instruction (becomes effective after the next pulse output). the setting for the channel corresponding to system register 400 should be set to “High . DT20 . Since the output is delayed near the maximum and minimum levels.level Instructions FP0 5 F170(PWM) PWM output instruction (with channel specification) Step 5 Availability FP0 C10.270 .3 Explanation of High . ch0 ch1 Control flag R903A R903B Notes • • When this instruction is used. The duty can be changed each scan.

n is number except 0 and 1.7s) H11 to H16 are supported by CPU Ver.level Instructions Data table settings S S+1 Control code Duty (%) K0 to K8 (*1) K1 to K999 (0. 100% or higher is set with “S + 1” S Error flag (R9008): 3 .3Hz (Cycle 26ms) (Cycle 52ms) (Cycle 105ms) (Cycle 210ms) (Cycle 420ms) (Cycle 840ms) (Cycle 1.0ms) H16: Frequency 100Hz (Cycle 10ms) H0: Frequency 38Hz H1: Frequency 19Hz H2: Frequency 9. .8Hz H4: Frequency 2.100% or higher is set with “S + 1” Turns on for an instant when: The area specified using the index modifier exceeds the limit.4s) H8: Frequency 0. n is number except 0 and 1.3 Explanation of High .2Hz H6: Frequency 0.271 .6s) (Cycle 3.The frequency setting value set with S is outside the specification range.5ms) H15: Frequency 200Hz (Cycle 5.9%) *1: Control code contents (frequency settings) H11: Frequency 1kHz (Cycle 1. 2. .0ms) H12: Frequency 714Hz (Cycle 1.5Hz H3: Frequency 4.0ms) H14: Frequency 400Hz (Cycle 2. Flag conditions S Error flag (R9007): Turns on and stays on when: .1 or later.The area specified using the index modifier exceeds the limit.FP0 High.6Hz H7: Frequency 0.4Hz H5: Frequency 1. . The frequency setting value set with S is outside the specification range.level Instructions 3.15Hz (Cycle 6.25ms) H13: Frequency 500Hz (Cycle 2.1% to 99.

DT10 .01s units (0.01 seconds has elapsed. the auxiliary timer is activated.bit on .level Instructions FP0 5 Step Availability F183 (DSTM) 32-bit auxilialy timer 7 FP0 C10. the relays being used are turned on by the OT instruction which comes next in the program.01 to 21474836. DT5 R900D R5 Operation is the same as that in the example shown above. DT 5 S S D (DSTM) 10 5 5 R5 D 32-bit equivalent constant or lower 16-bit area of 32-bit data for timer set value 16-bit area for timer elapsed value Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter Register SV A A EV A A DT A A Index register IX A N/A IY N/A N/A Constant K A N/A H A N/A N/A N/A A: Available N/A: Not Available Index modifier Explanation of example When the execution condition (trigger) has been satisfied.) R0 F183 DSTM. SL1 Outline Sets the 32 .272 .(R900D is off when the execution condition (trigger) is off and while addition is being carried out. R5 goes on.second units. When the execution condition (trigger) is off. C32. Description This functions as a 32 . DT10. and relays being used are turned off by the OT instruction. the elapsed value area is cleared to 0.delay timer for 0.level Instructions 3. When the execution condition (trigger) is on. T32. and when the elapsed value “D + 1.01 .type on delay timer set in 0. R900D can also be used as a timer contact. C16. C14. D” (32 bits) exceeds the set value. the relay is turned on. When the time set for the special internal relay R900D has elapsed.3 Explanation of High . the elapsed time is added.bit addition .High . 3 . and the time equal to the values stored in data registers DT10 and DT11 x 0.47s) Boolean Address 10 11 Instruction ST F183 DT DT 16 OT R R 0 Program example Ladder Diagram Trigger R0 10 F183 DSTM .

DT6 0 2 If the execution condition (trigger) stays on. (In cases such as programs where division is carried out. R0 F183 DSTM.01 seconds. The F183 (DSTM) is set between 0. D”.FP0 High. or where it was not possible to carry out any operation during the scan. DT5 R5 0 1 Sent to “D + 1. The timer set value is specified as a K constant within the range of K1 to K2147483647. K500. R0 F183 DSTM. DT5 R5 DT5. DT50. D” are added.474.01 and 21. WR50 0 1 2 next page 3 .47 seconds.level instruction operations. DT50. the set time will be 0.273 .level Instructions Timer set time The timer setting is entered as a value of 0. the values in the elapsed value area “D + 1. Precautions during programming The area in which the set value is stored must be set so that the area specified for the elapsed value does not overlap any areas reserved for other timer or counter instructions. If the set value is K500.level Instructions 3. Precautions concerning programming tools Reading and writing the F183 (DSTM) instruction (32 . or for jump or loop instructions. the program should be set up so that operations are carried out every scan. where several operations are carried out during one scan. Because addition is carried out when operations are carried out. or memory areas used for high . correct results cannot be obtained.01 x (timer set value). 4.836. DT6 K500 2 Addition R900D F0 MV.3 Explanation of High . WR50 DT5. in units of 0.01 x 500 = 5 seconds.2 or a subsequent version. values of 0 are sent to the elapsed value area “D + 1.GR Ver. D” R900D F0 MV.) Consecutive OT instructions may be used in the program. or the FP Programmer II (AFP1114V2). K500. How the auxiliary timer works 1 When the execution condition (trigger) changes from off to on.bit auxiliary timer) requires NPST .

High .274 . DT50. DT5 R5 DT5 K500 R900D F0 MV. which is activated by R1: on. which is activated by R0: on. DT10 R900D Y1 Pair When timer a . R900D will not function correctly. DT20. D” Set value “S+1. relays being used are turned on by the OT instruction which comes next in the program. R0 F183 DSTM. The special internal relay R900D also goes on at this point. WR1. DT0. R0 F183 DSTM. If written as indicated below. S”. When timer expires. WR50 3 Addition completed Elapsed value “D+1. expires.level Instructions 3 FP0 If the values in the elapsed value area “D +1.3 Explanation of High . WR10. K500. DT10 b .level Instructions 3. R900D R900D Y0 Y1 3 . Y0 goes on. Y1 goes on. R0 F183 DSTM. DT5 R1 F183 DSTM. S” R0 on off R5 on (R900D) off Precautions when using R900D If R900D is used and multiple auxiliary timers are being used. always use R900D in the line following the auxiliary timer instruction. DT5 R900D Y0 Pair R1 F183 DSTM. D” reach “S + 1.

234) 3 .FP0 High.3 Explanation of High .1 or later/FP0 T32 Copies floating point type data (32 bits) to the specified 32-bit area.level Instructions 3. DT10 S S D D Floating point type data (32 bits) or lower 16-bit area of 32-bit data (source) Lower 16-bit area for 32-bit area (destination) Operands Operand S D Relay WX WY WR N/A N/A N/A N/A A A Timer/Counter SV N/A A EV N/A A Register DT N/A A Index register IX IY K Constant H f A Integer device N/A N/A A: Available N/A: Not Available N/A A N/A N/A N/A N/A N/A Explanation of example The floating point type data “f 1. C14.234 10 Trigger R0 10 F309 FMV.level Instructions Step Availability F309 (FMV) Outline Program example 8 Floating point type data move FP0 C10. 2.234. DT10: DT11: (f1. C16.275 . C32 CPU Ver. f 1.234” are copied to data registers DT11 and DT10 when trigger R0 turns on. Ladder Diagram Boolean Address 10 11 Instruction ST F309 f DT R 0 (FMV) 1.

0. Floating point type data Real number data D: D+1: 15 0 Lower word Higher word Range of real number data which can be set are as follows: Positive: f0.3 Explanation of High .276 .9999999 to f . Flag conditions S Error flag (R9007): S Error flag (R9008): Turns on and stays on when the area specified using the index modifier exceeds the limit.0000001 to f9999999 Negative: f .level Instructions FP0 Description The floating point type data (32 bits) specified by S is copied to the 32-bit area specified by D when the trigger turns on.High .000001 Precaution during programming This instruction F309 (FMV) cannot be used in the interrupt program.level Instructions 3. Turns on for an instant when the area specified using the index modifier exceeds the limit. 3 .

C16. C32 CPU Ver. S2] → [D+1. R0 F310 F+.277 .level Instructions 3. 2. C14.3 Explanation of High .1 or later/FP0 T32 Adds two real number data items and stores the result in the specified area. % DT 0. the integer data is internally converted to real numbers before operations continue. D] Specifying the integer device with [S1] and [S2]. DT10.FP0 High. DT20. % DT 2. S1] + [S2+1. DT30 S1 S1 S2 D S2 D Real number data (2 words) or lower 16-bit area of 32-bit data (for augend) Real number data (2 words) or lower 16-bit area of 32-bit data (for addend) Lower 16-bit area of 32-bit data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A Index register IX A A A IY K A A Constant H A A f A A Integer device A A A A: Available N/A: Not Available N/A N/A N/A Description The real number data (2 words) specified by S1 and S2 are added together when the trigger turns on. The added result is stored in D+1 and D. DT 4 3 . Ladder Diagram Boolean Address 10 11 Instruction ST F310 DT DT DT R 0 (F+) 10 20 30 Trigger R0 10 F310 F+. [S1+1.level Instructions Step Availability F310 (F+) Outline Program example 14 Floating point type data addition FP0 C10.

f123.3 Explanation of High .The area specified using the index modifier exceeds the limit.level Instructions FP0 Specifying the integer device with [D].level Instructions 3. For detailed information about the processing of specifying the integer device section 1. R0 F310 F+.The area specified using the index modifier exceeds the limit. Flag conditions S Error flag (R9007): Turns on and stays on when: .If result of processing is outside integer range when integer device is specified in “D+1 and D”.795” is stored to DT30 and DT31 when the R0 turns on.345 DT10 F309 FMV.3 Program example The “f4. R0 F309 FMV. R0 F310 F+.” . Turns on for an instant when the result is overflowed. % DT 4 When the constant K is specified in S1 and S2. DT 2.If data other than real number data is specified in “S1+1 and S1” and “S2+1 and S2. .If data other than real number data is specified in “S1+1 and S1” and “S2+1 and S2.414. DT 0. the operations are the same as when a integer device is specified. DT10.” . DT30 The “f135. Turns on for an instant when: . the real numbers are automatically converted into integer data. S Error flag (R9008): S Carry flag (R9009): 3 . f1. DT30 Precaution during programming This instruction F310 (F+) cannot be used in the interrupt program. f12. DT20. .554” is stored to DT30 and DT31 when the R0 turns on.14. DT20 F310 F+.High .278 .If result of processing is outside integer range when integer device is specified in “D+1 and D”. f3.45.

Ladder Diagram Boolean Address 10 11 Instruction ST F311 DT DT DT R 0 (F-) 10 20 30 Trigger R0 10 F311 F . C14. S1] .level Instructions 3.1 or later/FP0 T32 Subtracts real number data from the minuend and stores the result in the specified area. 2. C16. R0 F311 F . % DT 0. DT20. The subtracted result is stored in D+1 and D.279 . D] Specifying the integer device with [S1] and [S2].[S2+1... DT30 S1 S1 S2 D S2 D Real number data (2 words) or lower 16-bit area of 32-bit data (for minuend) Real number data (2 words) or lower 16-bit area of 32-bit data (for subtrahend) Lower 16-bit area of 32-bit data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A Index register IX A A A IY K A A Constant H A A f A A Integer device A A A A: Available N/A: Not Available N/A N/A N/A Description Subtracts the real number data (2 words) specified by S2 from the real number data (32-bit) specified by S1 when the trigger turns on.level Instructions Step Availability F311 (F .FP0 High. DT10. % DT 2.3 Explanation of High . [S1+1. DT 4 3 . C32 CPU Ver.) Outline Program example Floating point type data subtraction 14 FP0 C10. the integer data is internally converted to real numbers before operations continue. S2] → [D+1.

DT30 The “f100. the operations are the same as when a integer device is specified.3 Explanation of High . DT 0.” . DT20 F311 F . .The area specified using the index modifier exceeds the limit. Turns on for an instant when the result is overflowed. f0.If result of processing is outside integer range when integer device is specified in “D+1 and D”. DT30 Precaution during programming This instruction F311 (F–) cannot be used in the interrupt program.1.level Instructions 3.If data other than real number data is specified in “S1+1 and S1” and “S2+1 and S2. . R0 F309 FMV.” .If data other than real number data is specified in “S1+1 and S1” and “S2+1 and S2. f0. S Error flag (R9008): S Carry flag (R9009): 3 .level Instructions FP0 Specifying the integer device with [D]. Flag conditions S Error flag (R9007): Turns on and stays on when: . Turns on for an instant when: . DT10.High .05” is stored to DT30 and DT31 when the R0 turns on.. the real numbers are automatically converted into integer data. f100. DT10 F309 FMV.. R0 F311 F . DT20.If result of processing is outside integer range when integer device is specified in “D+1 and D”.The area specified using the index modifier exceeds the limit. DT 2. % DT 4 When the constant K is specified in S1 and S2. For detailed information about the processing of specifying the integer device section 1.3 Program example The “f0.445” is stored to DT30 and DT31 when the R0 turns on. f1.555.05.280 .. R0 F311 F .

D] Specifying the integer device with [S1] and [S2]. [S1+1. R0 F312 F*. % DT 0. C16. S2] → [D+1.1 or later/FP0 T32 Multiplies two real number data items and stores the result in the specified 32-bit area. DT20. The multiplied result is stored in D+1 and D (32-bit area).level Instructions 3. the integer data is internally converted to real numbers before operations continue.FP0 High.281 .level Instructions Step Availability F312 (F*) Outline Program example Floating point type data multiplication 14 FP0 C10. % DT 2. C14. S1] × [S2+1.3 Explanation of High . C32 CPU Ver. DT30 S1 S1 S2 D S2 D Real number data (2 words) or lower 16-bit area of 32-bit data (for multiplicand) Real number data (2 words) or lower 16-bit area of 32-bit data (for multiplier) Lower 16-bit area of 32-bit data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A Index register IX A A A IY K A A Constant H A A f A A Integer device A A A A: Available N/A: Not Available N/A N/A N/A Description Multiplies the real number data (2 words) specified by S1 and the one specified by S2 when the trigger turns on. 2. Ladder Diagram Boolean Address 10 11 Instruction ST F312 DT DT DT R 0 (F*) 10 20 30 Trigger R0 10 F312 F*. DT10. DT 4 3 .

% DT 4 When the constant K is specified in S1 and S2. the real numbers are automatically converted into integer data.” . .High . the operations are the same as when a integer device is specified.The area specified using the index modifier exceeds the limit.If data other than real number data is specified in “S1+1 and S1” and “S2+1 and S2.234. R0 F312 F*.If data other than real number data is specified in “S1+1 and S1” and “S2+1 and S2.If result of processing is outside integer range when integer device is specified in “D+1 and D”.The area specified using the index modifier exceeds the limit. f1.3 Explanation of High . .282 . f100.4000” is stored to DT30 and DT31 when the R0 turns on.level Instructions FP0 Specifying the integer device with [D]. DT 0. R0 F312 F*. For detailed information about the processing of specifying the integer device section 1. DT 2. Turns on for an instant when the result is overflowed. Flag conditions S Error flag (R9007): Turns on and stays on when: .level Instructions 3.” .3 Program example The “f123.If result of processing is outside integer range when integer device is specified in “D+1 and D”. Turns on for an instant when: . S Error flag (R9008): S Carry flag (R9009): 3 . DT30 Precaution during programming This instruction F312 (F*) cannot be used in the interrupt program.

DT4 3 . The result is stored in D+1 and D. Ladder Diagram Boolean Address 10 11 Instruction ST F313 DT DT R 0 (F%) 10 20 30 Trigger R0 10 F313 F%. 2.283 . R0 F313 F%.level Instructions Step Availability F313 (F%) Outline Program example 14 Floating point type data division FP0 C10.level Instructions 3. C14. % DT 2. [S1+1.3 Explanation of High . S1] ÷ [S2+1. the integer data is internally converted to real numbers before operations continue. DT20.FP0 High. % DT 0. DT30 S1 S1 S2 D S2 D DT Real number data (2 words) or lower 16-bit area of 32-bit data (for dividend) Real number data (2 words) or lower 16-bit area of 32-bit data (for divisor) Lower 16-bit area of 32-bit data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A Index register IX A A A IY K A A Constant H A A f A A Integer device A A A A: Available N/A: Not Available N/A N/A N/A Description The real number data (2 words) specified by S1 is divided by the real number data (2 words) specified by S2 when the trigger turns on. S2] → [D+1. C16. D] Specifying the integer device with [S1] and [S2].1 or later/FP0 T32 Divides real number data by the divisor and stores the divided result in the specified 32-bit area. C32 CPU Ver. DT10.

0”.level Instructions FP0 Specifying the integer device with [D].321.The area specified using the index modifier exceeds the limit.If result of processing is outside integer range when integer device is specified in “D+1 and D”. DT 2.The area specified using the index modifier exceeds the limit. f54.If data other than real number data is specified in “S1+1 and S1” and “S2+1 and S2. . Turns on for an instant when the result is overflowed. . % DT 4 When the constant K is specified in S1 and S2.3 Explanation of High .High . the operations are the same as when a integer device is specified.The real number data for the divisor specified by S2 is “0.level Instructions 3. R0 F313 F%.432100” is stored to DT30 and DT31 when the R0 turns on. the real numbers are automatically converted into integer data. R0 F313 F%. .0”.The real number data for the divisor specified by S2 is “0. Turns on for an instant when: . DT30 Precaution during programming This instruction F313 (F%) cannot be used in the interrupt program.” .If data other than real number data is specified in “S1+1 and S1” and “S2+1 and S2. Flag conditions S Error flag (R9007): Turns on and stays on when: .” . .If result of processing is outside integer range when integer device is specified in “D+1 and D”. f10. For detailed information about the processing of specifying the integer device section 1. S Error flag (R9008): S Carry flag (R9009): 3 .284 . DT 0.3 Program example The “f5.

3 Explanation of High . 2. C16. S]) → [D+1. the integer data is internally converted to real numbers before operations continue. This instruction calculates sine [SIN ( )]. D] Specifying the integer device with [S]. SIN ([S+1.FP0 High. DT10.1 or later/FP0 T32 Triangle functions.level Instructions Step Availability F314 (SIN) Outline Program example Floating point type data sine operation 10 FP0 C10. R0 F314 SIN. C14. Ladder Diagram Boolean Address 10 11 Instruction ST F314 DT DT R 0 (SIN) 10 20 Trigger R0 10 F314 SIN. % DT 0. C32 CPU Ver.level Instructions 3. DT20 S S D D Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description The SIN([S+1 and S]) of an angle data (units are radians) specified by S+1 and S is calculated and the result stored in D+1 and D. DT 4 3 .285 .

The area specified using the index modifier exceeds the limit. DT 0.High . the real numbers are automatically converted into integer data. R0 F314 SIN. f0.level Instructions 3. Flag conditions S Error flag (R9007): Turns on and stays on when: .4999999” is stored to DT20 and DT21 when the R0 turns on.3 Program example The “f0. We recommend that angle data be set within the following range: . . % DT 4 When the constant K is specified in S. .” S Error flag (R9008): S Carry flag (R9009): S = flag (R900B): 3 . Turns on for an instant when the result is overflowed.3 Explanation of High .2π (radians) ≦ [S+1. DT20 Precautions during programming The accuracy of the calculation decreases as the absolute value of the input value (angle data specified in S+1 and S) increases.The area specified using the index modifier exceeds the limit. the operations are the same as when a integer device is specified. Turns on for an instant when: .If result of processing is outside integer range when integer device is specified in “D+1 and D”. S] ≦ 2π (radians) This instruction F314 (SIN) cannot be used in the interrupt program.If result of processing is outside integer range when integer device is specified in “D+1 and D”. . .Absolute value of “S+1 and S” is 52707176 or greater.286 .Absolute value of “S+1 and S” is 52707176 or greater.If data other than real number data is specified in “S+1 and S”. For detailed information about the processing of specifying the integer device section 1. Radians of 30_ R0 F314 SIN. . Turns on when result of processing is recognized as “0.level Instructions FP0 Specifying the integer device with [D].5235987.If data other than real number data is specified in “S+1 and S”. .

This instruction calculates cosine [COS ( )]. % DT 0. D] Specifying the integer device with [S].FP0 High. DT 4 3 . DT20 S S D D Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description The COS ([S+1 and S]) of an angle data (units are radians) specified by S+1 and S is calculated and the result stored in D+1 and D. DT10. 2.287 . the integer data is internally converted to real numbers before operations continue. R0 F315 COS. C16.3 Explanation of High .level Instructions 3. S]) → [D+1. COS ([S+1. C32 CPU Ver. Ladder Diagram Boolean Address 10 11 Instruction ST F315 DT DT R 0 (COS) 10 20 Trigger R0 10 F315 COS. C14.1 or later/FP0 T32 Triangle functions.level Instructions Step Availability F315 (COS) Outline Program example Floating point type data cosine operation 10 FP0 C10.

For detailed information about the processing of specifying the integer device section 1. f0.” S Error flag (R9008): S Carry flag (R9009): S = flag (R900B): 3 . DT 0.If data other than real number data is specified in “S+1 and S”.288 .High . Flag conditions S Error flag (R9007): Turns on and stays on when: .If result of processing is outside integer range when integer device is specified in “D+1 and D”. R0 F315 COS. Radians of 45_ R0 F315 COS. Turns on for an instant when: .The area specified using the index modifier exceeds the limit.The area specified using the index modifier exceeds the limit. . the real numbers are automatically converted into integer data. . We recommend that angle data be set within the following range: .level Instructions FP0 Specifying the integer device with [D]. the operations are the same as when a integer device is specified.level Instructions 3. Turns on for an instant when the result is overflowed. Turns on when result of processing is recognized as “0.7071068” is stored to DT20 and DT21 when the R0 turns on.7853981. % DT 4 When the constant K is specified in S.3 Explanation of High .2π (radians) ≦ [S+1. DT20 Precautions during programming The accuracy of the calculation decreases as the absolute value of the input value (angle data specified in S+1 and S) increases. .Absolute value of “S+1 and S” is 52707176 or greater.If data other than real number data is specified in “S+1 and S”. . . . S] ≦ 2π (radians) This instruction F315 (COS) cannot be used in the interrupt program.3 Program example The “f0.Absolute value of “S+1 and S” is 52707176 or greater.If result of processing is outside integer range when integer device is specified in “D+1 and D”.

D] Specifying the integer device with [S]. S]) → [D+1. TAN ([S+1. C16.level Instructions Step Availability F316 (TAN) Outline Program example Floating point type data tangent operation 10 FP0 C10. the operations are the same as when a integer device is specified. DT10. C14.3 Explanation of High . 2. % DT 0. C32 CPU Ver. DT 0.level Instructions 3. R0 F316 TAN. DT 4 Specifying the integer device with [D].289 . Ladder Diagram Boolean Address 10 11 Instruction ST F316 DT DT R 0 (TAN) 10 20 Trigger R0 10 F316 TAN. the integer data is internally converted to real numbers before operations continue.1 or later/FP0 T32 Triangle functions. DT20 S S D D Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description The TAN([S+1 and S]) of an angle data (units are radians) specified by S+1 and S is calculated and the result stored in D+1 and D. For detailed information about the processing of specifying the integer device section 1. R0 F316 TAN. % DT 4 When the constant K is specified in S. the real numbers are automatically converted into integer data.FP0 High.3 3 . This instruction calculates tangent [TAN ( )].

The area specified using the index modifier exceeds the limit.The area specified using the index modifier exceeds the limit. DT20 Precautions during programming The accuracy of the calculation decreases as the absolute value of the input value (angle data specified in S+1 and S) increases.level Instructions 3. .2π (radians) ≦ [S+1. .High .047197. Flag conditions S Error flag (R9007): Turns on and stays on when: . Radians of 60_ R0 F316 TAN.3 Explanation of High .level Instructions FP0 Program example The “f1.Absolute value of “S+1 and S” is 52707176 or greater. Turns on for an instant when the result is overflowed.If data other than real number data is specified in “S+1 and S”.If result of processing is outside integer range when integer device is specified in “D+1 and D”. .Absolute value of “S+1 and S” is 52707176 or greater. f1. Turns on for an instant when: .732048” is stored to DT20 and DT21 when the R0 turns on. We recommend that angle data be set within the following range: .” S Error flag (R9008): S Carry flag (R9009): S = flag (R900B): 3 .290 . Turns on when result of processing is recognized as “0.If result of processing is outside integer range when integer device is specified in “D+1 and D”. S] ≦ 2π (radians) This instruction F316 (TAN) cannot be used in the interrupt program. .If data other than real number data is specified in “S+1 and S”. . .

R0 F317 ASIN. For detailed information about the processing of specifying the integer device section 1.1 ([S+1.3 Explanation of High . the integer data is internally converted to real numbers before operations continue.level Instructions 3. S]) → [D+1. % DT 0.291 . % DT 4 When the constant K is specified in S. the operations are the same as when a integer device is specified. DT10. R0 F317 ASIN. C16. SIN .3 3 . D] Specifying the integer device with [S].FP0 High. Ladder Diagram Boolean Address 10 11 Instruction ST F317 DT DT R 0 (ASIN) 10 20 Trigger R0 10 F317 ASIN. DT20 S S D D Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description SIN of the value specified in S+1 and S is calculated. the real numbers are automatically converted into integer data. C14. DT 0. 2. C32 CPU Ver.1 ( )]. and the result [an angle (radians)] is stored in D+1 and D.1 or later/FP0 T32 Triangle functions. This instruction calculates arcsine [SIN . DT 4 Specifying the integer device with [D].level Instructions Step Availability F317 (ASIN) Outline Program example Floating point type data arcsine operation 10 FP0 C10.

“S+1 and S” is not within the range . Turns on for an instant when: .292 . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . f0.1. .0 ≦ [S+1.0 .level Instructions 3.0 .High . S] ≦ 1.4999999.The area specified using the index modifier exceeds the limit. D] ≦ π/2 (radians) This instruction F317 (ASIN) cannot be used in the interrupt program.3 Explanation of High . .If result of processing is outside integer range when integer device is specified in “D+1 and D”. S] ≦ 1.level Instructions FP0 Program example The “f0.0 ≦ [S+1.” Turns on for an instant when the result is overflowed.If data other than real number data is specified in “S+1 and S”. DT20 Precautions during programming D+1 and D is stored within the following range: . Flag conditions S Error flag (R9007): Turns on and stays on when: . .The area specified using the index modifier exceeds the limit. R0 F317 ASIN.If result of processing is outside integer range when integer device is specified in “D+1 and D”.1.5235986 (30_ radians)” is stored to DT20 and DT21 when the R0 turns on. Turns on when result of processing is recognized as “0.If data other than real number data is specified in “S+1 and S”. .π/2 (radians) ≦ [D+1.“S+1 and S” is not within the range .

This instruction calculates arccosine [COS . the operations are the same as when a integer device is specified. C16. the integer data is internally converted to real numbers before operations continue.1 ([S+1.level Instructions 3. % DT 4 When the constant K is specified in S.level Instructions Step Availability F318 (ACOS) Outline Program example Floating point type data arccosine operation 10 FP0 C10. R0 F318 ACOS. DT 4 Specifying the integer device with [D]. % DT 0. For detailed information about the processing of specifying the integer device section 1.1 or later/FP0 T32 Triangle functions. DT10. Ladder Diagram Boolean Address 10 11 Instruction ST F318 DT R 0 (ACOS) 10 20 Trigger R0 10 F318 ACOS. C14. C32 CPU Ver.3 3 . 2. DT20 S S D DT D Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description COS of the value specified in S+1 and S is calculated.293 .3 Explanation of High . the real numbers are automatically converted into integer data.1 ( )]. R0 F318 ACOS. DT 0. D] Specifying the integer device with [S]. S]) → [D+1. and the result [an angle data (units and radians)] is stored in D+1 and D. COS .FP0 High.

.If result of processing is outside integer range when integer device is specified in “D+1 and D”.0 ≦ [S+1.294 .0 ≦ [S+1.High .3 Explanation of High .1.0 (radians) ≦ [D+1.If result of processing is outside integer range when integer device is specified in “D+1 and D”. DT20 Precautions during programming D+1 and D is stored within the following range: 0. .0 .0 .The area specified using the index modifier exceeds the limit.” Turns on for an instant when the result is overflowed. Turns on when result of processing is recognized as “0.“S+1 and S” is not within the range .level Instructions FP0 Program example The “f0. . Turns on for an instant when: . R0 F318 ACOS. .If data other than real number data is specified in “S+1 and S”. S] ≦ 1.level Instructions 3.If data other than real number data is specified in “S+1 and S”.7071069. f0. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . D] ≦ π (radians) This instruction F318 (ACOS) cannot be used in the interrupt program.The area specified using the index modifier exceeds the limit.7853980 (45_ radians)” is stored to DT20 and DT21 when the R0 turns on. S] ≦ 1.“S+1 and S” is not within the range .1. Flag conditions S Error flag (R9007): Turns on and stays on when: .

This instruction calculates arctangent [TAN . R0 F319 ATAN. DT20 S S D D Angle data (2 words) or lower 16-bit area of 32-bit data where angle data is stored Lower 16-bit area of 32-bit data where calculated result is stored Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description TAN . D] Specifying the integer device with [S]. R0 F319 ATAN.3 3 . DT10.1 ([S+1.3 Explanation of High . the operations are the same as when a integer device is specified.level Instructions Step Availability F319 (ATAN) Outline Program example Floating point type data arctangent operation 10 FP0 C10.1 ( )]. and the result [an angle data (units and radians)] is stored in D+1 and D. For detailed information about the processing of specifying the integer device section 1.295 .FP0 High. % DT 4 When the constant K is specified in S. Ladder Diagram Boolean Address 10 11 Instruction ST F319 DT DT R 0 (ATAN) 10 20 Trigger R0 10 F319 ATAN. C32 CPU Ver. C16. the real numbers are automatically converted into integer data. S]) → [D+1.level Instructions 3. % DT 0. the integer data is internally converted to real numbers before operations continue. DT 4 Specifying the integer device with [D].1 or later/FP0 T32 Triangle functions.1 (the arctangent) of the value specified in S+1 and S is calculated. C14. DT 0. 2. TAN .

Flag conditions S Error flag (R9007): Turns on and stays on when: .” Turns on for an instant when the result is overflowed.73205. f1. Turns on for an instant when: . DT20 Precautions during programming D+1 and D is stored within the following range: .3 Explanation of High .π/2 (radians) < [D+1.If data other than real number data is specified in “S+1 and S”.296 .If result of processing is outside integer range when integer device is specified in “D+1 and D”. . . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .The area specified using the index modifier exceeds the limit. .If data other than real number data is specified in “S+1 and S”.047197 (60_ radians)” is stored to DT20 and DT21 when the R0 turns on.If result of processing is outside integer range when integer device is specified in “D+1 and D”.level Instructions 3.High . D] < π/2 (radians) This instruction F319 (ATAN) cannot be used in the interrupt program.level Instructions FP0 Program example The “f1. . R0 F319 ATAN.The area specified using the index modifier exceeds the limit. Turns on when result of processing is recognized as “0.

3 Explanation of High . DT 4 Specifying the integer device with [D]. DT10.level Instructions Step Availability F320 (LN) Outline Program example Floating point type data natural logarithm 10 FP0 C10. and the result is stored in D+1 and D.1 or later/FP0 T32 This instruction calculates a natural logarithm LN( ). C14. 2. the integer data is internally converted to real numbers before operations continue. C16.3 3 . % DT 0. LN ([S+1. S]) → [D+1. DT 0. R0 F320 LN. DT20 S S D D Real number data (2 words) or lower 16-bit area of 32-bit data where real number data is stored Lower 16-bit area of 32-bit data where calculated result is stored Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description The natural logarithm LN(S+1 and S) is calculated of the data specified in S+1 and S. D] Specifying the integer device with [S]. R0 F320 LN. the real numbers are automatically converted into integer data.level Instructions 3. Ladder Diagram Boolean Address 10 11 Instruction ST F320 DT DT R 0 (LN) 10 20 Trigger R0 10 F320 LN.FP0 High. % DT 4 For detailed information about the processing of specifying the integer device section 1. C32 CPU Ver.297 .

The “S+1 and S” is not greater than zero. .729. DT30 Precaution during programming This instruction F320 (LN) cannot be used in the interrupt program.3160815” is stored to DT30 and DT31 when the R0 turns on.6094379” is stored to DT20 and DT21 when the R0 turns on. DT20 The “f . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . Turns on for an instant when: .The area specified using the index modifier exceeds the limit.The “S+1 and S” is not greater than zero. .High .3 Explanation of High . f0. .If data other than real number data is specified in “S+1 and S”. R0 F320 LN. . K 5.0. . .If data other than real number data is specified in “S+1 and S”. Turns on when result of processing is recognized as “0.level Instructions FP0 Program example The “f1.level Instructions 3. Flag conditions S Error flag (R9007): Turns on and stays on when: .If result of processing is outside integer range when integer device is specified in “D+1 and D”.” Turns on for an instant when the result is overflowed.298 .The area specified using the index modifier exceeds the limit. R0 F320 LN.If result of processing is outside integer range when integer device is specified in “D+1 and D”.

the real numbers are automatically converted into integer data.1 or later/FP0 T32 This instruction calculates the exponent of a floating point type real number EXP( ). C16. D] The calculation is performed with the exponent base (e) equal to 2. C14. DT 4 Specifying the integer device with [D].FP0 High. Ladder Diagram Boolean Address 10 11 Instruction ST F321 DT DT R 0 (EXP) 10 20 Trigger R0 10 F321 EXP. DT20 S S D D Real number data (2 words) or lower 16-bit area of 32-bit data where real number data is stored Lower 16-bit area of 32-bit data where calculated result is stored Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description The exponent EXP(S+1 and S) is calculated from the real number data specified in S+1 and S. EXP ([S+1. 2. DT10. % DT 4 For detailed information about the processing of specifying the integer device section 1. R0 F321 EXP.299 . and the result is stored in D+1 and D. C32 CPU Ver.3 3 . S]) → [D+1. R0 F321 EXP. % DT 0. the integer data is internally converted to real numbers before operations continue.level Instructions Step Availability F321 (EXP) Outline Program example Floating point type data exponent 10 FP0 C10. Specifying the integer device with [S].718282. DT 0.level Instructions 3.3 Explanation of High .

If result of processing is outside integer range when integer device is specified in “D+1 and D”. f5.High .If data other than real number data is specified in “S+1 and S”. . .406402” is stored to DT30 and DT31 when the R0 turns on.If data other than real number data is specified in “S+1 and S”.4. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .The area specified using the index modifier exceeds the limit.level Instructions FP0 Program example The “f7. Turns on when result of processing is recognized as “0. DT20 The “f221. . DT30 Precaution during programming This instruction F321 (EXP) cannot be used in the interrupt program.level Instructions 3. Turns on for an instant when: .If result of processing is outside integer range when integer device is specified in “D+1 and D”. K 2.389056” is stored to DT20 and DT21 when the R0 turns on. R0 F321 EXP.The area specified using the index modifier exceeds the limit. R0 F321 EXP. Flag conditions S Error flag (R9007): Turns on and stays on when: .” Turns on for an instant when the result is overflowed. .3 Explanation of High .300 .

level Instructions Step Availability F322 (LOG) Outline Program example Floating point type data logarithm 10 FP0 C10. C14. R0 F322 LOG. D] Specifying the integer device with [S]. R0 F322 LOG. S]) → [D+1. LOG ([S+1. the integer data is internally converted to real numbers before operations continue. the real numbers are automatically converted into integer data. Ladder Diagram Boolean Address 10 11 Instruction ST F322 DT R 0 (LOG) 10 20 Trigger R0 10 F322 LOG. % DT 0. For detailed information about the processing of specifying the integer device section 1.level Instructions 3.301 . % DT 4 When the constant K is specified in S. C16. C32 CPU Ver.1 or later/FP0 T32 This instruction calculates the logarithm of a floating point type real number LOG( ). DT 0. DT10.FP0 High. and the result is stored in D+1 and D.3 3 . 2. DT20 S S D DT D Real number data (2 words) or lower 16-bit area of 32-bit data where real number data is stored Lower 16-bit area of 32-bit data where calculated result is stored Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description The logarithm LOG(S+1 and S) is calculated of the data specified in S+1 and S.3 Explanation of High . DT 4 Specifying the integer device with [D]. the operations are the same as when a integer device is specified.

” Turns on for an instant when the result is overflowed.If data other than real number data is specified in “S+1 and S”. K20. . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . f1. R0 F322 LOG.level Instructions 3. .If result of processing is outside integer range when integer device is specified in “D+1 and D”. . DT20 The “f0. DT30 Precaution during programming This instruction F322 (LOG) cannot be used in the interrupt program.If result of processing is outside integer range when integer device is specified in “D+1 and D”.0254. Flag conditions S Error flag (R9007): Turns on and stays on when: .302 .3 Explanation of High . . R0 F322 LOG.The “S+1 and S” is not greater than zero. Turns on when result of processing is recognized as “0.High .If data other than real number data is specified in “S+1 and S”.The area specified using the index modifier exceeds the limit.30103” is stored to DT20 and DT21 when the R0 turns on.The “S+1 and S” is not greater than zero. .level Instructions FP0 Program example The “f1. Turns on for an instant when: .0108932” is stored to DT30 and DT31 when the R0 turns on.The area specified using the index modifier exceeds the limit. .

DT20. S] ^ [S2+1. DT 4 3 . 2. % DT 0. S2] → [D+1. R0 F323 PWR. the integer data is internally converted to real numbers before operations continue.level Instructions 3. DT30 S1 S1 S2 D DT DT S2 D Real number data (2 words) or lower 16-bit area of 32-bit data (for multiplicand) Real number data (2 words) or lower 16-bit area of 32-bit data (for multiplier) Lower 16-bit area of 32-bit data (for result) Operands Operand S1 S2 D A A N/A Relay WX WY WR A A A A A A Timer/Counter SV A A A EV A A A Register DT A A A Index register IX A A A IY K A A Constant H A A f A A Integer device A A A A: Available N/A: Not Available N/A N/A N/A Description The real number data specified by S1+1 and S1 is raised to the power specified by the real number data of S2+1 and S2. D] Specifying the integer device with [S1] and [S2].FP0 High. C14.3 Explanation of High . Ladder Diagram Boolean Address 10 11 Instruction ST F323 DT R 0 (PWR) 10 20 30 Trigger R0 10 F323 PWR.303 . C32 CPU Ver. C16. DT10.1 or later/FP0 T32 This instruction raises a floating point type real number to the specified power. % DT 2. [S1+1.level Instructions Step Availability F323 (PWR) Outline Program example Floating point type data power 14 FP0 C10. and the result is stored in D+1 and D.

” . R0 F323 PWR.The area specified using the index modifier exceeds the limit. . the real numbers are automatically converted into integer data.304 .” Turns on for an instant when the result is overflowed.The power of negative number data is not an integer .level Instructions FP0 Specifying the integer device with [D]. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .125. For detailed information about the processing of specifying the integer device section 1. DT20 The “f30.The power of negative number data is not an integer .” .If data other than real number data is specified in “S1+1 and S1” and “S2+1 and S2. the operations are the same as when a integer device is specified.The area specified using the index modifier exceeds the limit.If result of processing is outside integer range when integer device is specified in “D+1 and D”. DT 2.level Instructions 3. DT 0. f3.High .3 Program example The “f625. DT30 Precaution during programming This instruction F323 (PWR) cannot be used in the interrupt program. Turns on when result of processing is recognized as “0. Flag conditions S Error flag (R9007): Turns on and stays on when: .51758” is stored to DT30 and DT31 when the R0 turns on. R0 F323 PWR.0” is stored to DT20 and DT21 when the R0 turns on.3 Explanation of High . Turns on for an instant when: . % DT4 When the constant K is specified in S1 and S2. R0 F323 PWR. K 4. K 3. K 5. .If result of processing is outside integer range when integer device is specified in “D+1 and D”.If data other than real number data is specified in “S1+1 and S1” and “S2+1 and S2.

DT10. C14. DT 4 Specifying the integer device with [D].level Instructions Step Availability F324 (FSQR) Outline Program example Floating point type data square root 10 FP0 C10.3 3 . % DT 0. S] → [D+1. D] Specifying the integer device with [S]. DT20 S S D D Real number data (2 words) or lower 16-bit area of 32-bit area for storing data to be calculated Lower 16-bit area of 32-bit area for storing the calculated result Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description The square root of real number data specified by S is calculated and stored in the 32-bit area specified by D. For detailed information about the processing of specifying the integer device section 1.FP0 High. the integer data is internally converted to real numbers before operations continue. the operations are the same as when a integer device is specified. C16.305 . % DT 4 When the constant K is specified in S. Ladder Diagram Boolean Address 10 11 Instruction ST F324 DT DT R 0 (FSQR) 10 20 Trigger R0 10 F324 FSQR. C32 CPU Ver.1 or later/FP0 T32 Takes the square root of the specified real number data and stores result in the specified area.3 Explanation of High . R0 F324 FSQR. √[S1+1. DT 0. R0 F324 FSQR. 2.level Instructions 3. the real numbers are automatically converted into integer data.

Turns on when result of processing is recognized as “0. Turns on for an instant when: .If data other than real number data is specified in “S+1 and S”.High .The area specified using the index modifier exceeds the limit. DT20 Precaution during programming This instruction F324 (FSQR) cannot be used in the interrupt program. .The area specified using the index modifier exceeds the limit.The “S+1 and S” is not greater than zero. R0 F324 FSQR. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . K 2. . .3 Explanation of High .306 .If result of processing is outside integer range when integer device is specified in “D+1 and D”. .The “S+1 and S” is not greater than zero. .level Instructions 3.If data other than real number data is specified in “S+1 and S”.If result of processing is outside integer range when integer device is specified in “D+1 and D”.” Turns on for an instant when the result is overflowed.level Instructions FP0 Program example The “f1.41421” is stored to DT20 and DT21 when the R0 turns on. . Flag conditions S Error flag (R9007): Turns on and stays on when: .

level Instructions Step Availability F325 (FLT) Outline Program example 16 .307 .FP0 High. C16. The converted data is stored in D.1 or later/FP0 T32 Converts 16-bit integer data to real number data.3 Explanation of High . C32 CPU Ver. C14. 3 .bit integer data to Floating point type data conversion 6 FP0 C10. Ladder Diagram Boolean Address 10 11 Instruction ST F325 DT R 0 (FLT) 10 20 Trigger R0 10 F325 FLT. DT20 S S D DT D 16-bit integer data or 16-bit area for storing integer data (source) Lower 16-bit area of floating point type real number data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f N/A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description Converts the 16-bit integer data with sign specified by S to real number data when the trigger turns on. 2.level Instructions 3. DT10. 16-bit integer data with sign 15 0 S: Floating point type real number data 15 0 D: D+1: Lower word Higher word Precaution during programming This instruction F325 (FLT) cannot be used in the interrupt program.

3 .High .3 Explanation of High . Turns on for an instant when the converted data is recognized as “0”.level Instructions 3.level Instructions FP0 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit.308 .

309 . Ladder Diagram Boolean Address 10 11 Instruction ST F326 DT DT R 0 (DFLT) 10 20 Trigger R0 10 F326 DFLT.3 Explanation of High . C32 CPU Ver.FP0 High.level Instructions 3. 3 . DT20 S S D D 32-bit integer data or lower 16-bit area of 32-bit data (source) Lower 16-bit area for 32-bit data floating point type real number (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f N/A Integer device N/A N/A A: Available N/A: Not Available N/A N/A N/A Description Converts the 32-bit integer data with sign specified by S to real number data when the trigger turns on. C16. C14.1 or later/FP0 T32 Converts 32-bit integer data to real number data. 15 0 32-bit integer data with sign S: S+1: Lower word Higher word Floating point type real number data 15 0 D: D+1: Lower word Higher word Precaution during programming This instruction F326 (DFLT) cannot be used in the interrupt program. The converted data is stored in D+1 and D.level Instructions Step Availability F326 (DFLT) Outline Program example 32 . DT10.bit integer data to Floating point type data conversion 8 FP0 C10. 2.

3 Explanation of High .level Instructions 3.High . Turns on for an instant when the area specified using the index modifier exceeds the limit.level Instructions FP0 Flag conditions S Error flag (R9007): S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the converted data is recognized as “0”. Turns on for an instant when there are too many significant digits in mantissa of converted real number data. 3 .310 .

FP0 High. 2. C32 CPU Ver. as shown below.1.234) DT20: (K .level Instructions F327 (INT) Outline Program example Floating point type data to 16 . Ladder Diagram Boolean Address 10 11 Instruction ST F327 DT R 0 (INT) 10 20 Trigger R0 10 F327 INT. C16.1.2) 3 .234) DT11: DT20: (K1) When the real number data “ .bit integer data conversion (the largest integer not exceeding the floating point type data) Step 8 Availability FP0 C10. DT20 S S D DT D Real number data (2 words) or lower 16-bit area of 32-bit data (source) 16-bit area for storing converted data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K N/A Constant H A f A Integer device N/A N/A A: Available N/A: Not Available N/A N/A N/A Explanation of example When the real number data “1. as shown below. DT10: (f1.311 .1 or later/FP0 T32 Converts real number data to 16-bit integer data (the largest integer not exceeding the floating point type data). DT10: DT11: (f .level Instructions 3.3 Explanation of High .234” is in DT10 and DT11. C14. DT10.234” is in DT10 and DT11.

Turns on for an instant when the converted data is recognized as “0”.High .3 Explanation of High .3 For detailed information about the processing of specifying the integer device Precaution during programming This instruction F327 (INT) cannot be used in the interrupt program.If data other than real number data is specified in “S+1 and S”. .99) specified by S to the 16-bit integer data with sign (the largest integer not exceeding the floating point type data) when the trigger turns on.The area specified using the index modifier exceeds the limit. The converted data is stored in D. Real number data 15 0 S: S+1: Lower word Higher word 15 0 16-bit integer data with sign D: section 1.The area specified using the index modifier exceeds the limit. S Error flag (R9008): S = flag (R900B): 3 . Turns on for an instant when: .The converted data “D” exceeds the range of 16-bit integer data.The converted data “D” exceeds the range of 16-bit integer data.99 to +32767. .32767.If data other than real number data is specified in “S+1 and S”. .level Instructions 3. .level Instructions FP0 Description Converts real number data ( .312 . Flag conditions S Error flag (R9007): Turns on and stays on when: .

DT10.12345.12345.67) DT20: (K .67” is in DT10 and DT11.67) DT11: DT20: (K12345) DT21: When the real number data “ .level Instructions 3.bit integer data conversion (the largest integer not exceeding the floating point type data) Step 8 Availability FP0 C10.313 .3 Explanation of High . DT20 S S D DT D Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K N/A Constant H A f A Integer device N/A N/A A: Available N/A: Not Available N/A N/A N/A Explanation of example When the real number data “12345. DT10: (f12345.67” is in DT10 and DT11.level Instructions F328 (DINT) Outline Program example Floating point type data to 32 . DT10: DT11: (f .FP0 High. as shown below. C32 CPU Ver. Ladder Diagram Boolean Address 10 11 Instruction ST F328 DT R 0 (DINT) 10 20 Trigger R0 10 F328 DINT. 2.12346) DT21: 3 . C16.1 or later/FP0 T32 Converts real number data to 32-bit integer data (the largest integer not exceeding the floating point type data). as shown below. C14.

S Error flag (R9008): S = flag (R900B): 3 .000 to +2.3 For detailed information about the processing of specifying the integer device Precaution during programming This instruction F328 (DINT) cannot be used in the interrupt program.2. Flag conditions S Error flag (R9007): Turns on and stays on when: .483. The converted data is stored in D+1 and D.The converted data “D+1 and D” exceeds the range of 32-bit integer data. Real number data 15 0 S: S+1: 15 Lower word Higher word 0 32-bit integer data with sign D: D+1: Lower word Higher word section 1. .level Instructions FP0 Description Converts real number data ( .483.The converted data “D+1 and D” exceeds the range of 32-bit integer data. Turns on for an instant when: .000) specified by S+1 and S to the 32-bit integer data with sign (the largest integer not exceeding the floating point type data) when the trigger turns on.314 .The area specified using the index modifier exceeds the limit.147. Turns on for an instant when the converted data is recognized as “0”.High .The area specified using the index modifier exceeds the limit.level Instructions 3.If data other than real number data is specified in “S+1 and S”.If data other than real number data is specified in “S+1 and S”. .3 Explanation of High . .147. .

as shown below. C14. DT20 S S D D Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area for storing converted data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K N/A Constant H A f A Integer device N/A N/A A: Available N/A: Not Available N/A N/A N/A Explanation of example When the real number data “1. 2.234567) DT20: (K .234567) DT11: DT20: (K1) When the real number data “ . C32 CPU Ver.315 .234567” is in DT10 and DT11. Boolean Address 10 11 Instruction ST F329 DT DT R 0 (FIX) 10 20 Ladder Diagram Trigger R0 10 F329 FIX.3 Explanation of High .bit integer data conversion (rounding the first decimal point down to integer) Step 8 Availability FP0 C10. C16.level Instructions 3.1 or later/FP0 T32 Converts real number data to 16-bit integer data (rounding the first decimal point down to integer).234567” is in DT10 and DT11. DT10: DT11: (f . DT10: (f1.FP0 High.1.1) 3 .1. DT10.level Instructions F329 (FIX) Outline Program example Floating point type data to 16 . as shown below.

.level Instructions 3.The converted data “D+1 and D” exceeds the range of 16-bit integer data. . Turns on for an instant when: . Real number data 15 0 S: S+1: Lower word Higher word 16-bit integer data with sign D: 15 0 For detailed information about the processing of specifying the integer device section 1.99 to 32767. Turns on for an instant when the converted data is recognized as “0”.3 Precaution during programming This instruction F329 (FIX) cannot be used in the interrupt program.32767.99) specified by S to the 16-bit integer data with sign (rounding the first decimal point down to integer) when the trigger turns on.3 Explanation of High .If data other than real number data is specified in “S+1 and S”.316 .The converted data “D+1 and D” exceeds the range of 16-bit integer data.If data other than real number data is specified in “S+1 and S”. S Error flag (R9008): S = flag (R900B): 3 . Flag conditions S Error flag (R9007): Turns on and stays on when: .The area specified using the index modifier exceeds the limit.level Instructions FP0 Description Converts real number data ( . The converted data is stored in D. .High .The area specified using the index modifier exceeds the limit. .

bit integer conversion (rounding the first decimal point down to integer) Step 8 Availability FP0 C10.level Instructions F330 (DFIX) Outline Program example Floating point type data to 32 .level Instructions 3.7” is in DT10 and DT11. as shown below.7) DT20: (K .3 Explanation of High .123456) DT21: 3 . DT20 S S D DT D Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K N/A Constant H A f A Integer device N/A N/A A: Available N/A: Not Available N/A N/A N/A Explanation of example When the real number data “123456.FP0 High.123456. 2. as shown below. DT10. DT10: DT11: (f .317 . DT10: (f123456. C32 CPU Ver. C16.7” is in DT10 and DT11.123456.1 or later/FP0 T32 Converts real number data to 32-bit integer data (rounding the first decimal point down to integer).7) DT11: DT20: (K123456) DT21: When the real number data “ . Boolean Address 10 11 Instruction ST F330 DT R 0 (DFIX) 10 20 Ladder Diagram Trigger R0 10 F330 DFIX. C14.

147.483.The converted data “D+1 and D” exceeds the range of 32-bit integer data. . S Error flag (R9008): S = flag (R900B): 3 . . .The converted data “D+1 and D” exceeds the range of 32-bit integer data.318 .483. Turns on for an instant when: . .level Instructions 3.000 to 2. Real number data 15 0 S: S+1: 15 Lower word Higher word 0 32-bit integer data with sign D: D+1: Lower word Higher word section 1.3 For detailed information about the processing of specifying the integer device Precaution during programming This instruction F330 (DFIX) cannot be used in the interrupt program.2. The converted data is stored in D+1 and D.If data other than real number data is specified in “S+1 and S”.The area specified using the index modifier exceeds the limit.High .level Instructions FP0 Description Converts real number data ( . Turns on for an instant when the converted data is recognized as “0”.000) specified by S+1 and S to 32-bit integer data with sign (rounding the first decimal point down to integer) when the trigger turns on.3 Explanation of High .147.The area specified using the index modifier exceeds the limit.If data other than real number data is specified in “S+1 and S”. Flag conditions S Error flag (R9007): Turns on and stays on when: .

C14.1234. DT10: DT11: (f .3 Explanation of High .bit integer conversion (rounding the first decimal point off to integer) Step 8 Availability FP0 C10.1234.567) DT20: (K . DT20 S S D DT D Real number data (2 words) or lower 16-bit area of 32-bit data (source) 16-bit area for storing converted data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K N/A Constant H A f A Integer device N/A N/A A: Available N/A: Not Available N/A N/A N/A Explanation of example When the real number data “1234. as shown below. DT10.567” is in DT10 and DT11. 2. C16.567” is in DT10 and DT11.FP0 High.567) DT11: DT20: (K1235) When the real number data “ . C32 CPU Ver.1 or later/FP0 T32 Converts real number data to 16-bit integer data (rounding the first decimal point off to integer). DT10: (f1234.1235) 3 . as shown below.319 .level Instructions 3. Boolean Address 10 11 Instruction ST F331 DT R 0 (ROFF) 10 20 Ladder Diagram Trigger R0 10 F331 ROFF.level Instructions F331 (ROFF) Outline Program example Floating point type data to 16 .

99) specified by S+1 and S to 16-bit integer data with sign (rounding the first decimal point off to integer) when the trigger turns on.32767.99 to +32767.3 Explanation of High .The area specified using the index modifier exceeds the limit. . Real number data 15 0 S: S+1: Lower word Higher word 15 16-bit integer data with sign D: 0 For detailed information about the processing of specifying the integer device section 1. S Error flag (R9008): S = flag (R900B): 3 .The converted data “D” exceeds the range of 16-bit integer data. Turns on for an instant when the converted data is recognized as “0”.If data other than real number data is specified in “S+1 and S”.High . . . .The area specified using the index modifier exceeds the limit. The converted data is stored in D.3 Precaution during programming This instruction F331 (ROFF) cannot be used in the interrupt program. Turns on for an instant when: . Flag conditions S Error flag (R9007): Turns on and stays on when: .The converted data “D” exceeds the range of 16-bit integer data.If data other than real number data is specified in “S+1 and S”.320 .level Instructions 3.level Instructions FP0 Description Converts real number data ( .

as shown below. DT10. DT10: DT11: (f .bit integer conversion (rounding the first decimal point off to integer) Step 8 Availability FP0 C10.321 .51” is in DT10 and DT11. DT20 S S D (DROFF) 10 20 DT D Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K N/A Constant H A f A Integer device N/A N/A A: Available N/A: Not Available N/A N/A N/A Explanation of example When the real number data “45678.level Instructions F332 (DROFF) Outline Program example Floating point type data to 32 . as shown below. C32 CPU Ver.51) DT20: (K .FP0 High.45679) DT21: 3 .45678. C14.1 or later/FP0 T32 Converts real number data to 32-bit integer data (rounding the first decimal point off to integer).51” is in DT10 and DT11.45678. DT10: (f45678.3 Explanation of High . C16.level Instructions 3. 2.51) DT11: DT20: (K45679) DT21: When the real number data “ . Boolean Address 10 11 Instruction ST F332 DT R 0 Ladder Diagram Trigger R0 10 F332 DROFF.

Turns on for an instant when: .The converted data “D+1 and D” exceeds the range of 32-bit integer data.High . Turns on for an instant when the converted data is recognized as “0”.The converted data “D+1 and D” exceeds the range of 32-bit integer data.level Instructions 3.level Instructions FP0 Description Converts real number data ( .000) specified by S+1 and S to 32-bit integer data with sign (rounding the first decimal point off to integer) when the trigger turns on.147.The area specified using the index modifier exceeds the limit.147. .000 to +2.The area specified using the index modifier exceeds the limit. .3 For detailed information about the processing of specifying the integer device Precaution during programming This instruction F332 (DROFF) cannot be used in the interrupt program. .483. The converted data is stored in D+1 and D. .If data other than real number data is specified in “S+1 and S”.2. Flag conditions S Error flag (R9007): Turns on and stays on when: . Real number data 15 0 S: S+1: 15 Lower word Higher word 0 32-bit integer data with sign D: D+1: Lower word Higher word section 1. S Error flag (R9008): S = flag (R900B): 3 .322 .483.If data other than real number data is specified in “S+1 and S”.3 Explanation of High .

567) DT20: (f .level Instructions Step Availability F333 (FINT) Outline Program example Floating point type data rounding the first decimal point down 8 FP0 C10.FP0 High.1234. DT10.000) DT21: 3 . 2. DT10: DT11: (f .1 or later/FP0 T32 This instruction rounds down the decimal part of real number data.567” is in DT10 and DT11.323 . C32 CPU Ver.1234.567” is in DT10 and DT11. C16. Boolean Address 10 11 Instruction ST F333 DT R 0 (FINT) 10 20 Ladder Diagram Trigger R0 10 F333 FINT. C14. DT10: (f1234.level Instructions 3. DT20 S S D DT D Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K N/A Constant H A f A Integer device N/A N/A A: Available N/A: Not Available N/A N/A N/A Explanation of example When the real number data “1234. as shown below.1235. as shown below.3 Explanation of High .000) DT21: When the real number data “ .567) DT11: DT20: (f1234.

and the result is stored in D+1 and D. .level Instructions FP0 Description The decimal part of the real number data specified in S+1 and S is rounded down.level Instructions 3.3 Explanation of High . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .324 .” Turns on for an instant when the result is overflowed.If data other than real number data is specified in “S+1 and S”.The area specified using the index modifier exceeds the limit. Flag conditions S Error flag (R9007): Turns on and stays on when: .If data other than real number data is specified in “S+1 and S”. . Turns on when result of processing is recognized as “0. Real number data 15 0 S: S+1: 15 Lower word Higher word 0 Real number data D: D+1: Lower word Higher word Precaution during programming This instruction F333 (FINT) cannot be used in the interrupt program.High .The area specified using the index modifier exceeds the limit. Turns on for an instant when: .

DT10: DT11: (f .1 or later/FP0 T32 This instruction rounds off the decimal part of real number data. DT10: (f1234. as shown below. as shown below.000) DT21: When the real number data “ . 2.567) DT11: DT20: (f1235. C14. DT20 S S D DT D Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K N/A Constant H A f A Integer device N/A N/A A: Available N/A: Not Available N/A N/A N/A Explanation of example When the real number data “1234.567” is in DT10 and DT11. Boolean Address 10 11 Instruction ST F334 DT R 0 (FRINT) 10 20 Ladder Diagram Trigger R0 10 F334 FRINT.567” is in DT10 and DT11.1234. C16.3 Explanation of High .1234.567) DT20: (f .325 . DT10.level Instructions Step Availability F334 (FRINT) Outline Program example Floating point type data rounding the first decimal point off 8 FP0 C10.000) DT21: 3 .FP0 High.1235.level Instructions 3. C32 CPU Ver.

.High . Turns on when result of processing is recognized as “0. and the result is stored in D+1 and D.326 . Turns on for an instant when: . Flag conditions S Error flag (R9007): Turns on and stays on when: .If data other than real number data is specified in “S+1 and S”.The area specified using the index modifier exceeds the limit.The area specified using the index modifier exceeds the limit. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . Real number data 15 0 S: S+1: 15 Lower word Higher word 0 Real number data D: D+1: Lower word Higher word Precaution during programming This instruction F334 (FRINT) cannot be used in the interrupt program.” Turns on for an instant when the result is overflowed.level Instructions FP0 Description The decimal part of the real number data stored in S+1 and S is rounded off.If data other than real number data is specified in “S+1 and S”.3 Explanation of High . .level Instructions 3.

00) DT11: DT20: (f60000.00) DT21: When the real number data “ .00” is in DT10 and DT11.00” is in DT10 and DT11. as shown below. DT10: (f . DT10: DT11: (f .1 or later/FP0 T32 This instruction changes the sign of real number data. C32 CPU Ver.60000.level Instructions 3. C14.60000.3 Explanation of High . C16.level Instructions Step Availability F335 Outline (F+/ .30000. DT20 S S D DT D Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A N/A A: Available N/A: Not Available N/A N/A N/A Explanation of example When the real number data “ .FP0 High.) Floating point type data sign changes 8 FP0 C10. DT10. 2.00) DT20: (f30000. Boolean Address 10 11 Instruction ST F335 DT R 0 (F+/-) 10 20 Program example Ladder Diagram Trigger R0 10 F335 F+/ .30000.327 ..00) DT21: 3 . as shown below.

. . S Error flag (R9008): S Carry flag (R9009): 3 . Flag conditions S Error flag (R9007): Turns on and stays on when: . and the result is stored in D+1 and D.3 Explanation of High .328 .The area specified using the index modifier exceeds the limit.level Instructions 3.) cannot be used in the interrupt program.If data other than real number data is specified in “S+1 and S”.The area specified using the index modifier exceeds the limit.level Instructions FP0 Description The real number data stored in S+1 and S is changed sign bit.High .If data other than real number data is specified in “S+1 and S”. Turns on for an instant when the result is overflowed. Real number data 15 0 S: S+1: 15 Lower word Higher word 0 Real number data D: D+1: Lower word Higher word Precaution during programming This instruction F335 (F+/ . Turns on for an instant when: .

1234. DT10: (f1234.level Instructions Step Availability F336 Outline (FABS) Floating point type data absolute 8 FP0 C10.567) DT11: DT20: (f1234.1 or later/FP0 T32 Takes absolute value of real number data. C14. as shown below. DT10. Boolean Address 10 11 Instruction ST F336 DT R 0 (FABS) 10 20 Program example Ladder Diagram Trigger R0 10 F336 FABS.FP0 High. DT20 S S D DT D Real number data (2 words) or lower 16-bit area of 32-bit data (source) Lower 16-bit area of 32-bit data for storing converted data (destination) Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A N/A A: Available N/A: Not Available N/A N/A N/A Explanation of example When the real number data “1234.329 .1234. C32 CPU Ver.567” is in DT10 and DT11.3 Explanation of High .567) DT21: When the real number data “ . C16. 2.567” is in DT10 and DT11.567) DT20: (f1234. DT10: DT11: (f .567) DT21: 3 .level Instructions 3. as shown below.

the operations are the same as when a integer device is specified. .3 Precaution during programming This instruction F336 (FABS) cannot be used in the interrupt program. .” Turns on for an instant when the result is overflowed.If data other than real number data is specified in “S+1 and S” Turns on when result of processing is recognized as “0. the integer data is internally converted to real numbers before operations continue.330 .3 Explanation of High .The area specified using the index modifier exceeds the limit.level Instructions FP0 Description Takes the absolute value of real number data specified by S+1 and S when the trigger turns on. Flag conditions S Error flag (R9007): Turns on and stays on when: . Real number data 15 0 S: S+1: 15 Lower word Higher word 0 Real number data D: D+1: Lower word Higher word Specifying the integer device with [S].If data other than real number data is specified in “S+1 and S” Turns on for an instant when: . The result (absolute value) is stored in D+1 and D. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .The area specified using the index modifier exceeds the limit.level Instructions 3. For detailed information about the processing of specifying the integer device section 1.High . When the constant K is specified in [S].

level Instructions 3.331 . C16. the operations are the same as when a integer device is specified.3 Explanation of High . Boolean Address 10 11 Instruction ST F337 DT R 0 (RAD) 10 20 Program example Ladder Diagram Trigger R0 10 F337 RAD. the integer data is internally converted to real numbers before operations continue.FP0 High. When the constant K is specified in S. C14. DT10. C32 CPU Ver. 2. For detailed information about the processing of specifying the integer device section 1.level Instructions Step Availability F337 Outline (RAD) Floating point type data degrees → radians 8 FP0 C10.1 or later/FP0 T32 This instruction converts the units of an angle from degrees to radians. DT20 S S D DT D Angle data (degrees) (2 words) or lower 16-bit area of 32-bit data Lower 16-bit area of 32-bit data for storing converted data Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A N/A A: Available N/A: Not Available N/A N/A N/A Description The data in degrees of an angle specified in S+1 and S is converted to radians (real number data) and the result is stored in D+1 and D. Angle data (degrees) (Real number data) 15 0 S: S+1: 15 Lower word Higher word 0 Angle data (radians) (Real number data) D: D+1: Lower word Higher word Specifying the integer device with [S].3 3 .

Turns on for an instant when: . .The area specified using the index modifier exceeds the limit.The area specified using the index modifier exceeds the limit.332 .High . S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 .3 Explanation of High .If data other than real number data is specified in “S+1 and S”.level Instructions 3. R0 F337 RAD.” Turns on for an instant when the result is overflowed. Turns on when result of processing is recognized as “0. DT20 Precaution during programming This instruction F337 (RAD) cannot be used in the interrupt program.level Instructions FP0 Program example The “f0. f45.7853981” is stored to DT20 and DT21 when the R0 turns on. .If data other than real number data is specified in “S+1 and S”. Flag conditions S Error flag (R9007): Turns on and stays on when: .

C32 CPU Ver. DT20 S S D DT D Angle data (radians) (2 words) or lower 16-bit area of 32-bit data Lower 16-bit area of 32-bit data for storing converted data Operands Operand S D A N/A Relay WX WY WR A A A A Timer/Counter SV A A EV A A Register DT A A Index register IX A A IY K A Constant H A f A Integer device A A A: Available N/A: Not Available N/A N/A N/A Description The angle data in radians (real number data) specified in S+1 and S is converted to angle data in degrees and the result is stored in D+1 and D. C16.3 Explanation of High .level Instructions 3. 2.FP0 High. C14.1 or later/FP0 T32 Converts the units of an angle from radians to degrees. Boolean Address 10 11 Instruction ST F338 DT R 0 (DEG) 10 20 Program example Ladder Diagram Trigger R0 10 F338 DEG. DT10. Angle data (radians) (Real number data) 15 0 S: S+1: 15 Lower word Higher word 0 Angle data (degrees) (Real number data) D: D+1: Lower word Higher word 3 .level Instructions Step Availability F338 Outline (DEG) Floating point type data radians → degrees 8 FP0 C10.333 .

the operations are the same as when a integer device is specified.If data other than real number data is specified in “S+1 and S”. DT20 Precautions during programming When the constant or integer device is specified in S. the real numbers are automatically converted into integer data. the integer data is internally converted to real numbers before operations continue. This instruction F338 (DEG) cannot be used in the interrupt program.If data other than real number data is specified in “S+1 and S”. .334 .5235987. DT 0. . R0 F338 DEG.3 Program example The “f30. Turns on for an instant when: . f0. R0 F338 DEG.00000” is stored to DT20 and DT21 when the R0 turns on.High .The area specified using the index modifier exceeds the limit. the integer device cannot be set in D. . Turns on when result of processing is recognized as “0. Flag conditions S Error flag (R9007): Turns on and stays on when: .level Instructions FP0 Specifying the integer device with [S].If result of processing is outside integer range when integer device specified in “D+1 and D”.The area specified using the index modifier exceeds the limit. % DT 4 When the constant K is specified in S. % DT 0. R0 F338 DEG.3 Explanation of High . .” Turns on for an instant when the result is overflowed. For detailed information about the processing of specifying the integer device section 1.level Instructions 3.If result of processing is outside integer range when integer device specified in “D+1 and D”. S Error flag (R9008): S = flag (R900B): S Carry flag (R9009): 3 . DT 4 Specifying the integer device with [D].

“Reverse operation” is specified to boost the output (heating. with “derivative type PID control”. with “proportional . DT 10 S S Starting number of PID parameter area (30 words) Operands Operand S Relay WX WY WR N/A N/A N/A Timer/Counter Register SV N/A EV N/A DT A Index register IX IY K N/A Constant H N/A f N/A A: Available N/A: Not Available N/A Description PID processing is performed to hold the measured value specified by S+2 at the set value S+1. C16. etc.FP0 High. but convergence is slower. when a set value is changed. but convergence is faster.). PID processing will be performed based on these settings. C32 CPU Ver.PD) Generally. C14.1 or later/FP0 T32 This instruction carries out PID processing. “Forward operation” is specified to boost the output (cooling.D) / Proportional . when a set value is changed.delivative type PID control”. etc.).3 Explanation of High .delivative type (I . If the measured value drops. there is less fluctuation in the output. Derivative type (PI . integral time and derivative time) and the processing mode and cycle in the parameter table. 3 .335 . there is increased fluctuation in the output. 2. If the measured value increases. and the result is output to S+3. Program example Ladder Diagram Boolean Address 10 11 Instruction ST F355 DT R 0 (PID) 10 Trigger R0 10 F355 PID.level Instructions 3. Types of PID Processing Reverse operation and forward operation When a process has been changed.derivative type can be selected for the PID processing mode. Derivative type or proportional . Generally. the vertical direction of the output can be selected.level Instructions Step Availability F355 Outline (PID) 4 PID processing FP0 C10. Set the PID processing coefficients (proportional gain.

. . . .336 .) For precautions concerning execution of auto tuning. . the estimated results are reflected in the parameter area after auto tuning has been completed. . . . . . . . . Control mode Value of [S] Auto. Ti. . . . . . . [S] Select the type of PID processing and auto-tuning with the H constants. . . . . . . . . .3 Explanation of High . . refer to the following page. . . . . . . . . processing returns to the original parameter operation. . (There may be cases in which auto tuning cannot be executed. . . . . . depending on the process. . . When auto tuning is executed. . . . . .The parameter setting is outside allowed range. . . . . . . .The value set for the parameter is out of range. .tuning when executed H8000 H8001 H8002 H8003 Derivative type Proportional delivative type Reverse operation Forward operation Reverse operation Forward operation H0 H1 H2 H3 Auto-tuning The optimum values for the Kp.level Instructions FP0 Flag conditions S Error flag (R9007): Turns on and stays on when: . . .level Instructions 3. 3 . . . . .The value set for the parameter is out of range. . . S Error flag (R9008): Parameter Table Settings [S] [S+1] [S+2] [S+3] [S+4] [S+5] [S+6] [S+7] [S+8] [S+9] [S+10] [S+11] PID processing work area [S+29] Control mode Set value (SP) Measured value (PV) Output value (MV) Output lower limit value Output upper limit value Proportional gain (Kp) Integral time (Ti) Derivative time (Td) Control cycle (Ts) Auto-tuning progress Explanation of Parameters 1 Control mode . . .High . . and Td of the PID parameters can be measured by measuring the process response.The area specified using the index modifier exceeds the limit. Turns on for an instant when: . . . .tuning when not executed Auto. If this happens.

. . . . . . . . . . . . . [S+4] K0 to K9999 (< upper limit value) 6 Output upper limit value . Reverse operation If the measured process value decreases. . . . . . . . . . . . . . Use the D/A converter or other device to output it to the process. . . . . . . . . . . . . . . Derivative type In general this produces a large change when a set value is changed. . . . . . . . . .1 to 3000 seconds. . the output will increase. . . . . specify in increments of 0. . . . . . . . 3 . . . . . . . . The setting range is K1 to K30000 (0. Proportional . . . . . . . . . . . . . . . .level Instructions 3. . . . . . . . . . . . . . . . . . . . . . . . . . convergence is slow. . . [S+1] Set the target value which determines the amount of process control within the following range. . . however. . . . . K0 to K10000 4 Output value (MV) . . . . . . . .1 will be the actual integral time. K0 to K10000 3 Measured value (PV) . . . specify in increments of 0. . . . . . . . . . . . . . [S+6] Specify the coefficient used for PID processing. . . . . . . . . . . . . . . . . . . . . convergence is fast. . . . . . (Example: Cooling) Derivative type PID and proportional . . . the output changes. . . . . . . . Adjust so that it falls within the following range. . . . . . . . .1 to 999. . . . . . . (Example: Heating) Forward operation If the measured process value increases. . however. . . . . . . . . . . Values specified for the range are not output. . The setting range is K1 to K9999 (0. . . . . . . . . . . . . . . . . .FP0 High. 7 Proportional gain (Kp) .3 Explanation of High . . .1 will be the actual proportional gain. . 8 Integral time (Ti) . . . . . .derivative type In general this produces a small change when a set value is changed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The limits should be as follows: 0 ≦ output lower limit value < output upper limit value ≦ 10000. . . . . . . . . . . . . . . . . . . . . . . the output will increase. .level Instructions Reverse operation and forward operation These parameters determine whether the output will increase or decrease when a change occurs in the process. . 2 Set value (SP) . . . . . . . . . . . . . . . .1) If auto-tuning is selected for the specified control mode. . . . . [S+3] The result of PID processing is stored. . . . .1 seconds) When the set value is 0. the integration is not executes. . . . . . the set value will be automatically adjusted and rewritten. . . . . . . . . . . . . . K0 to K10000 5 Output lower limit value . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+5] K1 to K10000 (> lower limit value) Specify the output value (MV) range. . . If auto-tuning is selected for the specified control mode. . . . . . . . .9. . . . . . . . . the set value will be automatically adjusted and rewritten. . . . . . . . . . [S+2] Input the current process control value with the A/D converter or other device. . . . . . . . . . . . . . . . . . .337 . [S+7] Specify the coefficient used for PID processing. . . The set value × 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . The set value × 0. . . . . . . . . . . .derivative type PID When the set value is changed. . . .

. Be careful that the stored values are not inadvertently rewritten. . . . . . . .01 to 60. . including the work area for processing. . . . . [S+10] If auto . . . . The set value × 0. . . . 11 Auto-tuning progress .tuning. . . . . 12 PID processing work area . the integration time (Ti) and delivative time (Td). the lower limit value) within the setting range must be set. specify in increments of 0. . After auto . . . .1 to 1000 seconds. . . . . . . .01 seconds). . .tuning has been completed. . . . . . . . Precautions when executing auto . . . . . . . After auto . . . . An error will not be detected if the area is exceeded. .338 . . . . .3 Explanation of High . . . . . . . . The values for K1 to K5 are stored based on the progress from the default value of 0. .tuning has progressed is indicated. . . . . . . . . . . [S+11] to [S+29] The system uses this work area to perform PID processing. .tuning” is specified using the parameter table (control mode [S]). . and the values return to the default values when auto . . the degree to which auto . Take care that the area is not exceeded due to index modification. . . but before executing auto . . . . . . When specifying S. . . .tuning has been completed. . [S+8] Specify the coefficient used for PID processing. . . . . . . . . . . . . . . the appropriate values (for example. . .1 will be the actual derivative time. . . . the optimum values are stored for the proportional gain (Kp). . . . . . . . . . . . . . . . . . . The set value × 0. the set value will be automatically adjusted and rewritten. .level Instructions 9 FP0 Derivative time (Td) . . . . . . . . . The setting range is K1 to K10000 (0. . specify in increments of 0. . . . . . . . . .0 seconds. . the integration time (Ti) and delivative time (Td). . . . . The setting range is K1 to K6000 (0. . [S+9] Set the cycle for executing PID processing. Use the D/A converter or other device to output the result of PID processing S+3 to the process. . . . . . . . . Precautions during programming A 30-word area is required for the parameter table.tuning has been completed. . .1 seconds) If auto-tuning is selected for the specified control mode. . . . . Take care that other instructions do not overwrite the values in this area. . Use the A/D converter or other device to input the current measured value S+2. . . . . After auto . . . . . . . . An error will not be detected if the parameter table exceeds its area. . attention should be paid to the following points. This instruction F355 (PID) cannot be used in the interrupt program. . . . .level Instructions 3. . . . . . . . . . . . . . . . . . the control mode [S] area is automatically rewritten from H8000 to H8003 to H0 to H3. . . . . the optimum values are stored for the proportional gain (Kp). Make sure the mode is not rewritten again in the program. .01 will be the actual control period. . 10 Control cycle (Ts) . . . select a number at least 30 words before the last number. . . . .tuning If “Execute auto . . .High . . . . . . . .tuning has been completed. . . . . . 3 . . . . . . .tuning is specified in the control mode. . . . .

1) Dn.PVn) + en × Ts/Ti + ΔDn} en : SP .SP ΔDn : (ηβ .PD) and reverse operation [S] = H2 ΔMV = Kp × {(PVn.1) η: 1/8 (fixed) β: Td/(Ts + ηTd) 3 .1 .1) + en × Ts/Ti + ΔDn} en :PVn .PD) and forward operation [S] = H3 ΔMV = Kp × {(PVn .1)Dn.1 + ΔMV Calculation of ΔMV 1 Derivative type (PI .1 + β (PVn.derivative type (I .1 + β (PVn .1) Dn.1 .FP0 High.PVn) η: 1/8 (fixed) β: Td/(Ts + ηTd) 2 Derivative type (PI .1) + en × Ts/Ti + ΔDn} en : PVn .339 .PVn ΔDn : (η β .1 + β (PVn.PVn.PVn.level Instructions 3.PVn) η: 1/8 (fixed) β: Td/(Ts + ηTd) 4 Propotional .derivative type (I .en.1) + en × Ts/Ti + ΔDn} en : SP .level Instructions PID processing equations MVn = MVn.D) and reverse operation [S] = H0 ΔMV = Kp × {(en .PVn.1 + β (PVn .D) and forward operation [S] = H1 (or H8001) ΔMV = Kp × {(en .3 Explanation of High .PVn ΔDn : (ηβ .1) η: 1/8 (fixed) β: Td/(Ts + ηTd) 3 Propotional .SP ΔDn : (ηβ .en.1 .1) Dn.

5 0 t 0 t Kp=1 Kp=. pressure. integral operation removes the offset produced by these methods.derivative operation.340 . Integral operation grows stronger as the integral time (Ti) is shortened.level Instructions 3.5 The amount of control is held constant. Setting signal SV + - Offset e Measurement signal PV Kp Output MV e MV 2 Kp=2 1 1 . 3 . 1) Proportional operation Proportional operation generates an output which is proportional to the input. 2) Integral operation Integral operation generates an output which is proportional to the integral time of the input. Setting signal SV + - Offset e Integral operation Output mi mi=1/Tiedt e Measurement signal PV mi In combination with proportional operation or proportional . and fluid level.High .level Instructions FP0 Operation of PID control PID control is a control method widely used in the instrumentation field involving feedback control of process quantities such as temperature.3 Explanation of High . An offset remains. flow. Proportional control grows stronger as Kp is increased.

and this can have an adverse effect on the process being controlled. incomplete differential operation is executed.3 Explanation of High . e mD 4) PID operation PID operation is a combination of proportional.level Instructions 3) Derivative operation Derivative operation generates an output which is proportional to the derivative time of the input. Derivative control grows stronger as the derivative time (Td) is increased.level Instructions 3. In the case of pure derivative operation. Setting signal SV + de dt Offset e Derivative operation Output mD mD=TD S e Measurement signal PV mD The advancing characteristic of derivative control alleviates the adverse effect which the delaying characteristic of the process exerts on control. 3 .FP0 High. PID control can quickly bring the amount of control to the target value and maintain it there. Setting signal SV Offset e + + + + - Integral operation Derivative operation Output MV Kp Measurement signal PV If the parameters are set to the optimum values. and derivative operation. integral. For this reason.341 . control can temporarily become ineffective if noise is input.

High .level Instructions 3.3 Explanation of High .level Instructions FP0 3 .342 .

. . . . . . . . . . .7 4.11 Points to Check in Program . . . . . .3. . . . . . . . . . .8 4. . . . . 4 . . . .2 4. .5 4.5 4. . . . . .12 next page . . . . . . . . . . . . . . . . . . . . . . .1 Use of Duplicated Output . . . . . . . . . . . . or RST Instruction . . . .1 4. . 4 .7 Memory Areas Which can be Modified with Index Registers . . . . . . . . . .1. . .10 Dealing with Operation Errors . . . . . .4 Operation Errors . . . . . . . . . . . . . . . . . . . . . . . .7 Example of Using an Index Register . . . 4 . . . 4 . . . . 4 . . . . . 4 . .4. . . . . 4 . . . .4 Outline of Operation Errors . . . . . . . . . . . .2. . 4 . . . . . . . .3. . 4 .3. . . . . . . . . . . . .5 Handling BCD Data in the PLC . . .3 Index Registers . 4 . . . . . . KP. .4. . . . . . .1. . .2. . . . . .4. .4. . . . . .10 4. . .Chapter 4 Precautions During Programming 4.3 4. .2 BCD Data . . . . . . . . . . . . .3 When Output is Repeated with an OT. .4 4. . . . . . . . . . . . . . .2 Duplicated Output . . . . . 4 .3 4. . . . . SET. .1 4. . . . . . . 4 .10 Operation Mode When an Operation Error Occurs . . . . . . . . . .1 4. . . . . . . . . . . . 4 . . . . .2 Handling BCD Data . . . . 4 . . . . . . . .1 4. . . . . . .3 Handling Index Registers . 4 . . . . . .2 4. . .

. . . . . . . . . . . 4 . . . . . . . . . . . . . . . . . . .5. . . . . . . . . . . . . . . . . . 4 . . . . . . . . 4 . . . . . . . .14 Precautions When Using a Control Instruction . . . .9 Processing During Forced Input and Output . .2 4. . . . . . .21 Changing Modes in FP Programmer II . . . . . . . .6 4. . . . . . . . . . . .1 4. .2 Method of Rewriting Constant in FP Programmer II . . . . 4 . . . . . . . . . . .18 Rewrite Function During RUN . . . . . . . . . . . . . . .1 4. . . . .22 4. . . . . .8. . . . . . .24 4. . . . .7. . . . . . . . . . . . . . .Precautions During Programming FP0 4. . . . .2 . . . . . . . .16 4. . . . . . . . . 4 . . . . . . . . . .23 4. 4 . . . 4 . .3 Instructions of Leading Edge Detection Method . 4 . . . . . .7 Precautions for Programming . . . . . . . .7. 4 . . . . . . . 4 . . . . . . . 4 .5. . 4 . . . . . . .7. . . . . . . . . .27 4. . . . . . . . .5. .20 Procedures and Operation of Rewrite During RUN . . . . . .8.23 Method of Rewriting a Value in the Set Value Area . . . . .3 4. . .2 4. . .19 Cases Where Rewriting During Run is not Possible .8 Changing the Set Value of Timer/Counter During RUN . . . . . . . . 4 . .13 4. . . 4 . . . . . . . . . .4 Operation of Rewrite During RUN . . . . . .7.19 4. .13 Operation and Precautions at Run Start Time . . . . .1 4. . . .5 Instruction of Leading Edge Detection Method .

3 . change the setting of system register 20 to ”enable” (when using FP Programmer II.” If there are any duplicated outputs. Enabling Duplicated Output If you need to use output repeatedly due to the content of the program. an error message (DUPLICATED OUTPUT ERROR) and the address will be displayed. The “FPWIN GR” tool software has a similar operation menu. the ERROR/ALARM LED will light and the self-diagnostic error flag R9000 will go on. and the first address number will be displayed. or high. How to Check for Duplicated Use You can check for duplicated outputs in the program using the programming tool.) OP 9 ENT READ If there are any duplicated outputs. Using NPST-GR software: Excute the “TOTALLY CHECK A PROGRAM” on “CHECK A PROGRAM. In this case.” the error message will be displayed. The above shows the operation menu for the “NPST .1 Use of Duplicated Output 4. Key operation: (. If you enter RUN mode while the duplicated output condition exists.1 Use of Duplicated Output 4. such as the SET or RST instruction. If you execute “SEARCH AN ERROR. When this is done.FP0 Precautions During Programming 4. please check the “Help” menu.1.1 Duplicated Output Duplicated output refers to repeatedly specifying the same output in a program. by the following method: Using FP Programmer II: Operate the TOTAL CHECK function. it is considered to be duplicated output. Even if the same output is used for multiple instructions. it is not regarded as duplicated output.GR” tool software. an error message (DUP USE) and the address will be displayed. it will be flagged as an error. If the same output is specified for the “OT” and “KP” instructions. For information on operating the menus. set K1).level instruction for data transfer. under normal conditions. an error will not occur when the program is executed. 4. duplicated output can be enabled.

SET and RST instructions. X0 Y0 Y0: on X1 Y0 S Y0 R Y0: on Y0: off X2 When X0 to X2 are all on. KP. the contents are rewritten at each step during operation.1 Use of Duplicated Output FP0 4. SET. 4. use a partial I/O update instruction “F143 (IORF)”. X0 R0 R0 S This section of the program is processed as if R0 were on. KP. Example: Processing when SET. Example: Output to the same output relay Y0 with OT. RST and OT instructions are used (X0 to X2 are all on). R0 R X1 This section of the program is processed as if R0 were off. The output is determined by the final operation results If the same output is used by several instructions such as the OT.Precautions During Programming 4. or data transfer instructions. KP. RST. Y0 is output as off at I/O update. SET. or RST Instruction Condition of Internal and Output Relays During Operation When instructions are repeatedly used which output to internal and output relays such as transfer instructions and OT.1. SET and RST instructions.2 When Output is Repeated with an OT.4 . the output obtained at the I/O update is determined by the results of the operation at the greatest program address. If you need to output a result while processing is still in progress. X2 R0 This section of the program is processed as if R0 were on.

BIN conversion instruction “F81 (BIN)”. use a data conversion instruction as shown in the examples at below. BCD arithmetic instructions “F40 (B+) to F58 (DB .coded decimal. and means that each digit of a decimal number is expressed as a binary number. Input From a Digital Switch Use the BCD .1)” also exist which allow direct operation on BCD data.segment display (with a decoder).1 BCD Data BCD is an acronym for binary . Digital switch 1 9 9 2 1 9 9 2 Data inputted into the PLC (BCD data) PLC BCD ↓ BIN (Conversion using F81 (BIN) instruction) 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0 Data which can be 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0 processed in the PLC Converted to 1992 in decimal data. however.to . Example: Expressing a decimal number in BCD: Decimal number Each digit is converted to a binary number.5 . the data must be in BCD form. In this case.coded decimal) 0110 0100 0101 4.FP0 Precautions During Programming 4.2.2 Handling BCD Data 4. BCD (Binary .1)” as operation in the PLC takes place in binary.2 Handling BCD Data 4. (BIN data) 4. it is normally most convenient to use BIN operation instructions “F20 (+) to F38(D .2 Handling BCD Data in the PLC When inputting data from a digital switch to the PLC or outputting data to a 7 .2.

segment Display (with Decoder) Use the BIN . PLC BIN (Conversion ↓ using BCD F80 (BCD) instruction) Data processed in PLC (BIN data) 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0 Data outputted from PLC (BCD data) 7-segment display 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0 1 9 9 2 4.BCD conversion instruction “F80 (BCD)”.Precautions During Programming 4.to .6 .2 Handling BCD Data FP0 Output to a 7 .

the destination will be DT20. R0 F0 MV. specify with IX. In this way. IXDT100 Constants can also be modified. for reading and writing 16-bit data. when IX contains K10 the destination will be DT10.2 Memory Areas Which can be Modified with Index Registers Index registers can be used to modify other types of memory areas in addition to data registers DT. the number of the destination data register varies depending on the contents of IX with DT0 acting as a base. DT100. index registers have two points. IXIX. IXH1001 An index register cannot modify another index register. index registers allow the specification of multiple memory areas with a single instruction.FP0 Precautions During Programming 4. IXWR0. 4. In this example. For example. Use an index register to indirectly specify a memory area number. IXWX0. In this case. IXDT0 Base memory area.3 Handling Index Registers 4. IXWY1.3. IXSV0. IXK10. IXEV2. IX and IY are handled together as 32-bit data. IXIY When using index modification with an instruction which handles 32-bit data.) Example: Transferring the contents of data register DT100 to the number specified by the contents of an index register. IX and IY. and thus index registers are very convenient when handling large amounts of data. (This is also called index modification. Higher 16-bit area Lower 16-bit area Contents of IY Contents of IX 4. and when IX is K20.7 .3 Handling Index Registers 4.1 Index Registers Like other registers.3.

When the R1 turns on. IXDT0 F35 +1. K0 is written to index register IX. 3 Input times Contents of Destination of R1 IX data register 1st 2nd 3rd ⋮ 0 1 2 ⋮ DT0 DT1 DT2 ⋮ Inputting and Outputting Data Based on a Number Specified by an Input Example 1: Setting a timer number specified by a digital switch PLC Timer setting number 2 0 7 9 4 Timer set value (timer time setting) WX1 WX0 Digital switches 4.3 Example of Using an Index Register Repeatedly Reading in External Data Example: Writing the contents of word external input relay WX3 to a sequence of data registers beginning from DT0.8 .3 Handling Index Registers FP0 4. and the destination data register will be as follows. K0. the contents of IX will change successively. In this case. WX3. IX 2 3 1 1 2 When R0 turns on. R0 F0 MV. Add 1 to IX. IX R1 DF F0 MV. the contents of WX3 is transferred to the data register specified by IXDT0.Precautions During Programming 4.3.

WX1. Convert the BCD timer set value in WX0 to binary and stored in the timer set value area SV specified by contents of IX. Convert the elapsed value data EV in the timer specified by IX to BCD.9 . and output it to word external output relay WY0. IX F81 BIN. IXSV0 1 2 1 Convert the BCD timer number data in WX1 to binary and set it in index register IX. IXEV0.3 Handling Index Registers R0 DF F81 BIN. and set it in index register IX. 2 4. 2 Example 2: External output of the elapsed value in a timer number specified by a digital switch WY0 Timer elapsed value display 7-segmenet indicator PLC Timer number setting R1 DF 1 Digital switches WX1 F81 BIN. WX0. WX1.FP0 Precautions During Programming 4. IX F80 BCD. WY0 1 2 1 Convert the BCD timer number data in WX1 to binary.

or BCD conversion is attempted on data which is not within the possible conversion range. However. The operation error code “E45” is set at special data register DT9000. when you set system register 26 to “continuation” (KI).4 Operation Errors FP0 4. Over area error The data manipulated by a block instruction exceeds the memory range. the FP0 control unit operates even if an operation error occurs.Precautions During Programming 4. Types of Operation Error Address error The memory address (number) specified by index modification is outside the area which can be used BCD data error Operation is attempted on non .BCD data when an instruction handling BCD is executed.1 Outline of Operation Errors An operation error is a condition in which operation is impossible when a high-level instruction is executed. For detailed information section 8.2 Operation Mode When an Operation Error Occurs Normally.4. the operation stops when an operation error occurs.4 4 . Parameter error In an instruction requiring the specification of control data. the ERROR/ALARM LED on the FP0 control unit will blink and the operation error flags (R9007 and R9008) will turn on. When an operation error occurs.4.10 . the specified data is outside the possible range. 4.4 Operation Errors 4. The error address is stored in special data registers DT9017 and DT9018.

4. Clear the error. RUN will resume as soon as the error is cleared. press the Error clear “F3” key. however.FP0 Precautions During Programming 4.) In the “STATUS DISPLAY” menu of NPST . ACLR (.level instruction for that address is correct and appropriate.GR software. (If the mode selector is set to RUN. Use a programming tool to clear the error.3 Dealing with Operation Errors Procedure: 1. For information on operating the menus. press the following keys. The “FPWIN GR” tool software has a similar menu.) OP 1 1 2 ENT SHIFT (DELT) SC INST An error can be cleared by turning the power off and on in PROG. 4 . the contents of the operation memory except the hold type data will be cleared.4 Operation Errors 4. An error can also be cleared by executing a F148 (self-diagnostic error set) instruction. Check the address where the error occurred. The above shows the menu for the “NPST . Check the location of the error. which is stored in DT9017 and DT9018. please check the “Help” menu.11 . 2. mode. In FP Programmer II. and make sure the high.GR” tool software.

the last address of the data register is DT1659. if DT1 contains a negative value or a value greater than K9999. The same is true when the contents of IX are negative. index register (IX) modifies the address of data register DT0. an operation error will occur. an operation error will occur. an operation error will occur. if DT0 contains a hexadecimal number with one of the digits A through F such as 12A4. DT1. Example: R0 F32 %. conversion will be impossible and an operation error will result.to . If data in IX is larger than the last address of the data register. Is there any data which cannot be converted using BCD ↔ BIN data conversion? Example: When BCD . DT100.BCD conversion is attempted R0 F80 BCD. If the data in IX exceeds the range of K0 to K255. DT101 In this case.to . DT0. DT100 In this case. Example: When a data register is modified using an index register R0 F0 MV.12 . 4 . Example: When BIN . if the content of DT100 is K0.4 Operation Errors FP0 4. DT0. DT200 In this case.4. If the PLC you are using is of the FP0 16-point type. Check if the divisor of a division instruction is K0.BIN conversion is attempted R0 F81 BIN. IXDT0 In this case.4 Points to Check in Program Check if an extraordinarily large value or negative value was stored in the index register. an operation error will occur. DT0.Precautions During Programming 4.

5.FP0 Precautions During Programming 4.5 Instruction of Leading Edge Detection Method 4. Standard operation Trigger Operation of instruction on off on off Leading edge differential operation Trigger Operation of instruction on off on off Executed every scan Executed only one time The condition of the previous execution and the condition of the current execution are compared.5 Instruction of Leading Edge Detection Method 4. the instruction is not executed.1 Instructions of Leading Edge Detection Method Instructions Using the Leading Edge Detection Operation DF (leading edge differential) instructions Count input for CT instructions Count input for F118 (UDC) instructions Shift input for SR instructions Shift input for F119 (LRSR) instructions NSTP instructions Leading Edge Detection Method An instruction with a leading edge detection method operates only in the scan where its trigger (execution condition) is detected switching from off to on. and the instruction is executed only if the previous condition was off and the current condition is on. 4 . In any other case.13 .

5.14 . RUN (Power on) Trigger Operation Not executed Executed If you need to execute an instruction when the trigger (execution condition) is on prior to switching to RUN mode. for example when the system is powered on. the operation of the instruction may change depending on input timing.5. or when the power supply is booted in the RUN mode. The instruction is not executed. (R9014 is a special internal relay which is off during the first scan and turns on at the second scan. if the trigger (execution condition) is already on. the off → on change of the execution condition (trigger) is not detected. such as: MC and MCE instructions JP and LBL instructions LOOP and LBL instructions CNDE instruction Step ladder instructions Subroutine instructions 4.2 Operation and Precautions at Run Start Time Operation of first scan after RUN begins The leading edge detection instruction is not executed when the mode has been switched to the RUN mode.) 4 .Precautions During Programming 4.2. Execution of the instruction will take place as explained on section 4.5 Instruction of Leading Edge Detection Method FP0 Precautions When Using an Instruction Which Performs Leading Edge Detection When RUN begins. When used with one of the instructions indicated in instructions below which change the order of execution of instructions. use R9014 (initial pulse off relay) in your program on the following page. Take care regarding this point. Be careful when using leading edge detection type instructions with control instructions.

5 Instruction of Leading Edge Detection Method Example 1: DF (leading edge differential) instruction X0 DF Y0 Add R9014 X0 R9014 DF Y0 RUN (Power on) X0 Y0 Even if X0 was initially on.to .to . therefore the count is incremented.FP0 Precautions During Programming 4.on at the second scan. 4 . Example 2: CT (counter) instruction X0 CT X1 100 Add R9014 X0 X1 R9014 CT 100 RUN (Power on) X0 CT100 counting operation Even if X0 was initially on. the input condition (X0) for the DF instruction is off . therefore derivative output is obtained. the input condition (X0) for the counter is off .15 .on at the second scan.

and execute the instruction only if the previous condition was off and the current condition is on.3 Precautions When Using a Control Instruction Instructions which leading edge detection compare the condition of the previous execution and the condition of the current execution. 4 . thus derivative output is not obtained. the instruction is not executed. Example 1: Using the DF instruction between MC and MCE instructions X0 MC X1 DF MCE 0 0 Y0 Time chart 1 X0 X1 Y0 Previous execution of DF instruction The input condition (X1) for the DF instruction has not changed since the time of the previous execution.5.5 Instruction of Leading Edge Detection Method FP0 4.16 . Take care regarding this point. When a leading edge detection instruction is used with an instruction which changes the order of instruction execution such as MC.Precautions During Programming 4. In any other case. the operation of the instruction may change as follows depending on input timing. Time chart 2 X0 X1 Y0 Previous execution of DF instruction The input condition (X1) for the DF instruction has changed from off to on since the time of the previous execution. MCE. thus derivative output is obtained. JP or LBL.

4 .17 .FP0 Precautions During Programming 4.5 Instruction of Leading Edge Detection Method Example 2: Using the CT instruction between JP and LBL instructions R0 JP X0 CT 100 X1 1 LBL 1 Time chart 1 R0 X0 Counting operation Final timing at which the previous JP instruction was not executed Time chart 2 R0 X0 Counting operation The count is not incremented. because the final timing at which the previous JP instruction was not executed has not been changed. and the execution condition X0 for the counter input has not changed. Final timing at which the previous JP instruction was not executed The count is incremented. because the count input changed from off to on after the final timing at which the previous JP instruction was not executed.

4 . read stack (RDS) instruction.Precautions During Programming 4.18 . do not use an AND stack (ANS) instruction. K30 Y0 X0 X1 TMX 5. Program example 1: Program in which the example 1 is rewritten ANS X0 X1 DF X2 X0 X2 Y0 X0 X1 DF Y0 Program example 2: Program in which the example 2 is rewritten ANS X0 X1 TMX5. K 30 Y0 X2 X0 X2 Program example 3: PSHS X0 X1 Y0 Program in which the example 3 is rewritten X0 X1 Y0 X2 DF Y1 X0 X2 DF Y1 RDS X3 X0 X3 POPS When a combination of contacts are set as the trigger (execution condition) of a differential instruction (DF) or timer instruction. or pop stack (POPS) instruction.6 Precautions for Programming Programs which do not execute correctly Do not write the following programs as they will not execute correctly.6 Precautions for Programming FP0 4.

7. For this reason.19 . External output (X) is ignored. the tool service time is temporarily extended. and left/right shift registers [F119 (LRSR)] are ignored. When a rewrite is attempted during RUN. (Supported in CPU Ver. and operation is resumed without the need to change the mode. 2.0 and subsequent versions) 4 . It can be used instead of the initial pulse relay following a change in the program. counter instructions (CT). Rise and fall changes in the inputs of differential instructions (DF). Internal clock relays (special internal relays) are also stopped. Operation During Rewrite External output (Y) is held.1 Operation of Rewrite During RUN How Operation of Rewrite During RUN The FP0 allows program rewriting even in RUN mode. Interrupt functions are stopped. Operation of Rewrite During RUN Completed Flag The rewrite during RUN completed flag (R9034) is a special internal relay that goes on for only the first scan following the completion of rewriting in the RUN mode. Pulse output is stopped during the rewrite. Values in the elapsed value area (EV) do not change. program rewriting is performed.FP0 Precautions During Programming 4.7 Rewrite Function During RUN 4. Set Values for Timer/Counter Instructions All set values specified with decimal constants (K) in timer and counter instructions are preset in the corresponding set value areas (SV). the time of the scan during the RUN rewrite extends from several msec to several hundreds of msec. The timer (T) stops the clock.7 Rewrite Function During RUN 4.

two channel counting. S1. Enable by executing an ICTL instruction once again. do not perform a rewrite during RUN.7 Rewrite Function During RUN FP0 4. Exercise caution. pulse output or PWM output functions. two channel counting. Target value match on/off instructions (F166/F167) will continue.7. S2 R9034 The high-speed counter will continue to count. Jump/label instructions (JP/LBL) Loop/label instructions (LOOP/LBL) Master control relay/master control relay end instructions (MC/MCE) Cases where rewriting is not possible during RUN When a syntax error has occurred. high-speed counter.phase. However.5 kHz or higher during one .Precautions During Programming 4. but not deletion and clearing. when the maximum output frequency is higher than 2. Pulse output and PWM output will be stopped.25 Hz or higher during one . miscounts may occur.25 Hz during one . one channel counting or 1.) Instructions which do not allow rewriting to subprograms The following instructions do not allow rewriting during subroutines or interrupt programs.20 . At 2. The F168 instruction (positioning control) will continue to operate. the following problems may occur. 4 .2 Cases Where Rewriting During Run is not Possible Instructions which do not allow rewriting during RUN Step ladder instructions (SSTP/STPE) Subroutine instructions (SUB/RET) Interrupt instructions (INT/IRET) Control instructions (ED/LBL) (LBL instructions allow insertion and writing. Interrupt programs will be disabled. one channel counting or 1. During forced input/output operation Interrupt Restrictions When using interrupt.phase.phase. Coincidence programs will be disabled. the output pulse number may differ from the set number.phase. Example: Using R9034 (rewrite during RUN completed flag) R9013 ICTL. If a rewrite during RUN is executed.5 kHz during one .

the condition before the rewrite will be held. Set values specified by K constants in TM/CT instructions are preset in all of the corresponding SV’s in the program.21 .) Block a Block b Operation of each instruction OT/KP If an instruction written in block a is deleted in block b. the condition before the rewrite will be held.8 If deleted. If an instruction written in block a is deleted in block b. the condition before the rewrite will be held.7 Rewrite Function During RUN 4. An interrupt program is a program appearing between INTn and IRET instructions. If an instruction written in block a is deleted in block b. set values can be rewritten during operation without affecting the timer. the mode must be changed.) In the case of FP Programmer II.FP0 Precautions During Programming 4. Set values specified by K constants in TM/CT instructions are preset in all of the corresponding SV’s in the program.) High-level instructions If an instruction written in block a is deleted in block b. For detailed information section 4. the program will be rewritten. When PG conversion is executed online. (Elapsed values EV do not change.7.7. be sure to write the instructions as a pair. Caution is required as rewriting takes place simultaneously with the change. NPST-GR Boolean mode FP Programmer II Rewrite procedure Rewriting performed by step. Y contact relays which are on will be held in the on status. the output memory area will be held. Write or delete the instruction in NPSTGR ladder symbol mode. When writing MC/MCE instructions. the condition before the rewrite will be held. the condition before the rewrite will be held. Be sure to write it to an address which follows the ED instruction. (Elapsed values EV do not change. To turn them off in the RUN mode. Be sure to write it to an address which follows the ED instruction. SUB. Write in the order: RET. RET CALL/SUB/ RET INT/IRET Write in the order: IRET.3 Item Procedures and Operation of Rewrite During RUN NPST-GR Ladder symbol mode Maximum of 128 steps. INT Delete in the order:INT.4. A subroutine is a program appearing between SUBn and RET instructions. (See section 4. use forced output. In the case of FP Programmer II. MC/MCE Writing or deleting a single instruction during RUN is not possible. CALL Delete in the order: CALL. TM/CT If an instruction written in block a is deleted in block b. SUB. IRET next page 4 . Changes are performed by block.

NPST-GR Boolean mode FP Programmer II Writing and deletion of a single instruction is not possible for a program with no step ladder area.Precautions During Programming 4. To perform a rewrite during RUN. Write in the order: JP-LBL or LOOP-LBL.7 Rewrite Function During RUN FP0 Item Operation of SSTP/STPE each instruction NPST-GR Ladder symbol mode A distance with the same number cannot be defined twice.) OP 1 4 ENT 1 WRT Procedure for changing to PROG . An SSTP instruction cannot be written in a subprogram. In the case of an SSTP instruction only. After the rewrite.7. 4. change back to PROG . Procedure for changing to RUN .) OP 1 4 ENT 0 WRT 4 .EDIT mode ACLR (.4 Changing Modes in FP Programmer II Changing program modes FP Programmer II is normally in PROG .EDIT mode which does not allow unintentional rewriting of programs.EDIT mode to prevent accidental rewriting.EDIT mode ACLR (.EDIT mode. Change the mode as shown below. the mode must be changed to RUN . Delete in the order: LBL-JP or LBL-LOOP. writing and deletion of a single instruction is possible for a program with a step ladder area.22 . Write or delete both instructions simultaneously in NPST-GR ladder symbol mode. JP/LOOP/LBL Be sure to write the instruction for setting the loop number before LBL-LOOP instructions.

FP0 4. Read the address containing the timer instruction. the changed set value will be preset.8 Precautions During Programming Changing the Set Value of Timer/Counter During RUN 4. Clear the constant (K30).K 30 Y0 Rewrite Method Using FP Programmer II Example of changing the set value of timer 5 from K30 to K50 Procedure: 1.8. (BIN) K/H 5 0 WRT Operation and Cautions After the Change After the change. Timer set value X0 T5 TMX 5. the timer or counter in operation will continue to run. when the mode is changed and then set back to RUN or when the power is turned on. Enter the new constant (K50). the program itself will change. (HELP) CLR 3.8 Changing the Set Value of Timer/Counter During RUN 4.23 . 4 . SHIFT SC TM T-SV ST X-WX 5 SRC READ READ 2. When this method is used. Operation based on the changed set value will be started the next time the execution condition changes from off to on. Thus.1 Method of Rewriting Constant in FP Programmer II This method rewrites the value in the program.

Operation based on the changed set value will be started the next time the execution condition changes from off to on. 0 is preset in the set value area SV.Method using the program (high-level instruction) Operation and cautions after the change After the change. operation will take place as follows: When a set value in the program is specified by a constant K The constant K is preset in the set value area SV. In the case of a hold type timer or counter. the timer or counter in operation will continue to run.Method using the FP Programmer II .24 . With these methods.8 Changing the Set Value of Timer/Counter During RUN FP0 4.GR/FPWIN GR) .Precautions During Programming 4. The program itself is not rewritten. K 30 Y0 SV5 30 This method rewrites the value in the set value area.2 Method of Rewriting a Value in the Set Value Area Transfers to SV area when mode changes to RUN mode. the value changed by the method on the following page is preset in the set value area SV. Timer set value X0 T5 TMX5. the value in the set value area SV will change. it will no longer be effective. the program itself will not change. however. 4 . Changing values in the set value area SV Values in the set value area SV can be changed with the following procedures. Therefore. When a set value in the program is specified by a set value area number In the case of a non-hold type timer or counter. when the mode is changed and then set back to RUN or when the power is turned on.Method using the programming tool software (NPST . .8. After the change.

4. Move the cursor to the position to be registered. 6.25 .8 Precautions During Programming Changing the Set Value of Timer/Counter During RUN Method 1: Method using the programming tool software (NPST-GR) Select “MONITOR & TEST RUN” from the online menu. and change the value. 7. Press the “F7” key and enter the number. Move the cursor to the position to be rewritten. 3. Press the “F4” key. read the set value area SV of the timer or counter using the data monitor. please check the Help menu. Press the “F6” key and enter the timer number. Register the area to be rewritten Enter the numeric value Procedure: 1. 5. The above shows the menu for the “NPST . For information on operating the menus. 4 . 2. Press the “F6 (ENTRY)” key. Press the “Esc” key to register.FP0 4.GR” tool software. The “FPWIN GR” tool software has a similar menu.

Clear SV0.26 .) OP 8 ENT 2. use a high-level instruction as shown below to rewrite the value in the set value area SV of the desired timer or counter. Write the new changing value.Precautions During Programming 4. SV3 R1 T3 TMX 3. TM T-SV 0 READ 3. (BIN) K/H 5 0 WRT Method 3: Method using the program (high-level instruction) To change a set value of timer/counter based on an input condition. K50 Y0 When R0 turns on. Example of changing the value of SV0 from K30 to K50. (. Procedure: 1. K20. (HELP) CLR 4.8 Changing the Set Value of Timer/Counter During RUN FP0 Method 2: Method using the FP Programmer II Use the word data monitor function to read the set value area SV of the timer or counter to be changed. Execute word data monitor (OP8). the timer set value changes from 5 seconds to 2 seconds. and rewrite the value. Example: Changing the set value to K20 when input R0 turns on R0 F0 MV. Read SV0. 4 .

The on/off state of contacts not specified will be determined by the operation result.9 Processing During Forced Input and Output 4. Processing of external output (Y) Regardless of the result of operation. External output will take place according to the input/output update timing in the above diagram. At this time. forced on/off operation will take precedence at a contact specified for forced input/output. the contact of the timer (T) or counter (C) in the operation memory will be rewritten.FP0 Precautions During Programming 4. At this time.9 Processing During Forced Input and Output Processing when forced input/output is initiated during RUN Forced reset / reset processing Input/output update Forced set / reset processing Operation Forced set / reset processing Peripheral service Processing of external input (X) Regardless of the state of the input from the input device. At this time. forced on/off will take precedence at a contact specified for forced input/output.27 . Contacts not specified will read in the on/off state according to the condition of the input from the input device. 4 . the input LED will not blink. The on/off state of contacts not specified will be determined by the operation result. the area of input X in the operation memory will be rewritten. however. the area of output Y in the operation memory will be forcedly rewritten. Timer (T) and Counter (C) Regardless of the timer/counter input condition. forced on/off operation will take precedence at a contact specified for forced input/output. Timing and counting will not take place during control.

9 Processing During Forced Input and Output FP0 4 .28 .Precautions During Programming 4.

. . . . . . . . . . . .19 I/O Allocation and Wiring . . . . 5 . . . . . .5 Outline of Pulse Output Function . . .Chapter 5 High . . .1 5. . . 5 . . . .9 Types of Input Modes . . 5 . . . 5 . . . . . . . . . . . . . . . .speed Counter . 5 . . 5 . . . . . . . . . . . . . 5 . .4. . 5 . . . . . . . . . 5 .speed Counter Function .1 5. . . . . . . .speed Counter Function . . . . . .2. . . . . .22 Sample Program for Positioning Control .3. 5 . . . . . 5 . . . . .7 5. . 5 . . . . . . .2 Three Functions that Use Built. . . . . . .3 5.3 5. . . . . . . . . . . .4 5. . . . . . . . 5 . . . . .speed Counter Function . .1. . . . . . . . . . . .3. . . . . . .18 Control Mode . . . . . . . . . . . . . . . . . .5 Outline of High . . . .3 High . . . . .2. . . . . . . . . . .20 Instructions Used with Pulse Output Function . . . .4. . . . . . . . . . . . . . . . . .3 5. . . .25 next page . . . .1 5. . .3 Performance of Built. . . 5 . . . . . . . . . . . . . . . .in High speed Counter . . . . 5 . . . . . .2 Specifications . . . .12 Sample Program .5 Functions and Restrictions . . .3. . .14 5. . . . . . . .2 5. 5 . . .1 5.4 5. . . . . . . . . . . .4. . . . . . . . . . . . . .2 5. . . . . .in High . .4. . . .1 Outline of Functions . . . . . .5 5. . . . .18 5. . . . . .9 I/O Allocation . .2 Specifications and Restricted Items . . . . . . . . . . . . . . . . . . .11 Instructions Used with High . .1. . . . .4 5. . . 5 . . . 5 . .9 5. .speed Counter/Pulse Output/ PWM Output 5. .4. . . . . .3. . . . .3.4 Pulse Output Function .

. . . . . . 5 .High . . .33 5. 5 . . . . . . . . . . . 5 . . .speed Counter/Pulse Output/ PWM Output FP0 5. . . . .5 PWM Output Function . . . . .33 Instruction Used with PWM Output Function .5. .5. . . . .33 5. . . . . . . .2 Outline of PWM Output Function . . . . . . . .2 . . . . . . . . . . . . .1 5. .

When the count reaches the target value.1 Three Functions that Use Built . With the appropriate instruction. Stepping motor. and JOG operation.1 Outline of Functions 5.speed counter function counts external inputs such as those from sensors or encoders.1.speed Counter Functions that use the built .in high .3 .speed Counter/Pulse Output/ PWM Output 5. tape Motor Encoder Inverter START STOP signal FP0 Encoder output is input to the highspeed counter Cutter blade control signal Pulse output function Combined with a commercially available motor driver. Servo motor 5. this function turns on/off the desired output.speed counter There are three functions available when using the high.speed counter built into the FP0. home return.FP0 High . you can perform trapezoidal control. the pulse output function enables positioning control. Roller Cutter Lead wire. High . Servo motor Pulse output Y0 Y2 CW/CCW output Motor driver 1 FP0 Pulse output Y1 CW/CCW output Y3 Motor driver 2 Stepping motor.in High .speed counter function The high.1 Outline of Functions 5.

1 Outline of Functions FP0 PWM output function By using the appropriate instruction.1. heating decreases.in High .in high.8388608 to K8388607 (HFF8000 to H7FFFFF) (Coded 24 ..speed Counter/Pulse Output/ PWM Output 5. heating increases. Counting range K . When you increase the pulse width..2 Performance of Built .bit binary) 5..speed Counter Channel number There are four channels for the built .speed counter. The channel number allocated for the high..4 . When you decrease it. 5. the PWM output function enables a pulse output of the desired duty ratio.speed counter will change depending on the function being used.High .

phas e input.2 Specifications and Restricted Items 5. F166 (HC1S). DT9107/ DT90106. 10 kHz Related instructions R903A DT9044. DT90045 DT90047 DT9048. DT9105/ DT90104. DT90105 DT9050. Directional distinction X0 X1 (X2) CH0 R903A 250 μs Max. DT90107 DT9110. DT90107 X1 (X2) CH1 R903B Max. DT90051 DT9106. DT9105/ DT90104. 1 kHz Note Reset input X2 can be set to either CH0 or CH1. DT9051/ DT90050. DT9111/ DT90110. DT9109/ DT90108. Decremental input X0 (X2) CH0 Memory area used Control Elapsed flag value area Target value area Performance specifications Minimum Maximum input counting speed pulse Using Using width only 1 multichanple nel channels 50 μs Max.2. DT9107/ DT90106. 5 kHz X4 (X5) CH3 R903D Max. 10 kHz Total of 4 CH with max. F1 (DMV). DT9045/ DT9047/ DT90044. DT9046. DT90046. DT9047/ DT90046. (value in parenthesis is reset input) Specify the desired output from Y0 to Y7 Incremental input. 5. DT90109 DT9044.1 Specifications Table of high . 10 kHz F0 (MV). DT90047 DT9106. 2 kHz X3 X4 (X5) CH2 R903C 500 μs Max. 2 kHz Total of 2 CH with max. Incremental/ decremental input. DT90045 DT9104.speed counter function specifications Input/output contact number Built-in being used high speed On/off Count Input counter output mode contact channel number no. DT90105 DT9108. DT90049 DT9104. 5 kHz Specify the desired output from Y0 to Y7 2 .2 Specifications and Restricted Items 5.FP0 High . DT9045/ DT90044. DT9049/ DT90048. DT90111 DT9046.speed Counter/Pulse Output/ PWM Output 5. F167 (HC1R) X3 (X5) CH2 R903C 100 μs Max. Reset input X5 can be set to either CH2 or CH3.5 .

5 kHz. DT90049 Target value area DT9046.point output DT9051/ DT90050. DT90047 Performance Related instruc specifications instrucfor maximum tions output frequency F0 (MV).Home Near counter output al output input home channel input no.1 % to 99.speed counter channel no.2 Specifications and Restricted Items FP0 Table of pulse output function specifications Input/output contact number being used Built-in high speed Pulse Direction. Table of PWM output specifications Output number being used Built . F1 (DMV). DT90051 Note The maximum 1-point output for instruction F168 (SPD1) is 9. 10 kHz for 1 .point output Max.speed Counter/Pulse Output/ PWM Output 5. F1 (DMV). 2 .15 Hz to 38 Hz (CPU ver. CH0 Memory area used Performance specifications for output Control flag frequency R903A Frequency: 0. DT9045/ DT90044.in high .High . DT90045 DT9048. F170 (PWM) Y1 CH1 R903B 5. Y0 Y2 X0 DT9052/ DT90052 <bit2> DT9052/ DT90052 <bit6> CH0 Memory area used Control flag R903A Elapsed value area DT9044. F169 (PLS) Y1 Y3 X1 CH1 R903B Max.0 or later: 100 to 1 kHz) Duty: 0. DT9047/ DT90046. DT9049/ DT90048. 5 kHz for DT9050.6 . F168 (SPD1).9 % Related instructions Y0 F0 (MV). 2.

speed Counter/Pulse Output/ PWM Output 5.speed counter with a mode that does not use the reset input. F167 (target value match off instruction) cannot be executed with CH0. 5.speed counter and pulse output functions.7 .speed counter (F166 to F170) are executed.speed counter function. you can allot the inputs listed in parenthesis in the specifications table to a normal input. When the flag for a channel turns on. you cannot allot X0 and X1 to normal inputs. When using the high. Example of prohibited application When using CH0 for 2 .2 Specifications and Restricted Items 5. another instruction cannot be executed using that same channel. you cannot allot origin input X0 to a normal input. the control flag (special internal relay: R903A to R903D) corresponding to the used channel turns on. Example of allowable application When using the high.phase input.2. When using Y0 for the pulse output function. Example of prohibited application While executing F166 (target value match on instruction) and flag R903A is in the on state.FP0 High . you cannot allot Y2 (directional output) to a normal input or output.speed counter with no reset input and 2 .phase inputting with the high. Restrictions on the execution of related instructions (F166 to F170) When any of the instructions related to the high. Example of prohibited application: You cannot share CH0 with the high. I/O number (input/output contact point) The number allocated to each function cannot be used for normal input or outputs.2 Channel Functions and Restrictions The same channel cannot be used by more than one function. you can allot X2 to a normal input. When using Y0 for the pulse output (with directional output operating) function.

Example 1: While in the incremental input mode and using the two channels CH0 and CH1. the maximum counting speed of the high . then CH2 can be used up to 1 kHz.High .2 Specifications and Restricted Items FP0 Restrictions for maximum counting speed/pulse output frequency The counting speed when using the high. specifications will differ depending on the conditions of use.speed counter function and pulse output function.8 . The maximum output frequency when using the pulse output function will differ depending on the output contact number as shown in the table. if CH0 is being used at 1 kHz.phase input mode and using the two channels CH0 and CH2.speed Counter/Pulse Output/ PWM Output 5. Example 2: When using the two contacts Y0 and Y1.speed counter being used simultaneously is 5 kHz with the incremental mode and 1 kHz with the 2 . the maximum output frequency is 5 kHz.speed counter function will differ depending on the counting mode as shown in the table. if CH0 is being used at 8 kHz. Example 2: While in the 2 . 5. then CH1 can be used up to 2 kHz. Example: When using one pulse output contact with a maximum output frequency of 5 kHz.phase mode. Example 1: When using either only Y0 or only Y1. the maximum output frequency is 10 kHz. When using the high.

speed Counter Function 5. Preset the output to be turned on and off with the SET/RET instruction.speed counter function is able to count high. use the target value match on instruction (F166).speed pulses of frequencies up to 10 kHz. The high. For detailed information 5. it is necessary to set system registers section 8.4 400 and 401.speed counter function counts the input signals. To turn off an output.3 High . and when the count reaches the target value.3.FP0 High .3.speed counter function The high.2 Types of Input Modes Incremental input mode X0 Count 0 1 2 3 4 n-3 n-2 n-1 n on off Decremental input mode X0 Count n n-1 n-2 n-3 n-4 3 2 1 0 on off 5.9 .speed Counter Function High .speed Counter Function 5. turns on and off the desired output.1 Outline of High . use the target value match off instruction (F167).speed Counter/Pulse Output/ PWM Output 5. To turn on an output when the target value is matched.3 High .speed counter function. Setting the system register In order to use the high.

3 High .speed Counter/Pulse Output/ PWM Output 5.speed Counter Function FP0 2 .10 .High .phase input mode (Incremental input: CW) X0 X1 Count 0 1 2 n-1 n on off on off (Decremental input: CCW) X0 X1 Count n n-1 n-2 n-3 2 1 on off on off Incremental/decremental input mode (separate input mode) X0 on off on off 1 2 3 4 3 2 1 2 3 Increasing 4 3 Decreasing X1 Count 0 Increasing Decreasing Directional distinction mode X0 on off on off 1 2 3 4 3 2 1 0 X1 Count 0 Increasing Decreasing 5 .

phase input and reset input A phase input B phase input Reset input X0 X1 X2 Yn * On and off output * The output turned on and off when values match can be specified from Y0 to Y7 as desired. When using CH0 with incremental input and reset input Count input X0 Reset input X2 Yn * On and off output * The output turned on and off when values match can be specified from Y0 to Y7 as desired.1.3 I/O Allocation The inputting.11 .FP0 High .3.3 High .speed Counter Function 5. as shown in the table on section 5. When using CH0 with 2 . will differ depending on the channel number being used.2. The output turned on and off can be specified from Y0 to Y7 as desired with instructions F166 and F167. 5 .speed Counter/Pulse Output/ PWM Output 5.

4 Instructions Used with High .3 High . H 1 . Example 1: Set the initial value of K3000 in the high .speed counter control instruction (F0) This instruction is used for counter operations such as software reset and count disable. Example: Performing a software reset X7 DF F0 MV.speed counter (example of changing the elapsed value). X7 DF F1 DMV. Count enable/disable.speed Counter Function FP0 5. Clear controls from high.High . DT9052 F0 MV. Use this F1 (DMV) instruction to set the elapsed value. If it is only reset. Clear target value match interrupt. Specify this instruction together with the F1 (DMV) instruction and the special data register DT9044/DT90044.speed Counter/Pulse Output/ PWM Output 5. K3000.12 . Operations that can be performed with this instruction Counter software reset.speed Counter Function High .speed counter instructions F166 to F170. The elapsed value is stored as 32 . counting will not be performed. Specify this instruction together with the F0 (MV) instruction and the special data register DT9052/DT90052. the settings will remain until this instruction is executed again.bit data in the combined area of special data registers DT9044 and DT9045/DT90044 and DT90045. H 0 . DT9052 ⋅⋅⋅⋅⋅⋅⋅ 1 ⋅⋅⋅⋅⋅⋅⋅ 2 In the above program.3.speed counter. the reset is performed in step 1 and 0 is entered just after that in step 2 . The count is now ready for operation. Once this instruction is executed. DT9044 5 . Hardware reset enable/disable. Elapsed value change and read instruction (F1) This instruction changes or reads the elapsed value of the high.

Y6 If the elapsed value (DT9104 and DT9105/DT90104 and DT90105) for channel 2 matches K20000. Target value match on instruction (F166) XA DF F166 HC1S.speed counter and copies it to DT100.speed Counter/Pulse Output/ PWM Output 5. Y7 If the elapsed value (DT9044 and DT9045/DT90044 and DT90045) for channel 0 matches K10000. Target value match off instruction (F167) XC DF F167 HC1R. K10000. DT9044. output Y5 turns off. XD DF F167 HC1R. XB DF F166 HC1S. output Y6 turns on. K1. K2. Y4 If the elapsed value (DT9048 and DT9049/DT90048 and DT90049) for channel 1 matches K30000. K0. X7 DF F1 DMV. the elapsed value is automatically transferred from the elapsed value area to the special data registers DT9044 and DT9045/ DT90044 and DT90045. K30000.FP0 High .3 High .speed Counter Function Example 2: Reads the elapsed value of the high . output Y7 turns on. K20000.13 . K3. Y5 If the elapsed value (DT9108 and DT9109/DT90108 and DT90109) for channel 3 matches K40000. K40000. DT100 Each time the ED instruction is executed. 5 . output Y4 turns off.

speed Counter Function FP0 5.3.speed Counter/Pulse Output/ PWM Output 5.14 .5 Sample Program Wiring examples FP0 Input terminal X0 Operation start Encoder input X5 COM Encoder Motor Output terminal Operation Y0 + - Inverter Operation/Stop COM Speed 0 Number of pulse Y0 5.High .000 5 .3 High .

Y 0 R101 Y0 S R100 DF/ R102 TMX 0.FP0 High . Y0 turns off and the conveyor stops.3 High .speed Counter/Pulse Output/ PWM Output 5. DT 9044 Positioning operations start R903A R102 R100 Positioning operations running R100 F167 HC1R. K 0.5 seconds) Start signal to inverter R903A 5 . Y0 turns on and the conveyor begins moving. K 5 T0 R102 Completion pulse (0.speed Counter Function Positioning operations with a single speed inverter When X5 is turned on. K 5000. K 0.15 . X5 DF R100 R101 DF R101 F1 DMV. When the elapsed value (DT9044 and DT9045) reaches K5000.

speed switching Y0 Y1 + Inverter Run/Stop Fast/Slow COM Speed 0 Number of pulse Y0 Y1 4.speed Counter/Pulse Output/ PWM Output 5.500 5.High .speed Counter Function FP0 Wiring example FP0 Input terminal Encoder input Operation start X0 X5 COM Encoder Motor Output terminal High .3 High .000 5 .16 .

X5 DF R100 R903A R103 R100 Positioning operations running R100 DF R101 F1 DMV.speed Counter/Pulse Output/ PWM Output 5. When the elapsed value (DT9044 and DT9045) reaches K4500.17 . K 5 R100 T0 Y1 R R103 Completion pulse (0.5 seconds) Deceleration Start signal to inverter High. K 5000.speed Counter Function Positioning operations with a double speed inverter When X5 is turned on. Y0 turns off and the conveyor stops. R100 R900C K 4500. K 0. K 0. Y1 turns off and the conveyor begins decelerating.FP0 High . Y0 and Y1 turn on and the conveyor begins moving. Y 0 R101 Y0 S Y1 S R100 F61 DCMP. DT 9044 R102 Reaches deceleration point R102 DF R903A DF/ R103 TMX 0.3 High . When the elapsed value reaches K5000. DT 9044 R101 Positioning operations start F167 HC1R.speed signal to inverter 5 .

speed counter.speed Counter/Pulse Output/ PWM Output 5.4 Pulse Output Function 5. and target value. Provides trapezoidal control with the instruction F168 for automatically obtaining pulse outputs by specifying the initial speed.4 For detailed information 5 . Setting the system register When using the pulse output function.4 Pulse Output Function FP0 5.High . JOG operation with the instruction F169 for pulse output while the execution condition (trigger) is in the on state. maximum speed.1 Outline of Pulse Output Function Instructions used and control settings The pulse function enables positioning control by use in combination with a commercially available pulse.4.” section 8.string input type motor driver. set the channels corresponding to system registers 400 to “Do not use high.18 . acceleration/deceleration time. Instruction F168 also enables automatic home return.

speed counter decreases.4. The directional output and output frequency are specified by instruction F169.2 Control Mode Incremental <relative value control> Outputs the pulse of the pulse number set by the target value.) By setting H12 (absolute. reverse: on) in the control code with instruction F168. the directional output is turned off and the elapsed value of the high. By setting H03 in the control code. when the current value is less than the target value. the directional output turns on and the elapsed value of the high. F168 (SPD1) and section 5. the pulse is continuously output.4. the directional output turns on and the elapsed value of the high. By setting H13 in the control code. set the bit corresponding to DT9052/ DT90052 to off → on → off → with the near home input. F169 (PLS) and section 5. F168 (SPD1) and section 5.speed counter increases.5 For detailed information Absolute <absolute value control> Outputs the pulse set by the difference between the current value and the target value. the directional output is the reverse of that above.FP0 High . When the current value is greater than the target value. F0 (MV).5 For detailed information JOG operation Pulses are output from the specified channel while the trigger for instruction F169 is in the on state. the directional output is the reverse of that above.5 For detailed information 5 . the directional output is turned off and the elapsed value of the high. By setting H02 (incremental. When the target value is negative. To decelerate the movement when near the home.speed counter decreases. F168 (SPD1) and section 5.speed counter increases. (The difference between the current value and the target value is the output pulse number.4. forward: off.4.speed Counter/Pulse Output/ PWM Output 5. forward: off.5 For detailed information Home return Until the home input (X0 or X1) is entered by executing instruction F168. when the target value is positive.19 .4.4 Pulse Output Function 5. reverse: on) in the control code with instruction F168.

When using CH0 FP0 Home input X0 X2 Near home input Y0 Y2 Pulse output * Driver Directional switching output * The near home input specifies the desired input. For detailed information Near home input is substituted by allocating the desired contact point and turning on and off the specified bit of DT9052/DT90052. 5 . and home input I/O allocation is section 5.2. directional output terminal. F0 (MV) For detailed information Up to two driver systems can be connected.4.High .1 determined by the channel used. The pulse output terminal.3 I/O Allocation and Wiring Single pulse input driver (pulse input and directional switching input) One output point is used as a pulse output and the other output is used as a directional output.4 Pulse Output Function FP0 5. When using CH1 FP0 Home input X1 X3 Near home input Y1 Y3 Pulse output * Driver Directional switching output * The near home input specifies the desired input. such as X2. such as X3.speed Counter/Pulse Output/ PWM Output 5.20 .

The pulse output terminal and home input I/O allocation is determined by the channel used. For detailed information section 5.speed Counter/Pulse Output/ PWM Output 5. the relay must be switched earlier by the amount of its operation time.FP0 High . One output contact is used as a pulse output for relay switching. FP0 Y0 CW input Driver Y1 CCW input 5 . ** Y4 or other desired output can be specified for the relay switching. At this time.1 Set the control code for instruction F168 to “No directional output. The elapsed values can thus be sent to the program as necessary. the counter elapsed values for the separate channels (ch0 and ch1) increase and decrease in response to the individual outputs. switching must be performed by an external relay. Caution when using a double pulse input driver When using the FP0 pulse outputs Y0 and Y1 for direct connection to the CW input and CCW input of a driver.2.21 .4 Pulse Output Function Double pulse input driver (CW pulse input and CCW pulse input) Since a double pulse input is used.” F168 (SPFD1) For detailed information When using CH0 FP0 Home input X0 X2 Near home input Y0 Y4 ** Pulse output * CW input CCW input Driver * X2 or other desired input can be specified for the near home input.

4 Pulse Output Function FP0 5. DT100. K500. DT103 F1 DMV. a maximum speed of 5000 Hz. K5000. Notes • • For trapezoidal control. refer to page 5 .High . DT106 F168 SPD1. K200. K10000.speed counter elapsed value (DT9044 and DT9045/DT90044 and DT90045) will be increasing. 5 .4. H102. K0. 5000 Hz 10000 pulses 500 Hz 0 Hz 200 msec 200 msec At this time the high.4 Instructions Used with Pulse Output Function Positioning control instruction (F168) Automatically performs trapezoidal control according to the specified data table. DT100 F0 MV.32. X3 DF F0 MV. DT104 F0 MV. and a movement amount of 10000 pulses.22 . DT102 F0 MV. For details on troubleshooting procedures when no pulse is output when instruction F168 (SPD1) is executed. H0 Generates a pulse from output Y0 at an initial speed of 500 Hz.speed Counter/Pulse Output/ PWM Output 5. an acceleration/deceleration time of 200 msec. DT101 F0 MV. set the initial speed to no more than 5000 Hz.

At this time. DT200. DT201 F169 PLS.4 Pulse Output Function Pulse output instruction (F169) This instruction is for JOG operation by obtaining a pulse from the desired output when the execution condition (trigger) turns on.speed Counter/Pulse Output/ PWM Output 5. Operations that can be performed with this instruction Clear controls (stopping the pulse outputs) from high. X6 F0 MV. H1 While X6 is in the on state.23 . At this time. Specify this instruction together with the F0 (MV) instruction and the special data register DT9052/DT90052. directional output (Y3) is off and the count of the elapsed value for the high. DT200 F0 MV.speed counter.FP0 High . Near home processing for home return operations. DT200 F0 MV.speed counter CH0 (DT9044 and DT9045/DT90044 and DT90045) increases. and setting and resetting the near home input.speed counter instructions F166 to F170. High . 5 . H112. H123.speed counter control instruction (F0) This instruction is used for resetting the built . DT200.speed counter CH1 (DT9048 and DT9049/DT90048 and DT90049) decreases. a pulse of 300 Hz with a duty ratio of 10% is output from Y0. directional output (Y2) is off and the count of the elapsed value for the high. K700.in high. K300. stopping the pulse outputs. X2 F0 MV. Once this instruction is executed. H0 While X2 is in the on state. a pulse of 700 Hz with a duty ratio of 10% is output from Y1. the settings will remain until this instruction is executed again. DT201 F169 PLS.

. DT9052 F0 MV... the elapsed value is automatically transferred from the elapsed value area to the special data registers DT9044 and DT9045/DT90044 and DT90045. X3 DF F0 MV. Example 2: Performing a forced stop of the pulse output. X7 DF F0 MV.4 Pulse Output Function FP0 Example 1: Enable the near home input during home return operations and begin deceleration. 1 . K3000. X7 DF F1 DMV.High . the near home input is enabled in step 1 and 0 is entered just after that in step 2 to perform the preset operations. Use this F1 (DMV) instruction to set the elapsed value. The elapsed value is stored as 32 . H 4 . DT100 Each time the ED instruction is executed. DT9052 .bit data in the combined area of special data registers DT9044 and DT9045/DT90044 and DT90045.speed Counter/Pulse Output/ PWM Output 5.. H 8 . DT9052 Elapsed value write and read instruction (F1) This instruction is used to read the pulse number counted by the built .in high... H 0 . DT9044..speed counter.speed counter to DT100.24 . X7 DF F1 DMV. DT9044 Example 2: Reads the elapsed value of the high .. 5 . Example 1: Set the initial value of K3000 in the high .speed counter (example of writing the elapsed value). Specify this instruction together with the F1 (DMV) instruction and the special data register DT9044/DT90044. 2 In the above program. H 0 . DT9052 F0 MV.

Note When the stepping motor input is a 5 V photo .speed Counter/Pulse Output/ PWM Output 5. . 5 .4.coupler type.side) Stepping motor driver Output terminal Pulse output Y0 COM Pulse input COM Directional output Y2 Directional input + 24 V DC power supply See note.25 . connect a 2 KΩ 1/4 W resistor.5 Sample Program for Positioning Control Wiring example FP0 Input terminal Home sensor Positioning start Positioning start Home return start Near home sensor Forward JOG start Reverse JOG start Overrun X0 X1 X2 X3 X4 X5 X6 X7 COM a contact b contact a contact Moving table b contact (+ side) Stepping motor (.4 Pulse Output Function 5.FP0 High .

F0 MV.speed Counter/Pulse Output/ PWM Output 5. DT 106 DT 100. H 0 T0 R11 Positioning operations start DT100 Control code: H102 [refer to “instruction F168 (SPD1)”] DT101 Initial speed: 500 Hz DT102 Maximum speed: 5000 Hz DT103 Acceleration/deceleration time: 200 msec DT104 Movement amount: DT105 10000 pls R12 F168 SPD1. F1 DMV. DT 101 K5000. R903A DF/ R12 R10 DT106 Pulse stop Positioning completion pulse (1 sec) TMX 0. X1 DF R10 R903A R12 R10 Positioning operations running R10 DF R11 F0 MV. K10 5000 Hz (. a pulse is output from Y0. H 102. F0 MV.High . DT 102 K 200.side) Motor 10000 pulses (+ side) 10000 pulses 500 Hz 0 Hz 200 msec 200 msec 5 . directional output Y2 does not turn on. DT 100 K 500. F0 MV. DT 104 K 0. At this time.4 Pulse Output Function FP0 Relative value positioning operation (plus direction) When X1 turns on. F0 MV.26 . DT 103 K10000.

R903A DF/ R22 R20 DT106 Pulse stop Positioning completion pulse (1 sec) 6000 Hz (.4 Pulse Output Function Relative value positioning operation (minus direction) When X2 turns on. F0 MV. H 102. F0 MV. K10 F168 SPD1. a pulse is output from Y0. H 0 T1 R21 Positioning operations start DT100 Control code: H102 [refer to “instruction F168 (SPD1)”] DT101 Initial speed: 1000 Hz DT102 Maximum speed: 6000 Hz DT103 Acceleration/deceleration time: 300 msec DT104 Movement amount: DT105 . DT 104 K 0. directional output Y2 turns on. DT 100 K1000.FP0 High .speed Counter/Pulse Output/ PWM Output 5. DT 106 DT 100.side) Motor 8000 pulses (+ side) 8000 pulses 1000 Hz 0 Hz 300 msec 300 msec 5 . At this time.8000.27 . X2 DF R20 R903A R22 R20 Positioning operations running R20 DF R21 F0 MV. F0 MV. F0 MV. F1 DMV. DT 101 K6000. DT 103 K .8000 pls R22 TMX 1. DT 102 K 300.

DT 102 K 250.000 (30. H 0 T2 R31 Positioning operations start DT100 Control code: H112 [refer to “instruction F168 (SPD1)”] DT101 Initial speed: 200 Hz DT102 Maximum speed: 4000 Hz DT103 Acceleration/deceleration time: 250 msec DT104 Target value: 22000 DT105 R32 F168 SPD1. DT 101 K4000.4 Pulse Output Function FP0 Absolute value positioning operation When X1 is turned on. F1 DMV. DT 104 K 0. pulses are output from Y0.speed Counter/Pulse Output/ PWM Output 5.High . DT 103 K22000. F0 MV. F0 MV. X1 DF R30 R903A R32 R30 Positioning operations running R30 DF R31 F0 MV. F0 MV. the direction output Y2 does not go on.000”.side) Motor (+ side) (10. and if the value is smaller than ”22.28 .” 200 Hz 0 Hz 250 msec 250 msec 5 . DT 100 K 200.000. R903A DF/ R32 R30 DT106 Pulse stop Positioning completion pulse (1 sec) TMX 2. F0 MV. the direction output Y2 goes on.000) 4000 Hz Regardless of the current value. K10 (.000) 22. If the current value at that point is larger than ”22. DT 106 DT 100.000”. H 112. its movement is towards position “22.

H 0.FP0 High . when X4 turns on.speed Counter/Pulse Output/ PWM Output 5. home return is completed. DT 201 K2000. F0 MV. directional output Y2 turns on. K10 X4 DF F0 MV.4 Pulse Output Function Home return operation (minus direction) When X3 turns on. the elapsed value (DT9044 and DT9045/DT90044 and DT90045) are cleared to 0. and when X0 turns on. After the return to home is completed. H 123. a pulse is output from Y0 and the return to home begins. DT 202 K 150. DT9052 DT9052 Near home deceleration start (. H 0 T3 R41 Home return operation start DT200 Control code: H123 [refer to “instruction F168 (SPD1)”] DT201 Initial speed: 100 Hz DT202 Maximum speed: 2000 Hz DT203 Acceleration/deceleration time: 150 msec R42 F168 SPD1.side) Motor (+ side) X3: on 2000 Hz Near home sensor X4: on Home sensor X0: on X0 Home sensor X4 Near home sensor 100 Hz 0 Hz 150 msec 150 msec 5 . Then. X3 DF R40 R903A R42 R40 Home return operations running R40 DF R41 F0 MV. DT 200 K 100. At this time. DT 203 DT 200. R903A DF/ R42 R40 Home return completion pulse TMX 3. H 4. F0 MV. F0 MV. deceleration begins. F0 MV.29 .

4 Pulse Output Function FP0 Home return operation (plus direction) When X3 turns on. home return is completed. F0 MV. DT 202 K 100. F0 MV. a pulse is output from Y0 and the return to home begins. H 0 T4 R51 Home return operation start DT200 Control code: H122 [refer to “instruction F168 (SPD1)”] DT201 Initial speed: 120 Hz DT202 Maximum speed: 2500 Hz DT203 Acceleration/deceleration time: 100 msec R52 F168 SPD1.30 . DT 203 DT 200. H 0.High . DT 201 K2500.speed Counter/Pulse Output/ PWM Output 5. directional output Y2 does not turn on. K10 X4 DF F0 MV.side) Motor (+ side) X3: on 2500 Hz Home sensor X0: on X4 Near home sensor X0 Home sensor 120 Hz 0 Hz 100 msec 100 msec 5 . the elapsed value (DT9044 and DT9045/DT90044 and DT90045) are cleared to 0. At this time. R903A DF/ R52 R50 Home return completion pulse TMX 4. After the return to home is completed. F0 MV. DT 200 K 120. and when X0 turns on. H 4. DT9052 DT9052 Near home sensor X4: on Near home deceleration start (. when X4 turns on. H 122. deceleration begins. X3 DF R50 R903A R52 R50 Home return operations running R50 DF R51 F0 MV. F0 MV. Then.

At this time.side) Motor (+ side) X5 on off 300 Hz 0 Hz Y0(Pulse) JOG operation (minus direction) While X6 is in the on state. directional output Y2 does not turn on. X5 F0 MV. H 122. H 112. X6 F0 MV. (.4 Pulse Output Function JOG operation (plus direction) While X5 is in the on state. directional output Y2 turns on. DT 310 K 300. DT9052 Pulse output control clear F0 MV. F0 MV. X7 DF/ F0 MV. H 0 DT300 Control code: H112 [refer to “instruction F169 (PLS)”] DT301 Speed: 300 Hz F169 PLS. H 0 DT310 Control code: H122 [refer to “instruction F169 (PLS)”] DT311 Speed: 300 Hz F169 PLS. a pulse is output from Y0. H 0. the output of the pulse is stopped. F0 MV. DT 301 DT 300. H 8. At this time.31 .side) Motor (+ side) X6 on off 300 Hz 0 Hz Y0(Pulse) Emergency stop (over limit) If X7 turns off while a pulse is being output from Y0. (. DT9052 5 . DT 311 DT 310. DT 300 K 300.FP0 High .speed Counter/Pulse Output/ PWM Output 5. a pulse is output from Y0.

High . No Remedy problem Modify elapsed value.speed Counter/Pulse Output/ PWM Output 5. Yes Elapsed value tried to output pulse in forward direction at H7FFFFF. No No Modify elapsed value. Fifth word of data table is set to HFF8000 ≦ target value ≦ H7FFFFF. Yes No Set to home return mode No Home input is already used by interrupt or HSC. Yes Remedy problem No Please contact your dealer. Kj] Remedy problem Yes Special internal relay R903A or R903B is already on. Remedy problem Yes No First word of data table is not set to incremental (0). Set to absolute mode No Please contact your dealer. Yes Remedy problem Remedy problem Yes HSC CH0 or CH1 is set to system register 400. Yes Remedy problem No Please contact your dealer. j.4 Pulse Output Function FP0 Troubleshooting flowchart if a pulse is not output when instruction F168 (SPD1) executed Error occurs No [F168 SPD1.32 . or home return (2). No Remedy problem Yes No Elapsed value tried to output pulse in reverse direction at HFF8000. Yes Yes Not set to K0 or K1. absolute (1). Yes Absolute mode setting is target value = elapsed value. Yes Yes Please contact your dealer. 5 . Second word of data table is set to 40 ≦ initial speed ≦ maximum speed. No Remedy problem No Control clear flag for special data register DT9052/DT90052 is on.

DT101 F170 PWM.4 5. DT100 F0 MV. H6. DT100 F0 MV. Applicable to analog controls such as temperature control and light modulation. DT101 F170 PWM.5. a pulse with a period of 840 msec and duty ratio of 50% is output from Y0. set the channels corresponding to system section registers 400 to “Do not use high.6 sec and duty ratio of 30% is output from Y1.speed Counter/Pulse Output/ PWM Output 5.FP0 High .2 Instruction Used with PWM Output Function PWM output instruction (F170) X6 F0 MV.” For detailed information 8. the specified duty ratio and pulse width modulation is obtained. X7 F0 MV. Setting the system register When using the PWM output function. a pulse with a period of 1.33 . DT100. DT100. K500. K300. K0 While X6 is in the on state. 5 .speed counter. K1 While X7 is in the on state.5 PWM Output Function 5.5.5 PWM Output Function 5. H5.1 Outline of PWM Output Function PWM output function With the instruction F170 (PWM).

speed Counter/Pulse Output/ PWM Output 5.5 PWM Output Function FP0 5 .34 .High .

. . . . . .3 6.3. . .1. . .use Serial Communications Function . .8 6. . . . . . .1.8 If “Yes” has been Set for the Start and Terminal Codes (Start Code: STX.use Serial Communication . . . .3 Data Reception . . . . . . . . . . .4 System Register Settings . . . . . . . 6 . . 6 . .2 If “None” is Set for Start and Terminal Codes 6 . . .1 General . . 6 . 6 .1 6.1. . . . .3 Data Transmission . . . 6 . . . . . . .2 6. . .1 6. .5 Explanation of Operations When Using General .3 General . . .3 6. . 6 .9 . . . 6 . .use Serial Communications 6. . . . . . . . . . . .use Serial Communications . . . . . . .3. .2 6. . . .Chapter 6 General . . . . . . Terminal Code: ETX) . . . . . . . . . . . . . . .

2 .use Serial Communications FP0 6.General .

as long as it does not exceed the range that can be used by the data register. Start and terminal codes are automatically added to the data being transmitted.) 6. so system register 412 must be changed to a general. There is no restriction on the number of bytes that can be transmitted. (For details.2 Data Transmission Any desired data register can be prepared as the transmission table.1 General .) The data register to be used as the transmission table is specified using the F144 (TRNS) instruction.1 General .3 .1 General .use Serial Communications 6.use Serial Communications Using the RS232C port. see “F144 (TRNS)” instruction. 6. Data transmission is executed using the F144 (TRNS) instruction.use port (K2). Any number of bytes may be sent. and the data stored in that table transmitted. and the data is sent.use Serial Communications Function 6.1. Transmission and reception are not enabled in the default settings. data and commands can be sent to and received from an external device such as a bar code reader. etc.use Serial Communications Function 6.1. This is done by executing the F144 (TRNS) instruction. The transmission speed (baud rate) and transmission format are set using system register 413 and 414.FP0 General . Table for transmission Transmission Transmitteddata storage area External device (PC.

) Data registers used as reception buffers are specified by system register 417 and 418.3 Data Reception Data sent from an external device is received at the RS232C port.1.General .use Serial Communications 6. Reception buffer Reception Received data storage area External device (bar code reader. etc.) 6.4 . (For details see “F144 (TRNS)” instruction.use Serial Communications Function FP0 6.1 General . Data reception is enabled by the F144 (TRNS) instruction. The received data is automatically stored in the data register specified as the reception buffer.

and settings entered using H constants. this is H3. Setting the RS232C Transmission Format (System Register 413) The transmission format is as follows in the default settings.2 System Register Settings 6. as shown below. the items outlined below must be specified.Usage purpose of the RS232C port .RS232C transmission format .use Serial Communications 6. 15 6 5 4 3 2 1 0 Start code 0:STX None 1:STX Yes 00:CR 01:CR and LF 10: None 11:ETX 0:1 bit 1:2 bits 00: None 01: Yes (odd) 11:Yes (even) 1:8 bits Terminal code Stop bit Parity Data length 0:7 bits next page 6. With the FP Programmer II.2 System Register Settings Preparation for Sending and Receiving Data (System Register Settings) Communication is not enabled in the default settings for the RS232C port. (With the FP Programmer II.FP0 General . the various items should be selected in bit units.5 .Reception buffer Setting the Usage Purpose of the RS232C Port (System Register 412) Specify “General .Baud rate . This is the setting which enables serial communication. To enable communication.) Data length: 8 bits Parity check: Yes/odd Stop bit: 1 bit Terminal code: CR Start code: STX None Set these items to match the external device connected to the RS232C port. enter settings for the pertinent individual items.use port” (this is K2 for the FP Programmer II). . using the system registers. and if changing the transmission format.

6.2 System Register Settings FP0 Start codes (STX) and terminal codes (EXT) When data is transmitted.3. The start and terminal codes themselves are not stored in the reception buffer. Note If no terminal codes are specified for either transmission or reception. Also.use Serial Communications 6. In this case. the reception completed flag (R9038) goes on. the reception completed flag will not go on.6 . the specified code is added automatically to the data being sent. however. see section 6. watch the number of bytes received to determine whether the reception has been completed. data following the start code is stored in the reception buffer. When receiving data.2.General . Example: Changing the terminal code to [CR and LF] Data length Parity check Stop bit Terminal code Start code 0 0 0 1 0 0 1 1 H1 H3 b Change H3 (default value) to H13. For details. if ”Yes” has been specified for the start code parameter. at the point at which the terminal code is received.

Setting the Reception Buffer (System Registers 417 and 418) In the default settings. all areas of the data registers are set to be used as reception buffers.7 . specify the initial number in system register 417. and the volume (number of words) in system register 418. To change the area of the data register used as the reception buffer. H 0 0 RS232C port H0: 19200 bit/s H1: 9600 bit/s H2: 4800 bit/s H3: 2400 bit/s H4: 1200 bit/s H5: 600 bit/s H6: 300 bit/s Tool port H0: 9600 bit/s H1: 19200 bit/s If anything other than H0 or H1 is set for the baud rate of tool port.use serial communication is set to “9600 bit/s” (H1) in the default settings. select one of the values listed below.FP0 General . Example: Setting 19. To change this setting to match the external device connected to the RS232C port. the baud rate will be 9600 bit/s.2 System Register Settings Setting the Baud Rate (System Register 414) The baud rate (transmission speed) for general.use Serial Communications 6. The reception buffer is configured as shown below.200 bit/s for both the tool port and RS232C port ' Write H100. Initial area specified with system register 417 Number of reception bytes Received data storage area Number of words specified by system register 418 6.

use Serial Communication FP0 6.3 Explanation of Operations When Using General .use Serial Communication 6.3.3 Explanation of Operations When Using General .use serial communication.duplex transmission should be used for general.) When the F144 (TRNS) instruction is executed. reception completed flag (R9038) and transmission completed flag (R9039) go off. Be aware that the reception completed flag (R9038) changes even while a scan is in progress.use Serial Communications 6. the error flag (R9037). there is a possibility of different statuses existing within the same scan.1 If “None” is Set for Start and Terminal Codes Relationship between the flags (reception completed flag and transmission completed flag) and the F144 (TRNS) instruction External received data on A B C CR D E F G Cannot be stored when reception completed flag is on R9038 Reception completed flag F144 (TRNS) instruction execution R9039 Transmission completed flag off on off on off Duplex transmission disabled while F144 (TRNS) instruction is being executed Transmitted data Stored Reception buffer A A B A B C 1 2 3 CR A B C E B C E F C E B G Number of reception bytes <1> <2> <3> <0> <1> <2> <3> Write pointer Number of bytes received is cleared when F144 (TRNS) instruction is executed Half .8 . Check the transmission completed flag (R9039) to determine whether duplex transmission is possible. (Example: If the reception completed flag is used multiple times as an input condition. Reception is disabled when the reception completed flag (R9038) is on. Duplex transmission is disabled while the F144 (TRNS) instruction is being executed. 6.General .

data following the later start code is overwritten and stored in the reception buffer. When the F144 (TRNS) instruction is executed. Terminal Code: ETX) When receiving data External received data on A B C STX D E ETX F G STX H ETX The reception code is deleted by the F144 (TRNS) instruction. the reception completed flag will not be detected.<1> <2> <3> <0> <1> <2> tion bytes Number of Write pointer bytes received is cleared when start code is received. R9038 Reception comoff pleted flag on Cannot be stored when reception completed flag is on F144 (TRNS) instruction execution off The reception completed flag is turned off by executing the F144 (TRNS) instruction.3. 6. but at the point at which the start code is received.use Serial Communications 6. If there are two start codes.FP0 General . Reception stops if the error flag (R9037) goes on. To resume reception. and the address (write pointer) is returned to the initial address in the reception buffer.use Serial Communication When the F144 (TRNS) instruction is executed. Number of bytes received is cleared when start code is received. the number of bytes received is cleared. Because of this. and the address (write pointer) is returned to the initial address in the reception buffer. the number of bytes received is cleared.2 If “Yes” has been Set for the Start and Terminal Codes (Start Code: STX. if the F144 (TRNS) instruction is executed at the same time that the terminal code is received. the number of bytes received is cleared. 6.9 . Stored Reception buffer A A B A B C A B C D B C D E C D E C D E C G E C G E C H E C H E C Number of recep. The reception completed flag (R9038) is turned off by the F144 (TRNS) instruction. This turns off the error flag. The data is stored in the reception buffer in sequential order. <2> <0> <1> <0> <1> <1> Number of bytes received is cleared when F144 (TRNS) instruction is executed. execute the F144 (TRNS) instruction. Reception is disabled while the reception completed flag (R9038) is on. and transmits both actual and empty data.3 Explanation of Operations When Using General . and the address (write pointer) returns to the initial address in the reception buffer.

and the data is transmitted to an external device.3 Explanation of Operations When Using General . see section 6.) Executing the F144 (TRNS) instruction turns off the transmission completed flag (R9039).use Serial Communication FP0 When sending data Transmitted data STX a b ETX STX c d e ETX Transmission R9039 Transmission completed flag on Transmission off on F144 (TRNS) instruction execution off Duplex transmission disabled while F144 (TRNS) instruction is being executed Send buffer a b a b a b a b c d e c d e c d e c d e c d e Number of bytes not yet sent <2> <1> <0> <0> <3> <2> <1> <0> <0> Transmission point Start codes (STX) and terminal codes (ETX) are automatically added to the data being transmitted. Check the transmission completed flag (R9039) to determine whether duplex transmission is possible.10 .2.General . 6 . Duplex transmission is disabled while the F144 (TRNS) instruction is being executed. (For information on start and terminal code settings.use Serial Communications 6.

. . . . . . . .1 Analog I/O Unit Programs . . . . . . . . . . 7 . .Chapter 7 Programming for FP0 Analog I/O Unit 7. .3 . . . .

2 .Programming for FP0 Analog I/O Unit FP0 7.

WX2 .3 .1 Analog I/O Unit Programs 7. the values of K0 to 4000 are stored in DT0.) Data transmission instruction If “0 to 20 mA DC input” has been specified for the input range in the above program. Configuration diagram CPU Analog I/O unit A/D conversion Input (analog value) from external device to analog I/O unit (WX2) 7.FP0 Programming for FP0 Analog I/O Unit 7.2. for analog I/O unit input section (Refer to section 8.1 Analog I/O Unit Programs The data transmission instruction F0 (MV) is used to read data from the analog I/O unit. Analog input Program example Digital values which have been converted in the analog I/O unit are stored in any desired data register. and to write it to the unit. R9010 F0 MV . DT0 Area where converted data is stored I/O no.

2. for analog I/O unit output section (Refer to section 8.4 . R9010 F0 MV . WY2 I/O no. writing data of range of K0 to 4000 to DT10 causes 0 to 20 mA DC to be output from the analog I/O unit. Refer to the section 8. 7.Programming for FP0 Analog I/O Unit 7. Refer to the “FP0 Hardware manual” for the range. Configuration diagram CPU Analog I/O unit D/A conversion Output (analog value) to external device from analog I/O unit (WY2) Precautions during programming The I/O numbers for the specified analog I/O unit input and output sections vary depending on the installed position of the analog I/O unit. DT10 .2 for the I/O numbers. Data values undergoing A/D and D/A conversion vary depending on the range used.1 Analog I/O Unit Programs FP0 Analog output Program example Digital values which have been stored in any desired data register are transferred to the analog output area.) Register where input data is stored Data transmission instruction If “0 to 20 mA DC output” has been specified for the output range in the above program.

. . . . . .1 Error Confirmation When “ERROR/ALARM LED” Turns ON . . . . . . 8 . .SL1 S . . . . . . . . 8 .13 Table of System Registers . . . . . . . . . . . . . .40 Table of Syntax Check Error . . . . 8 .29 Error Codes . . . . 8 . . . 8 .7 System Registers . . . . . . . . 8 . . . . . . . . .9 FP0 . . . . . . . .11 8. . . . .3 8. .6 8. . . . . . . 8 . . . . 8 . . . . . . . . .26 Table of Special Data Registers . .4 Performance Specifications .39 Syntax Check Error . . . . 8 . . . . . . . . . . 8 . . .2 8. . . 8 . . . . . .7.2 8. . . . . . . . . .2 8. . . . . .7. . . . . . .Chapter 8 Appendix 8. . . . . . .41 Table of Self . 8 .1. . . . . . . . 8 . . . .4. . .7 Relays. . . .5 8. . . . . .1 8. .10 ASCII Codes . 8 . . . . . 8 . . .LINK Address . . . . . . . . . . . .8 8.1. . . . . . 8 . . .43 Binary/Hexadecimal/BCD Expressions .3 8. .1 8.15 Table of Special Internal Relays . . . . . .diagnostic Error . . . . . . . . . .9 Table of System Registers .1.42 8. .diagnostic Error . . . . . .3 Error Confirmation Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 . . . .39 8.2 8. . . . . . . . . . . . . . .7. .39 Self . .7. . . . . 8 . . . . . . . .3 8. . . .39 8. . . . .4. . . .11 Content of System Register Settings . . . . . . . . . . .3 I/O Allocation Table . . . . . . .7. 8 . Memory Areas and Constants . .7. . . . . . . . . . . .4. . . .44 8. 8 . . . . . . . .1 8. .

Appendix FP0 8.2 .

1s.FP0 8. 100ms. 10ms.LINK type SL1 T32C Programming method/Control method Relay symbol/Cyclic operation Controllable I/O Basic unit Total: 10 Total: 14 Total: 16 points Input: 6 Input: 8 Input: 8 Output: 4 Output: 6 Output: 8 Total: 32 Input: 16 Output: 16 Max.000 steps 10. 112 unit 1 When configured with same output type as control unit With expansion Max. DF/) Master control relay points (MCR) Number of labels (JP and LOOP) 2 words Unlimited of points 32 points 64 labels 255 labels 64 labels next page 8. 128 5. T0 to T99 / 44 counter points.3 . 128 Max. 112 unit 2 When relays and transistors are mixed Built .008 points (R0 to R62F) 1.3ms With expansion board(s): 0.720 steps Basic High-level Max. 128 Max. 128 Input: 64 Output: 64 at S .660 words (DT0 to DT1659) 6. selected by instruction Memory Data register 1.000 steps 83 115 Operation speed 0. 58 Max.1 Item Performance Specifications Relay output type C10RS/ C10RM/ C10CRS/ C10CRM C14RS/ C14RM/ C14CRS/ C14CRM Transistor output type C16T/ C16P/ C16CT/ C16CP C32T/ C32P/ C32CT/ C32CP Total: 32 Input: 16 Output: 16 S .9μs/step (by basic instruction) I/O refresh and base time With no expansion board: 0. C100 to C143 (* Note 2)) (T/C) Timer range: 1ms. 106 Max.144 area words words (DT) words (DT0 to (DT0 to (DT0 to DT6143) DT16383) DT6143) (* Note 1) Special data 112 words (DT9000 to DT9111) 112 words 112 words register (DT) (DT90000 (DT9000 to to DT90111) DT9111) Index register (IX.1 Appendix Performance Specifications 8.LINK block Program memory Program capacity Numbers of instruction i t ti With expansion Max. 110 Max. IY) Differential points (DF. 62 Max.008 1.3ms and (1 x number of expansion boards) ms Operation Relay Internal relay (R) 1.in memory Built in EEPROM (without battery) 2.000 steps 5. 96 at expansion block Max.144 16.384 6.008 memory points (R0 points (R0 to R62F) points to R62F) (* Note 1) Special internal 64 points (R9000 to R903F) relay (R) Timer/Counter 144 points (initial setting is 100 timer points. 128 Max.

made by phoenix Contact Co.5ms to 30s interval Available Not Counter mode: available Addition/subtraction (one phase) (* Note 7) . 6) Such as watchdog timer.Minimum input pulse width: X0.3.speed counter function (* Note 5.pin. X4 Counter mode: Two. internal 1 point) 704 stages (* Note 1) 100 subroutines 128 stages 16 subroutines 1 program (internal 1 point) Not available Not available Self-diagnosis function Clock/calender function Special functions Pulse catch input Interrupt input RS232C port (* Note 4) (Only units with an RS232C port) Periodical interrupt Constant scan High.Input point number: Two channels maximum .Maximum counting speed: 2kHz maximum for all 2 channels . <10kHz> 100μs. <10kHz> 100μs. X4 50μs.5) Communication method: Half .1 Performance Specifications FP0 Item Relay output type C10RS/ C10RM/ C10CRS/ C10CRM C14RS/ C14RM/ C14CRS/ C14CRM Transistor output type C16T/ C16P/ C16CT/ C16CP C32T/ C32P/ C32CT/ C32CP T32C S . Terminal block: 3 .LINK type SL1 Number of step ladders Number of subroutines Number of interrupt programs 128 stages 16 subroutines 7 programs (external 6 points.duplex 0. (products number: MKDS1/3 .Minimum input pulse width: X0. <5kHz> Not available 8.84ft. <5kHz> 50μs. X1 X3.phase/individual/direction decision (two.Input contacts used: X0: count input (ch 0) X3: count input (ch 2) X1: count input (ch 0) X4: count input (ch 2) X2: reset input X5: reset input . X1 X3.4 .Input point number: Four channels maximum .Input contacts used: X0: count input (ch 0) X3: count input (ch 2) X1: count input (ch 1) X4: count input (ch 3) X2: reset input (*Note 8) X5: reset input (*Note 8) . program syntax check Not available Available (* Note 3) Total 6 points X0 to X1: 50μsec X2 to X5: 100μsec Transmission speeds: 300/600/1200/2400/4800/9600/19200bit/s Transmission distance: 3m/9.phase) .Appendix 8.Maximum counting speed: 10kHz maximum for all 4 channels .

.Memory relays: areas 128 points which can be speciDate fied: registers: Timers. and are retained by the EEPROM.FP0 8.LINK type SL1 Special functions Pulse p output funcf tion (* Note 6. and are retained by the EEROM.point output) Two points (Y0 and Y1) Frequency: 0.1% to 99.9% Frequency: 0.Number of points/ words of the fixed hold areas in the various memories Counters: 16 points The operation memory is backed up using built . Data registers next page 8.Number of points/ words of the fixed hold areas in the various memories Counters: 16 points Internal relays: 128 points Date registers: 32 words Internal .1 Appendix Performance Specifications Item Relay output type C10RS/ C10RM/ C10CRS/ C10CRM C14RS/ C14RM/ C14CRS/ C14CRM Transistor output type C16T/ C16P/ C16CT/ C16CP C32T/ C32P/ C32CT/ C32CP T32C S . Internal relays. (* Note 11) Areas which are held if the power supply fails are fixed. (* Note 9) Duty: 0.15Hz to 1KHz Duty: 0.9% Not available Not available Output point number Output frequency Not available Not available Not available Not available Memory backup Program and system register Operation memory EEPROM Areas which are held if the power supply fails are fixed. and are retained by the EEPROM.1% to 99.point output) 40Hz to 5kHz (Y0/Y1: two .15Hz to 38Hz. so the hold type memory areas can be specified using the programming tools.in chargeable (secondary ) battery.5 .10) PWM p output funcf tion (* Note 6) Output point number Output frequency Not available Not available Two independent points (Y0 and Y1)(no interpolation function) 40Hz to 10kHz (Y0/Y1: one.Number of points/words of the fixed hold areas in the various memories Counters: 4 points Internal relays: 32 points Date registers: 8 words Areas which are held if the power supply fails are fixed. . 32 words Counters. .

For detailed information. 9) With a CPU of Ver. refer to “FP0 Hardware manual.28 standards. At 55_C/131_F.2 or a subsequent version. less than 169 seconds error per month. less than 72 seconds error per month. X5 acts as the reset input of X4. In the same way. This accuracy is considered to be the worst fluctuation coefficient value based on fluctuations in the normal voltage of 5V and the battery backup voltage of 3V. for X3 and X4. 4) When using the RS232C port for communication. less than 139 second error per month.speed counter.15Hz to 1kHz. the frequency will be 0. At 25_C/77_F. X2 will be the reset input of X1. so please make sure that the built . 5) The combinations 1 phase × 2 channels and 2 phases × 1 channel are also possible for the high . we recommend using resend processing.hold type can be set using the system registers. 7) The max. The counting speed (frequency) will decrease depending on the voltage and temperature.” 8. counting speed (10kHz) is the counting speed with a rated input voltage of 24V DC and an ambient temperature of 25°C.1 Performance Specifications FP0 Notes 1) Hold or non .6 . see sections 5. 8) If both reset inputs X0 and X1 are reset. 6) For details and limitations on the high speed counter.in backup battery have been charged before using the unit.3 to 5. and PWM output function. 2) The proportion of timer points to counter points can be changed using a system register 5.5.232E and CCITT V. The driver IC for the RS232C is in full conformance with EIA/TIA . F157 and F158 (time/date addition and subtraction instructions) cannot be used. 10) The maximum is 9. pulse output. Also.Appendix 8. 1. 3) Precision of calender timer: At 0_C/32_F.5kHz when the positioning control instruction (F168) is executed. 11) Precautions when using the battery backup function Secondary (chargeable) battery is used as backup battery in the FP0 T32C control unit. The battery is not charged before the unit is shipped.

Unit Input: 64 p p points FP0 I/O X80 to X8F X90 to X9F X100 to X10F X110 to X11F S .LINK Control Units The I/O allocation of the S .FP0 8. Type of Expansion Unit yp p I/O number First expansion E8X E8R E8YR/E8YT/E8YP E16X E16R/E16T/E16P / / E16YT/E16YP E32T/E32P / Input: 8 points Input: 4 points Output: 4 points Output: 8 points Input: 16 points Input: 8 points Output: 8 points Output: 16 points Input: 16 points Output: 16 points X20 to X27 X20 to X23 Y20 to Y23 Y20 to Y27 X20 to X2F X20 to X27 Y20 to Y27 Y20 to Y2F X20 to X2F Y20 to Y2F Second expansion X40 to X47 X40 to X43 Y40 to Y43 Y40 to Y47 X40 to X4F X40 to X47 Y40 to Y47 Y40 to Y4F X40 to X4F Y40 to Y4F Third expansion X60 to X67 X60 to X63 Y60 to Y63 Y60 to Y67 X60 to X6F X60 to X67 Y60 to Y67 Y60 to Y6F X60 to X6F Y60 to Y6F 8.2 I/O Allocation Table FP0 Control Units The I/O allocation of the FP0 control unit is fixed.LINK control unit is fixed. Type of Control Unit C10 series C14 series C16 series C32/T32 series / Input: 6 points Output: 4 points Input: 8 points Output: 6 points Input: 8 points Output: 8 points Input: 16 points Output: 16 points I/O number X0 to X5 Y0 to Y3 X0 to X7 Y0 to Y5 X0 to X7 Y0 to Y7 X0 to XF Y0 to YF S .7 .2 Appendix I/O Allocation Table 8.LINK address 0 to 15 16 to 31 32 to 47 48 to 63 64 to 79 80 to 95 96 to 111 112 to 127 Output: 64 p p points Y80 to Y8F Y90 to Y9F Y100 to Y10F Y110 to Y11F FP0 Expansion Units The I/O allocation of the FP0 expansion unit is determined by order of connection.

. . X 1 X 10.. . ... . . . . 3 . .. . . X 7F 8. . . .. . .8 . . . . they are expressed as a combination of decimal and hexadecimal numbers as shown below. . 9 A.. . .. . .. .. . . . .. . .. . 2. 12 Hexadecimal 0. . .. . .. 2.. . . . . . .. X 71 . . . .. .. X 11 X 20.. . X F . . . . . . . . .. Type IOL Input: 32 points output: 32 points First expansion X20 to X3F Y20 to Y3F Second expansion X40 to X5F Y40 to Y5F Third expansion X60 to X7F Y60 to Y7F Expression of numbers for input/output relays Since input/output relays X and Y are handled in units of 16 points. . . .2 I/O Allocation Table FP0 Analog I/O Unit The I/O allocations of the analog I/O unit are determined by the position at which the unit is installed. X 2F to . . .Appendix 8. 1. . . . . Example: External input relay “X” × Decimal 1. . X 21 to to X 70. . X 1F . F X 0.. . 3 .B . Type A21 Input: CH0 16 points Input: CH1 16 points Output: 16 points First expansion WX2 (X20 to X2F) WX3 (X30 to X3F) WY2 (Y20 to Y2F) Second expansion WX4 (X40 to X4F) WX5 (X50 to X5F) WY4 (Y40 to Y4F) Third expansion WX6 (X60 to X6F) WX7 (X70 to X7F) WY6 (Y60 to Y6F) I/O Link Unit The I/O allocation of the I/O link unit is determined by order of connection. .

Function Relays External input relay External output relay Internal relay (* Note 1) Timer (* Note 1) Counter (* Note 1) Special internal relay X Y R T 208 points (X0 to X12F) 208 points (Y0 to Y12F) 1.144 words 16.660 words 6. the contact with the same number turns on.384 words Data memory used in program. Stores by timer/counter number. Register can be used as an address of memory area and constants modifier.3 Item Relays. Various settings and error codes are stored. Data memory for storing the elapsed value during operation of a timer/counter. (DT0 to (DT0 to (DT0 to Data is handled in 16. IY) IX IY K H Constant Decimal constants t t Hexadecimal constants t t K . 144 words (SV0 to SV143) Data memory for storing a target value of a timer and an initial value of a counter.008 points (R0 to R62F) 144 points (T0 to T99/C100 to C143) (* Note 2) C R Memory Areas External input relay External output relay Internal relay (* Note 1) Data register (* Note 1) Timer/Counter set value area (* Note 1) WX WY WR DT 1.FP0 Appendix 8. Code for specifying 16 internal relay points as one word (16 bits) of data.2147483648 to K2147483647 (for 32-bit operation) H0 to HFFFF (for 16-bit operation) H0 to HFFFFFFFF (for 32-bit operation) next page 8. Code for specifying 16 external input points as one word (16 bits) of data. If a CT instruction has counted up. Memory Areas and Constants 8. 112 words (DT90000 to DT90111) Data memory for storing specific data. Relay which turns on or off only within program. Stores by timer/counter number. Externally outputs on or off state. the contact with the same number turns on.32768 to K32767 (for 16-bit operation) K .3 Relays. SV Timer/Counter EV elapsed value area (* Note 1) Special data register Index register DT 144 words (EV0 to EV143) 112 words (DT9000 to DT9111) 2 words (IX. If a TM instruction has timed out. 64 points (R9000 to R903F) 13 words (WX0 to WX12) 13 words (WY0 to WY12) 63 words (WR0 to WR62) Relay which turns on or off based on specific conditions and is used as a flag. Memory Areas and Constants Numbering C10/C14/ C16 C32/SL1 T32 Turns on or off based on external input.bit units DT16383) DT1659) DT6143) (one word). Code for specifying 16 external output points as one word (16 bits) of data.9 .

and the non . For the FP0 C10/C14/C16/C32/SL1.hold type: All points From the set value to C139 4 points (elapsed values) (C140 to C143) 976 points (R0 to R60F) 61 words (WR0 to WR60) Hold type 32 points (R610 to R62F) 2 words (WR61 to WR62) 1652 words (DT0 to DT1651) 8 words (DT1652 to DT1659) C32/SL1 From the set value to C127 16 points (elapsed values) C128 to C143 880 points (R0 to R54F) 55 words (WR0 to WR54) 128 points (R550 to R62F) 8 words (WR55 to WR62) 6112 words (DT0 to DT6111) 32 words (DT6112 to DT6143) Data register g Non-hold type Hold type 2) The points for the timer and counter can be changed by the setting of system register 5. section 8. the selection of hold type and non . refer to section 8. For details about the setting of system registers. For the FP0 T32. These areas can be specified as hold type or non . the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG.4 For detailed about the system registers 8 .hold type by setting system register.hold type areas Item Timer Counter Non-hold type Hold type Internal relay Non-hold type C10/C14/C16 Non.4. Hold type and non . The number given in the table are the numbers when system register 5 is at its default setting. mode. Memory Areas and Constants FP0 Notes 1) There are two unit types.Appendix 8. that area is fixed and allotted the numbers as shown below.hold type that resets them.10 .hold type can be changed by the setting of system register.3 Relays.

and the settings for system register 6 to 8. Modem connection setting (System register 411) Set to ”Modem connection” when the tool port will be used for modem communication. Types of system register Allocation of timers and counters (System register 5) The number of timers and counters is set by specifying the leading counter number. and I/O verification errors occur. 411 and 414) Set the tool port parameters when computer link will be used. the areas held in the event of a power supply interruption are fixed.1 System Registers System register area System registers are used to set values (parameters) which determine operation ranges and functions used. Time settings (System register 31 and 34) Set the time . set the operation mode and the input number to be used as a special input. and 14. There is no need to set system registers for functions which will not be used.out error detection time and the constant scan time.11 .FP0 8. operation. 8 . pulse catch function or interrupt function. Hold types and non . 23 . Set values based on the use and specifications of your program.26 and 27) Set the operation mode effective when errors such as doplicated use of output. Tool port settings (System register 410. will be invalid.4 Appendix Table of System Registers 8.4. Operation mode settings for errors (System register 20. Input settings (System register 400 to 403) When using the high.4 Table of System Registers 8. RS232C port settings (System register 412 to 418) Only applicable for unit with RS232C port.speed counter function.hold type settings (System register 6 to 8 and 14) With the FP0.

Press the keys on the FP programmer II. 5. If you are going to use a value which is already set (the value which appears when read). press the <CLR (clear)> key and write the new value as indicated in the system register table. To change a set value. Select the function to be set in the “SYSTEM REGISTER” in “PLC CONFIGURATION” screen. 2 0 READ 4. Execute [Register] (f1) to write the data to the PLC. 3. The value set in the selected system register will appear. 2. Using programming tool software Procedure: 1. please check the Help menu. as shown below.GR” tool software. For information on operating the menus. The “FPWIN GR” tool software has a similar menu. Set the mode of the FP0 control unit to PROG. 3.4 Table of System Registers FP0 Checking and changing system register settings System register values (parameters) can be set with K or H constants. 8 . Select the “SYSTEM REGISTER” in “PLC CONFIGURATION” option from the NPST menu. Using FP programmer II Procedure: 1.20) for the parameter to be set and read the parameter. ACLR (. there is no need to write it again. No. The above shows the menu for the “NPST .12 .Appendix 8. write the new value as indicated in the system register table. To change the set value. Set the mode of the FP0 control unit to PROG.g. The value set in the selected register will be displayed.) OP 5 0 ENT Specify the register number (e. 4. 2.

99) 44 points (No. the whole area becomes the timer. set the system registers 5 and 6 to the same value. By setting system register 5 to “0”. When the initialized operation is performed. tool port.FP0 8. change the value of system register 5 to K120. and the default value for the split is 100. all set system resister values (parameters) will be initialized. input. to RUN. With regard to the modem connection setting.13 . 0 to No. Timer Counter 100 points (No. 8 . when the power is turned off and on or when the mode is changed from PROG. 143) Setting example To increase the number of timers to 120. 8.4.4 Appendix Table of System Registers Precautions when setting system registers System register settings are effective from the time they are set. the timer and counter are split into two areas. the whole area becomes the counter. The timer and counter together total 144 points. RS232C port.2 Content of System Register Settings Setting the timers and counters (System register 5) By indicating the counter start number. by setting it to the value “144”. to RUN. However. 0 Timer Set value: n Counter 144 MIN (0): All counter Set value < n Counter size increases Set value > n Timer size increases MAX (144): All timer For FP0 T32. 100 to No. and modem connection settings become effective when the mode is changed from PROG. Also. the controller sends a command to the modem which enables it for reception. Thus the point allotment is as shown in the table below. This sets the timer to a non-hold type and counter to a hold type.

Default value Type Area Timer Counter Internal Non . the whole area becomes hold type. the whole area becomes non-hold type. the areas held in the event of a power supply interruption are fixed at the areas shown in the table below.hold relay type Hold type Data register All non. by setting it to the value 1 higher than the last number.Appendix 8.hold type: 10 words (WR0 to WR9) Hold type: 53 words (WR10 to WR62) All hold type FP0 T32 8 . C10/C14/C16 Timer Counter Internal relay Non-hold type: All points Non-hold type: From the set value to C139 Hold type: 4 points (elapsed values) C140 to C143 Non-hold type: 976 points (R0 to R60F) 61 words (WR0 to WR60) Hold type: Data register g 32 points (R610 to R62F) 2 words (WR61 to WR62) Non-hold type: 1652 words (DT0 to DT1651) Hold type: 8 words (DT1652 to DT1659) C32/SL1 Timer Counter Internal relay Non-hold type: All points Non-hold type: From the set value to C127 Hold type: 16 points (elapsed values) C128 to C143 Non-hold type: 880 points (R0 to R54F) 55 words (WR0 to WR54) Hold type: Data register g 128 points (R550 to R62F) 8 words (WR55 to WR62) Non-hold type: 6112 words (DT0 to DT6111) Hold type: 32 words (DT6112 to DT6143) With the FP0 T32. This sets the timer to a non-hold type and counter to a hold type.hold type settings (System registers 6 to 8 and 14) With the FP0 C10/C14/C16/C32/SL1.14 . Also.4 Table of System Registers FP0 Hold types and non . set each relay and register to a hold type or non-hold type. By setting this value to “0”.hold type All hold type Non. and the settings for system registers 6 to 8 and 14. set the system registers 5 and 6 to the same value. will be invalid. Non-hold type Setting value: n Hold type Setting value < n Hold type size increases Setting value > n Non-hold type size increases For normal situations.

C14. C16. K0: Hold K1: Non.LINK) system K0 K1 K0: Stop K1: Continuation K0: Stop K1: Continuation K0 K0: Stop K1: Continuation K0 K0: Disable (will be syntax error) K1: Enable (will not be syntax error) 8 .hold 6 to 8 Not used Timer and counter division (setting of starting counter number) Not used (Available type: C10. values set with the programming tool become invalid.hold K100 K100 K0 to K144 With the FP0 C10/C14/C16/C32/SL1. C32. SL1) K10: 10K words (FP0 T32) 1 to 3 Hold/ 5 Non. 6 7 K10 K0 to K63 8 K0 K0 to K16384 9 to 13 14 15 Action on error 20 21.FP0 8. T32 and SL1 in the table respectively indicate 10-point.3 Table of System Registers C10. C32. The stored values vary depending on the type. SL1) Hold or non . K0 to K144 Set the system registers 5 and 6 to the same value. C32. 22 23 24. C16) K5: 5K words (FP0 C32.LINK type FP0 control units.4 Appendix Table of System Registers 8. C14. 32-point type and S .4. 14-point. C16. Item Allocation of user memory Address Name 0 Sequence program area capacity Default value Description The set values are fixed and cannot be changed.hold setting for step ladder process (Available type: T32) K1 With the FP0 C10/C14/C16/C32/SL1. C14. 16-point. C16.15 . SL1) Hold type area starting number setting for timer and counter (Available type: T32) Hold type area starting number setting for internal relays (in word units) (Available type: T32) Hold type area starting number setting for data registers (Available type: T32) Not used Not used (Available type: C10. K3: 3K words (FP0 C10. C14. values set with the programming tool become invalid. 25 26 27 Not used Disable or enable setting for duplicated output Not used Operation setting when an I/O verification error occurs Not used Operation setting when an operation error occurs Operation settings when communication error occurs in the remote I/O (S .

5). values set with the programming tool become invalid. enter the time (a number divisible by 2.5 ms = Wait time setting for multi . K1 to K64 (2.frame communication (ms) Time setting tti In programming tool software. enter the set value (equal to the time divided by 2.5 ms = Constant value setting for scan time (ms) In programming tool software. 32. enter the time (a number divisible by 2. In FP Programmer II.5).Appendix 8.16 .5). 29 4 30 31 Not used Not used Unused Wait time setting for multi-frame communication Default value Description With the FP0. enter the set value (equal to the time divided by 2.5 ms to 160 ms): Scans once each specified time interval.5). values set with the programming tool become invalid. In FP Programmer II. set value × 2. 33 34 Unused Constant value settings for scan time K0 With the FP0. 8 .4 Table of System Registers FP0 Item Action on error Address Name 28. K0: Normal scan set value × 2. K2600 K4 to K32760: 10 ms to 81900 ms (6500 ms) Used of default setting (K2600/ 6500 ms) is recommended.

X1) 10:Direction decision (X0. Reset input (X2) 5: Decremental input (X1) 6: Decremental input (X1). Ver. If the NPST . 8 . 3: Incremental input (X1) 4: Incremental input (X1). X1). X1). X1). the setting for CH1 is invalid.speed counter] ' [Pulse catch] ' [Interrupt input]. 4. the following precedence order is effective: [High .17 . If system register 400 to 403 have been set simultaneously for the same input relay. If reset input settings overlap. individual. or direction differentiation. Reset input (X2) CH1 0: Do not set input X1 as high-speed counter. Reset input (X2) Notes • • • • If the operation mode is set to 2 . Reset input (X2) 3: Incremental input (X0) 4: Incremental input (X0). Reset input (X2) 7: Individual input (X0.0 or a subsequent version is required for the settings of system register 400 to 403. X1) 2: 2-phase input (X0. Reset input (X2) 5: Decremental input (X0) 6: Decremental input (X0).4 Appendix Table of System Registers Item Input setting AdName dress 400 High-speed counter mode settings (X0 to x2) Default value Setting by H0 programming tool software Description CH0 0: Do not set input X0 as high-speed counter.FP0 8. 1: 2-phase input (X0.phase. Reset input (X2) 9: Direction decision (X0.GR software is used. X1) 8: Individual input (X0. the setting of CH1 takes precedence.

Reset input (X2) 0: Do not use highspeed counter.0 or a subsequent version is required for the settings of system register 400 to 403. Table of System Registers 8 . X1).speed counter] ' [Pulse catch] ' [Interrupt input]. X1) 2: 2-phase input (X0. Reset input (X2) 7: Individual input (X0.GR software is used.4 Table of System Registers FP0 Item Input setting AdName dress 400 High-speed counter mode settings (X0 to x2) Setting by FP programmer II Default value H0 Description CH0/ CH1 H 0 0 0: Do not use highspeed counter. Reset input (X2) 5: Decremental input (X1) 6: Decremental input (X1). X1) A: Direction dicision (X0. the setting for CH1 is invalid. 3: Incremental input (X1) 4: Incremental input (X1). If the NPST . or direction differentiation. Reset input (X2) 9: Direction dicision (X0. 1: 2-phase input (X0. the setting of CH1 takes precedence.Appendix 8. Reset input (X2) 5: Decremental input (X0) 6: Decremental input (X0).4 If the operation mode is set to 2 . Ver. X1) 8: Individual input (X0. 4. X1). X1). If system register 400 to 403 have been set simultaneously for the same input relay. Reset input (X2) 3: Incremental input (X0) 4: Incremental input (X0).18 . If reset input settings overlap. the following precedence order is effective: [High . individual. Reset input (X2) Notes • • • • 8.phase.

4. X4) 8: Individual input (X3.speed counter] ' [Pulse catch] ' [Interrupt input]. If system register 400 to 403 have been set simultaneously for the same input relay. Reset input (X5) 7: Individual input (X3. individual. 1: 2-phase input (X3. 3: Incremental input (X4) 4: Incremental input (X4). 8 . or direction differentiation. the following precedence order is effective: [High . Reset input (X5) 5: Decremental input (X4) 6: Decremental input (X4). Reset input (X5) 5: Decremental input (X3) 6: Decremental input (X3). If the NPST . X4) 2: 2-phase input (X3.FP0 Item Input setting AdName dress 401 High-speed counter mode settings (X3 to X5) Appendix Default value Setting by H0 programming tool software Description CH2 0: Do not set input X3 as high-speed counter. Reset input (X5) 0: Do not set input X4 as high-speed counter. X4). the setting for CH3 is invalid. Reset input (X5) 3: Incremental input (X3) 4: Incremental input (X3).phase. Reset input (X5) 9: Direction decision (X3. If reset input settings overlap. X4).19 .GR software is used. the setting of CH3 takes precedence.0 or a subsequent version is required for the settings of system register 400 to 403. Reset input (X5) CH3 Notes • • • • If the operation mode is set to 2 . X4) 10:Direction decision (X3. X4). Ver.

Appendix 8.4 Table of System Registers

FP0

Item
Input setting

AdName dress 401 High-speed counter mode settings (X3 to X5) Setting by FP programmer II

Default value
H0

Description
CH2/ CH3

H 0

0

0: Do not use high-speed counter. 1: 2-phase input (X3, X4) 2: 2-phase input (X3, X4), Reset input (X5) 3: Incremental input (X3) 4: Incremental input (X3), Reset input (X5) 5: Decremental input (X3) 6: Decremental input (X3), Reset input (X5) 7: Individual input (X3, X4) 8: Individual input (X3, X4), Reset input (X5) 9: Direction dicision (X3, X4) A: Direction dicision (X3, X4), Reset input (X5) 0: Do not use high-speed counter. 3: Incremental input (X4) 4: Incremental input (X4), Reset input (X5) 5: Decremental input (X4) 6: Decremental input (X4), Reset input (X5)

Notes

• • • •

If the operation mode is set to 2 - phase, individual, or direction differentiation, the setting for CH3 is invalid. If reset input settings overlap, the setting of CH3 takes precedence. If system register 400 to 403 have been set simultaneously for the same input relay, the following precedence order is effective: [High - speed counter] ' [Pulse catch] ' [Interrupt input]. If the NPST - GR software is used, Ver. 4.0 or a subsequent version is required for the settings of system register 400 to 403.

8 - 20

FP0 8.4

Appendix Table of System Registers

Item
Input setting

Address
402

Name
Pulse catch input function settings

Default value
H0

Description
X5 X4 X3 X2 X1 X0 0: Standard input 1: Pulse catch input

0 0 0 0 0 0

In FP Programmer II, enter the above settings in hexadecimal. When X3 and X4 are set to pulse catch input 15 402: 0 00011000
X5 X4 X3 X2 X1 X0

H1

H8

Input H18
With the FP0, settings X6 and X7 are invalid. 403 Interrupt input settings H0 Using programming tool software X5 X4 X3 X2 X1 X0 Specify the input contacts used as interrupt inputs in the upper byte. (0: Standard input/1: Interrupt input) X5 X4 X3 X2 X1 X0 Specify the effective interrupt edge in the lower byte. (When 0: on/When 1: off) Using FP programmer II When setting inputs X0, X1, X2, and X3 as interrupts, and X0 and X1 are set as interrupt inputs when going from on to off. Specify edge 15 403: 000011
X5 X4 X3 X2 X1 X0

Specify interrupt 0 001111
X5 X4 X3 X2 X1 X0

H0

H3

H0

HF

Input H30F
404 to 407 Unused With the FP0, values set with the programming tool become invalid.

next page

8 - 21

Appendix 8.4 Table of System Registers

FP0

Notes

• •

With the NPST - GR software, “0” or “1” is set for each bit on the screen in the setting for system register 403. If system register 400 to 403 are set simultaneously for the same input relay, the following precedence order is effective: [High - speed counter] ' [Pulse catch] ' [Interrupt input]. When the high - speed counter is being used in the incremental input mode, even if input X0 is specified as an interrupt input and as pulse catch input, those settings are invalid, and input X0 functions as counter input for the high - speed counter. No. 400: H1 a This setting will be valid. No. 402: H1 No. 403: H1

8 - 22

FP0 8.4

Appendix Table of System Registers

Item
Tool port setting

Address
410

Name
Unit number setting for tool port (when connecting C- NET) Communication format setting for tool port Setting item S Default setting value S Modem communication: Disabled S Data length (character bits): 8 bits

Default value
K1

Description
K1 to K32 (Unit No. 1 to 32)

411

H0

Using programming tool software Select items from the menu. Using FP programmer II Specify the setting contents using H constants. 15 6 0

Modem communication 0: Disabled 1: Enabled Data length (character bits) 0: 8 bits 1: 7 bits When connecting a modem, set the unit number to 1 with system resister 410. 414 Baud rate setting for tool port Baud rate setting for tool port and RS232C port Setting by H0 programming tool software Setting by FP programmer II H1 0: 9600 bit/s 1: 19200 bit/s

Tool port/ RS232C port setting

414

H 0
Tool port

0
RS232C port H0: 19200 bit/s H1: 9600 bit/s H2: 4800 bit/s H3: 2400 bit/s H4: 1200 bit/s H5: 600 bit/s H6: 300 bit/s

H0: 9600 bit/s H1: 19200 bit/s If anything other than H0 or H1 is set for the tool port baud rate, the baud rate will be 9600 bit/s.

If 19,200 bit/s is set for both the tool port and RS232C port ' H100 should be written.

Note
NPST - GR software Ver. 4 or later must be used to set system register 414.

8 - 23

Appendix 8.4 Table of System Registers

FP0

Item
RS232C port setting

Address
412

Name
Communication method setting for RS232C port

Default value
K0

Description
Using programming tool software Select items from the menu. Using FP programmer II K0: RS232C port is not used. K1: Computer link mode (when connecting C- NET) K2: Serial data communication mode (general port)

413

Communication format setting for RS232C port Setting item/Default setting value - Start code: None - Terminal code: CR - Stop bit: 1 bit - Parity check: With odd - Data length: 8 bits

H3

Using programming tool software Select items from the menu. Using FP programmer II Specify the setting contents using H constants.
15 6 0

Start code

0: No STX

1: STX 01: CR+LF 11: ETX 1: 2 bits 01: With odd 11: With even 1: 8 bits

Terminal code 00: CR 10: None Stop bit Parity check 0: 1 bit 00: None

Data length

0: 7 bits

414

Baud rate setting for RS232C port

Setting by H1 programming tool software

0: 19200 bit/s 1: 9600 bit/s 2: 4800 bit/s 3: 2400 bit/s 4: 1200 bit/s 5: 600 bit/s 6: 300 bit/s K1 to K32 (unit No. 1 to 32)

415

Unit number setting for RS232C port (when connecting C- NET) Modem compatibility setting for RS232C port

K1

416

H0

Using programming tool software Select items from the menu. Using FP programmer II H0: Modem disabled H8000: Modem enabled

417

Starting address setting for reception buffer

K0

C10C/C14C/C16C: K0 to K1659 C32C/SL1: K0 to K6143 T32C: K0 to K16383

Note
NPST - GR software Ver. 4 or later must be used to set system register 414.

8 - 24

FP0 8.4

Appendix Table of System Registers

Item
RS232C port p setting tti

Address
418

Name
Capacity setting for g reception ti buffer C10C/ C14C/ C16C C32C/SL1 T32C

Default value
K1660 K6144 K16384

Description
K0 to K1660 K0 to K6144 K0 to K16384

8 - 25

Appendix 8.5 Table of Special Internal Relays

FP0

8.5

Table of Special Internal Relays

The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction.
Address
R9000 R9001 to R9003 R9004 I/O verification error flag

Name
Self - diagnostic error flag

Description
Turns on when a self - diagnostic error occurs. The self - diagnostic error code is stored in DT9000. Not used Turns on when an I/O verification error occurs. The position number of the I/O where the verification error was occured is stored in DT9010. Not used

R9005, R9006 R9007 Operation error flag (hold) Operation error flag (non-hold) Carry flag

Turns on and keeps the on state when an operation error occurs. The address where the error occurred is stored in DT9017 (indicates the first operation error which occurred). Turns on for an instant when an operation error occurs. The address where the operation error occurred is stored in DT9018. The contents change each time a new error occurs. Turns on for an instant, - when an overflow or underflow occurs. - when “1” is set by one of the shift instructions.

R9008

R9009

R900A R900B

> flag = flag

Turns on for an instant when the compared results become larger in the “F60 (CMP) to F63 (DWIN) comparison instructions.” Turns on for an instant, - when the compared results are equal in the comparison instructions (F60 to F63). - when the calculated results become 0 in the arithmetic instructions.

R900C R900D

< flag Auxiliary timer contact Tool port error flag Constant scan error flag Always on relay Always off relay Scan pulse relay

Turns on for an instant when the compared results become smaller in the “F60 (CMP) to F63 (DWIN) comparison instructions.” Turns on when the set time elapses (set value reaches 0) in the timing operation of the F137 (STMR)/F183 (DSTM) auxiliary timer instruction. It turns off when the trigger for auxiliary timer instruction turns off. This turns on when an error occurs during communication with a programming tool. Turns on when scan time exceeds the time specified in system register 34 during constant scan execution. Always on. Always off. Turns on and off alternately at each scan.

R900E R900F R9010 R9011 R9012

8 - 26

FP0 8.5

Appendix Table of Special Internal Relays

Address
R9013 R9014 R9015 R9016, R9017 R9018

Name
Initial on pulse relay Initial off pulse relay Step ladder initial on pulse relay

Description
Turns on only at the first scan in the operation. Turns off from the second scan and maintains the off state. Turns off only at the first scan in the operation. Turns on from the second scan and maintains the on state. Turns on for an instant only in the first scan of the process the moment step ladder process is opened. Not used

0.01 s clock pulse relay

Repeats on/off operations in 0.01 s cycles.

0.01 s
R9019 0.02 s clock pulse relay Repeats on/off operations in 0.02 s cycles.

0.02 s
R901A 0.1 s clock pulse relay Repeats on/off operations in 0.1 s cycles.

0.1s
R901B 0.2 s clock pulse relay Repeats on/off operations in 0.2 s. cycles

0.2 s
R901C 1 s clock pulse relay Repeats on/off operations in 1 s cycles.

1s
R901D 2 s clock pulse relay Repeats on/off operations in 2 s cycles.

2s
R901E 1 min clock pulse relay Repeats on/off operations in 1 min cycles.

1 min.
R901F R9020 R9021 to R9025 R9026 (* Note) R9027 (* Note) R9028 Message flag Remote mode flag RUN mode flag Not used Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN. Not used Turns on while the F149 (MSG) instruction is executed. Turns on while the mode selector is set to REMOTE. Not used

Note
Used by the system.

8 - 27

Appendix 8.5 Table of Special Internal Relays

FP0

Address
R9029 (* Note) R902A (* Note) R902B (* Note) R902C to R902F R9030, R9031 R9032 R9033 R9034

Name
Forcing flag External interrupt enable flag Interrupt error flag

Description
Turns on during forced on/off operation for I/O relay and timer/counter contacts. Turns on while the external interrupt trigger is enabled by the ICTL instruction. Turns on when an interrupt error occurs. Not used Not used

RS232C port mode flag Printout instruction flag Rewrite during RUN flag S - LINK I/O communication error flag S - LINK communication status flag RS232C communication error flag RS232C reception completed flag RS232C transmission completed flag High-speed counter control flag for ch0 High-speed counter control flag for ch1 High-speed counter control flag for ch2 High-speed counter control flag for ch3

When “General - use port” is selected, ”K2” goes on. Turns on while a F147 (PR) instruction is executed. Turns off when a F147 (PR) instruction is not executed. This is a special internal relay that goes on for only the first scan following the completion of rewriting in the RUN mode. (CPU Ver. 2.1 or later available) Turns on when the S - LINK error (ERR 1, 3 or 4) occurs using S - LINK system. Turns on when communication is taking place with an S - LINK input/output unit. Turns on when the serial data communication error occurs. Turns on when a terminator is received during the serial data communicating. Turns on while data is not send during the serial data communicating. Turns off while data is being sent during the serial data communicating. Turns on while the high-speed counter instruction “F166 (HC1S) to F170 (PWM)” is executed. Turns on while the high-speed counter instruction “F166 (HC1S) to F170 (PWM)” is executed. Turns on while the high-speed counter instruction “F166 (HC1S) to F170 (PWM)” is executed. Turns on while the high-speed counter instruction “F166 (HC1S) to F170 (PWM)” is executed. Not used

R9035 R9036 R9037 R9038 R9039 R903A R903B R903C R903D R903E, R903F

Note
Used by the system.

8 - 28

FP0 8.6

Appendix Table of Special Data Registers

8.6

Table of Special Data Registers

The special data registers are one word (16-bit) memory areas which store specific information. With the exception of registers for which “Writing is possible” is indicated in the “Description” column, these registers cannot be written to.
Address FP0 T32
DT90000

Name FP0 C10, C14, C16, C32, SL1
DT9000 Self - diagnostic error code I/O verify error unit Auxiliary register for operation Auxiliary register for operation

Description p

The self-diagnostic error code is stored here when a self-diagnostic error occurs. Monitor the error code using decimal display. The position of the I/O for which an error occurred is stored in bits 0 to 3. One shift-out hexadecimal digit is stored in bit positions 0 to 3 when F105 (BSR) or F106 (BSL) instruction is executed. The divided remainder (16-bit) is stored in DT9015/DT90015 when F32 (%) or F52 (B%) instruction is executed. The divided remainder (32-bit) is stored DT9015 and DT9016/DT90015 and DT90016 when F33 (D%) or F53 (DB%) instruction is executed.

DT90010 DT90014

DT9010 DT9014

DT90015

DT9015

DT90016

DT9016

DT90017

DT9017

Operation error address (hold) Operation error address (non-hold)

After commencing operation, the address where the first operation error occurred is stored. Monitor the address using decimal display. The address where a operation error occurred is stored. Each time an error occurs, the new address overwrites the previous address. At the beginning of scan, the address is 0. Monitor the address using decimal display. The data stored here is increased by one every 2.5ms. (H0 to HFFFF) Difference between the values of the two points (absolute value) × 2.5ms = Elapsed time between the two points.

DT90018

DT9018

DT90019

DT9019

2.5ms ring counter

8 - 29

Appendix 8.6 Table of Special Data Registers

FP0

Address FP0 T32 FP0 C10, C14, C16, C32, SL1
DT9020 (Available type: SL1)

Name

Description p

S - LINK status flag / error flag

15 DT9020 Not used

5 4 3 2 1 0

S - LINK communication status (1: Communication in progress) ERR4 (1: Disconnected wire, or S - LINK input/output unit error) ERR3 (1: Problem with voltage level between D and G) Not used ERR1 (1: Short - circuit between D and G) Notes S ERR1 and ERR3 occur even if the power supply on the S - LINK side is interrupted, but are canceled when the power supply is turned on again. S ERR4 is held. To cancel it, repair the disconnected wire in the S - LINK system, or whatever is causing the problem, and then either turn the power to the FP0 on again, press the SET switch to reset it, or turn the power supply on again on the S - LINK unit side.

8 - 30

FP0 8.6

Appendix Table of Special Data Registers

Address FP0 T32 FP0 C10, C14, C16, C32, SL1
DT9021 (Available type: SL1)

Name

Description p

No. of units connected (When normal) to S - LINK / error address 15 DT9021

8 7 6 5 4 3 2 1 0

No. of units connected: 0 to 128 (0 to H80) Note S When the SET switch is pressed, the number of input/output units connected to the S - LINK system is set. (If the same address has been specified for multiple units, the units are counted as a single unit. This is invalid, however, if an ERR4 error is in progress.) (If ERR4 occurs) 15 DT9021 8 7 6 5 4 3 2 1 0

Multiple errors (0: Single, 1: Multiple) Error address 0 to 127 (0 to H7F) (Initial address if there are multiple errors) DT90022 DT9022 Scan time (current value) (* Note) The current scan time is stored here. Scan time is calculated using the formula: Scan time (ms) = stored data (decimal) × 0.1 K50 indicates 5ms.

Note
Scan time display is only possible in RUN mode, and shows the operation cycle time. The maximum and minimum values are cleared when each the mode is switched between RUN mode and PROG. mode.

8 - 31

C16. The mask conditions of interrupts using ICTL instruction can be monitored here. mode. C14. t d Notes 1) Scan time display is only possible in RUN mode.1 K50 indicates 5ms. 8 . C32. . and shows the operation cycle time.) DT90024 DT9024 DT90025 (* Note 2) DT9025 (* Note 2) 23 19 16 (INT No.Appendix 8. SL1 DT9023 Scan time (minimum value) (* Note 1) Scan time (maximum value) (* Note 1) Mask condition monitoring register for interrupts (INT 0 to 5) Description p The minimum scan time is stored here.32 . Scan time is calculated using the formula: Scan time (ms) = stored data (decimal) × 0. The maximum scan time is stored here.) 0: interrupt disabled (masked) 1: interrupt enabled (unmasked) DT90026 DT90027 (* Note 2) DT9026 DT9027 (* Note 2) Periodical interrupt interval (INT 24) Not used The value set by ICTL instruction is stored.K0: periodical interrupt is not used . Scan time is calculated using the formula: Scan time (ms) = stored data (decimal) × 0. 15 11 7 3 0 (Bit No. 2) Used by the system. Monitor using binary display. The maximum and minimum values are cleared when each the mode is switched between RUN mode and PROG.6 Table of Special Data Registers FP0 Address FP0 T32 DT90023 Name FP0 C10.1 K125 indicates 12. Not used Not used The contents of the specified message are stored ( ) in these special data registers when F149 (MSG) p g instruction i i t ti is executed.K1 to K3000: 10ms to 30s DT90028 DT90029 DT90030 (* Note 2) DT90031 (* Note 2) DT90032 (* Note 2) DT90033 (* Note 2) DT90034 (* Note 2) DT90035 (* Note 2) DT90036 DT90037 DT9028 DT9029 DT9030 (* Note 2) DT9031 (* Note 2) DT9032 (* Note 2) DT9033 (* Note 2) DT9034 (* Note 2) DT9035 (* Note 2) DT9036 DT9037 Work 1 for F96 (SRC) instruction Message 0 Message 1 Message 2 Message 3 Message 4 Message 5 Not used The number of data that match the searched data is stored here when F96 (SRC) instruction is executed.5ms.

speed counter instruction is stored here. Target values have been preset for the various instructions.33 .6 Appendix Table of Special Data Registers Address FP0 T32 DT90038 Name FP0 C10. counting from the starting 16-bit area.speed counter related instruction F166 to F170 is executed.bit data) for the high. and cannot be written.speed counter is stored here. the elapsed value for the highspeed counter is automatically transferred to the p y special registers DT9048 and DT9049/DT90048 i l i DT90 8 d DT90 9/DT900 8 and DT90049.bit data) of the high.bit data) of the high.FP0 8. DT90050 DT9050 High-speed counter target value area for ch1 The target value (24. C32.bit data) for the high. The value can be written by executing F1 (DMV) instruction. DT90051 DT9051 8 . These preset values can only be read.speed counter specified by the high. Each time the ED instruction is executed. C14. These preset values can only be read.speed counter specified by the high. The value can be written by executing F1 (DMV) instruction. Each time the ED instruction is executed. to be used when the high. SL1 DT9038 Work 2 for F96 (SRC) instruction Description p The position of the first matching data. DT90046 DT9046 High-speed counter target value for ch0 The target value (24.speed counter related instruction F166 to F170 is executed.speed counter instruction is stored here. Not used DT90039 to DT90043 DT90044 DT9039 to DT9043 DT9044 High-speed counter elapsed value for ch0 DT90045 DT9045 The elapsed value (24. the elapsed value for the highspeed counter is automatically transferred to the p y special registers DT9044 and DT9045/DT90044 i l i DT90 d DT90 /DT900 and DT90045. is stored here when an F96 (SRC) instruction is executed.speed counter is stored here. and cannot be written. DT90047 DT9047 DT90048 DT9048 High-speed counter elapsed value area for ch1 DT90049 DT9049 The elapsed value (24. Target values have been preset for the various instructions. C16. to be used when the high.

This data is read-only data. DT90053 Clock/calendar monitor (hour/minute) Hour and minute data of the clock/calendar are stored here. C32. and clear the high-speed counter. SL1 DT90052 DT9052 Name Description p High-speed counter control flag A value can be written with F0 (MV) instruction to reset the high-speed counter. a hardware reset input is equivalent to an home point proximate input. bit 15 DT9052/ DT90052 12 11 8 7 4 3 0 for ch3 for ch2 for ch1 for ch0 A hardware reset disable is only effective when using the reset inputs (X2 and X5).34 . C14. In all other cases it is ignored.Appendix 8. it cannot be overwritten. disable counting. Control code setting Control code = j j j j (Binary) Software reset 0: Yes / 1: No Count 0: Enable / 1: Disable Hardware reset 0: Enable / 1: Disable High. C16.speed counter clear 0: Continue / 1: Clear Software is not reset: H0 (0000) Perform software reset: H1 (0001) Disable count: H2 (0010) Disable hardware reset: H4 (0100) Stop pulse output (clear instruction): H8 (1000) Perform software reset and stop pulse output: H9 (1001) The 16 bits of DT9052/DT90052 are allocated in groups of four to high-speed channels 0 to 3 as shown below. stop high-speed counter instruction (F168). When using pulse output. Higher 8 bits Lower 8 bits Hour data H00 to H23 (BCD) Minute data H00 to H59 (BCD) 8 .6 Table of Special Data Registers FP0 Address FP0 T32 FP0 C10.

C16. C32. minute.35 . hour. instruction Higher 8 bits Lower 8 bits DT90054 DT90056 DT90055 DT90056 DT90057 DT90057 Minute data H00 to H59 (BCD) Day data H01 to H31 (BCD) Year data H00 to H99 (BCD) Second data H00 to H59 (BCD) Hour data H00 to H23 (BCD) Month data H01 to H12 (BCD) Day-of-the-week data H00 to H06 (BCD) 8 . C14. The built-in calendar timer will operate correctly through the year 2099 and supports leap years.6 Appendix Table of Special Data Registers Address FP0 T32 FP0 C10.FP0 8. second. day. The calendar timer can be set (the time set) by writing a value using a programming tool software or a program that uses the F0 (MV) instruction. and day-of-theweek data for the calendar timer is stored. SL1 DT90054 Name Description p Clock/calendar monitor and setting (minute/second) Clock/calendar monitor and setting (day/hour) Clock/calendar monitor and setting (year/month) Clock/calendar monitor and setting (day-of-the-week) DT90055 The year. month.

DT90058 is cleared to 0. H8000. DT90054 ] . it will be moved up. and. . Therefore. it is unnecessary to write to DT90058. if the time was 5 minutes 35 seconds. the time becomes that written to DT90054 to DT90057 by F0 (MV) instruction. After the time is set. it will be moved down. if the time was 5 minutes 29 seconds. it will become 6 minutes 0 second. these values will function normally. DT90058 ] If you changed the values of DT90054 to DT90057 with the data monitor functions of programming tool software. DT90055 ] [ F0 MV. 8 . Sets the time [ F0 MV. C16. X0 ( DF ) 1 1 [ F0 MV. Note After discharging the battery (including when the power is turned on for the first time). (Cannot be performed with any instruction other than F0 (MV) instruction. C14. . C32. When setting the clock/calendar by program By setting the the highest bit of DT90058 to 1.6 Table of Special Data Registers FP0 Address FP0 T32 FP0 C10. the value will be moved up or down and become exactly 0 seconds. if between 0 and 29 seconds. Inputs 0 minutes and 0 seconds . Once the time and date have been set. At the time of correction. the values of DT90053 to DT90058 change at random. H 512. In the example above. DT90058 is cleared to 0. it will become 5 minutes 0 second. the time will be set when the new values are written. SL1 DT90058 Name Description p Clock/calendar time setting and 30 seconds correction The clock/calendar is adjusted as follows. Example: Correct to 0 seconds with X0 turns on X0 ( DF ) 1 1 [ F0 MV. When the correcting times less than 30 seconds By setting the lowest bit of DT90058 to 1. H 1. and if the between 30 and 59 seconds. H 0.36 . After the correction is completed.) Example: Set the time to 12:00:00 on the 5th day when the X0 turns on. Inputs 12th hour 5th day . . DT90058 ] Correct to 0 second.Appendix 8.

bit data) of the high.speed counter instruction is stored here.speed counter is stored here. DT90106 DT9106 High-speed counter target value area for ch2 The target value (24.) DT90063 DT9063 3 0 (Process No. C14. Each time the ED instruction is executed.37 . Monitor using binary display.speed counter is automatically transferred to the special registers DT9104 and DT9105/DT90104 and DT90105. DT90065 DT9065 DT90066 DT9066 DT90067 DT9067 DT90104 DT9104 DT90105 DT9105 The elapsed value (24.speed counter related instruction F166 to F170 is executed. When the proccess starts up.bit data) for the high. the bit correspondg p ing to the process number turns on “1”. C32. Target values have been preset f th various instrucT t l h b t for the i i t tions. DT90107 DT9107 8 .speed counter specified by the high. C16. DT90061 DT9061 DT90062 DT9062 15 DT9060/ DT90060 15 11 11 7 7 3 0 (Bit No. and cannot be written.) 0: not . to be used when the high. the elapsed value for the high. These preset values can only be read. The value can be written by executing a DMV (F1) instruction. SL1 DT90059 DT9059 Name Description p Serial communication error code bit 15 DT9059/ DT90059 12 11 8 7 4 3 0 Error flag of RS232C port S Tool port bit 0 = 1: Over run error bit 1 = 1: Framing error bit 2 = 1: Parity error S RS232C port bit 8 = 1: Over run error bit 9 = 1: Framing error bit 10 = 1: Parity error DT90060 DT9060 Step ladder process Process number: 0 to 15 Process number: 16 to 31 Process number: 32 to 47 Process number: 48 to 63 Process number: 64 to 79 Process number: 80 to 95 Process number: 96 to 111 Process number: 112 to 127 High-speed counter elapsed value area for ch2 Error flag of tool port Indicates the startup condition of the step ladder process.executing 1: executing DT90064 DT9064 A programming tool software can be used to write data.FP0 8.6 Appendix Table of Special Data Registers Address FP0 T32 FP0 C10.

C14. Target values have been preset f th various instrucT t l h b t for the i i t tions.speed counter specified by the high. Each time the ED instruction is executed. C32. and cannot be written. The value can be written by executing a DMV (F1) instruction.6 Table of Special Data Registers FP0 Address FP0 T32 FP0 C10.speed counter instruction is stored here. DT90110 DT9110 High-speed counter target value area for ch3 The target value (24.38 . SL1 DT90108 DT9108 Name Description p High-speed counter elapsed value area for ch3 DT90109 DT9109 The elapsed value (24.bit data) of the high. the elapsed value for the high. DT90111 DT9111 8 .Appendix 8.speed counter related instruction F166 to F170 is executed.speed counter is stored here.speed counter is automatically transferred to the special registers DT9108 and DT9109/DT90108 and DT90109.bit data) for the high. C16. to be used when the high. These preset values can only be read.

Check the error contents in the table of error codes using the error code ascertained above.7. the total check function automatically activates and eliminates the possibility of incorrect operation from syntax errors in the program. Using NPST-GR software: By executing the “STATUS DISPLAY”. 8 . a self . mode.7 Error Codes 8.7.diagnostic error.FP0 8. 2. Operation will not begin even after switching to the RUN mode. Confirm the contents of the error and take the appropriate steps. When the mode selector of controller is switched to the RUN mode. Using FP programmer II: With the syntax check error.1 Error Confirmation Method Procedure: 1. press the following keys.39 .7. With the self . 8.) OP 1 1 0 ENT READ Then the self . ACLR (. Use the programming tool to call up the error code. the error code and content of error are displayed.diagnostic error or syntax check error has occurred.1.diagnostic error code will be displayed.2 Syntax Check Error This is an error detected by the total check function when there is a syntax error or incorrect setting written in the program. Remote operation cannot be used to change to RUN mode. When a syntax check error is detected ERROR/ALARM LED begins flashing.1. the error code and message is displayed by simply connecting the unit. Clearing a syntax check error By changing to the PROG.1 Error Confirmation When “ERROR/ALARM LED” Turns ON When the “ERROR/ALARM LED” on the control unit is flashing. the error will clear and the ERROR/ALARM LED will turn off. 8.7 Appendix Error Codes 8.

I/O abnormal detection. When a self .diagnostic Error This error occurs when the controller’s self . The error can also be cleared depending on the self-diagnostic error set instruction F148 (ERR). Correct the program while referring to the content of error.LINK Unit Hardware Manual 8 .diagnostic error occurs The controller’s ERROR/ALARM LED begins flashing.3 Self .diagnostic error of the S . For more details. the contents of operation memory.1. This will call up the content of error and the address where the error occurred. Error codes 43 and higher can be cleared.diagnostic function monitors the memory abnormal detection. 8. Using FP programmer II Press the keys as shown below. The self . use the error code obtained above and consult the table of self-diagnostic error codes. For detailed information about the self . Clearing the self . Steps to take for self .40 .Appendix 8.diagnostic error The steps to be taken will differ depending on the error contents. mode. mode.7 Error Codes FP0 Steps to take for syntax error Change to the PROG. and other devices. In the case of operation error. and then execute the total check function while online mode with the programming tool connected. Error codes 43 and higher can be cleared. not stored with the hold type data. press the <F3> (error clear) key. ACLR (.) OP 1 1 2 ENT SHIFT SC WRT Errors can also be cleared by turning off and on the power while in the PROG. will also be cleared.LINK control unit FP0 S . the error address will be stored in the DT9017 and DT9018/DT90017 and DT90018. The operation of the controller might stop depending on the content of error and the system resister setting.7.diagnostic error Using NPST-GR software: At the “STATUS DISPLAY”. The error codes will be stored in the special data resister DT9000 or DT90000. However.diagnostic function detects the occurrence of an abnormality in the system.

Change to PROG. set the duplicated output to “enable (K1)” in system register 20.7 Appendix Error Codes 8. the operands must all be of a certain type). check the system register settings. mode and correct the program so that one relay is not used for two or more OT instructions and KP instructions. the number setting in a program does not agree with the timer/counter range setting. a subroutine SUB to RET is placed before an ED instruction). Enter the correct combination of operands.2 Error code E1 E2 Table of Syntax Check Error Name Syntax error Duplicated output error Operation status Stops Stops Description and steps to take A program with a syntax error has been written. E4 Parameter mismatch error Stops An instruction has been written which does not agree with system register settings.41 . Change to PROG.FP0 8. mode.7. mode and correct the error. one instruction is either missing or in an incorrect position. E8 High . E5 Program area error Stops An instruction which must be written to a specific area (main program area or subprogram area) has been written to a different area (for example. For example. Two or move OT (Out) instructions and KP (Keep) instructions are programmed using same relay. and change so that the settings and the instruction agree. mode and enter the two instructions which must be used in a pair in the correct positions. mode and enter the instruction in the correct area. Or. Change to PROG. 8 . Change to PROG. Change to PROG. E3 Not paired error Stops For instructions which must be used in a pair such as jump (JP and LBL).level instruction operand error Stops There is an incorrect operand in an instruction which requires a specific combination of operands (for example.

Selection of operation status using system register 26: . Continues 8 . There is no interrupt program for an interrupt which occurred. or 4) is detected in the S .diagnosis.Appendix 8.LINK system as the result of a self .LINK) communication error) is stored.to continue operation. Selection of operation status using system register 27: . The cause of the operation error varies depending on the instruction. E32 Interrupt error 2 Stops E45 Operation error Selectable Operation became impossible when a high level instruction was executed.diagnostic error set by ( ) F148 (ERR) instruction i t ti Stops The self-diagnostic error specified by the F148 (ERR) instruction is occurred. set K0 (STOP) The default value is K1.to stop operation. E100 to E199 E200 to E299 Self . Check the number of the interrupt program and change it to agree with the interrupt request.3 Error code E31 Table of Self .7. Turn off the power and check noise conditions.LINK) error Selectable If an S .to continue operation.diagnostic Error Name Interrupt error 1 Operation status Stops Description and steps to take An interrupt occurred without an interrupt request. error code E46 (remote I/O (S .LINK error (ERR1. An interrupt occurred without an interrupt request. Take steps to clear the error condition according to the specification you chose. set K1 (CONT) . A hardware problem or error due to noise is possible. 3. A hardware problem or error due to noise is possible. Turn off the power and check noise conditions. set K0 (STOP) E46 Remote I/O (S .to stop operation. set K1 (CONT) .7 Error Codes FP0 8.42 .

S .LINK address dress Hexainput Decimal decimal (Y) Y80 Y81 Y82 Y83 Y84 Y85 Y86 Y87 Y88 Y89 Y8A Y8B Y8C Y8D Y8E Y8F 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F I/O ad.LINK Address 8.LINK address dress Hexainput Decimal decimal (Y) Y100 Y101 Y102 Y103 Y104 Y105 Y106 Y107 Y108 Y109 Y10A Y10B Y10C Y10D Y10E Y10F 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F I/O ad.S .SL1 S .LINK address dress Hexainput Decimal decimal (Y) Y90 Y91 Y92 Y93 Y94 Y95 Y96 Y97 Y98 Y99 Y9A Y9B Y9C Y9D Y9E Y9F 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F I/O ad.LINK Address I/O ad.43 .LINK address dress Hexainput Decimal decimal (X) X100 X101 X102 X103 X104 X105 X106 X107 X108 X109 X10A X10B X10C X10D X10E X10F 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F I/O ad.LINK address dress Hexainput Decimal decimal (Y) Y110 Y111 Y112 Y113 Y114 Y115 Y116 Y117 Y118 Y119 Y11A Y11B Y11C Y11D Y11E Y11F 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 8 .LINK address dress Hexainput Decimal decimal (X) X90 X91 X92 X93 X94 X95 X96 X97 X98 X99 X9A X9B X9C X9D X9E X9F 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F I/O ad.FP0 Appendix 8.S .S .SL1 S .S .8 FP0 .S .8 FP0 .S .LINK address dress Hexainput Decimal decimal (X) X110 X111 X112 X113 X114 X115 X116 X117 X118 X119 X11A X11B X11C X11D X11E X11F 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F I/O ad.LINK address dress Hexainput Decimal decimal (X) X80 X81 X82 X83 X84 X85 X86 X87 X88 X89 X8A X8B X8C X8D X8E X8F 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 A B C D E F I/O ad.S .

Appendix 8.9 Decimal 0 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 ⋮ 63 ⋮ 255 ⋮ 9999 Binary/Hexadecimal/BCD Expressions Hexadecimal 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001A 001B 001C 001D 001E 001F ⋮ 003F ⋮ 00FF ⋮ 270F Binary 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ⋮ ⋮ ⋮ 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 00001010 00001011 00001100 00001101 00001110 00001111 00010000 00010001 00010010 00010011 00010100 00010101 00010110 00010111 00011000 00011001 00011010 00011011 00011100 00011101 00011110 00011111 BCD code 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 ⋮ ⋮ ⋮ 0000 0000 0000 0001 0000 0010 0000 0011 0000 0100 0000 0101 0000 0110 0000 0111 0000 1000 0000 1001 0001 0000 0001 0001 0001 0010 0001 0011 0001 0100 0001 0101 0001 0110 0001 0111 0001 1000 0001 1001 0010 0000 0010 0001 0010 0010 0010 0011 0010 0100 0010 0101 0010 0110 0010 0111 0010 1000 0010 1001 0011 0000 0011 0001 00000000 00000000 00100111 00111111 11111111 00001111 0000 0000 0000 0010 1001 1001 0110 0011 0101 0101 1001 1001 8 .9 Binary/Hexadecimal/BCD Expressions FP0 8.44 .

45 . / 3 4 5 6 7 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Leas signi ast nificant digit d 0 1 2 3 4 5 6 7 8 9 A B C D E F NUL DEL SOH DC1 STX DC2 ETX DC3 EOT DC4 ENQ NAK ACK SYN BEL ETB BS HT LF VT FF CR SO SI CAN EM SUB ESC FS GS RS US 0 1 2 3 4 5 6 7 8 9 : . . < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ¥ ] ^ _ ‘ a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ DEL 8 .10 ASCII Codes 8.FP0 Appendix 8.10 ASCII Codes b7 b6 b5 b4 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 b7 b6 b5 b4 b3 b2 b1 b0 ASCII HEX code Most significant digit 0 1 2 SPA CE ! ” # $ % & ’ ( ) * + .

10 ASCII Codes FP0 8 .Appendix 8.46 .

3.45 Decimal constants (K). 2 .7 I.4 Basic instructions. 4 . 1 .3 H Hexadecimal constants (H). 8 . 2 .10 E Elapsed value area for timer/counter (EV). 3 .5 Hold types.4 Data register (DT). 3 . 4 .23 Clock pulse relay. 1 .level instructions.44 BCD arithmetic instructions. 4 . 3 . 3 .24 Constants. 8 . 5 . 3 .7 Baud rate.6 Data transmission.7 Index registers (IX.6 External output relays (Y).27 C Carry flag. 8 .7 BCD data.5 BIN arithmetic instructions. 6 . 3 . 3 . 5 .39 Execution condition.5 Counter (C).speed counter function specifications. 8 .18 Error codes. 8 .10 G General . 8 .14 D Data compare instructions.44 High. 8 .27 Communication format setting.8 Data reception.9 Data transfer instructions. 1 .21 Duplicated output. 8 .9 Control instructions. 1 . 8 .41 B Basic function instructions.3. 1 .7 Data conversion instructions.3. 3 .23. 3 .23. 2 . 8 . 8 . 1 . 6 .22 Hexadecimal.speed counter function.3 I I/O allocation.hold type settings. 6 . 4 .7.24 BCD. 8 . IY).use serial communications.44 Bit manipulation instructions. 3 .6 Binary.7 Index modification. 4 .11 Hold types and non . 8 .3 Duplicated output error.9 High.FP0 Index Index A ASCII codes. 1 .19.21. 2 .4 External input relays (X). 3 . 1 . 8 .11 High. 2 . 1 .6 F Forced input and output.level instruction number.9 Data shift instructions.26 Character constants (M). 3 . 8 .1 . 8 .3 High. 6 . 1 .13 Data rotate instructions.6 Data comparison instructions. 5 .

8 .41 Syntax error.26 Sequence basic instructions.2 .6 PWM output function.41 System registers.27 R Reception buffer.25 RS232C transmission format.9.43 Self . 3 . 8 .15. 1 .4.5 I.10 Tool port setting. 8 .21 Pulse output function. 1 . 5 .3.6 U Underflow.39. 8 . 8 .11.3.10 Overflow. 6 .23 to 8 . 8 .29 Self . 3 .3 Set value area for timer/counter (SV). 1 .hold type.6 Syntax check error. 8 .7 Interrupt input settings.4 P Performance specifications.11 O Operand.13 Logic operation instructions. 1 .10 Special internal relays. 1 .Index FP0 Internal relays (R). 8 . 8 . 1 . 8 .18 Pulse output function specifications. 8 . 3 . 8 .LINK address.21 S S . 5 . 1 . 8 .15 L Leading edge detection method.23 Trigger. 8 .3 Pulse catch input function settings.3 Operation errors.11.diagnostic error flag.7 Relays.9 Modem compatibility setting. 6 .29 Special instructions.19 RS232C port setting.26 Start codes (STX).diagnostic error code. 8 . 2 .40. 8 . 3 . 1 .9 Rewrite function during RUN. 5 . 8 .42 Self .24 Modem connection setting.27 T Terminal codes (EXT).17 Setting the timers and counters. 8 .33 PWM output specifications. 8 .6 Timer (T). 5 . 4 . 4 .13 Special data registers. 8 .11. 6 .diagnostic error. 6 . 8 . 4 . 8 . 8 .12. 5 . 8 . 1 .11 N Non . 8 . 5 .8 M Memory areas.

M0091.use Serial Communications” “Chapter 8 Programming for FP0 Analog I/O Unit” “Section 9.M0091.1997 JUN.FP0 Record of changes Record of changes Manual No.1999 NOV.1 ACG .1 .2000 5th edition S Additional high.3 ARCT1F309E/ ACG .2 ACG .1 JUN.9 ASCII Codes” ARCT1F309E . ACG .1/ ACG .M309E Date JUL.M309E .level instructions “F12 (ICRD) Data read from EEPROM” “P13 (PICWT) Data write to EEPROM” “F144 (TRNS) Serial data communication control for RS232C port” “F355 (PID) PID processing” S Additional chapters and section “Chapter 7 General .M0091.1998 OCT.1999 Description of Changes First edition 2nd edition 3rd edition 4th edition S Additional high.level instructions “Floating point type real number operation instructions” [“F309 (FMV) to F338 (DEG)”] R.

Record of changes FP0 R.2 .

Sign up to vote on this title
UsefulNot useful