Atlogic EN ProgrammingManu-V1 1-1907 190708 W

Download as pdf or txt
Download as pdf or txt
You are on page 1of 372

Programming Manual

Software

atLogic
V2.2.48

Thank you for purchasing an Autonics product.


This user manual contains information about the product and its proper use,
and should be kept in a place where it will be easy to access.

www.autonics.com
2 © Copyright Reserved Autonics Co., Ltd.
Preface

Preface
Thank you for purchasing Autonics product.
This programming manual contains information about the product and its proper use, and should
be kept in a place where it will be easy to access.

© Copyright Reserved Autonics Co., Ltd. iii


atLogic Programming Manual Guide

atLogic Programming Manual Guide


 Please familiarize yourself with the information in this manual before using the product.
 This manual provides detailed information on the product’s features. It does not offer any
guarantee concerning matters beyond the scope of this manual.
 This manual may not be edited or reproduced in either part or whole without permission.
 This programming manual is not provided as part of the product package.
Please visit our website (www.autonics.com) to download a copy.
 The manual’s content may vary depending on changes to the product’s software and other
unforeseen developments within Autonics, and is subject to change without prior notice.
Upgrade notice is provided through our website.
 We contrived to describe this manual more easily and correctly. However, if there are any
corrections or questions, please notify us these on our website.

4 © Copyright Reserved Autonics Co., Ltd.


atLogic Programming Manual Symbols

atLogic Programming Manual Symbols

Symbol Description

Supplementary information for a particular feature.

Failure to follow instructions can result in serious injury or death.

Failure to follow instructions can lead to a minor injury or product damage.

An example of the concerned feature's use.

※1 Annotation mark.

※ The specifications and dimensions of this manual are subject to change


without any notice.

© Copyright Reserved Autonics Co., Ltd. v


Reference Manual for Each Configuration

Reference Manual for Each Configuration

Logic panel device specification, installation, maintenance, management, firmware


update and system configuration

Hardware Manual LP-A Series User Manual

Project drawing, programming

Software Drawing atDesigner User Manual


Manual Programming atLogic User Manual, atLogic Programming Manual

Project Upload/Download

Hardware Manual LP-A Series User Manual

Connected device setting, communication setting

Drawing atDesigner User Manual


Software Manual
Programming atLogic User Manual, atLogic Programming Manual
Hardware Manual LP-A Series User Manual

Check connectable device, connection cable model name and protocol

Communication Manual GP/LP Communication Manual

6 © Copyright Reserved Autonics Co., Ltd.


Table of Contents

Table of Contents
Preface .............................................................................................................................iii
atLogic Programming Manual Guide .............................................................................. iv
atLogic Programming Manual Symbols ........................................................................... v
Reference Manual for Each Configuration ...................................................................... vi
Table of Contents ........................................................................................................... vii
1 Overview .................................................................................................... 1
1.1 Feature of atLogic .............................................................................................. 1
1.2 Program Structure and Operation ..................................................................... 2
1.2.1 Program Structure ....................................................................................... 2
1.2.2 Program Operation ...................................................................................... 2

2 Create Program ......................................................................................... 3


2.1 Operation Processing Procedures..................................................................... 3
2.1.1 Basic Processing Procedures ..................................................................... 3
2.1.2 Processing Procedures when Branching ....................................................4
2.2 Display the numerical values ............................................................................. 6
2.3 Input/Output Processing .................................................................................... 7
2.4 Response Delay ................................................................................................ 8
2.5 Dual Coil ............................................................................................................ 8
2.5.1 Definition and Diagnosis of Dual Coil ..........................................................8
2.6 Pointer Use .....................................................................................................10
2.7 Operation Error ...............................................................................................10
2.8 Usage of User Defined Functions...................................................................11
2.9 Notice ..............................................................................................................14
3 Device .....................................................................................................15
3.1 X Device..........................................................................................................15
3.2 Y Device ..........................................................................................................15
3.3 M Device .........................................................................................................15
3.4 S Device..........................................................................................................16
3.5 D Device .........................................................................................................16
3.6 T Device ..........................................................................................................17
3.7 C Device .........................................................................................................18
3.8 Z Device ..........................................................................................................19
3.9 F Device ..........................................................................................................19
3.10 V Device..........................................................................................................19
3.11 L Device ..........................................................................................................20
3.12 R Device .........................................................................................................20
3.13 Device List ......................................................................................................21
3.13.1 LP-S044/LP-S070 ................................................................................... 21
3.13.2 LP-A070/LP-A104 ................................................................................... 22

© Copyright Reserved Autonics Co., Ltd. vii


Table of Contents

4 Special Device ....................................................................................... 23


4.1 LP-S044/LP-S070 ...........................................................................................23
4.1.1 Bit Special Device List ............................................................................. 23
4.1.2 Word Special Device ............................................................................... 33
4.2 LP-A070/LP-A104 ...........................................................................................37
4.2.1 Bit Special Device.................................................................................... 37
4.2.2 Word Special Device ............................................................................... 50

5 Instruction.............................................................................................. 55
5.1 Structures of Instruction Name ....................................................................... 55
5.1.1 Structure by Data Type ............................................................................ 55
5.2 Basic Instruction List .......................................................................................57
5.2.1 Non Processing Instruction ..................................................................... 57
5.2.2 Contact Instruction .................................................................................. 57
5.2.3 Output Instruction .................................................................................... 58
5.2.4 Reversal Instruction ................................................................................. 59
5.2.5 Stack Instruction ...................................................................................... 59
5.2.6 Exit Instruction ......................................................................................... 59
5.3 Application Instruction list ...............................................................................60
5.3.1 Count Instruction ..................................................................................... 60
5.3.2 Timer Instruction ...................................................................................... 60
5.3.3 Control Instruction ................................................................................... 61
5.3.4 Branch Instruction ................................................................................... 61
5.3.5 Loop Instruction ....................................................................................... 61
5.3.6 Master Control Instruction ....................................................................... 62
5.3.7 Interrupt Instruction ................................................................................. 62
5.3.8 Watchdog Timer ...................................................................................... 63
5.3.9 Input Comparison Instruction .................................................................. 64
5.3.10 Comparison Instruction ........................................................................... 67
5.3.11 Transmission Instruction ......................................................................... 68
5.3.12 Exchange Instruction ............................................................................... 70
5.3.13 Rotation Instruction ................................................................................. 70
5.3.14 Movement Instruction .............................................................................. 72
5.3.15 Arithmetic Operation Instruction .............................................................. 73
5.3.16 Logical Operation Instruction .................................................................. 77
5.3.17 BIN/BCD Instruction ................................................................................ 79
5.3.18 String Conversion Instruction .................................................................. 79
5.3.19 Code Conversion Instruction ................................................................... 80
5.3.20 Sign Reversal Instruction ........................................................................ 81
5.3.21 Data Conversion Instruction .................................................................... 81
5.3.22 Refresh Instruction .................................................................................. 81
5.3.23 Display Instruction ................................................................................... 82
5.3.24 Clock Instruction ...................................................................................... 82
5.3.25 Motion Instruction .................................................................................... 83
5.3.26 High-speed Counter Instruction .............................................................. 84
5.4 Basic Instruction .............................................................................................85
5.4.1 Non Processing Instruction (NOP) .......................................................... 85
5.4.2 Contact Instruction (LOAD) ..................................................................... 86
5.4.3 Contact Instruction (LOADN)................................................................... 87
5.4.4 Contact Instruction (LOADP) ................................................................... 88

8 © Copyright Reserved Autonics Co., Ltd.


Table of Contents

5.4.5 Contact Instruction (LOADF) ................................................................... 89


5.4.6 Contact Instruction (AND) ....................................................................... 90
5.4.7 Contact Instruction (ANDN) ..................................................................... 91
5.4.8 Contact Instruction (ANDP) ..................................................................... 92
5.4.9 Contact Instruction (ANDF) ..................................................................... 93
5.4.10 Contact Instruction (ANDL) ..................................................................... 94
5.4.11 Contact Instruction (OR) ......................................................................... 95
5.4.12 Contact Instruction (ORN) ....................................................................... 96
5.4.13 Contact Instruction (ORP) ....................................................................... 97
5.4.14 Contact Instruction (ORF) ....................................................................... 98
5.4.15 Contact Instruction (ORL) ....................................................................... 99
5.4.16 Output Instruction (OUT) ..................................................................... 100
5.4.17 Output Instruction (OUT Syyy.xx) ........................................................ 101
5.4.18 Output Instruction (OUTP) .................................................................. 102
5.4.19 Output Instruction (OUTF)................................................................... 103
5.4.20 Output Instruction (SET) ..................................................................... 104
5.4.21 Output Instruction (SET Syyy.xx) ........................................................ 105
5.4.22 Output Instruction (RST) ..................................................................... 106
5.4.23 Reversal Instruction (ALT) ................................................................... 107
5.4.24 Reversal Instruction (NOT) ................................................................. 108
5.4.25 Stack Instruction (MPUSH) ................................................................. 109
5.4.26 Stack Instruction (MLOAD) .................................................................. 110
5.4.27 Stack Instruction (MPOP) .................................................................... 111
5.4.28 Exit Instruction (END) .......................................................................... 112
5.5 Application Instruction................................................................................. 113
5.5.1 Counter Instruction (CTU) ................................................................... 113
5.5.2 Counter Instruction (CTD) ................................................................... 114
5.5.3 Counter Instruction (CTUD) ................................................................ 115
5.5.4 Counter Instruction (CTR) ................................................................... 116
5.5.5 Timer Instruction (TON)....................................................................... 117
5.5.6 Timer Instruction (TOFF) ..................................................................... 118
5.5.7 Timer Instruction (TMR) ...................................................................... 119
5.5.8 Timer Instruction (TMON).................................................................... 120
5.5.9 Timer Instruction (TRTG) .................................................................... 121
5.5.10 Control Instruction (JMP) .................................................................... 122
5.5.11 Control Instruction (LABEL) ................................................................ 123
5.5.12 Control Instruction (FCALL) ................................................................ 124
5.5.13 Control Instruction (FUNC).................................................................. 125
5.5.14 Branch Instruction (CALL) ................................................................... 126
5.5.15 Branch Instruction (SUBRT) ................................................................ 127
5.5.16 Branch Instruction (RET)..................................................................... 128
5.5.17 Loop Instruction (FOR) ........................................................................ 129
5.5.18 Loop Instruction (NEXT)...................................................................... 130
5.5.19 Loop Instruction (BREAK) ................................................................... 131
5.5.20 Master control Instruction (MCS) ........................................................ 132
5.5.21 Master control Instruction (MCR) ........................................................ 133
5.5.22 Interrupt Instruction (EI) ...................................................................... 134
5.5.23 Interrupt Instruction (DI) ...................................................................... 135
5.5.24 Interrupt Instruction (ETI) .................................................................... 136
5.5.25 Interrupt Instruction (EEI) .................................................................... 137
5.5.26 Interrupt Instruction (DTI) .................................................................... 138
5.5.27 Interrupt Instruction (DEI) .................................................................... 139

© Copyright Reserved Autonics Co., Ltd. ix


Table of Contents

5.5.28 Interrupt Instruction (TINT) .................................................................. 140


5.5.29 Interrupt Instruction (EINT) .................................................................. 141
5.5.30 Interrupt Instruction (IRET) .................................................................. 142
5.5.31 Watchdog timer(WDT) ......................................................................... 143
5.5.32 Input comparison Instruction (LOAD=) ................................................ 144
5.5.33 Input comparison Instruction (LOAD>) ................................................ 145
5.5.34 Input comparison Instruction (LOAD<) ................................................ 146
5.5.35 Input comparison Instruction (LOAD<>) .............................................. 147
5.5.36 Input comparison Instruction (LOAD>=) .............................................. 148
5.5.37 Input comparison Instruction (LOAD<=) .............................................. 149
5.5.38 Input comparison Instruction (DLOAD=) ............................................. 150
5.5.39 Input comparison Instruction (DLOAD>) ............................................. 151
5.5.40 Input comparison Instruction (DLOAD<) ............................................. 152
5.5.41 Input comparison Instruction (DLOAD<>) ........................................... 153
5.5.42 Input comparison Instruction (DLOAD>=) ........................................... 154
5.5.43 Input comparison Instruction (DLOAD<=) ........................................... 155
5.5.44 Input comparison Instruction (AND=) .................................................. 156
5.5.45 Input comparison Instruction (AND>) .................................................. 157
5.5.46 Input comparison Instruction (AND<) .................................................. 158
5.5.47 Input comparison Instruction (AND<>) ................................................ 159
5.5.48 Input comparison Instruction (AND>=) ................................................ 160
5.5.49 Input comparison Instruction (AND<=) ................................................ 161
5.5.50 Input comparison Instruction (DAND=) ............................................... 162
5.5.51 Input comparison Instruction (DAND>) ............................................... 163
5.5.52 Input comparison Instruction (DAND<) ............................................... 164
5.5.53 Input comparison Instruction (DAND<>) ............................................. 165
5.5.54 Input comparison Instruction (DAND>=) ............................................. 166
5.5.55 Input comparison Instruction (DAND<=) ............................................. 167
5.5.56 Input comparison Instruction (OR=) .................................................... 168
5.5.57 Input comparison Instruction (OR>) .................................................... 169
5.5.58 Input comparison Instruction (OR<) .................................................... 170
5.5.59 Input comparison Instruction (OR<>) .................................................. 171
5.5.60 Input comparison Instruction (OR>=) .................................................. 172
5.5.61 Input comparison Instruction (OR<=) .................................................. 173
5.5.62 Input comparison Instruction (DOR=) .................................................. 174
5.5.63 Input comparison Instruction (DOR>) .................................................. 175
5.5.64 Input comparison Instruction (DOR<) .................................................. 176
5.5.65 Input comparison Instruction (DOR<>) ............................................... 177
5.5.66 Input comparison Instruction (DOR>=) ............................................... 178
5.5.67 Input comparison Instruction (DOR<=) ............................................... 179
5.5.68 Comparison Instruction (CMP) ............................................................ 180
5.5.69 Comparison Instruction (DCMP) ......................................................... 181
5.5.70 Comparison Instruction (ACMP).......................................................... 182
5.5.71 Comparison Instruction (CMPL) .......................................................... 183
5.5.72 Comparison Instruction (DCMPL) ....................................................... 184
5.5.73 Comparison Instruction (BWCMP) ...................................................... 185
5.5.74 Comparison Instruction (DBWCMP) ................................................... 187
5.5.75 Transmission Instruction (BMOV) ....................................................... 189
5.5.76 Transmission Instruction (MOV) .......................................................... 190
5.5.77 Transmission Instruction (DMOV) ....................................................... 191
5.5.78 Transmission Instruction (BMOVL) ..................................................... 192
5.5.79 Transmission Instruction (MOVL) ........................................................ 193

10 © Copyright Reserved Autonics Co., Ltd.


Table of Contents

5.5.80 Transmission Instruction (DMOVL) ..................................................... 194


5.5.81 Transmission Instruction (BMOVG) .................................................... 195
5.5.82 Transmission Instruction (MOVG) ....................................................... 196
5.5.83 Transmission Instruction (DMOVG) .................................................... 197
5.5.84 Transmission Instruction (BCMOV) ..................................................... 198
5.5.85 Transmission Instruction (CMOV) ....................................................... 199
5.5.86 Transmission Instruction (DCMOV) .................................................... 200
5.5.87 Exchange Instruction (XCH)................................................................ 201
5.5.88 Exchange Instruction (DXCH) ............................................................. 202
5.5.89 Exchange Instruction (AXCH) ............................................................. 203
5.5.90 Exchange Instruction (SWAP) ............................................................. 204
5.5.91 Exchange Instruction (DSWAP) .......................................................... 205
5.5.92 Rotation Instruction (ROR) .................................................................. 206
5.5.93 Rotation Instruction (DROR) ............................................................... 207
5.5.94 Rotation Instruction (AROR) ............................................................... 208
5.5.95 Rotation Instruction (RORC) ............................................................... 209
5.5.96 Rotation Instruction (DRORC) ............................................................. 210
5.5.97 Rotation Instruction (ARORC) ............................................................. 211
5.5.98 Rotation Instruction (ROL) .................................................................. 212
5.5.99 Rotation Instruction (DROL) ................................................................ 213
5.5.100 Rotation Instruction (AROL) ................................................................ 214
5.5.101 Rotation Instruction (ROLC) ................................................................ 215
5.5.102 Rotation Instruction (DROLC) ............................................................. 216
5.5.103 Rotation Instruction (AROLC) ............................................................. 217
5.5.104 Movement Instruction (SFTR) ............................................................. 218
5.5.105 Movement Instruction (ASFTR)........................................................... 219
5.5.106 Movement Instruction (SFTL).............................................................. 220
5.5.107 Movement Instruction (ASFTL) ........................................................... 221
5.5.108 Movement Instruction (WSFTR).......................................................... 222
5.5.109 Movement Instruction (WSFTL) .......................................................... 223
5.5.110 Arithmetic Operation Instruction (ADD) ............................................... 224
5.5.111 Arithmetic Operation Instruction (DADD) ............................................ 225
5.5.112 Arithmetic Operation Instruction (ADDU) ............................................ 226
5.5.113 Arithmetic Operation Instruction (DADDU) ......................................... 227
5.5.114 Arithmetic Operation Instruction (ADDL) ............................................. 228
5.5.115 Arithmetic Operation Instruction (DADDL) .......................................... 229
5.5.116 Arithmetic Operation Instruction (ADDLU) .......................................... 230
5.5.117 Arithmetic Operation Instruction (DADDLU) ....................................... 231
5.5.118 Arithmetic Operation Instruction (SUB) ............................................... 232
5.5.119 Arithmetic Operation Instruction (DSUB) ............................................ 233
5.5.120 Arithmetic Operation Instruction (SUBU) ............................................ 234
5.5.121 Arithmetic Operation Instruction (DSUBU) .......................................... 235
5.5.122 Arithmetic Operation Instruction (SUBL) ............................................. 236
5.5.123 Arithmetic Operation Instruction (DSUBL) .......................................... 237
5.5.124 Arithmetic Operation Instruction (SUBLU) .......................................... 238
5.5.125 Arithmetic Operation Instruction (DSUBLU) ........................................ 239
5.5.126 Arithmetic Operation Instruction (MUL) ............................................... 240
5.5.127 Arithmetic Operation Instruction (DMUL) ............................................ 241
5.5.128 Arithmetic Operation Instruction (MULU) ............................................ 242
5.5.129 Arithmetic Operation Instruction (DMULU) ......................................... 243
5.5.130 Arithmetic Operation Instruction (MULL) ............................................. 244
5.5.131 Arithmetic Operation Instruction (DMULL) .......................................... 245

© Copyright Reserved Autonics Co., Ltd. xi


Table of Contents

5.5.132 Arithmetic Operation Instruction (MULLU) .......................................... 246


5.5.133 Arithmetic Operation Instruction (DMULLU)........................................ 247
5.5.134 Arithmetic Operation Instruction (DIV) ................................................ 248
5.5.135 Arithmetic Operation Instruction (DDIV) .............................................. 249
5.5.136 Arithmetic Operation Instruction (DIVU) .............................................. 250
5.5.137 Arithmetic Operation Instruction (DDIVU) ........................................... 251
5.5.138 Arithmetic Operation Instruction (DIVL) .............................................. 252
5.5.139 Arithmetic Operation Instruction (DDIVL) ............................................ 253
5.5.140 Arithmetic Operation Instruction (DIVLU) ............................................ 254
5.5.141 Arithmetic Operation Instruction (DDIVLU) ......................................... 255
5.5.142 Arithmetic Operation Instruction (INC) ................................................ 256
5.5.143 Arithmetic Operation Instruction (DINC) .............................................. 257
5.5.144 Arithmetic Operation Instruction (DEC) ............................................... 258
5.5.145 Arithmetic Operation Instruction (DDEC) ............................................ 259
5.5.146 Arithmetic Operation Instruction (ADDB) ............................................ 260
5.5.147 Arithmetic Operation Instruction (DADDB) .......................................... 261
5.5.148 Arithmetic Operation Instruction (ADDBL) .......................................... 262
5.5.149 Arithmetic Operation Instruction (DADDBL) ........................................ 263
5.5.150 Arithmetic Operation Instruction (SUBB) ............................................. 264
5.5.151 Arithmetic Operation Instruction (DSUBB) .......................................... 265
5.5.152 Arithmetic Operation Instruction (SUBBL) ........................................... 266
5.5.153 Arithmetic Operation Instruction (DSUBBL) ........................................ 267
5.5.154 Arithmetic Operation Instruction (MULB) ............................................ 268
5.5.155 Arithmetic Operation Instruction (DMULB) .......................................... 269
5.5.156 Arithmetic Operation Instruction (MULBL) .......................................... 270
5.5.157 Arithmetic Operation Instruction (DMULBL) ........................................ 271
5.5.158 Arithmetic Operation Instruction (DIVB) .............................................. 272
5.5.159 Arithmetic Operation Instruction (DDIVB) ........................................... 273
5.5.160 Arithmetic Operation Instruction (DIVBL) ............................................ 274
5.5.161 Arithmetic Operation Instruction (DDIVBL) ......................................... 275
5.5.162 Arithmetic Operation Instruction (INCB) .............................................. 276
5.5.163 Arithmetic Operation Instruction (DINCB) ........................................... 277
5.5.164 Arithmetic Operation Instruction (DECB) ............................................ 278
5.5.165 Arithmetic Operation Instruction (DDECB) .......................................... 279
5.5.166 Logical Operation Instruction (WAND) ................................................ 280
5.5.167 Logical Operation Instruction (DAND) ................................................. 281
5.5.168 Logical Operation Instruction (AAND) ................................................. 282
5.5.169 Logical Operation Instruction (WANDL) .............................................. 283
5.5.170 Logical Operation Instruction (DANDL) ............................................... 284
5.5.171 Logical Operation Instruction (WOR) .................................................. 285
5.5.172 Logical Operation Instruction (DOR) ................................................... 286
5.5.173 Logical Operation Instruction (AOR) ................................................... 287
5.5.174 Logical Operation Instruction (WORL) ................................................ 288
5.5.175 Logical Operation Instruction (DORL) ................................................. 289
5.5.176 Logical Operation Instruction (XOR) ................................................... 290
5.5.177 Logical Operation Instruction (DXOR)................................................. 291
5.5.178 Logical Operation Instruction (AXOR) ................................................. 292
5.5.179 Logical Operation Instruction (XORL) ................................................. 293
5.5.180 Logical Operation Instruction (DXORL)............................................... 294
5.5.181 Logical Operation Instruction (XNR) ................................................... 295
5.5.182 Logical Operation Instruction (DXNR) ................................................. 296
5.5.183 Logical Operation Instruction (AXNR) ................................................. 297

12 © Copyright Reserved Autonics Co., Ltd.


Table of Contents

5.5.184 Logical Operation Instruction (XNRL) ................................................. 298


5.5.185 Logical Operation Instruction (DXNRL) ............................................... 299
5.5.186 BIN/BCD conversion Instruction (BIN2BCD) ...................................... 300
5.5.187 BIN/BCD conversion Instruction (DBIN2BCD) .................................... 301
5.5.188 BIN/BCD conversion Instruction (BCD2BIN) ...................................... 302
5.5.189 BIN/BCD conversion Instruction (DBCD2BIN) .................................... 303
5.5.190 String conversion Instruction (BIN2HASC) ......................................... 304
5.5.191 String conversion Instruction (DBIN2HASC) ....................................... 305
5.5.192 String conversion Instruction (HASC2BIN) ......................................... 306
5.5.193 String conversion Instruction (DHASC2BIN) ....................................... 307
5.5.194 String conversion Instruction (BCD2DASC) ........................................ 308
5.5.195 String conversion Instruction (DBCD2DASC) ..................................... 309
5.5.196 String conversion Instruction (DASC2BIN) ......................................... 310
5.5.197 String conversion Instruction (DDASC2BIN) ....................................... 311
5.5.198 String conversion Instruction (STR2ASC) ........................................... 312
5.5.199 String conversion Instruction (DASC2BCD) ........................................ 313
5.5.200 String conversion Instruction (DDASC2BCD) ..................................... 314
5.5.201 String conversion Instruction (BIN2DASC) ......................................... 315
5.5.202 String conversion Instruction (DBIN2DASC) ....................................... 316
5.5.203 Code conversion Instruction (GRY2BIN) ............................................ 317
5.5.204 Code conversion Instruction (DGRY2BIN) .......................................... 318
5.5.205 Code conversion Instruction (BIN2GRY) ............................................ 319
5.5.206 Code conversion Instruction (DBIN2GRY) .......................................... 320
5.5.207 Sign reversal Instruction (NEG) .......................................................... 321
5.5.208 Sign reversal Instruction (DNEG) ........................................................ 322
5.5.209 Data conversion Instruction (DECO) ................................................... 323
5.5.210 Data conversion Instruction (ENCO) ................................................... 324
5.5.211 Data conversion Instruction (EXT) ...................................................... 325
5.5.212 Refresh Instruction (REF) ................................................................... 326
5.5.213 Display Instruction (SEG) .................................................................... 327
5.5.214 Clock Instruction (TCMP) .................................................................... 329
5.5.215 Clock Instruction (TADD) ..................................................................... 330
5.5.216 Clock Instruction (TSUB) ..................................................................... 331
5.5.217 Clock Instruction (TRD) ....................................................................... 332
5.5.218 Clock Instruction (TWR) ...................................................................... 333
5.5.219 Clock Instruction (HOUR) .................................................................... 334
5.5.220 Clock Instruction (TZCP) ..................................................................... 335
5.5.221 Motion Instruction (MTVDM) ............................................................... 337
5.5.222 Motion Instruction (MTPDM) ............................................................... 338
5.5.223 Motion Instruction (MTIDM) ................................................................. 339
5.5.224 Motion Instruction (MTMEC) ............................................................... 340
5.5.225 Motion Instruction (MTEMS) ............................................................... 341
5.5.226 Motion Instruction (MTCPP) ................................................................ 342
5.5.227 Motion Instruction (MTFOS) ................................................................ 343
5.5.228 Motion Instruction (MTSRS) ................................................................ 344
5.5.229 Motion Instruction (MTOBC) ............................................................... 345
5.5.230 Motion Instruction (MTOVV) ................................................................ 346
5.5.231 Motion Instruction (MTOVP) ................................................................ 347
5.5.232 Motion Instruction (MTIPT).................................................................. 348
5.5.233 Motion Instruction (MTUAI) ................................................................. 349
5.5.234 High speed counter Instruction (HSCNT) ........................................... 350
5.5.235 High speed counter Instruction (HSSET) ............................................ 352

© Copyright Reserved Autonics Co., Ltd. xiii


Table of Contents

5.5.236 High-speed Counter Instruction (HSRST) ........................................... 353

6 Appendix ............................................................................................. 355


6.1 Error Code and Troubleshooting ................................................................ 355

14 © Copyright Reserved Autonics Co., Ltd.


1 Overview

1 Overview

1.1 Feature of atLogic


atLogic is the exculsive software to write program and debug for LP series. Features and
advantages of atLogic are as below.

 Support multi project


Able to open up to 5 projects at the same time and write or edit programs.
 Convenient program edit
 Able to edit by cell unit
 Able to edit with multi window
 Support several view functions such as viewing device name, variable name, or device
name & comment, etc. to edit program easily.
 Able to edit ladder program and mnemonic program at the same time.
 Several monitor function
Support several monitor function such as monitoring variable, device, system, or time chart,
etc.
 Convenient user interface
Easy adaptation for atLogic by same basic function of Microsoft window.
 Various message window
Supports various message window for edit or check program easily.
 Real time switching ladder and mnemonic program
Switching ladder or mnemonic program in real time and it is available to write or edit at two
editors simultaneously.

© Copyright Reserved Autonics Co., Ltd. 1


1 Overview

1.2 Program Structure and Operation

1.2.1 Program Structure


The program consists of all functions required to execute a specific control, and it is saved
embedded RAM of CPU module or flash memory.
These functions are generally classified as below.
Function Description
Scan Program Processes a sign repeating regularly in every scan.
Executes the program according to the set time interval when required to
process time conditions as follows.
 When it is required to faster processing than an average process time
Time-driven
for a scan
Interrupt Program  When it is required a longer time interval than an average processing
time for a scan
 When it is required to process a program in the designated time interval
Executes only when certain condition is fulfilled.
Subroutine Program
(When input condition of CALL instruction is ON )

1.2.2 Program Operation


This program processes the operation according to the following procedures.

2 © Copyright Reserved Autonics Co., Ltd.


2 Create Program

2 Create Program

2.1 Operation Processing Procedures

2.1.1 Basic Processing Procedures

LP program performs input refresh before starting its operation, and begins operation work from
the step 0 one by one. Then it executes output refresh after performing the END instruction.
Through all these procedures, finally one scan is completed.

 Refresh input: Before executing the program operation, it reads the data from the input
contact or module and saves it in designated device area(X Device).

 Refresh output: After completing the program operation, it outputs the data from designated
area(Y Device) to the output contact or output module.

 Refresh input and output: Refresh input and output is executed by force at the time to
perform the instruction.

© Copyright Reserved Autonics Co., Ltd. 3


2 Create Program

2.1.2 Processing Procedures when Branching


(1) When using JMP to CALL

(2) When END instruction is duplicated

If the END instruction executes while the program is being processed, it exits the operation
without performing the below program.

4 © Copyright Reserved Autonics Co., Ltd.


2 Create Program

(3) Interrupt, Subroutine, User defined functions

As above example for interrupt program, programs containing interrupt, subroutine and user
defined functions, firstly jump to the subroutine and perform it completely, and then go to the
main program again, finally keep continuing to execute the program from the next step of
the stopped step.

© Copyright Reserved Autonics Co., Ltd. 5


2 Create Program

2.2 Display the numerical values


(1) Decimal number
Setting values of timer and counter, addresses of word device and S device, for designate
the numeral values in instruction operands, for designate the number of operation times in
instruction operands
Ex) 1, 3, 10, 19...
(2) Hexadecimal number
Setting values of timer and counter, addresses of bit devices such as X, Y and M, for
designate the numeral values in instruction operands, for designate the number of operation
times in instruction operands
Ex) h0001, h0003, h000a, h0013...
(3) Binary number
Setting values of timer and counter, for designate the numeral values and the number of
operation times is displayed with decimal or hexadecimal number, these kinds of numeric
values are usually converted into binary numbers in LP.
Ex) 0001, 0011, 1010, 00010011...
(4) BCD
BCD is a numeric system that represents the decimal digits consisted of 0 to 9 as the binary
numeric system of 4 bits.
Ex) 0001, 0011, 0001 0000, 0001 1001...

6 © Copyright Reserved Autonics Co., Ltd.


2 Create Program

2.3 Input/Output Processing

No. Description
① Input is OFF.
② It is not time to refresh input, input is OFF.
It is ON at the time to refresh input, input is ON. But the length of input signal is shorter

than scan cycle, it may not recognize as ON depending on the time to refresh input.
Because the input retains ON during a cycle of scan regardless of refreshing input time.
④ ※The minimum input retaining time of LP series is 1ms. Even though the input is entered
at the time of refreshing input, the input is invalid if it is not able to maintain for 1ms.

© Copyright Reserved Autonics Co., Ltd. 7


2 Create Program

2.4 Response Delay

The program is processed as above, therefore in case of input/output the response delay may
be occurred due to operation time. If you need to perform input/output processing while program
is being operated, it is available with using REF instructions(Refresh input/output).

2.5 Dual Coil

2.5.1 Definition and Diagnosis of Dual Coil


(1) Definition of dual coil
Dual coil indicates that the same output coil is used in duplicate in a program.
(2) Diagnosis of dual coil
1) When the same device is used as operand of OUT instruction more than twice in a
program.
 Not dual coil

 Dual coil

8 © Copyright Reserved Autonics Co., Ltd.


2 Create Program

2) When the same device of counter or timer is used as timer/counter instruction more
than twice in a program.
 Not dual coil

 Dual coil

It is not regard as dual coil when the same device is used in other instructions.

(3) Process dual coil as error


Select [Tool]-[Program Checking]-[Program Checking Options] of atLogic menu, ‘Checking
Program Options’ dialog box appears. Check ‘Process dual coil as error’ and it processes
dual coil as an error and you cannot download the program. If not checking ‘Process dual
coil as error’ you can download the program.

© Copyright Reserved Autonics Co., Ltd. 9


2 Create Program

2.6 Pointer Use


Pointer usually refers to the same kind of device having a corresponding device value as an
address. Using a pointer indicates that the asterisk mark(‘*’) attaches in front of device in order
to use it as a pointer. (ex : *M0010)

When as following mnemonic codes exist,


MOV *M0010 D0050
If the value 100 is stored in M0010, the above mnemonic code can be interpreted as follows.
MOV M0100 D0050
If the value 30 is stored in D0050, the above mnemonic code can be interpreted as follows.
MOV 30 D0050

2.7 Operation Error


If it is a numerical operation error caused by the problems, which are occurred during performing
the user program, it is displayed in error flag and the system continues to operate. When the
operation time is longer than the setting time for scan delay monitoring during performing the
operation, the system is not operated any more.

 Time-driven operation error (F35 bit)


When the scan time is longer than the time-driven setting time, it is SET. When the scan
time is shorter than the time-driven setting time, its corresponding bit turns OFF from ON.
 Operation error flag (At present) (F68 bit)
When an error occurs in numerical operation during performing the user program, its
corresponding bit is SET. When changing to all modes excluded STOP mode and no
operation error after a scan and program download and power reset, its corresponding bit
turns OFF from ON.
 Operation error flag (Retaining) (F69 bit)
It is used to figure out the history of operation error occurrences. If the first operation error
occurs while scanning, the corresponding bit is SET and turns OFF when the power is reset.

10 © Copyright Reserved Autonics Co., Ltd.


2 Create Program

2.8 Usage of User Defined Functions


This function is to reuse a block, possibly to be used in other project, by making it library while
you are creating a program. The program made in library is saved as a file so that it is available
to use in other projects or PC again.
User calls “user defined functions” as forms of FCALL cmd op1 op2... and uses it as forms of
FUNC cmd.
(1) How to register user defined functions
1st Select the block you want to register as below.

2nd Select [Tool]-[Register User Defined Function] of menu, press Shift + F10, or click
of ladder tool bar. ‘Register User Defined Function’ dialog box appears.

No. Description
① Input a user defined function name.
② Set the number of operands to use.
Set the number of each operand’s device as much as the designated

number of operands.
④ Describe for the user defined functions you want to register.
3rd If click “OK” button after completing above process, the user defined function is
registered. The registered user defined function is stored with the function name.lib
file in \LIB folder.

© Copyright Reserved Autonics Co., Ltd. 11


2 Create Program

(2) How to use user defined function


1st Select [Tool]-[User Defined Function], press Ctrl + F11, or click of ladder tool bar.
‘Function List’ dialog box appears.

No. Description
① Displays the selected user defined function name.
② Displays user defined functions stored in the designated folders.
③ Displays used device in the selected user defined function.
④ Displays registered description for the selected user defined function.
2nd User defined functions are applied when click ‘Select’. If user defined function or
operand is not entered correctly, and when you click ‘Select’, ‘Function List’ dialog
box is not closed and user defined function is not applied to ladder program.
Click ‘Cancel’ and the user defined functions list is closed automatically regardless of
whatever you input.

12 © Copyright Reserved Autonics Co., Ltd.


2 Create Program

3rd In the place where call the function, call with FCALL instruction, and in the place
where the function is called, is called with FUNC instruction.

© Copyright Reserved Autonics Co., Ltd. 13


2 Create Program

2.9 Notice
(1) Input/Output processing and response delay

It is processing input/output through executing the above processing repeatedly. Therefore,


please be aware that there is a response delay by operation cycle except by the operation
time of input filter or output elements in sequence control.
(2) Dual coil
When the output coil is used in multi places, usually the last programmed coil is activated
first.
For example,
LOAD X0
OUT Y0 (First Y0)
LOAD Y0
OUT Y1
LOAD X1
OUT Y0 (Second Y0)
In above, X0 = ON, X1= OFF.
For first Y0 is X0 = ON, virtual memory is ON and output Y1 is ON. However, second Y0 is
X1 = OFF, virtual memory turns OFF.
Therefore, actual external output is Y0 = ON, Y1 = ON. If using dual output as explained
above, the latter one is activated first. Therefore, pay attention when using dual coil. For
whether to using dual coil or not, refer to ‘2.5 Dual Coil’.

14 © Copyright Reserved Autonics Co., Ltd.


3 Device

3 Device

3.1 X Device
X input device is a device that transfers the signal inputted from an external switch or a button to
CPU.
It is able to use A(Normally Open) or B(Normally Closed)Contacts in the program, and also
available to with pulse inputs for the contact.

X input device, which is not connected with input terminal, is able to be used as the same
function as an inner auxiliary device(M Device).
Because input contact is only retained by external input, be sure that if you want to use it as an
external output.

3.2 Y Device
Y output device is a device that transfers the inner processing result to externally connected
output devices.

Y device, which is not connected with output terminal, is able to be used as the same function as
an inner auxiliary device(M Device).
In case the output device is allocated to an actual external contact and the same output contact
is used more than twice to the operand of out instruction in a program, the last used output is
output to outside. For further details, refer to ‘2.5 Dual Coil’.

3.3 M Device
It is an inner auxiliary device of LP.
It is only able to perform in the program, not able to directly output to outside of LP. It is available
to be used as a memory protection device by setting ‘Device Latch Range Settings’ in
[Parameter]-[COMMON].

© Copyright Reserved Autonics Co., Ltd. 15


3 Device

3.4 S Device
It is a step device.
It is a device to control step and used with OUT, SET and RESET instructions. When it is used
with SET or RESET instruction, the previous step must be performed first to execute the current
step. When it is used with OUT instruction, it executes the last step turned “On” regardless of the
order of step.
It is unavailable to be used as a word device, only can be used as a bit device. It is available to
be used as a memory protection device by setting ‘Device Latch Range Settings’ in [Parameter]-
[COMMON]. The clear condition, SET XXX.00, is able to execute anytime regardless of the
processing steps.

3.5 D Device
It is a data device of LP.
It is only able to be used as a word bit, not able to be used as a bit device. When it is used as
the 32 bit instruction, D word is operated as lower 16 bit and D+1 word is operated as upper 16
bit as following picture.

It is available to be used as a memory protection device by setting ‘Device Latch Range Settings’
in [Parameter]-[COMMON].

16 © Copyright Reserved Autonics Co., Ltd.


3 Device

3.6 T Device
It is a device used with instructions related to Timer.
It consists of three parts; timer contact, timer setting value, timer present value.
Timer contact performs ON/OFF functions according to the result of timer instruction and also
available to be used as timer and input instructions.
Timer setting value is a place where a boundary value for the result of timer is saved, and is
available to be used with timer and application instructions.
Timer present value is a place where a present value is stored while timer is operating, and user
can not set it up directly.
When as following picture, if inputting 100 to “T0” setting value device, “T0” timer contact device
turns ON when “T0” present value device becomes 100.

Timer instructions, related to LP Series are TON, TOFF, TMON, TRTG and TMR, and even the
same timer device is operated differently depending on each instruction.
The basic cycle of timer device is 10ms, but it is available to be operated in 10ms or 100ms by
setting up the device range in parameters.
It is available to be used as a memory protection device by setting ‘Device Latch Range Settings’
in [Parameter]-[COMMON].
For furter details of timer device, refer to ‘5.3.2 Timer ’.

© Copyright Reserved Autonics Co., Ltd. 17


3 Device

3.7 C Device
It is a device used with the instructions related to Counter.
It consists of three parts; counter contact, counter setting value, and counter present value.
Counter contact performs ON/OFF functions according to the result of counter instructions, and
also available to be used as counter and input instructions.
Counter setting value is a place where a boundary value for the result of count is stored, and is
available to be used with counter and application instructions.
Counter present value is a place where a present value is stored while counter is operating, and
user can not set it up directly.
When as following picture, if inputting 100 to “C0” setting value device, “C0” contact device turns
ON when “C0” present value device becomes 100.

Counter instructions, related to LP Series are CTD, CTU, CTUD and CTR, and even the same
counter device is operated differently depending on each instruction.

18 © Copyright Reserved Autonics Co., Ltd.


3 Device

3.8 Z Device
It is a device that is able to designate indirectly a device with using other word device.
When as following picture, if “D0” device value is 10, the value 10 stored in “D0” is transferred to
D(0+Z0) device, namely D100 device.

In other words, MOV D0 D0Z0 is interpreted as below.


 MOV D0 D (value of 0 + Z0)
 MOV D0 D (0+100)
 MOV D0 D100
For another example, if MOV D0 D40Z0 it could be interpreted as below.
 MOV D0 D (value of 40 + Z0)
 MOV D0 D (40+100)
 MOV D0 D 140
It is possible to designate a device address indirectly according to the change of Z device.

3.9 F Device
It is a device that sets up the status and operation of LP.
It designates a device that is able to be used separately in input and output instructions, and not
able to be used as a memory protection area.
For further details of F device, refer to ‘4 Special ’.

3.10 V Device
It is the used area for matched automatically device area by system when using user defined
function. User can not use this device area.

© Copyright Reserved Autonics Co., Ltd. 19


3 Device

3.11 L Device
It is a link device. It is a device sharing link data each other when communicating with other
module.
It is available to be used as a memory protection device by setting ‘Device Latch Range Settings’
in [Parameter]-[COMMON].

3.12 R Device
It is a device used when using the recipe function of graphic panel in LP series.
It is available to be used as a memory protection device by setting ‘Device Latch Range Settings’
in [Parameter]-[COMMON].

20 © Copyright Reserved Autonics Co., Ltd.


3 Device

3.13 Device List

3.13.1 LP-S044/LP-S070
Word
Description Bit range GP device(UB) GP device (UW)
range
X0 to UB70000 to UW7000 to
X Input device X0 to X255
X255F UB7255F UW7255
Y0 to UB80000 to UW8000 to
Y Output device Y0 to Y255
Y255F UB8255F UW8255
M0 to M0 to UB200000 to UW20000 to
M Auxiliary device
M9999F M9999 UB29999F UW29999
S0.0 to
S Step device
S255.99
D0 to D0 to UB400000 to UW40000 to
D Data device
D9999F D9999 UB49999F UW49999
UB100000 to UW10000 to
T Timer contact T0 to T255
UB10015F UW10015
Timer present UB110000 to UW11000 to
T T0 to T255
value UB11255F UW11255
UB130000 to UW13000 to
T Timer set value T0 to T255
UB13255F UW13255
UB150000 to UW15000 to
C Counter contact C0 to C255
UB15015F UW15015
Counter present UB160000 to UW16000 to
C C0 to C255
value UB16255F UW16255
Counter set UB180000 to UW18000 to
C C0 to C255
value UB18255F UW18255
Z0 to UB067000 to UW06700 to
Z Index device Z0 to Z255
Z255F UB06955F UW06955
F0 to UB064000 to UW06400 to
F Special device F0 to F255
F255F UB066550F UW06655
V0 to UB061000 to UW06100 to
V Virtual device V0 to V255
V255F UB06355F UW06355
L0 to UW38000 to
L Link device L0 to L999
L999F UW38999
R0 to R0 to UB020000 to UW02000 to
R File device
R3999F R3999 UB05999F UW05999
UW UB000000 to UW00000 to
Read area
/UB UB00014F UW00014
UW UB000015 to UW00015 to
Write area
/UB UB00029F UW00029
UW UB000030 to UW00030 to
User area
/UB UB01999F UW01999

© Copyright Reserved Autonics Co., Ltd. 21


3 Device

3.13.2 LP-A070/LP-A104
GP device GP device
Description Bit range Word range
(UB) (UW)
UB70000 to UW7000 to
X Input device X0 to X255F X0 to X255
UB7255F UW7255
UB80000 to UW8000 to
Y Output device Y0 to Y255F Y0 to Y255
UB8255F UW8255
M0 to UB200000 to UW20000 to
M Auxiliary device M0 to M9999F
M9999 UB29999F UW29999
S Step device S0.0 to S255.99
UB400000 to UW40000 to
D Data device D0 to D9999F D0 to D9999
UB49999F UW49999
UB100000 to UW10000 to
T Timer contact T0 to T255
UB10015F UW10015
Timer present UB110000 to UW11000 to
T T0 to T255
value UB11255F UW11255
UB130000 to UW13000 to
T Timer set value T0 to T255
UB13255F UW13255
UB150000 to UW15000 to
C Counter contact C0 to C255
UB15015F UW15015
Counter present UB160000 to UW16000 to
C C0 to C255
value UB16255F UW16255
Counter set UB180000 to UW18000 to
C C0 to C255
value UB18255F UW18255
UB067000 to UW06700 to
Z Index device Z0 to Z255F Z0 to Z255
UB06955F UW06955
UB064000 to UW06400 to
F Special device F0 to F255F F0 to F255
UB066550F UW06655
UB061000 to UW06100 to
V Virtual device V0 to V255F V0 to V255
UB06355F UW06355
UW38000 to
L Link device L0 to L999F L0 to L999
UW38999
R0 to UB020000 to UW02000 to
R File device R0 to R3999
R3999F UB05999F UW05999
UW UB000000 to UW00000 to
Read area
/UB UB00014F UW00014
UW UB000015 to UW00015 to
Write area
/UB UB00029F UW00029
UW UB000030 to UW00030 to
User area
/UB UB01999F UW01999

22 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

4 Special Device

4.1 LP-S044/LP-S070

4.1.1 Bit Special Device List


4.1.1.1 System Mode
Initial GP LP
Name Function R/W
value device device
 Turns ON, when system mode is run
Run mode  Turns OFF, when system mode OFF R UB64000 F00000
changes from run to other mode
 Turns ON, when system mode is stop
Stop mode  Turns OFF, when system mode OFF R UB64001 F00001
changes from stop to other mode
 Turns ON, when system mode is pause
Pause mode  Turns OFF, when system mode OFF R UB64002 F00002
changes from pause to other mode
 Turns ON, when system mode is debug
Debug mode  Turns OFF, when system mode OFF R UB64003 F00003
changes from debug to other mode

4.1.1.2 System Signal


Initial GP LP
Name Function R/W
value device device
 Always ON, when PLC mode is run,
debug mode
Always ON OFF R UB64010 F00010
 Always OFF, when PLC mode is not
run, debug mode
 Always OFF, when PLC mode is run,
debug mode
Always OFF OFF R UB64011 F00011
 Always ON, when PLC mode is not run,
debug mode
 Turns ON only first scan, when PLC
mode is run
1 scan ON OFF R UB64012 F00012
 Turns OFF after second scan, when
PLC mode is run
 Turns OFF only first one scan, when
PLC mode is run
1 scan OFF OFF R UB64013 F00013
 Turns ON after second scan, when PLC
mode is run,
Reverse every scan, when PLC is in run
Scan pulse OFF R UB64014 F00014
mode
Time
One synchronous pulse during the RTC
synchronous OFF R UB64015 F00015
time.
pulse

© Copyright Reserved Autonics Co., Ltd. 23


4 Special Device

4.1.1.3 System Status


Initial GP LP
Name Function R/W
value device device
 Turns ON, when registering forced
While input device
operating OFF R UB64020 F00020
forced input  Turns OFF, when releasing forced input
device
While  Turns ON, when registering forced
operating output device
OFF R UB64021 F00021
forced  Turns OFF, when releasing forced
output output device
While  Turns ON, when running time-driven
running OFF R UB64024 F00024
time-driven  Turns OFF, when stopping time-driven

Back-up  Turns ON, when the backup battery


battery voltage is below the standard level
OFF R UB6402C F0002C
errors  Turns OFF, when the backup battery
(At present) voltage is over the standard level
Back-up  Retains ON, when the backup battery
battery voltage is below the standard level
OFF R UB6402D F0002D
errors  Turns OFF, when changing program or
(Retaining) mode

4.1.1.4 System Error


Initial GP LP
Name Function R/W
value device device
 Turns ON, when any of errors occurs
Error among the all defined errors OFF R UB64030 F00030
occurrence
 Turns OFF, when clearing error
 Turns ON, when errors related to
program occur
Errors  Turns OFF, when clearing program
related to error OFF R UB64034 F00034
PLC
 Turns OFF, when it stops operation
program
 Turns OFF, when changing program
 Turns OFF, when changing mode
 Turns ON, when scan time is longer
Time-driven than time-driven setting time
operation OFF R UB64035 F00035
error  Turns OFF, when scan time is shorter
than time-driven setting time
 Turns ON, when the time data is not
Time setting properly written
OFF R UB64036 F00036
error flag  Turns OFF, when the time data is
properly written by using RTC
Communicat  Turns ON, when the communication
ion errors error occurs
OFF R UB64038 F00038
(will be  Turns OFF, when the communication is
supported) properly completed
 Internal device range includes actual
I/O setting unavailable range, this bit turns ON
OFF R UB64039 F00039
value errors when checking ‘Using Internal Device’
of ‘I/O Contact Setting’ dialog box in

24 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

Initial GP LP
Name Function R/W
value device device
‘EXTENSION’ tab from atLogic’s
Parameter.
 When user does not turn OFF, this bit
maintains.

4.1.1.5 Module Status


Initial GP LP
Name Function R/W
value device device
 Turns ON, when SLOT0 parameter
Using inner uses more than one inner device
device of OFF R UB64040 F00040
SLOT 0  Turns OFF, when SLOT0 parameter
does not use inner device
 Turns ON, when SLOT1 parameter
Using inner uses more than one inner device
device of OFF R UB64041 F00041
SLOT 1  Turns OFF, when SLOT1 parameter
does not use inner device
 Turns ON, when SLOT2 parameter
Using inner uses more than one inner device
device of OFF R UB64042 F00042
SLOT 2  Turns OFF, when SLOT2 parameter
does not use inner device
 Turns ON, when SLOT3 parameter
Using inner uses more than one inner device
device of OFF R UB64043 F00043
SLOT 3  Turns OFF, when SLOT3 parameter
does not use inner device
 Turns ON, when SLOT4 parameter
Using inner uses more than one inner device
device of OFF R UB64044 F00044
SLOT 4  Turns OFF, when SLOT4 parameter
does not use inner device
 Turns ON, when SLOT5 parameter
Using inner uses more than one inner device
device of OFF R UB64045 F00045
SLOT 5  Turns OFF, when SLOT5 parameter
does not use inner device
 Turns ON, when SLOT6 parameter
Using inner uses more than one inner device
device of OFF R UB64046 F00046
SLOT 6  Turns OFF, when SLOT6 parameter
does not use inner device
 Turns ON, when SLOT7 parameter
Using inner uses more than one inner device
device of OFF R UB64047 F00047
SLOT 7  Turns OFF, when SLOT7 parameter
does not use inner device
 Turns ON, when SLOT8 parameter
Using inner uses more than one inner device
device of OFF R UB64048 F00048
SLOT 8  Turns OFF, when SLOT8 parameter
does not use inner device
 Turns ON, when SLOT9 parameter
Using inner uses more than one inner device
device of OFF R UB64049 F00049
SLOT 9  Turns OFF, when SLOT9 parameter
does not use inner device
Using inner  Turns ON, when SLOT10 parameter
OFF R UB6404A F0004A
device of uses more than one inner device

© Copyright Reserved Autonics Co., Ltd. 25


4 Special Device

Initial GP LP
Name Function R/W
value device device
SLOT 10  Turns OFF, when SLOT10 parameter
does not use inner device
 Turns ON, when SLOT11 parameter
Using inner uses more than one inner device
device of OFF R UB6404B F0004B
SLOT 11  Turns OFF, when SLOT11 parameter
does not use inner device
 Turns ON, when SLOT12 parameter
Using inner uses more than one inner device
device of OFF R UB6404C F0004C
SLOT 12  Turns OFF, when SLOT12 parameter
does not use inner device
 Turns ON, when SLOT13 parameter
Using inner uses more than one inner device
device of OFF R UB6404D F0004D
SLOT 13  Turns OFF, when SLOT13 parameter
does not use inner device
 Turns ON, when SLOT14 parameter
Using inner uses more than one inner device
device of OFF R UB6404E F0004E
SLOT 14  Turns OFF, when SLOT14 parameter
does not use inner device
 Turns ON, when SLOT15 parameter
Using inner uses more than one inner device
device of OFF R UB6404F F0004F
SLOT 15  Turns OFF, when SLOT15 parameter
does not use inner device

26 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

4.1.1.6 System Clock

Initial GP LP
Name Function R/W
value device device
10ms clock 10ms cycle of system clock occurs R UB64054 F00054
20ms clock 20ms cycle of system clock occurs R UB64055 F00055
50ms clock 50ms cycle of system clock occurs R UB64056 F00056
100ms clock 100ms cycle of system clock occurs R UB64057 F00057
200ms clock 200ms cycle of system clock occurs R UB64058 F00058
500ms clock 500ms cycle of system clock occurs R UB64059 F00059
1s clock 1s cycle of system clock occurs R UB6405A F0005A
2s clock 2s cycle of system clock occurs R UB6405B F0005B
5s clock 5s cycle of system clock occurs R UB6405C F0005C
10s clock 10s cycle of system clock occurs R UB6405D F0005D
60s clock 60s cycle of system clock occurs R UB6405E F0005E

4.1.1.7 Operation
Initial GP LP
Name Function R/W
value device device
 Turns ON, when operation result is 0
Zero flag  Turns OFF, when operation result is OFF R UB64060 F00060
not 0
 Turns ON, when carry occurs as
operation result
Carry flag OFF R UB64061 F00061
 Turns OFF, when carry does not occur
as operation result
 Turns ON, when borrow occurs as
operation result
 Turns OFF, when borrow does not
Borrow flag OFF R UB64062 F00062
occur as operation result
 Turns OFF, when changing program
or mode
 Turns ON, when operation error occurs
during scan operation
Operation  Turns OFF, when changing the other
mode except stop mode
error flag OFF R UB64068 F00068
 Turns OFF, when there is no operation
(At present) error after one scan operation
 Turns OFF, when downloading program
or re-setting power
Operation  Retains ON, when operation error
error flag occurs during scan operation OFF R UB64069 F00069
(Retaining)  Turns OFF, when resetting power

© Copyright Reserved Autonics Co., Ltd. 27


4 Special Device

4.1.1.8 System Setting


Initial LP
Name Function R/W GP device
value device
Settings for  When it turns ON, it is restricted port
full output OFF W UB64070 F00070
output and all ports becomes OFF.
restriction
 When it turns ON, it starts time-driven
Start-up activity depending on a word setting
time-driven value of time-driven run-time. OFF W UB64074 F00074
activity  When it turns OFF, it operates minimum
speed of scan as possible as it can.
 After checking ‘Operating only in run
mode’ in ‘COMMON’ tab from atLogic’s
Parameter and downloading these, it
turns RESET.
Operating  After checking ‘Operating in stop mode’
conditions in ‘COMMON’ tab from atLogic’s
for extended OFF W UB64078 F00078
Parameter and downloading these, it
module
function turns SET.
 In case of uploading from LP, it does
not read data from parameter file, it is
uploaded with the set contents from the
special register.
 When it is set, operate all undefined
filters of module in parameters as
Default filter default values. OFF W UB64079 F00079
setting flag
 When it is reset, all undefined filters of
module are operated without a filter.

4.1.1.9 Time Setting


Initial GP LP
Name Function R/W
value device device
 Set it as a special register after it is ON.
At this time, the time is not changed.
 When it turns OFF after completing
Time setting OFF W UB64080 F00080
settings, it is writing in RTC and the
time set in the special register keeps
going on.
 When it changes from OFF to ON
within the range of 0 to 29sec, the time
+/- 30 sec (second) is shifted to 00.
correction of  When it changes from OFF to ON OFF W UB64081 F00081
time setting within the range of 30 to 59sec, the
time(second) is shifted to 00 and
increased one minute

28 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

4.1.1.10 Module Setting


Initial GP LP
Name Function R/W
value device device
Settings for using When bit turns ON, inner
inner device of SLOT0 device value is written to OFF W UB64090 F00090
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT1 device value is written to OFF W UB64091 F00091
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT2 device value is written to OFF W UB64092 F00092
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT3 device value is written to OFF W UB64093 F00093
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT4 device value is written to OFF W UB64094 F00094
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT5 device value is written to OFF W UB64095 F00095
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT6 device value is written to OFF W UB64096 F00096
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT7 device value is written to OFF W UB64097 F00097
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT8 device value is written to OFF W UB64098 F00098
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT9 device value is written to OFF W UB64099 F00099
module function module register
Settings for using
When bit turns ON, inner
inner device of
device value is written to OFF W UB6409A F0009A
SLOT10 module
module register
function
Settings for using
When bit turns ON, inner
inner device of
device value is written to OFF W UB6409B F0009B
SLOT11 module
module register
function
Settings for using
When bit turns ON, inner
inner device of
device value is written to OFF W UB6409C F0009C
SLOT12 module
module register
function
Settings for using
When bit turns ON, inner
inner device of
device value is written to OFF W UB6409D F0009D
SLOT13 module
module register
function
Settings for using
When bit turns ON, inner
inner device of
device value is written to OFF W UB6409E F0009E
SLOT14 module
module register
function
Settings for using When bit turns ON, inner OFF W UB6409F F0009F
inner device of device value is written to

© Copyright Reserved Autonics Co., Ltd. 29


4 Special Device

Initial GP LP
Name Function R/W
value device device
SLOT15 module module register
function

30 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

4.1.1.11 Motion Control

(1) CH1 special device


GP LP
Name Function R/W
device device
 1: Use
Using Motion CH1 R UB64100 F100
 0: No use
Moving of Motion CH1  1: Moving
R UB64101 F101
(Accel, decel, constant)  0: Not moving

Using acceleration of  1: Accelerating


R UB64102 F102
Motion CH1  0: Not accelerating

Driving with set speed  1: Operating with set speed


R UB64103 F103
of Motion CH1  0: Not operating with set speed

Decelerating of Motion  1: Decelerating


R UB64104 F104
CH1  0: Not decelerating
 1: Dwelling
Dwelling of Motion CH1 R UB64105 F105
 0: Not dwelling
 1: Finishing drive
Finish driving of CH1 R UB64106 F106
 0: Not finishing drive
Detecting S/W lower  1: Detecting S/W lower limit
R UB64107 F107
limit of Motion CH1  0: Not detecting S/W lower limit

Detecting S/W upper  1: Detecting S/W upper limit


R UB64108 F108
limit of Motion CH1  0: Not detecting S/W upper limit

Detecting H/W lower  1: Detecting H/W upper limit


R UB64109 F109
limit of Motion CH1  0: Not detecting H/W upper limit

Detecting H/W upper  1: Detecting H/W lower limit


R UB6410A F10A
limit of Motion CH1  0: Not detecting H/W lower limit

(2) CH2 special device


GP LP
Name Function R/W
device device
 1: Use
Using Motion CH2 R UB64120 F120
 0: No use
Moving of Motion CH2  1: Moving
R UB64121 F121
(Accel, decel, constant)  0: Not moving

Using acceleration of  1: Accelerating


R UB64122 F122
Motion CH2  0: Not accelerating

Driving with set speed  1: Operating with set speed


R UB64123 F123
of Motion CH2  0: Not operating with set speed

Decelerating of Motion  1: Decelerating


R UB64124 F124
CH2  0: Not decelerating
 1: Dwelling
Dwelling of Motion CH2 R UB64125 F125
 0: Not dwelling

© Copyright Reserved Autonics Co., Ltd. 31


4 Special Device

GP LP
Name Function R/W
device device
 1: Finishing drive
Finish driving of CH2 R UB64126 F126
 0: Not finishing drive
Detecting S/W lower  1: Detecting S/W lower limit
R UB64127 F127
limit of Motion CH2  0: Not detecting S/W lower limit

Detecting S/W upper  1: Detecting S/W upper limit


R UB64128 F128
limit of Motion CH2  0: Not detecting S/W upper limit

Detecting H/W lower  1: Detecting H/W upper limit


R UB64129 F129
limit of Motion CH2  0: Not detecting H/W upper limit

Detecting H/W upper  1: Detecting H/W lower limit


R UB6412A F12A
limit of Motion CH2  0: Not detecting H/W lower limit

(3) Jog special device


GP LP
Name Function R/W
device device
 ON rising: Moving forward jog
in accelerating and constant
Jog starting forward of
speed R/W UB64501 F501
Motion CH1  OFF falling: Moving forward
jog in decelerating and stop
 ON rising: Moving backward
jog in accelerating and
Jog starting backward of
constant speed R/W UB64502 F502
Motion CH1  OFF falling: Moving backward
jog in decelerating and stop
 ON rising: Moving forward jog
in accelerating and constant
Jog starting forward of
speed R/W UB64503 F503
Motion CH2  OFF falling: Moving forward
jog in decelerating and stop
 ON rising: Moving backward
jog in accelerating and
Jog starting backward of
constant speed R/W UB64504 F504
Motion CH2  OFF falling: Moving backward
jog in decelerating and stop

32 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

4.1.2 Word Special Device


4.1.2.1 PLC Model
GP LP
Name Function R/W
Device device
PLC series and  High 2 digits = Series code
R UW6500 F0100
model code  Low 2 digits = Model code

UW6501
Displays the version of firmware by the F0101 to
System version R to
range of 5 word F0105
UW6505
Released date of the
Released year of the version R UW6506 F0106
version(Year)
Released month and date of the version.
Released date of the
Displays 4 digits, high 2 digits denotes R UW6507 F0107
version(Month, date)
month and low 2 digits denotes date.

4.1.2.2 Scan Time


GP LP
Name Function R/W
device device
Present scan Executing time for present scan
R UW6510 F0110
time (Revised in every scan)
Min. scan Min. scan time during the operation
R UW6511 F0111
time (It clears when changing PLC mode or program)
Max. scan Max. scan time during the operation
R UW6512 F0112
time (It clears when changing PLC mode or program)
Average scan
Displays average scan time R UW6513 F0113
time

4.1.2.3 Operation
GP LP
Name Function R/W
device device
Step operation
Present step which has operation error
generated error R UW6520 F0120
(At present) (It clears when changing PLC mode or program)

Step operation
First operation error step, (It clears when
generated error R UW6521 F0121
(Retaining) changing PLC mode or program)

4.1.2.4 Step
GP LP
Name Function R/W
Device device
Error step Stopped step by error at present R UW6530 F0130
Braked step during debug mode operation
Break step R UW6531 F0131
(It clears when changing PLC mode or program)

© Copyright Reserved Autonics Co., Ltd. 33


4 Special Device

4.1.2.5 Diagnosis
GP LP
Name Function R/W
device device
Self-diagnosis error code Displays self-diagnosis error code R UW6540 F0140

UW6540
Type Cause of error
(F0140)
0X0010 Watchdog error Scan time excesses watchdog timer setting value
When a certain area of memory is the
0X0020 Memory error
un-approached state.
0x0021 Battery error When battery value is below the standard level
0x0022 RTC setting error Disable to set RTC and RTC operation error
When the program contains instructions that are not able
0X0030 Program instruction error
to read and inappropriate forms.
When there is not the instructions required to process the
0X0031 Program sequence error program, such as user defined functions, label name,
END, RET and IRET, etc.
When there are some problems in settings for common
0X0040 Parameter setting error
and expansion parameters.
When it operates longer than the given time-driven run-
0X0041 Time-driven error
time.
In case, the hardware constructions are different from
Extended module setting
0X0050 previous parameter settings when applying power again
error
and changing the mode.
Extended module attaching When the extended module is attached or removed in run
0X0051
and removing error mode.
0x0060 Communication fail error When it is received NAK and data format not able to read.
When there are some problems occurred in formats
Communication format
0x0061 (excess of limited range etc.) and CHECK SUM while
error
download and upload.

34 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

4.1.2.6 Time
GP LP
Name Function R/W
device device
Time setting
Save the setting value of year as BCD Data W UW6550 F0150
(Year)
Time setting
Save the setting value of month as BCD Data W UW6551 F0151
(Month)
Time setting
Save the setting value of date as BCD Data W UW6552 F0152
(Date)
Time setting
Save the setting value of hour as BCD Data W UW6553 F0153
(Hour)
Time setting
Save the setting value of minute as BCD Data W UW6554 F0154
(Min)
Time setting
Save the setting value of second as BCD Data W UW6555 F0155
(Sec)
Save the setting value of the day of week as BCD Data
Time setting 0: Sunday, 1: Monday, 2: Tuesday,
3: Wednesday, 4: Thursday, 5: Friday, W UW6556 F0156
(Day)
6: Saturday

4.1.2.7 Input Filter Setting


GP LP
Name Function R/W
device device
Designates default input filter value by ms unit
Input filter settings When this is 0, it does not set filter value. R/W UW6560 F0160
It applies to all of non-filter setting modules.

4.1.2.8 Time-driven Run-time Settings


GP LP
Name Function R/W
device device
When time-driven setting flag is ON,
Time-driven run-time
time-driven running operates with the R/W UW6561 F0161
settings
setting time of this register.
Watchdog timer settings 0 to 65535 (Unit: ms) R/W UW6562 F0162

© Copyright Reserved Autonics Co., Ltd. 35


4 Special Device

4.1.2.9 Time-driven Interrupt


Name Function R/W GP device LP device
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW6570 F0170
settings 1 settings 1
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW6571 F0171
settings 2 settings 2
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW6572 F0172
settings 3 settings 3
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW6573 F0173
settings 4 settings 4
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW6574 F0174
settings 5 settings 5
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW6575 F0175
settings 6 settings 6
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW6576 F0176
settings 7 settings 7
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW6577 F0177
settings 8 settings 8

4.1.2.10 Motion Control

(1) CH1 Special device


Name Function R/W GP device LP device
Current position Current position of Motion CH1 R UW6460 F60
Current speed Current speed of Motion CH1 R UW6462 F62
Action No. Current action No. of Motion CH1 R UW6464 F64
Pattern No. Current pattern No. of Motion CH1 R UW6465 F65
Home position Current home position of Motion CH1 R UW6466 F66
Set speed Setting speed of Motion CH1 R UW6468 F68
Error check Error code check of Motion CH1 R UW6420 F20

(2) CH2 Special device


Name Function R/W GP device LP device
Current position Current position of Motion CH2 R UW6470 F70
Current speed Current speed of Motion CH2 R UW6472 F72
Action No. Current action No. of Motion CH2 R UW6474 F74
Pattern No. Current pattern No. of Motion CH2 R UW6475 F75
Home position Current home position of Motion CH2 R UW6476 F76
Set speed Setting speed of Motion CH2 R UW6478 F78
Error check Error code check of Motion CH2 R UW6421 F21

36 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

4.2 LP-A070/LP-A104

4.2.1 Bit Special Device


4.2.1.1 System Mode
Initial GP LP
Name Function R/W
value device device
 Turns ON, when system mode is run
Run mode  Turns OFF, when system mode OFF R UB744000 F00000
changes from run to other mode
 Turns ON, when system mode is stop
Stop mode  Turns OFF, when system mode OFF R UB744001 F00001
changes from stop to other mode
 Turns ON, when system mode is pause
Pause mode  Turns OFF, when system mode OFF R UB744002 F00002
changes from pause to other mode
 Turns ON, when system mode is debug
Debug mode  Turns OFF, when system mode OFF R UB744003 F00003
changes from debug to other mode

4.2.1.2 System Signal


Initial GP LP
Name Function R/W
value device device
 Always ON, when PLC mode is run,
debug mode
Always ON OFF R UB744010 F00010
 Always OFF, when PLC mode is not
run, debug mode
 Always OFF, when PLC mode is run,
debug mode
Always OFF OFF R UB744011 F00011
 Always ON, when PLC mode is not run,
debug mode
 Turns ON only first scan, when PLC
mode is run
1 scan ON OFF R UB744012 F00012
 Turns OFF after second scan, when
PLC mode is run
 Turns OFF only first one scan, when
PLC mode is run
1 scan OFF OFF R UB744013 F00013
 Turns ON after second scan, when PLC
mode is run,
Reverse every scan, when PLC is in run
Scan pulse OFF R UB744014 F00014
mode
Time
One synchronous pulse during the RTC
synchronous OFF R UB744015 F00015
time.
pulse

© Copyright Reserved Autonics Co., Ltd. 37


4 Special Device

4.2.1.3 System Status


Initial GP LP
Name Function R/W
value device device
While  Turns ON, when registering forced
input device
operating OFF R UB744020 F00020
 Turns OFF, when releasing forced input
forced input device
While  Turns ON, when registering forced
operating output device
OFF R UB744021 F00021
forced  Turns OFF, when releasing forced
output device
output
While
 Turns ON, when running time-driven
running OFF R UB744024 F00024
 Turns OFF, when stopping time-driven
time-driven
Back-up  Turns ON, when the backup battery
battery voltage is below the standard level
OFF R UB744025 F00025
errors  Turns OFF, when the backup battery
voltage is over the standard level
(At present)
Back-up  Retains ON, when the backup battery
battery voltage is below the standard level UB74402
OFF R F0002C
errors  Turns OFF, when changing program or C
mode
(Retaining)

4.2.1.4 System Error


Initial GP LP
Name Function R/W
value device device
 Turns ON, when any of errors occurs
Error
among the all defined errors OFF R UB744030 F00030
occurrence  Turns OFF, when clearing error
 Turns ON, when errors related to
Errors program occur
 Turns OFF, when clearing program
related to
error OFF R UB744034 F00034
PLC  Turns OFF, when it stops operation
program  Turns OFF, when changing program
 Turns OFF, when changing mode
Time-driven  Turns ON, when scan time is longer
than time-driven setting time
operation OFF R UB744035 F00035
 Turns OFF, when scan time is shorter
error than time-driven setting time
 Turns ON, when the time data is not
Time setting properly written
OFF R UB744036 F00036
error flag  Turns OFF, when the time data is
properly written by using RTC
Communicat  Turns ON, when the communication
ion errors error occurs
OFF R UB744038 F00038
(will be  Turns OFF, when the communication is
supported) properly completed

38 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

Initial GP LP
Name Function R/W
value device device
 Internal device range includes actual
unavailable range, this bit turns ON
when checking ‘Using Internal Device’
I/O setting of ‘I/O Contact Setting’ dialog box in
‘EXTENSION’ tab from atLogic’s OFF R UB744039 F00039
value errors
Parameter.
 When user does not turn OFF, this bit
maintains.
 Turns ON, when watch dog timer
Watch dog occurs UB74403
OFF R F0003A
timer error  Turns OFF, when watch dog timer error A
clear

4.2.1.5 Module Status


Initial GP LP
Name Function R/W
value device device
Using inner  Turns ON, when SLOT0 parameter
uses more than one inner device
device of OFF R UB744040 F00040
 Turns OFF, when SLOT0 parameter
SLOT 0 does not use inner device
Using inner  Turns ON, when SLOT1 parameter
uses more than one inner device
device of OFF R UB744041 F00041
 Turns OFF, when SLOT1 parameter
SLOT 1 does not use inner device
Using inner  Turns ON, when SLOT2 parameter
uses more than one inner device
device of OFF R UB744042 F00042
 Turns OFF, when SLOT2 parameter
SLOT 2 does not use inner device
Using inner  Turns ON, when SLOT3 parameter
uses more than one inner device
device of OFF R UB744043 F00043
 Turns OFF, when SLOT3 parameter
SLOT 3 does not use inner device
Using inner  Turns ON, when SLOT4 parameter
uses more than one inner device
device of OFF R UB744044 F00044
 Turns OFF, when SLOT4 parameter
SLOT 4 does not use inner device
Using inner  Turns ON, when SLOT5 parameter
uses more than one inner device
device of OFF R UB744045 F00045
 Turns OFF, when SLOT5 parameter
SLOT 5 does not use inner device
Using inner  Turns ON, when SLOT6 parameter
uses more than one inner device
device of OFF R UB744046 F00046
 Turns OFF, when SLOT6 parameter
SLOT 6 does not use inner device
Using inner  Turns ON, when SLOT7 parameter
uses more than one inner device
device of OFF R UB744047 F00047
 Turns OFF, when SLOT7 parameter
SLOT 7 does not use inner device
 Turns ON, when SLOT8 parameter
Using inner
uses more than one inner device OFF R UB744048 F00048
device of  Turns OFF, when SLOT8 parameter

© Copyright Reserved Autonics Co., Ltd. 39


4 Special Device

Initial GP LP
Name Function R/W
value device device
SLOT 8 does not use inner device

Using inner  Turns ON, when SLOT9 parameter


uses more than one inner device
device of OFF R UB744049 F00049
 Turns OFF, when SLOT9 parameter
SLOT 9 does not use inner device
Using inner  Turns ON, when SLOT10 parameter
uses more than one inner device
device of OFF R UB74404A F0004A
 Turns OFF, when SLOT10 parameter
SLOT 10 does not use inner device
Using inner  Turns ON, when SLOT11 parameter
uses more than one inner device
device of OFF R UB74404B F0004B
 Turns OFF, when SLOT11 parameter
SLOT 11 does not use inner device
Using inner  Turns ON, when SLOT12 parameter
uses more than one inner device
device of OFF R UB74404C F0004C
 Turns OFF, when SLOT12 parameter
SLOT 12 does not use inner device
Using inner  Turns ON, when SLOT13 parameter
uses more than one inner device
device of OFF R UB74404D F0004D
 Turns OFF, when SLOT13 parameter
SLOT 13 does not use inner device
Using inner  Turns ON, when SLOT14 parameter
uses more than one inner device
device of OFF R UB74404E F0004E
 Turns OFF, when SLOT14 parameter
SLOT 14 does not use inner device
Using inner  Turns ON, when SLOT15 parameter
uses more than one inner device
device of OFF R UB74404F F0004F
 Turns OFF, when SLOT15 parameter
SLOT 15 does not use inner device

40 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

4.2.1.6 System Clock

Initial LP
Name Function R/W GP device
value device
10ms clock 10ms cycle of system clock occurs R UB744050 F00050
20ms clock 20ms cycle of system clock occurs R UB744051 F00051
50ms clock 50ms cycle of system clock occurs R UB744052 F00052
100ms clock 100ms cycle of system clock occurs R UB744053 F00053
200ms clock 200ms cycle of system clock occurs R UB744054 F00054
500ms clock 500ms cycle of system clock occurs R UB744055 F00055
1s clock 1s cycle of system clock occurs R UB744056 F00056
2s clock 2s cycle of system clock occurs R UB744057 F00057
5s clock 5s cycle of system clock occurs R UB744058 F00058
10s clock 10s cycle of system clock occurs R UB744059 F00059
60s clock 60s cycle of system clock occurs R UB74405A F0005A

© Copyright Reserved Autonics Co., Ltd. 41


4 Special Device

4.2.1.7 Operation
Initial GP LP
Name Function R/W
value device device
 Turns ON, when operation result is 0
Zero flag  Turns OFF, when operation result is OFF R UB744060 F00060
not 0
 Turns ON, when carry occurs as
operation result
Carry flag OFF R UB744061 F00061
 Turns OFF, when carry does not occur
as operation result
 Turns ON, when borrow occurs as
operation result
 Turns OFF, when borrow does not
Borrow flag OFF R UB744062 F00062
occur as operation result
 Turns OFF, when changing program
or mode
 Turns ON, when operation error occurs
during scan operation
Operation  Turns OFF, when changing the other
mode except stop mode
error flag OFF R UB744068 F00068
 Turns OFF, when there is no operation
(At present) error after one scan operation
 Turns OFF, when downloading program
or re-setting power
Operation  Retains ON, when operation error
error flag occurs during scan operation OFF R UB744069 F00069
(Retaining)  Turns OFF, when resetting power

42 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

4.2.1.8 System Setting


Initial GP
Name Function R/W LP device
value device
Settings for
 When it turns ON, it is restricted port
full output OFF W UB744070 F00070
output and all ports becomes OFF.
restriction
Settings for
 When it turns ON, it is restricted output
output reset OFF W UB744071 F00071
reset
restriction
 When it turns ON, it starts time-driven
Start-up activity depending on a word setting
time-driven value of time-driven run-time. OFF W UB744074 F00074
activity  When it turns OFF, it operates minimum
speed of scan as possible as it can.
Change
time-driven
 When it turns ON, it changes the time
activity of time-driven activity operation OFF W UB744075 F00075
operating
time
Change
time-driven
 When it turns ON, it changes the time
activity OFF W UB744076 F00076
of time-driven activity interrupt
interrupt
time
Remain  Turns ON, when output status remains
output status  Turns OFF, when output status does OFF W UB744077 F00077
not remain
while stop
 After checking ‘Operating only in run
mode’ in ‘COMMON’ tab from atLogic’s
Parameter and downloading these, it
Operating turns RESET.
conditions  After checking ‘Operating in stop mode’
in ‘COMMON’ tab from atLogic’s
for extended OFF W UB744078 F00078
Parameter and downloading these, it
module turns SET.
function  In case of uploading from LP, it does
not read data from parameter file, it is
uploaded with the set contents from the
special register.
 When it is set, operate all undefined
filters of module in parameters as
Default filter
default values. OFF W UB744079 F00079
setting flag  When it is reset, all undefined filters of
module are operated without a filter.

© Copyright Reserved Autonics Co., Ltd. 43


4 Special Device

4.2.1.9 Time Setting


Initial GP LP
Name Function R/W
value device device
 Set it as a special register after it is ON.
At this time, the time is not changed.
 When it turns OFF after completing
Time setting OFF W UB64080 F00080
settings, it is writing in RTC and the
time set in the special register keeps
going on.
 When it changes from OFF to ON
within the range of 0 to 29sec, the time
+/- 30 sec (second) is shifted to 00.
correction of  When it changes from OFF to ON OFF W UB64081 F00081
time setting within the range of 30 to 59sec, the
time(second) is shifted to 00 and
increased one minute

4.2.1.10 Module Setting

Initial GP LP
Name Function R/W
value device device

Settings for using When bit turns ON, inner


inner device of SLOT0 device value is written to OFF W UB744090 F00090
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT1 device value is written to OFF W UB744091 F00091
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT2 device value is written to OFF W UB744092 F00092
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT3 device value is written to OFF W UB744093 F00093
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT4 device value is written to OFF W UB744094 F00094
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT5 device value is written to OFF W UB744095 F00095
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT6 device value is written to OFF W UB744096 F00096
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT7 device value is written to OFF W UB744097 F00097
module function module register

44 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

Initial GP LP
Name Function R/W
value device device

Settings for using When bit turns ON, inner


inner device of SLOT8 device value is written to OFF W UB744098 F00098
module function module register
Settings for using When bit turns ON, inner
inner device of SLOT9 device value is written to OFF W UB744099 F00099
module function module register
Settings for using
When bit turns ON, inner
inner device of UB74409
device value is written to OFF W F0009A
SLOT10 module A
module register
function
Settings for using
When bit turns ON, inner
inner device of UB74409
device value is written to OFF W F0009B
SLOT11 module B
module register
function
Settings for using
When bit turns ON, inner
inner device of UB74409
device value is written to OFF W F0009C
SLOT12 module C
module register
function
Settings for using
When bit turns ON, inner
inner device of UB74409
device value is written to OFF W F0009D
SLOT13 module D
module register
function
Settings for using
When bit turns ON, inner
inner device of UB74409
device value is written to OFF W F0009E
SLOT14 module E
module register
function
Settings for using
When bit turns ON, inner
inner device of
device value is written to OFF W UB74409F F0009F
SLOT15 module
module register
function

© Copyright Reserved Autonics Co., Ltd. 45


4 Special Device

4.2.1.11 Motion control

(1) CH1 special device


GP LP
Name Function R/W
device device
 1: Use
Using Motion CH1 R UB744100 F00100
 0: No use
Moving of Motion CH1  1: Moving
R UB744101 F00101
(Accel, decel, constant)  0: Not moving

Using acceleration of  1: Accelerating


R UB744102 F00102
Motion CH1  0: Not accelerating

Driving with set speed  1: Operating with set speed


R UB744103 F00103
of Motion CH1  0: Not operating with set speed

Decelerating of Motion  1: Decelerating


R UB744104 F00104
CH1  0: Not decelerating
 1: Dwelling
Dwelling of Motion CH1 R UB744105 F00105
 0: Not dwelling
 1: Finishing drive
Finish driving of CH1 R UB744106 F00106
 0: Not finishing drive
Detecting S/W lower  1: Detecting S/W lower limit
R UB744107 F00107
limit of Motion CH1  0: Not detecting S/W lower limit

Detecting S/W upper  1: Detecting S/W upper limit


R UB744108 F00108
limit of Motion CH1  0: Not detecting S/W upper limit

Detecting H/W lower  1: Detecting H/W upper limit


R UB744109 F00109
limit of Motion CH1  0: Not detecting H/W upper limit

Detecting H/W upper  1: Detecting H/W lower limit UB74410


R F0010A
limit of Motion CH1  0: Not detecting H/W lower limit A

Motion CH 1 usage  1: Error occurs UB74411


R F00110
error  0: Not error occurs 0
Motion CH 1  1: Error occurs UB74411
R F0011F
emergency stop error  0: No error F
MTSRS action  1: Exit action list UB74440
designated flag R F00400
 0: Not exit action list 0
(Action list exit)
MTSRS action  1: Group exit UB74440
designated flag R F00401
 0: Not group exit 1
(group exit)

46 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

(2) CH2 special device


LP
Name Function R/W GP device
device
 1: Use
Using Motion CH2 R UB744120 F00120
 0: No use
Moving of Motion CH2  1: Moving
R UB744121 F00121
(Accel, decel, constant)  0: Not moving

Using acceleration of  1: Accelerating


R UB744122 F00122
Motion CH2  0: Not accelerating

Driving with set speed  1: Operating with set speed


R UB744123 F00123
of Motion CH2  0: Not operating with set speed

Decelerating of Motion  1: Decelerating


R UB744124 F00124
CH2  0: Not decelerating
 1: Dwelling
Dwelling of Motion CH2 R UB744125 F00125
 0: Not dwelling
 1: Finishing drive
Finish driving of CH2 R UB744126 F00126
 0: Not finishing drive
Detecting S/W lower  1: Detecting S/W lower limit
R UB744127 F00127
limit of Motion CH2  0: Not detecting S/W lower limit

Detecting S/W upper  1: Detecting S/W upper limit


R UB744128 F00128
limit of Motion CH2  0: Not detecting S/W upper limit
 1: Detecting H/W upper limit
Detecting H/W lower
 0: Not detecting H/W upper R UB744129 F00129
limit of Motion CH2 limit
Detecting H/W upper  1: Detecting H/W lower limit
R UB74412A F0012A
limit of Motion CH2  0: Not detecting H/W lower limit

Motion CH 2 usage  1: Error occurs


R UB744130 F00130
error  0: Not error occurs
Motion CH 2  1: Error occurs
R UB74413F F0013F
emergency stop error  0: No error
MTSRS action  1: Exit action list
designated flag R UB744402 F00402
 0: Not exit action list
(Action list exit)
MTSRS action  1: Group exit
designated flag R UB744403 F00403
 0: Not group exit
(group exit)

© Copyright Reserved Autonics Co., Ltd. 47


4 Special Device

(3) Jog special device


GP LP
Name Function R/W
device device
 ON rising: Moving forward jog
in accelerating and constant
Jog starting forward of
speed R/W UB744501 F00500
Motion CH1  OFF falling: Moving forward
jog in decelerating and stop
 ON rising: Moving backward
jog in accelerating and
Jog starting backward of
constant speed R/W UB744502 F00501
Motion CH1  OFF falling: Moving backward
jog in decelerating and stop
 ON rising: Moving forward jog
in accelerating and constant
Jog starting forward of
speed R/W UB744503 F00502
Motion CH2  OFF falling: Moving forward
jog in decelerating and stop
 ON rising: Moving backward
jog in accelerating and
Jog starting backward of
constant speed R/W UB744504 F00503
Motion CH2  OFF falling: Moving backward
jog in decelerating and stop

4.2.1.12 High-speed Counter

(1) CH1 special device


GP LP
Name Function R/W
device device
 1: Use
Using high-speed counter CH1 R UB744300 F00300
 0: No use
High-speed counter CH1 up  1: Use
R UB744301 F00301
counting or down counting status  0: No use
Matching high-speed counter CH1  1: Match
R UB744303 F00303
with match value 1  0: Not match
Matching high-speed counter CH1  1: Match
with match value 2 R UB744304 F00304
 0: Not match
Matching high-speed counter CH1  1: Match
with match value 3 R UB744305 F00305
 0: Not match
Overflow status of high-speed  1: Overflow
R UB744308 F00308
counter CH 1 present value  0: Not overflow

48 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

(2) CH2 special device


GP LP
Name Function R/W
device device
 1: Use
Using high-speed counter CH2 R UB744310 F00310
 0: No use
High-speed counter CH2 up  1: Use
R UB744311 F00311
counting or down counting status  0: No use
Matching high-speed counter CH2  1: Match
R UB744313 F00313
with match value 1  0: Not match
Matching high-speed counter CH2  1: Match
with match value 2 R UB744314 F00314
 0: Not match
Matching high-speed counter CH2  1: Match
with match value 3 R UB744315 F00315
 0: Not match
Overflow status of high-speed  1: Overflow
R UB744318 F00318
counter CH2 present value  0: Not overflow

© Copyright Reserved Autonics Co., Ltd. 49


4 Special Device

4.2.2 Word Special Device


4.2.2.1 PLC Model
GP LP
Name Function R/W
device device
PLC series and model  High 2 digits = Series code
R UW74500 F100
code  Low 2 digits = Model code
Displays the version of firmware by the
System version R UW74501 F101
range of 5 word
Released date of the
Released year of the version R UW74506 F106
version (Year)
Released month and date of the version.
Released date of the
Displays 4 digits, high 2 digits denotes R UW74507 F107
version (Month, date)
month and low 2 digits denotes date.

4.2.2.2 Scan Time


GP LP
Name Function R/W
device device
Present scan Executing time for present scan
R UW74510 F110
time (Revised in every scan)
Min. scan Min. scan time during the operation
R UW74511 F111
time (It clears when changing PLC mode or program)
Max. scan Max. scan time during the operation
R UW74512 F112
time (It clears when changing PLC mode or program)
Average scan
Displays average scan time R UW74513 F113
time
Scan time
Counts and displays every scan time R UW74514 F114
count

4.2.2.3 Operation
GP LP
Name Function R/W
device device
Step operation
Present step which has operation error
generated error R UW74520 F120
(At present) (It clears when changing PLC mode or program)

Step operation
First operation error step, (It clears when
generated error R UW74521 F121
(Retaining) changing PLC mode or program)

4.2.2.4 Step
GP LP
Name Function R/W
device device
Error step Stopped step by error at present R UW74530 F130
Braked step during debug mode operation
Break step R UW74531 F131
(It clears when changing PLC mode or program)

50 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

4.2.2.5 Diagnosis
GP LP
Name Function R/W
device device
Self-diagnosis error code Displays self-diagnosis error code R UW74540 F140

UW74540
Type Cause of error
(F140)
0X0010 Watchdog error Scan time excesses watchdog timer setting value
When a certain area of memory is the un-approached
0X0020 Memory error
state.
0x0021 Battery error When battery value is below the standard level
0x0022 RTC setting error Disable to set RTC and RTC operation error
When the program contains instructions that are not able
0X0030 Program instruction error
to read and inappropriate forms.
When there is not the instructions required to process the
0X0031 Program sequence error program, such as user defined functions, label name,
END, RET and IRET, etc.
When there are some problems in settings for common
0X0040 Parameter setting error
and expansion parameters.
When it operates longer than the given time-driven run-
0X0041 Time-driven error
time.
In case, the hardware constructions are different from
Extended module setting
0X0050 previous parameter settings when applying power again
error
and changing the mode.
Extended module attaching When the extended module is attached or removed in
0X0051
and removing error run mode.
When it is received NAK and data format not able to
0x0060 Communication fail error
read.
When there are some problems occurred in formats
Communication format
0x0061 (excess of limited range etc.) and CHECK SUM while
error
download and upload.

4.2.2.6 Time
GP LP
Name Function R/W
device device
Time setting
Save the setting value of year as BCD Data W UW6550 F0150
(Year)
Time setting
Save the setting value of month as BCD Data W UW6551 F0151
(Month)
Time setting
Save the setting value of date as BCD Data W UW6552 F0152
(Date)
Time setting
Save the setting value of hour as BCD Data W UW6553 F0153
(Hour)

© Copyright Reserved Autonics Co., Ltd. 51


4 Special Device

GP LP
Name Function R/W
device device
Time setting
Save the setting value of minute as BCD Data W UW6554 F0154
(Min)
Time setting
Save the setting value of second as BCD Data W UW6555 F0155
(Sec)
Save the setting value of the day of week as BCD Data
Time setting 0: Sunday, 1: Monday, 2: Tuesday,
3: Wednesday, 4: Thursday, 5: Friday, W UW6556 F0156
(Day)
6: Saturday

4.2.2.7 Input Filter Setting


GP LP
Name Function R/W
device device
Designates default input filter value by ms unit
Input filter settings When this is 0, it does not set filter value. R/W UW74560 F160
It applies to all of non-filter setting modules.

4.2.2.8 Time-driven Run-time Setting


GP LP
Name Function R/W
device device
When time-driven setting flag is ON, time-
Time-driven
driven running operates with the setting time R/W UW74561 F161
run-time settings
of this register.
Watchdog timer
0 to 65535 (Unit: ms) R/W UW74562 F162
settings

4.2.2.9 Time-driven Interrupt

GP LP
Name Function R/W
device device
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW74570 F170
settings 1 settings 1
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW74571 F171
settings 2 settings 2
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW74572 F172
settings 3 settings 3
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW74574 F174
settings 4 settings 4
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW74575 F175
settings 5 settings 5
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW74576 F176
settings 6 settings 6
Time-driven interrupt cycle Time-driven interrupt cycle
R/W UW74577 F177
settings 7 settings 7
Time-driven interrupt cycle Time-driven interrupt cycle R/W UW74578 F178

52 © Copyright Reserved Autonics Co., Ltd.


4 Special Device

GP LP
Name Function R/W
device device
settings 8 settings 8

4.2.2.10 Motion Control

(1) CH1 special device


GP LP
Name Function R/W
device device
Current position Current position of Motion CH1 R UW74460 F60
Current speed Current speed of Motion CH1 R UW74462 F62
Action No. Current action No. of Motion CH1 R UW74464 F64
Pattern No. Current pattern No. of Motion CH1 R UW74465 F65
Home position Current home position of Motion CH1 R UW74466 F66
Set speed Setting speed of Motion CH1 R UW74468 F68
Error check Error code check of Motion CH1 R UW74420 F20

(2) CH2 special device


GP LP
Name Function R/W
device device
Current position Current position of Motion CH2 R UW74470 F70
Current speed Current speed of Motion CH2 R UW74472 F72
Action No. Current action No. of Motion CH2 R UW74474 F74
Pattern No. Current pattern No. of Motion CH2 R UW74475 F75
Home position Current home position of Motion CH2 R UW74476 F76
Set speed Setting speed of Motion CH2 R UW74478 F78
Error check Error code check of Motion CH2 R UW74421 F21

© Copyright Reserved Autonics Co., Ltd. 53


4 Special Device

4.2.2.11 High-speed Counter

(1) CH1 special device


GP LP
Name Function R/W
device device
1 phase: 1, 2
Current position
2 phase: 1,2,3,4 R UW74590 F190
counting mode
No use: -1
Current counting High-speed counter CH1 current counting
R UW74592 F192
value value
Match value 1 High-speed counter CH1 match value 1 R UW74596 F196
Match value 2 High-speed counter CH1 match value 2 R UW74598 F198
0: NO USE (Normal input),
Current phase 1: CH1 - phase1, 2: CH2 - phase1, R UW74612 F212
type 3: CH1,CH2 - phase1, 4: phase2

The number of total pulse input after


counting starts (64 bit)
CH1 current Current total counting value =
total counting Total counting value + Current HSCNT R UW74620 F220
value counting value
Initializes when using HSRST instruction
or replacing PLC program

(2) CH2 special device


GP LP
Name Function R/W
device device
1 phase: 1, 2
Current position
2 phase: 1,2,3,4 R UW74591 F191
counting mode
No use: -1
Current counting High-speed counter CH2 current counting
R UW74602 F202
value value
Match value 1 High-speed counter CH2 match value 1 R UW74606 F206
Match value 2 High-speed counter CH2 match value 2 R UW74608 F208
The number of total pulse input after
counting starts (64 bit)
CH2 current Current total counting value =
total counting Total counting value + Current HSCNT R UW74628 F228
value counting value
Initializes when using HSRST instruction
or replacing PLC program

54 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5 Instruction

5.1 Structures of Instruction Name


The structure of instruction name is divided into three parts and each part represents data type,
instruction name, and data processing method respectively. The data type is usually located in
front of instruction name, and the data processing method is located after the instruction
name(Limited to a few of them).

5.1.1 Structure by Data Type


(1) By data size
1) Bit data type instruction
It has an instruction structure of Bxxxx after Bit’s B.
Ex) BMOV, BMOVL, BMOVG .… etc.
2) Nibble data type instruction (4bit)
It has an instruction structure of Nxxxx after Nibble’s N.

3) Half word data type instruction (8bit)


It has an instruction structure of Hxxxx after Half Word’s H.

4) Word data type instruction (1word)


It has an instruction structure of xxxx without Word name.
Ex) MOV, MOVL, MOVG .… etc.
5) Double word data instruction (2word)
It has an instruction structure of Dxxx after Double word’s D.
Ex) DMOV, DMOVL, DMOVG …. etc.
6) User-defined data type instruction
It has an instruction structure of Axxxx, after Any bit’s A.
Ex) AOR, AAND, AXOR, …. etc.
(2) By data sign
There are signed and unsigned data types, and the former is typically used with omitting its
name. On the other hand, the latter is used with “U” and “U” is positioned in the far last part
of the instruction name.
If there is name according to data processing, in case of (xxxL, xxxG) it is placed to the back.
For further details, refer to ‘5.1.1.1 Structure by Data Processing’.
 If there is no data processing method part: MULU, ADDU, SUBU, ….. etc.

 If there is a data processing method part: MULLU, ADDLU, SUBLU ….. etc.

(3) By BCD data


BCD data has an instruction structure of xxxB after BCD’s B.
Be sure that the data processing method part (List, Group) is always positioned after the
BCD part.
 If there is no data processing method name. (1: 1 process): ADDB, MULB, SUBB, …..
etc.
 If the data processing method name is ‘List’: ADDBL, MULBL, SUBBL, …. etc.

© Copyright Reserved Autonics Co., Ltd. 55


5 Instruction

5.1.1.1 Structure by Data Processing

(1) 1:1 processing instruction


It has an instruction structure of xxx with omitting the name.
Ex) MOV, …
(2) 1:N processing instruction

It has an instruction structure of xxxL after List’s “L”.


Ex) MOVL, ….
(3) N:N processing instruction

It has an instruction structure of xxxG after Group’s “G”,


Ex) MOVG, …

Operand
 S: Represents source device
 D: Represents destination device
 N: Represents the number of device

56 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.2 Basic Instruction List

5.2.1 Non Processing Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

NOP 1 2 10.25 2.5 85

5.2.2 Contact Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

LOAD 1 1 10.625 2.5 86

LOADN 1 1 10.25 2.5 87

LOADP 2 1 19.8 5 88

LOADF 2 1 19.8 5 89

AND 1 1 10.3 2.5 90

ANDN 1 1 10.5 2.5 91

ANDP 2 1 20.28 5 92

ANDF 2 1 20.28 5 93

ANDL 1 0 20.2 5 94

OR 1 1 10 2.5 95

© Copyright Reserved Autonics Co., Ltd. 57


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

ORN 1 1 10 2.5 96

ORP 2 1 19 5 97

ORF 2 1 19 5 98

ORL 1 4 19 5 99

5.2.3 Output Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

OUT 1 1 10.625 2.5 100

OUT
1 1 10.8 2.5 101
Syyy.xx

OUTP 2 1 18.4 5 102

OUTF 2 1 18.4 5 103

SET 1 1 10 2.5 104

SET Syyy.xx 1 1 10 2.5 105

RST 1 1 10 2.5 106

58 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.2.4 Reversal Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

28.12 /
ALT 3 1 4.125 107
25.0

NOT 1 0 10.25 2.5 108

5.2.5 Stack Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

MPUSH 1 0 10.25 2.5 109

MLOAD 1 0 10.25 2.5 110

MPOP 1 0 10.25 2.5 111

5.2.6 Exit Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

MPUSH 1 0 10.25 2.5 109

© Copyright Reserved Autonics Co., Ltd. 59


5 Instruction

5.3 Application Instruction list

5.3.1 Count Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

CTU 5 2 29.5 8.75 113

CTD 5 2 29.5 8.75 114

CTUD 5 2 32.0 9.375 115

CTR 5 2 29.5 8.75 116

5.3.2 Timer Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

TON 5 2 28.5 8.75 117

TOFF 5 2 27.5 8.125 118

TMR 5 2 27.5 7.5 119

TMON 5 2 27.5 8.125 120

TRTG 5 2 739.0 8.75 121

60 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.3.3 Control Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

JMP 3 1 28.5 8.75 122

LABEL 3 1 10.25 2.5 123

FCALL 3 1 28.5 8.75 124

FUNC 3 1 28.5 8.75 125

5.3.4 Branch Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

CALL 3 1 28.5 8.75 126

SUBRT 3 1 28.5 8.75 127

RET 1 0 10.25 2.5 128

5.3.5 Loop Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

FOR 3 1 28.5 8.75 129

NEXT 1 0 10.25 2.5 130

© Copyright Reserved Autonics Co., Ltd. 61


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

BREAK 1 0 10.25 2.5 131

5.3.6 Master Control Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

MCS 2 1 28.5 8.75 132

MCR 2 1 28.5 8.75 133

5.3.7 Interrupt Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

EI 1 0 10.25 2.5 134

DI 1 0 10.25 2.5 135

ETI 1 1 10.25 2.5 136

EEI 1 1 10.25 2.5 137

DTI 1 1 10.25 2.5 138

DEI 1 1 10.25 2.5 139

TINT 1 1 10.25 2.5 140

62 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

EINT 1 1 10.25 2.5 141

IRET 1 0 10.25 2.5 142

5.3.8 Watchdog Timer


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

WDT 1 0 10.25 2.5 143

© Copyright Reserved Autonics Co., Ltd. 63


5 Instruction

5.3.9 Input Comparison Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

LOAD= 5 2 26.87 8.125 144

LOAD> 5 2 26.87 8.75 145

LOAD< 5 2 26.87 8.75 146

LOAD<> 5 2 26.87 8.75 147

LOAD>= 5 2 26.87 8.75 148

LOAD<= 5 2 26.87 8.75 149

DLOAD= 5 2 29.0 8.125 150

DLOAD> 5 2 29.0 8.75 151

DLOAD< 5 2 29.0 8.75 152

DLOAD<> 5 2 29.0 8.75 153

DLOAD>= 5 2 29.0 9.375 154

DLOAD<= 5 2 29.0 9.375 155

AND= 5 2 28.5 10 156

AND> 5 2 28.5 10 157

64 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

AND< 5 2 28.5 10 158

AND<> 5 2 28.5 10.625 159

AND>= 5 2 28.5 10.625 160

AND<= 5 2 28.5 10.625 161

DAND= 5 2 29.5 10.625 162

DAND> 5 2 29.5 10.625 163

DAND< 5 2 29.5 10.625 164

DAND<> 5 2 29.5 10.625 165

DAND>= 5 2 29.5 10.635 166

DAND<= 5 2 29.5 10.625 167

OR= 5 2 28.0 10.625 168

OR> 5 2 28.0 10.625 169

OR< 5 2 28.0 10.625 170

OR<> 5 2 28.0 10.625 171

© Copyright Reserved Autonics Co., Ltd. 65


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

OR>= 5 2 28.0 10.625 172

OR<= 5 2 28.0 10.625 173

DOR= 5 2 29.0 10.625 174

DOR> 5 2 29.0 10.625 175

DOR< 5 2 29.0 10.625 176

DOR<> 5 2 29.0 10.625 177

DOR>= 5 2 29.0 10.625 178

DOR<= 5 2 29.0 10.625 179

66 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.3.10 Comparison Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

CMP 7 3 49.35 / 34.3 11.375 180

DCMP 7 3 51.1 / 35.35 12.25 181

when H: 3, when H: 3,
54.6 16.625
when H: 15, when H: 15,
74.2 17.5
ACMP 7 4 when H: 30, when H: 30, 182
94.5 21
when not when not
running, running,
39.2 16.625
when N: 2, when N: 2,
62.1 18
when N: 4, when N: 4,
85.5 21.375
when N: 8, when N: 8,
CMPL 9 4 124.2 29.25 183
when N: 16, when N: 16,
211.5 45
when not when not
running, running,
41.85 13.5
when N: 2, when N: 2,
66.6 22.5
when N: 4, when N: 4,
88.2 25.875
when N: 8, when N: 8,
DCMPL 9 4 129.6 32.625 184
when N: 16, when N: 16,
214.2 39.375
when not when not
running, running,
43.2 15.75

BWCMP 9 4 49.35 11.375 185

DBWCMP 9 4 51.1 12.25 187

© Copyright Reserved Autonics Co., Ltd. 67


5 Instruction

5.3.11 Transmission Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

BMOV 5 2 19.5 / 19.5 6.875 189

MOV 5 2 19.5 / 19.5 7.5 190

22.35 /
DMOV 5 2 8.75 191
22.35

when N: 2, when N: 2,
35 13.125
when N: 4, when N: 4,
37.8 16.625
when N: 8, when N: 8,
BMOVL 7 3 44.1 20.125 192
when N: 16, when N:
56 16, 16.625
when not when not
running, running,
32.9 9.625
when N: 2, when N: 2,
29.4 9.625
when N: 4, when N: 4,
31.5 12.25
when N: 8, when N: 8,
MOVL 7 3 33.6 13.125 193
when N: 16, when N:
37.8 16, 15.75
when not when not
running, running,
27.3 9.625
when N: 2, when N: 2,
33.32 10.5
when N: 4, when N: 4,
35.35 12.25
when N: 8, when N: 8,
DMOVL 7 3 38.5 14 194
when N: 16, when N:
45.5 16, 18.375
when not when not
running, running,
31.5 9.625
when N: 2, when N: 2,
37.1 12.25
when N: 4, when N: 4,
BMOVG 7 3 195
41.6 13.125
when N: 8, when N: 8,
449.7 16.625

68 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104
when N: 16, when N:
65.8 16, 18.375
when not when not
running, running,
32.9 11.375
when N: 2, when N: 2,
27.3 10.5
when N: 4, when N: 4,
28.35 11.375
when N: 8, when N: 8,
MOVG 7 3 30.1 13.125 196
when N: 16, when N:
37.1 16, 15.75
when not when not
running, running,
26.6 9.625
when N: 2, when N: 2,
28.35 10.5
when N: 4, when N: 4,
30.38 11.375
when N: 8, when N: 8,
DMOVG 7 3 33.32 13.125 197
when N: 16, when N:
39.2 16, 14
when not when not
running, running,
26.6 8.75

BCMOV 5 2 19.5 / 19.5 6.875 198

CMOV 5 2 19.5 / 19.5 7.5 199

22.35 /
DCMOV 5 2 8.75 200
22.35

© Copyright Reserved Autonics Co., Ltd. 69


5 Instruction

5.3.12 Exchange Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

XCH 5 2 19.5 / 18.0 6.875 201

DXCH 5 2 20.1 / 18.0 7.5 202

AXCH 7 3 25.45 9.2 203

SWAP 3 1 12.9 / 11.9 4.5 204

13.35 /
DSWAP 3 1 4.875 205
12.3

5.3.13 Rotation Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

ROR 5 2 25.5 / 21.5 8.125 206

DROR 5 2 25.5 / 21.5 8.125 207

AROR 7 3 30.24 9.57 208

RORC 5 2 27 / 21.5 8.75 209

DRORC 5 2 27 / 21.5 8.75 210

ARORC 7 3 30.24 9.57 211

ROL 5 2 25.5 / 21.5 8.125 212

70 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

DROL 5 2 25.5 / 21.5 8.125 213

AROL 7 3 25.45 9.2 214

ROLC 5 2 27 / 21.5 8.75 215

DROLC 5 2 27 / 21.5 8.75 216

AROLC 7 3 30.24 9.57 217

© Copyright Reserved Autonics Co., Ltd. 71


5 Instruction

5.3.14 Movement Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

SFTR 9 2 38.75 10.55 218

43.2 /
ASFTR 9 3 12.375 219
35.55

SFTL 9 2 38.75 10.55 220

43.2 /
ASFTL 9 3 12.375 221
35.55

when N1: when N1:


8, 40.5 8, 12.375
when N1: when N1:
16, 45.5 16, 13.5
when N1: when N1:
WSFTR 9 3 222
24, 50.4 24, 14.625
when N1: when N1:
32, 54 32, 15.75
when not when not
running, running,
33.3 11.25
when N1: when N1:
8, 40.5 8, 12.375
when N1: when N1:
16, 45.5 16, 13.5
when N1: when N1:
WSFTL 9 3 24, 50.4 24, 14.625 223
when N1: when N1:
32, 54 32, 15.75
when not when not
running, running,
33.3 11.25

72 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.3.15 Arithmetic Operation Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

ADD 7 3 37.1 / 32.2 11.375 224

52.36 /
DADD 7 3 13.125 225
38.36

ADDU 7 3 37.1 / 32.2 12.25 226

52.36 /
DADDU 7 3 14 227
38.36

ADDL 9 4 37.1 12.25 228

DADDL 9 4 52.36 14 229

ADDLU 9 4 52.36 14 230

DADDLU 9 4 62.38 16 231

SUB 7 3 37.1 / 32.2 11.375 232

40.32 /
DSUB 7 3 12.25 233
36.33

SUBU 7 3 37.1 / 32.2 11.375 234

40.32 /
DSUBU 7 3 12.25 235
36.33

SUBL 9 4 37.1 11.375 236

DSUBL 9 4 40.32 12.25 237

© Copyright Reserved Autonics Co., Ltd. 73


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

SUBLU 9 4 40.32 12.25 238

DSUBLU 9 4 52.36 16 239

MUL 7 3 37.1 / 32.2 12.25 240

53.34 /
DMUL 7 3 14 241
38.36

MULU 7 3 37.1 / 32.2 12.25 242

53.34 /
DMULU 7 3 14.875 243
38.36

MULL 9 4 37.1 12.25 244

DMULL 9 4 53.34 14.875 245

MULLU 9 4 53.34 14.875 246

DMULLU 9 4 62.28 16 247

DIV 7 3 46.2 / 34.3 13.125 248

52.36 /
DDIV 7 3 14 249
38.36

DIVU 7 3 46.2 / 34.3 13.125 250

52.36 /
DDIVU 7 3 13.125 251
38.36

74 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

DIVL 9 4 52.36 14 252

DDIVL 9 4 62.28 16 253

DIVLU 9 4 62.28 16 254

DDIVLU 9 4 73.22 18.46 255

INC 3 1 13.8 / 12.3 4.875 256

14.37 /
DINC 3 1 4.875 257
12.87

DEC 3 1 13.8 / 12.3 4.875 258

14.37 /
DDEC 3 1 4.875 259
12.87

ADDB 7 3 67.2 / 32.2 13.125 260

110.32 /
DADDB 7 3 14 261
35.35

ADDBL 9 4 110.32 14 262

DADDBL 9 4 132.21 18 263

SUBB 7 3 41.3 / 32.2 13.125 264

DSUBB 7 3 14 265

© Copyright Reserved Autonics Co., Ltd. 75


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

SUBBL 9 4 44.28 14 266

DSUBBL 9 4 53.28 16.55 267

MULB 7 3 95.2 / 32.2 13.125 268

DMULB 7 3 21 269

MULBL 9 4 110.5 25.3 270

DMULBL 9 4 132 28.5 271

DIVB 7 3 82.6 / 32.2 14 272

DDIVB 7 3 14 273

DIVBL 9 4 95.3 36.2 274

DDIVBL 9 4 110 55.3 275

INCB 3 1 39.9 / 12.9 6 276

DINCB 3 1 7.5 277

DECB 3 1 39.9 / 12.9 6 278

DDECB 3 1 6.375 279

76 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.3.16 Logical Operation Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

WAND 7 3 23.25 8.4 280

DAND 7 3 23.25 8.4 281

AAND 9 4 38.44 10.5 282

WANDL 9 4 28.1 9.3 283

DANDL 9 4 35.2 10.2 284

WOR 7 3 23.25 8.4 285

DOR 7 3 23.25 8.4 286

AOR 9 4 35.2 10.2 287

WORL 9 4 28.1 9.3 288

DORL 9 4 28.1 9.3 289

XOR 7 3 23.25 8.4 290

DXOR 7 3 28.1 9.3 291

AXOR 9 4 35.2 10.2 292

XORL 9 4 35.2 10.2 293

© Copyright Reserved Autonics Co., Ltd. 77


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

DXORL 9 4 38.44 10.5 294

XNR 7 3 23.25 8.4 295

DXNR 7 3 28.1 9.3 296

AXNR 9 4 38.44 10.5 297

XNRL 9 4 23.25 8.4 298

DXNRL 9 4 28.1 9.3 299

78 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.3.17 BIN/BCD Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

BIN2BCD 5 2 22.38 8.4 300

DBIN2BCD 5 2 22.38 8.4 301

BCD2BIN 5 2 22.38 8.4 302

DBCD2BIN 5 2 22.38 8.4 303

5.3.18 String Conversion Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

BIN2HASC 5 2 22.38 8.4 304

DBIN2HASC 5 2 25.38 8.8 305

HASC2BIN 5 2 22.38 8.4 306

DHASC2BIN 5 2 25.38 8.8 307

BCD2DASC 5 2 22.38 8.4 308

DBCD2DASC 5 2 25.38 8.8 309

DASC2BIN 5 2 25.38 8.8 310

DDASC2BIN 5 2 35.24 9.6 311

© Copyright Reserved Autonics Co., Ltd. 79


5 Instruction

Run time (ON/OFF)


(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

STR2ASC 7 2 38.5 10 312

DASC2BCD 5 2 35.24 9.6 313

DDASC2BCD 5 2 25.38 8.8 314

BIN2DASC 5 2 22.38 8.4 315

DBIN2DASC 5 2 25.38 8.8 316

5.3.19 Code Conversion Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

GRY2BIN 5 2 22.38 8.4 317

DGRY2BIN 5 2 25.38 8.8 318

BIN2GRY 5 2 22.38 8.4 319

DBIN2GRY 5 2 25.38 8.8 320

80 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.3.20 Sign Reversal Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

NEG 3 1 23.4 8.2 321

DNEG 3 1 23.4 8.2 322

5.3.21 Data Conversion Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

DECO 7 3 28.8 9.2 323

ENCO 7 3 28.8 9.2 324

EXT 3 1 23.4 8.2 325

5.3.22 Refresh Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

REF 5 2 23.4 8.2 326

© Copyright Reserved Autonics Co., Ltd. 81


5 Instruction

5.3.23 Display Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

SEG 7 3 23.4 8.2 327

5.3.24 Clock Instruction


Run time (ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand LP-S070, Page
LP-S044 LP-A070,
LP-A104

TCMP 7 5 38.5 10 329

TADD 7 3 38.5 10 330

TSUB 7 3 38.5 10 331

TRD 3 1 52.5 12 332

TWR 3 1 52.5 12 333

HOUR 7 3 25.24 10.5 334

TZCP 9 4 52.5 12 335

82 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.3.25 Motion Instruction


Run time
(ON/OFF)
(unit: us)
Instruction Ladder symbol Step Operand Page
LP-S070,
LP-A070,
LP-A104

MTVDM 9 6 15.75 337

MTPDM 9 6 18 338

MTIDM 5 2 9 339

MTMEC 5 1 6.75 340

MTEMS 5 1 9 341

MTCPP 5 2 9 342

MTFOS 5 1 6.75 343

MTSRS 5 1 6.75 344

MTOBC 5 1 6.75 345

MTOVV 5 2 9 346

MTOVP 5 2 10.125 347

MTIPT 7 4 13.5 348

MTUAI 5 2 11.25 349

© Copyright Reserved Autonics Co., Ltd. 83


5 Instruction

5.3.26 High-speed Counter Instruction


Run time
(ON/OFF)
Instruction Ladder symbol Step Operand (unit: us) Page
LP-A070,
LP-A104

HSCNT 7 5 14 350

HSSET 6 3 13.5 352

HSRST 7 2 13.5 353

84 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4 Basic Instruction

5.4.1 Non Processing Instruction (NOP)

Non
processing NOP Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

1. It is non processing instruction.


2. It is available only for mnemonic program.

© Copyright Reserved Autonics Co., Ltd. 85


5 Instruction

5.4.2 Contact Instruction (LOAD)

Contact
LOAD S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow
Step
X, Y, M, S, T, C, F, UB
S BIT Contact of bit device
Not applicable 1

<Ladder>
When the contact(S) is ON, the corresponding output
bit becomes 1.

<Time chart>

86 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.3 Contact Instruction (LOADN)

Contact
LOADN S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB
S BIT Contact of bit device
Not applicable 1

<Ladder>
When the (S) bit turns OFF from ON, the operation
result becomes ON from OFF.

<Time chart>

© Copyright Reserved Autonics Co., Ltd. 87


5 Instruction

5.4.4 Contact Instruction (LOADP)

Contact
LOADP S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB
S BIT Contact of bit device
Not applicable 2

<Ladder>
As soon as the (S) contact turns ON from OFF, the
operation result becomes ON.

<Time chart>

1 Scan

88 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.5 Contact Instruction (LOADF)

Contact
LOADF S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB

S BIT Contact of bit device


Not applicable 2

<Ladder>
As soon as the (S) contact turns OFF from ON, the
operation result becomes ON.

<Time chart>

1 Scan

© Copyright Reserved Autonics Co., Ltd. 89


5 Instruction

5.4.6 Contact Instruction (AND)

Contact
AND S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB

S BIT Contact of bit device


Not applicable 1

<Ladder>
Executes AND operation between the previous
operation result and the designated contact(S), and
considers it as the operation result.

<Time chart>

90 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.7 Contact Instruction (ANDN)

Contact
ANDN S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB

S BIT Contact of bit device


Not applicable 1

<Ladder>
Executes AND NOT operation between the previous
operation result and the designated contact(S), and
considers it as the operation result.

<Time chart>

© Copyright Reserved Autonics Co., Ltd. 91


5 Instruction

5.4.8 Contact Instruction (ANDP)

Contact
ANDP S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB

S BIT Contact of bit device


Not applicable 2

<Ladder>
On the rising edge of a pulse, it executes AND
operation between the previous operation result and
the designated contact(S), and considers it as the
operation result.

<Time chart>

1 Scan

92 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.9 Contact Instruction (ANDF)

Contact
ANDF S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB

S BIT Contact of bit device


Not applicable 2

<Ladder>
On the falling edge of a pulse, it executes AND
operation between the previous operation result and
the designated contact(S), and considers it as the
operation result.

<Time chart>

1 Scan

© Copyright Reserved Autonics Co., Ltd. 93


5 Instruction

5.4.10 Contact Instruction (ANDL)

Contact
ANDL Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

<Mnemonic & Ladder>


Executes the AND operation between the block and the
block.

[Note]
 You cannot add as device input in ladder.
 Input for instruction is available only for mnemonic.

<Time chart>

94 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.11 Contact Instruction (OR)

Contact
OR S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB

S BIT Contact of bit device


Not applicable 1

<Ladder>
Executes the OR operation between the previous
operation result and the designated contact(S), and
considers it as the operation result.

<Time chart>

© Copyright Reserved Autonics Co., Ltd. 95


5 Instruction

5.4.12 Contact Instruction (ORN)

Contact
ORN S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB

S BIT Contact of bit device


Not applicable 1

<Ladder>
Executes the ORN operation between the previous
operation result and the designated contact(S), and
considers it as the operation result.

<Time chart>

96 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.13 Contact Instruction (ORP)

Contact
ORP S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB

S BIT Contact of bit device


Not applicable 2

<Ladder>
On the rising edge of a pulse, executes OR or ORN
operation between the previous operation result and
designated contact(S), and considers it as the
operation result.

<Time chart>

1 Scan

© Copyright Reserved Autonics Co., Ltd. 97


5 Instruction

5.4.14 Contact Instruction (ORF)

Contact
ORF S Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, F, UB

S BIT Contact of bit device


Not applicable 2

<Ladder>
On the falling edge of a pulse, executes OR or ORN
operation between the previous operation result and
the designated contact(S), and considers it as the
operation result.

<Time chart>

1 Scan 1 Scan

98 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.15 Contact Instruction (ORL)

Contact
ORL Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

<Mnemonic & Ladder>


Executes the OR operation between the block and the
block.

[Note]
 You cannot add as device input in ladder.
 Input for instruction is available only for mnemonic.

<Time chart>

© Copyright Reserved Autonics Co., Ltd. 99


5 Instruction

5.4.16 Output Instruction (OUT)

Output
OUT D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, S, M, UB

D BIT ON/OFF contact of device


Not applicable 1

<Ladder>
Outputs the operation result executed to the OUT
instruction to the (S) device.

<Time chart>

100 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.17 Output Instruction (OUT Syyy.xx)

Output
OUT Syyy.xx D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
S

D BIT yyy is group number(0 to 255), xx is step number (0 to 99)


Not applicable 1

<Ladder>
Step device
yyy: Group number(0 to 255)
xx: Step number(0 to 99)
1. Unlikely the Sequential Control (Set Syyy.xx)
Instructions, if input condition turns ON, the
corresponding step becomes ON regardless of the
step order.
2. Although a number of input condition contacts
become ON in the same group, the last
programmed contact is output firstly.
3. Even if the input condition turns OFF, the step
number retains ON.
4. In order to clear the OUT Syyy.xx instruction, the
input contact of Syyy.00 should become ON.

<Time chart>

© Copyright Reserved Autonics Co., Ltd. 101


5 Instruction

5.4.18 Output Instruction (OUTP)

Output
OUTP D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, S, M, UB

D BIT Contact to be ON for one scan on the rising edge of a pulse


Not applicable 2

<Ladder>
When the operation result executed to the OUTP
turns OFF from ON, the output contact becomes ON
for only one scan and then becomes OFF for any
other cases.

<Time chart>

1 Scan

102 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.19 Output Instruction (OUTF)

Output
OUTF D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, S, M, UB

D BIT Contact to be ON for one scan on the falling edge of a pulse


Not applicable 2

<Ladder>
When the operation result executed to the OUTF
turns OFF from ON, the output contact becomes ON
for only one scan and then becomes OFF for any
other cases.

<Time chart>

1 Scan

© Copyright Reserved Autonics Co., Ltd. 103


5 Instruction

5.4.20 Output Instruction (SET)

Output
SET D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, S, T, C, M, UB

D BIT Contact to be maintained ON status


Not applicable 1

<Ladder>
1. Once the contact is SET, even if the input condition
turns OFF, it retains SET status.
2. In order to turn OFF the contact, you should
execute
The RST instruction.

<Time chart>

104 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.21 Output Instruction (SET Syyy.xx)

Output
SET Syyy.xx D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
S

D BIT yyy is group number(0 to 255), xx is step number (0 to 99)


Not applicable 1

<Ladder>
Step device
yyy: Group number(0 to 255)
xx: Step number(0 to 99)
1. If the input contact of current step number is ON
while the previous step number is retaining ON status,
the current step number turns ON and the previous
step number turns OFF.
2. Even if the input contact turns OFF, S device at ON
status retains ON.
3. Syyy.00 is always ON status when starting the
program.
4. In order to reset the Syyy.xx instruction, the input
contact of Syyy.00 should become ON.

<Time chart>

© Copyright Reserved Autonics Co., Ltd. 105


5 Instruction

5.4.22 Output Instruction (RST)

Output
RST D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, S, T, C, M, UB

D BIT Contact to be maintained OFF status


Not applicable 1

<Ladder>
1. If the input condition turns ON, the corresponding
contact becomes OFF.
2. Even if the input condition turns OFF, the
corresponding contact retains OFF.

<Time chart>

106 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.23 Reversal Instruction (ALT)

Reversal
ALT D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, M ,UB

D BIT Data address to execute the operation


Not applicable 3

<Ladder>
Whenever the input condition turns ON from OFF, the
output is reversed according to this, and this event is
consecutively executed every operation cycle.

<Time chart>

1 Pulse 1 Pulse

When input one pulse When execute the


operation consecutively

© Copyright Reserved Autonics Co., Ltd. 107


5 Instruction

5.4.24 Reversal Instruction (NOT)

Reversal
NOT Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

<Ladder>
1. Transfers input by reversing.
2. A contact circuit is reversed as B contact circuit, B
contact circuit is reversed as A contact circuit.

<Time chart>

108 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.25 Stack Instruction (MPUSH)

Stack
MPUSH Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

The operation results executed to current are stored in the stack.

© Copyright Reserved Autonics Co., Ltd. 109


5 Instruction

5.4.26 Stack Instruction (MLOAD)

Stack
MLOAD Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

Loads the value stored in the stack.

110 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.4.27 Stack Instruction (MPOP)

Stack
MPOP Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

Removes the data in the stack after reading it.

© Copyright Reserved Autonics Co., Ltd. 111


5 Instruction

5.4.28 Exit Instruction (END)

Exit
END Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

Exits the program.

112 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5 Application Instruction

5.5.1 Counter Instruction (CTU)

Counter
CTU S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
C, UW
S WORD Counter contact you want to use
0(h0000) to 65535(hFFFF) 5
X, Y, M, S, T, C, D, Z, F, UW, integer
N WORD Setting value of counter
0(h0000) to 65535(hFFFF)

<Ladder>
1. If the pulse signal is applied to the input rung when
the reset signal is OFF, the word value of S device is
increased one by one, and then when it reaches the
setting value N, the corresponding counter contact
turns ON.
2. If the reset signal turns ON, the word value of S
device becomes 0.

<Time chart>

Setting value

Current value

Output
contact (C0)

© Copyright Reserved Autonics Co., Ltd. 113


5 Instruction

5.5.2 Counter Instruction (CTD)

Counter
CTD S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
C, UW

S WORD Counter contact you want to use


0(h0000) to 65535(hFFFF) 5
X, Y, M , S, T, C, D, Z, F, UW, integer
N WORD Setting value of counter
0(h0000) to 65535(hFFFF)

<Ladder>
1. If the pulse signal is applied to the input rung when
the reset signal is OFF, the word value of S device is
decreased one by one, and then when it reaches 0,
the corresponding counter contact turns ON.
2. If the reset signal is ON, the word value of S device
becomes the setting value “N” .

<Time chart>

Setting value

Current value

Output
contact (C0)

114 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.3 Counter Instruction (CTUD)

Counter
CTUD S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
C, UW

S WORD Counter contact you want to use


0(h0000) to 65535(hFFFF) 5
X, Y, M , S, T, C, D, Z, F, UW, integer
N WORD Setting value of counter
0(h0000) to 65535(hFFFF)

<Ladder>
1. If the count-up pulse is applied to the input rung
when the reset signal is OFF, the word value of S
device is increased one by one. Likewise, if the
countdown pulse is applied to the input rung, the
word value of S device is decreased one by one.
2. If the word value of S device is greater than the
setting value “N”, the corresponding counter contact
turns ON, and if the word value of S device is less
than the setting value “N”, the corresponding
counter contact turns OFF.
3. If the reset signal is ON, the word value of S
device becomes 0.

<Time chart>

Setting value

Current value

Output
contact (C0)

© Copyright Reserved Autonics Co., Ltd. 115


5 Instruction

5.5.4 Counter Instruction (CTR)

Counter
CTR S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
C, UW

S WORD Counter contact you want to use


0(h0000) to 65535(hFFFF) 5
X, Y, M , S, T, C, D, Z, F, UW, integer
N WORD Setting value of counter
0(h0000) to 65535(hFFFF)

<Ladder>
1. If the pulse signal is applied to the input rung when
the reset signal is OFF, the word value of S device is
increased one by one, and then when it reaches 0,
the corresponding counter contact turns ON.
2. If the pulse is continuously being input even after
the reset signal is ON, the word value of S device is
restarted at 0 again and the corresponding counter
contact becomes OFF.
3. Even if the reset signal turns ON, the word value of
S device becomes 0.

<Time chart>

Setting value

Current value

Output
contact (C0)

116 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.5 Timer Instruction (TON)

Timer
TON S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
T, UW

S WORD Timer contact you want to use


0(h0000) to 65535(hFFFF) 5
X, Y, M , S, T, C, D, Z, F, UW, integer
N WORD Setting value of timer
0(h0000) to 65535(hFFFF)

<Ladder>
1. As soon as the input condition is ON, S device
value of the timer is increased one by one and then
when it reaches the setting value “N”, the
corresponding timer contact turns ON.
2. If the input condition becomes OFF or encounters
RSTxxx instruction, the corresponding timer contact
turns OFF and the current value becomes 0.

<Time chart>

Input condition(X0)
Setting value

Device value

Output contact (T0)

© Copyright Reserved Autonics Co., Ltd. 117


5 Instruction

5.5.6 Timer Instruction (TOFF)

Timer
TOFF S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
T, UW

S WORD Timer contact you want to use


0(h0000) to 65535(hFFFF) 5
X, Y, M , S, T, C, D, Z, F, UW, integer
N WORD Setting value of timer
0(h0000) to 65535(hFFFF)

<Ladder>
1. As soon as the input condition is ON, S device value
of the timer is changed into the setting value “N” and
the corresponding timer contact becomes ON.
2. If the input condition becomes OFF, the current
value of the timer is decreased one by one and when it
reaches “0”, the corresponding timer contact becomes
OFF.
3. If it encounters RST Txxxx instruction, the
corresponding timer contact turns OFF and the setting
value becomes “0”.

<Time chart>

Input condition(X0)
Setting value

Device value

Output contact (T0)

118 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.7 Timer Instruction (TMR)

Timer
TMR S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
T, UW

S WORD Timer contact you want to use


0(h0000) to 65535(hFFFF) 5
X, Y, M , S, T, C, D, Z, F, UW, integer
N WORD Setting value of timer
0(h0000) to 65535(hFFFF)

<Ladder>
1. When the input signal is ON, the S device value of
the timer is increased. And when the input signal is
OFF, even if its value does not reach the setting value
“N”, it retains the current status of its value, and when
the input signal is ON again it is increased from that
value.
2. When the S device value reaches the setting value
“N”, the corresponding timer contact turns ON. If it
encounters RST Txxxx instruction, the corresponding
timer contact turns OFF and the S device value
becomes “0”.

<Time chart>

Reset (RST T0)

Setting value
Input condition(X0)

Device value

Output contact (T0)

© Copyright Reserved Autonics Co., Ltd. 119


5 Instruction

5.5.8 Timer Instruction (TMON)

Timer
TMON S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
T, UW

S WORD Timer contact you want to use


0(h0000) to 65535(hFFFF) 5
X, Y, M , S, T, C, D, Z, F, UW, integer
N WORD Setting value of timer
0(h0000) to 65535(hFFFF)

<Ladder>
1. As soon as the input condition is ON, the
corresponding timer contact turns ON, and the S
device value of the timer is changed into the setting
value “N” then it is decreasing.
2. Although the input condition is changed into
ON/OFF in the middle of the execution, the timer is
continuously operating, and when S device value of
the timer reaches “0”, the timer contact is to be OFF.
3. When it encounters RSTxxx instruction, the
corresponding timer contact will be OFF and the S
device value of the timer will be “0”. .

<Time chart>

Reset (RST T0)

Input condition(X0)
Setting value

Device value

Output contact (T0)

120 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.9 Timer Instruction (TRTG)

Timer
TRTG S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
T, UW

S WORD Timer contact you want to use


0(h0000) to 65535(hFFFF) 5
X, Y, M , S, T, C, D, Z, F, UW, integer
N WORD Setting value of timer
0(h0000) to 65535(hFFFF)

<Ladder>
1. As soon as the input condition is ON, the
corresponding timer contact turns ON and the S
device value is changed into the setting value “N”
then it is decreasing.
2. If the input condition turns OFF in the middle of the
execution and then becomes ON, the S device value
is changed into the setting value “N” again then it will
be decreasing.
3. If it encounters the RST instruction, the
corresponding timer contact turns OFF and the S
device value is changed into “0”.

<Time chart>

Reset (RST T0)

Input condition (X0)


Setting value

Device value

Output contact (T0)

© Copyright Reserved Autonics Co., Ltd. 121


5 Instruction

5.5.10 Control Instruction (JMP)

Control
JMP LABEL Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
LABEL name

LABEL STRING Label for the place to jump


STRING ◎ 3

<Ladder>
1. Jump to the place where the LABEL is matched.
2. When executing the JMP instruction, it does not
process the instructions between JMP to LABEL.
3. If the LABEL does not exist, error flag occurs.

JMP LABEL name

The instruction is not


processed

LABEL name

122 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.11 Control Instruction (LABEL)

Control Label
LABEL Applicable model
instruction name
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
LABEL name
Label
STRING Label for the place to be jumped
name
STRING 3

<Ladder>
It is a destination for the JMP instruction.

© Copyright Reserved Autonics Co., Ltd. 123


5 Instruction

5.5.12 Control Instruction (FCALL)

Control
FCALL LABEL Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
LABEL name

LABEL STRING Label for the function to call


STRING ◎ 3

<Ladder>
1. Calls the registered user defined function.
2. If you call an unused function, error flag occurs.
3. When you input the instruction statement, the
number of operands should be matched.

124 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.13 Control Instruction (FUNC)

Control
FUNC LABEL Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
LABEL name

LABEL STRING Label for the starting position of the function


STRING 3

<Ladder>

1. Represents the starting position of the user defined


function.
2. It should be located behind the END sentence.
3. The virtual function device “V” is being used.
4. The RET sentence should be located in the last
part of the FUNC statement.

© Copyright Reserved Autonics Co., Ltd. 125


5 Instruction

5.5.14 Branch Instruction (CALL)

Branch
CALL LABEL Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
LABEL name

LABEL STRING Label for the function to call


STRING 3

<Ladder>
1. Calls the subroutine, such as “LABLE” name.
(Executing the program between the SUBRT LABEL
to RET instructions)
2. CALL LABEL can be used in duplicating, and the
program between SUBRT LABEL to RET instructions
should be located behind the END instruction.

CALL LABEL name

END

SUBRT LABEL name

When calls CALL function, the program is


executed.

RET

126 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.15 Branch Instruction (SUBRT)

Branch
SUBRT LABEL Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
LABEL name

LABEL STRING A label for the called function


STRING 3

<Ladder>
1. Displays the starting point of the CALL subroutine.
2. It should be located behind END and cannot be
used in duplicate.(For CALL statement, it is able to be
used in duplicate)

© Copyright Reserved Autonics Co., Ltd. 127


5 Instruction

5.5.16 Branch Instruction (RET)

Branch
RET Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

Exits the subroutine

128 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.17 Loop Instruction (FOR)

Loop
FOR N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer

N WORD
0(h0000) to 65535(hFFFF) 3

<Ladder>
1. Sets the number of repetitions for the program with the
NEXT instruction.
2. The program is repeated N times until encountering the
NEXT.
3. The range for the number of repetitions is from 0 to
65535.
[Note]
The scan time can be longer than you expected therefore
please use the WDT instruction in order not to exceed the
setting value.

FOR: The number of


repetitions (N)

Repeats N times

NEXT

© Copyright Reserved Autonics Co., Ltd. 129


5 Instruction

5.5.18 Loop Instruction (NEXT)

Loop
NEXT Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

The program is repeated from the FOR instruction to the NEXT instruction.

130 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.19 Loop Instruction (BREAK)

Loop
BREAK Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104

Repeat operation is executed with FOR, NEXT instruction. With BREAK instruction, the repeated operation stops
even though repeated execution is not complete.

© Copyright Reserved Autonics Co., Ltd. 131


5 Instruction

5.5.20 Master control Instruction (MCS)

Master
control MCS N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer
Invariable
N MCS number (0 to 7)
number
0 to 7 ◎ 2

<Ladder>
1. If the input condition of MCS is ON, the program is
executed to the MCR instruction, which has the same
number of MCS. And if the input condition turns OFF,
the program does not execute the instruction.
2. MCS number “0” has the highest priority and MCS
number “15” has the lowest priority, therefore you
should use them in order of priority, and should clear
them in reverse order.
3. When you execute the MCR instruction, if you
clear the higher priority the MCS block, which has the
lower priority, is cleared too.
4. MCS or MCR instruction should be used in order of
its priority.

Example) 1. When X0 is ON and X1 is OFF,


A and C program are cleared

2. When XO is ON and X1 is ON,


A, B, C program are cleared

3. When XO is OFF and X1 is ON,


A, B, C program are not cleared.

4. When XO is OFF and X1 is OFF,


A, B, C programs are not cleared.

132 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.21 Master control Instruction (MCR)

Master
control MCR N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer
Invariable
N MCR number (0 to 7)
number
0 to 7 2

<Ladder>
Master control reset
Clears the registered master control by using the
MCS instruction.

© Copyright Reserved Autonics Co., Ltd. 133


5 Instruction

5.5.22 Interrupt Instruction (EI)

Interrupt
EI Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Not applicable

<Ladder>

Enable Interrupt
1. Enables all interrupts.
2. Enables the entire time interrupts and external
interrupts.
3. In order to use the individual interrupt, you should
use ETI and EEI instructions.

134 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.23 Interrupt Instruction (DI)

Interrupt
DI Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
1

<Ladder>

Disable Interrupt
1. Disables all interrupts.
2. Disables the entire time interrupts and external
interrupts.
3. In order to disable the individual interrupt, you
should use the DTI and DEI instructions.

© Copyright Reserved Autonics Co., Ltd. 135


5 Instruction

5.5.24 Interrupt Instruction (ETI)

Interrupt
ETI Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer
Invariable
number
0 to 7 1

<Ladder>

Enable Time Interrupt


1. Enables the individual time interrupt.
2. In order to use ETI, you should activate all
interrupts by using EI instruction first.
3. Structure of the instructions
ETI Time Interrupt Number(0 to 7)

136 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.25 Interrupt Instruction (EEI)

Interrupt
EEI Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer
Invariable
number
0 to 15 1

<Ladder>

1. Enables the individual external interrupt.


2. In order to use the EEI, you should activate all
interrupts by using EI instruction first.
3. Structure of the instructions
EEI External Interrupt Number(0 to 15)

© Copyright Reserved Autonics Co., Ltd. 137


5 Instruction

5.5.26 Interrupt Instruction (DTI)

Interrupt
DTI Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer
Invariable
number
0 to 7 1

<Ladder>

Disable Time Interrupt


1. Disables the individual time interrupt.
2. Structure of the instructions
DTI Time Interrupt Number(0 to 7)

138 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.27 Interrupt Instruction (DEI)

Interrupt
DEI Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer
Invariable
number
0 to 15 1

<Ladder>

Disable External Interrupt


1. Disables the individual external interrupt.
2. Structure of the instructions
DEI External Interrupt Number(0 to 15)

© Copyright Reserved Autonics Co., Ltd. 139


5 Instruction

5.5.28 Interrupt Instruction (TINT)

Interrupt
TINT Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer
Invariable
number
0 to 7 1

<Ladder>
Time Interrupt
1. Represents the starting point of the time interrupt
block.
2. In order to indicate the end of block, you should
use the IRET instruction at the end of TINT block.
3. Structure of the instructions
TINT Time Interrupt Number(0 to 7)

Example)
As soon as the input contact of
ETI 0 is ON, TINT0 to IRET loop
runs.

When the input contact of DTI 0


is ON, TINT0 to IRET loop
stops.

140 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.29 Interrupt Instruction (EINT)

Interrupt
EINT Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer
Invariable
number
0 to 15 1

<Ladder>

External Interrupt
1. Represent the starting point of the external interrupt
block.
2. In order to indicate the end of block, you should
use the IRET instruction at the end of EINT block.
3. Structure of the instructions
EINT External Interrupt Number(0 to 15)

© Copyright Reserved Autonics Co., Ltd. 141


5 Instruction

5.5.30 Interrupt Instruction (IRET)

Interrupt
IRET Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
1

<Ladder>

Interrupt Return
1. Represents the end of time interrupt and external
interrupt blocks.
2. As below, it is generally being used with TINT or
EINT instruction as a pair.
TINT to IRET
EINT to IRET

142 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.31 Watchdog timer(WDT)

Watchdog
WDT Applicable model
timer
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
1

<Ladder>

1. Resets watch dog timer during the program


operation.
2. When the operation time from 0 step to END is
over than max. watchdog setting time, program
operation stops and WDT instruction should be used.
3. Watch dog setting value is able to change by
special device.
4. When resupply power, watchdog setting value is
reset as 200ms.

© Copyright Reserved Autonics Co., Ltd. 143


5 Instruction

5.5.32 Input comparison Instruction (LOAD=)

Input
comparison LOAD= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. Compares the word value of S1 with that of S2, and
if they are equal, it turns ON.
2. If the word values of S1 and S2 are not equal, it
turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Ex) Comparison result

Comparison result

144 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.33 Input comparison Instruction (LOAD>)

Input
comparison LOAD> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is greater than that of S2, it
turns ON.
2. If the word value of S1 is less than or equal to that
of S2, it turns OFF.
3. Execute the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Ex) Comparison result

Comparison result

© Copyright Reserved Autonics Co., Ltd. 145


5 Instruction

5.5.34 Input comparison Instruction (LOAD<)

Input
comparison LOAD< S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the world value of S1 is less than that of S2, it
turns ON.
2. If the word value of S1 is greater than or equal to
that of S2, it turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to hFFFF(32767))

Ex) Comparison result

Comparison result

146 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.35 Input comparison Instruction (LOAD<>)

Input
comparison LOAD<> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word values of S1 and S2 are not equal, it
turns ON.
2. If the word values of S1 and S2 are equal, it turns
OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Ex) Comparison result

Comparison result

© Copyright Reserved Autonics Co., Ltd. 147


5 Instruction

5.5.36 Input comparison Instruction (LOAD>=)

Input
comparison LOAD>= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is less than or equal to that
of
S2, it turns ON.
2. If the word value of S1 is greater than that of S2, it
turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Ex) Comparison result

Comparison result

148 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.37 Input comparison Instruction (LOAD<=)

Input
comparison LOAD<= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is less than or equal to
that of
S2, it turns ON.
2. If the word value of S1 is greater than that of S2,
it turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Ex) Comparison result

Comparison result

© Copyright Reserved Autonics Co., Ltd. 149


5 Instruction

5.5.38 Input comparison Instruction (DLOAD=)

Input
comparison DLOAD= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word values of S1 and S2 are equal, it
turns ON.
2. If the double word values of S1 and S2 are not
equal, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Ex) Comparison result

Comparison result

150 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.39 Input comparison Instruction (DLOAD>)

Input
comparison DLOAD> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word value of S1 is greater than that
of S2, it turns ON.
2. If the double word value of S1 is less than or equal
to that of S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Ex) Comparison result

Comparison result

© Copyright Reserved Autonics Co., Ltd. 151


5 Instruction

5.5.40 Input comparison Instruction (DLOAD<)

Input
comparison DLOAD< S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word value of S1 is less than that of
S2, it turns ON.
2. If the double word value of S1 is greater than that
of
S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Ex) Comparison result

Comparison result

152 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.41 Input comparison Instruction (DLOAD<>)

Input
comparison DLOAD<> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word values of S1 and S2 are not
equal, it turns ON.
2. If the double word value of S1 and S2 are equal, it
turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Ex) Comparison result

Comparison result

© Copyright Reserved Autonics Co., Ltd. 153


5 Instruction

5.5.42 Input comparison Instruction (DLOAD>=)

Input
comparison DLOAD>= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
integer, *, Z, X, Y, M, D, L, F, T, C, UW
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word value of S1 is greater than or
equal to that of S2, it turns ON.
2. If the double word value of S1 is less than that of
S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Ex) Comparison result

Comparison result

154 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.43 Input comparison Instruction (DLOAD<=)

Input
comparison DLOAD<= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word value of S1 is less than or
equal to that of S2, it turns ON.
2. If the double word value of S1 is greater than that
of S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Ex) Comparison result

Comparison result

© Copyright Reserved Autonics Co., Ltd. 155


5 Instruction

5.5.44 Input comparison Instruction (AND=)

Input
comparison AND= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word values of S1 and S2 are equal, it turns
ON.
2. If the word values of S1 and S2 are not equal, it
turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison result

156 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.45 Input comparison Instruction (AND>)

Input
comparison AND> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is greater than that of S2, it
turns ON.
2. If the word value of S1 is less than or equal to that
of
S2, it turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison result

© Copyright Reserved Autonics Co., Ltd. 157


5 Instruction

5.5.46 Input comparison Instruction (AND<)

Input
comparison AND< S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is less than that of S2, it
turns ON.
2. If the word value of S1 is greater than or equal to
that of S2, it turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison result

158 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.47 Input comparison Instruction (AND<>)

Input
comparison AND<> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word values of S1 and S2 are not equal, it
turns ON.
2. If the word values of S1 and S2 are equal, it turns
OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison result

© Copyright Reserved Autonics Co., Ltd. 159


5 Instruction

5.5.48 Input comparison Instruction (AND>=)

Input
comparison AND>= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is greater than or equal to
that of S2, it turns ON.
2. If the word value of S1 is less than that of S2, it
turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison result

160 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.49 Input comparison Instruction (AND<=)

Input
comparison AND<= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is less than or equal to that
of
S2, it turns ON.
2. If the word value of S1 is greater than that of S2, it
turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison result

© Copyright Reserved Autonics Co., Ltd. 161


5 Instruction

5.5.50 Input comparison Instruction (DAND=)

Input
comparison DAND= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFFF)

<Ladder>
1. If the double word values of S1 and S2 are equal, it
turns ON.
2. If the double word values of S1 and S2 are not
equal, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison result

162 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.51 Input comparison Instruction (DAND>)

Input
comparison DAND> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word value of S1 is greater than that of
S2, it turns ON.
2. If the double word value of S1 is less than or equal
to that of S2, it turns OFF. .
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison result

© Copyright Reserved Autonics Co., Ltd. 163


5 Instruction

5.5.52 Input comparison Instruction (DAND<)

Input
comparison DAND< S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word value of S1 is less than that of
S2, it turns ON.
2. If the double word value of S1 is greater than or
equal to that of S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison result

164 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.53 Input comparison Instruction (DAND<>)

Input
comparison DAND<> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word values of S1 and S2 are not
equal, it turns ON.
2. If the double word values of S1 and S2 are equal, it
turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison result

© Copyright Reserved Autonics Co., Ltd. 165


5 Instruction

5.5.54 Input comparison Instruction (DAND>=)

Input
comparison DAND>= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word value of S1 is greater than or
equal to that of S2, it turns ON.
2. If the double word value of S1 is less than that of
S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison result

166 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.55 Input comparison Instruction (DAND<=)

Input
comparison DAND<= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. If the double word value of S1 is less than or equal
to that of S2, it turns ON.
2. If the double word value of S1 is greater than that
of
S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison

© Copyright Reserved Autonics Co., Ltd. 167


5 Instruction

5.5.56 Input comparison Instruction (OR=)

Input
comparison OR= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is equal to that of S2, it
turns ON.
2. If the word value of S1 is not equal to that of S2, it
turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison

168 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.57 Input comparison Instruction (OR>)

Input
comparison OR> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is greater than that of S2, it
turns ON.
2. If the word value of S1 is less than or equal to that
of S2, it turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison

© Copyright Reserved Autonics Co., Ltd. 169


5 Instruction

5.5.58 Input comparison Instruction (OR<)

Input
comparison OR< S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is less than that of S2, it
turns ON.
2. If the word value of S1 is greater than or equal to
that of S2, it turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison

170 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.59 Input comparison Instruction (OR<>)

Input
comparison OR<> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is not equal to that of S2, it
turns ON.
2. If the word value of S1 is equal to that of S2, it
turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison

© Copyright Reserved Autonics Co., Ltd. 171


5 Instruction

5.5.60 Input comparison Instruction (OR>=)

Input
comparison OR>= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is greater than or equal to
that of S2, it turns ON.
2. If the word value of S1 is less than that of S2, it
turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison

172 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.61 Input comparison Instruction (OR<=)

Input
comparison OR<= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2

-32768(h8000) to 32767(h7FFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. If the word value of S1 is less than or equal to that
of S2, it turns ON.
2. If the word value of S1 is greater than that of S2, it
turns OFF.
3. Executes the Signed comparison.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

Instruction Condition Comparison

© Copyright Reserved Autonics Co., Ltd. 173


5 Instruction

5.5.62 Input comparison Instruction (DOR=)

Input
comparison DOR= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFFF)

<Ladder>
1. If the double word value of S1 is equal to that of
S2, it turns ON.
2. If the double word value of S1 is not equal to that
of S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison

174 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.63 Input comparison Instruction (DOR>)

Input
comparison DOR> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFFF)

<Ladder>
1. If the double word value of S1 is greater than that
of
S2, it turns ON.
2. If the double word value of S1 is less than or equal
to that of S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison

© Copyright Reserved Autonics Co., Ltd. 175


5 Instruction

5.5.64 Input comparison Instruction (DOR<)

Input
comparison DOR< S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFFF)

<Ladder>
1. If the double word value of S1 is less than that of
S2, it turns ON.
2. If the double word value of S1 is greater than or
equal to that of S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison

176 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.65 Input comparison Instruction (DOR<>)

Input
comparison DOR<> S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFFF)

<Ladder>
1. If the double word value of S1 is not equal to that of
S2, it turns ON.
2. If the double word value of S1 is equal to that of
S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison

© Copyright Reserved Autonics Co., Ltd. 177


5 Instruction

5.5.66 Input comparison Instruction (DOR>=)

Input
comparison DOR>= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFF)

<Ladder>
1. If the double word value of S1 is greater than or
equal to that of S2, it turns ON.
2. If the double word value of S1 is less than that of
S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison

178 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.67 Input comparison Instruction (DOR<=)

Input
comparison DOR<= S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFF)

<Ladder>
1. If the double word value of S1 is less than or equal
to that of S2, it turns ON.
2. If the double word value of S1 is greater than that
of
S2, it turns OFF.
3. Executes the Signed comparison.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

Instruction Condition Comparison

© Copyright Reserved Autonics Co., Ltd. 179


5 Instruction

5.5.68 Comparison Instruction (CMP)

Comparison
Applicable model
instruction CMP S1 S2 D
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or address to compare with S2


-32768(h8000) to 32767(h7FFF) 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or address to compare with S1
-32768(h8000) to 32767(h7FFF)
Y, M, UB
D BIT Lead address of bit device to save the comparison result
Not applicable

<Ladder>
Compares the word value of S1 with that of S2. The
result is as below :
1. If S1 < S2, D bit turns ON.
2. If S1 = S2, D+1 bit turns ON.
3. If S1> S2, D+2 bit turns ON.
4. Comparison executes the Signed operation.
(h8000(-32768) to h7FFF(-1) < 0 to h7FFF(32767))

180 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.69 Comparison Instruction (DCMP)

Comparison
DCMP S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or address to compare with S2


-2147483648(h80000000) to 2147483647(h7FFFFFFF) 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or address to compare with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFF)
Y, M, UB
D BIT Lead address of bit device to save the comparison result
Not applicable

<Ladder>
Compares the double word value of S1 with that of
S2. The result is as below :
1. If S1 < S2, D bit turns ON.
2. If S1 = S2, D+1 bit turns ON.
3. If S1 > S2, D+2 bit turns ON.
4. Comparison executes the Signed operation.
(h8000(-32768) to h7FFF(-1) < 0 to h7FFF(32767))

© Copyright Reserved Autonics Co., Ltd. 181


5 Instruction

5.5.70 Comparison Instruction (ACMP)

Comparison
Applicable model
instruction ACMP S1 S2 D N
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, T, C, M, UB

S1 BIT Lead address of data or bit device to compare with S2


Not applicable 7
X, Y, F, T, C, M, UB
S2 BIT Lead address of data or bit device to compare with S1
Not applicable
Y, M, UB
D BIT Lead address of bit device to save the comparison result
Not applicable
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N WORD The number of devices to compare
1 to 32

<Ladder>
Compares the number of N bit values beginning with
S1 bit with the number of N bit values beginning with
S2 bit. As a result :
1. If S1 < S2, D bit turns ON.
2. If S1==S2, D+1 bit turns ON.
3. If S1>S2, D+2 bit turns ON.

Ex) When N=3,

S1+2 bit is S1+1 bit is S1 bit is ON S2+2 bit is S2+1 bit is ON S2 bit is ON
ON OFF OFF

101(Binary) = 011(Binary) = 3(Decimal)


5(Decimal)
Comparison
result (5 > 3)

D+2 bit is ON

182 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.71 Comparison Instruction (CMPL)

Comparison
CMPL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data or data address to compare with S2


-32768(h8000) to 32767(hFFFF) 9
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data or data address to compare with S1
-32768(h8000) to 32767(hFFFF)
Y, M, UB
D BIT Lead address of bit device to save comparison result
Not applicable
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N WORD The number of S2 data to compare with S1 data
As many as the number of devices remained in S1, S2 and D area

<Ladder>
Compares the word value of S1 with the number of
N word values beginning with S2 word. As a
result :
1. If S1 < S2, D bit turns ON.
2. If S1 == S2, D+1 bit turns ON.
3. If S1 > S2, D+2 bit turns ON.
Comparison Comparison Bit The comparison result of S2+1 is stored in bits
result from D+3 to D+5, like this way, the operation
results are sequentially stored in D bits.
4. Comparison executes the Signed operation.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))

© Copyright Reserved Autonics Co., Ltd. 183


5 Instruction

5.5.72 Comparison Instruction (DCMPL)

Comparison
Applicable model
instruction DCMPL S1 S2 D N
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data or data address to compare with S2


-2147483648(h80000000) to 2147483647(h7FFFFFFF) 9
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data or data address to compare with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFF)
Y, M, UB
D BIT Lead address of bit device to save comparison result
Not applicable
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N WORD The number of S2 data to compare with S1 data
As many as the number of devices remained in S1, S2 and D area

<Ladder>
Compares the double word S1 with the number of
N double words beginning with double word S2. As
a result :
1. If S1 < S2, D bit turns ON.
2. If S1 == S2, D+1 bit turns ON.
3. If S1 > S2, D+2 bit turns ON.
Comparison Comparison Bit The comparison result of S2+1 is stored in bits
result
from D+3 to D+5, like this way, the operation
results are sequentially stored in D bits.
4. Comparison executes the Signed operation.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))

184 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.73 Comparison Instruction (BWCMP)

Comparison
BWCMP S1 S2 S3 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer

S1 INT Data to compare with S2 and S3


-32768(h8000) to 32767(h7FFF) 9
X, Y, M, S, T, C, D, Z, F, UW, integer
S2 INT Data to compare with S1 and S3
-32768(h8000) to 32767(h7FFF)
X, Y, M, S, T, C, D, Z, F, UW, integer
S3 INT Data to compare with S1 and S2
-32768(h8000) to 32767(h7FFF)
Y, M, UB
D BIT Bit device address to save comparison result
Not applicable

<Ladder>
Compare word value of S3 with the limited area
between S1 and S2 word values. As a result :
1. If the value of S3 is less than the smaller value of
the two (S1, S2), D bit turns ON.
2. If the value of S3 is equal to the smaller value of
the two, D+1 bit turns ON.
3. If the value of S3 is located between the two
values, D+2 bit turns ON.
4. If the value of S3 is equal to the larger value of the
two, D+3 bit turns ON.
5. If the value of S3 is greater than the larger value of
the two, D+4 bit turns ON.
6. Comparison executes the Signed operation.

© Copyright Reserved Autonics Co., Ltd. 185


5 Instruction

S3 position

A area B area C area D area E area

Smaller number Larger number


between S1 and S2, between S1 and S2
If S3 position is A area, D bit is ON
B area, D+1 bit is ON
C area, D+2 bit is ON
D area, D+3 bit is ON
E area, D+4 bit is ON

Ex) In case of S3=h3300, S1=h1011, S2=h2020,

S3 is placed at E area. Therefore, D+4 bit is ON

186 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.74 Comparison Instruction (DBWCMP)

Comparison
DBWCMP S1 S2 S3 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer

S1 DINT Data to compare with S2 and S3


-2147483648(h80000000) to 2147483647(h7FFFFFFF) 9
X, Y, M, S, T, C, D, Z, F, UW, integer
S2 DINT Data to compare with S1 and S3
-2147483648(h80000000) to 2147483647(h7FFFFFFF)
X, Y, M, S, T, C, D, Z, F, UW, integer
S3 DINT Data to compare with S1 and S2
-2147483648(h80000000) to 2147483647(h7FFFFFFF)
Y, M, UB
D BIT Bit device address to save comparison result
Not applicable

<Ladder>
Compares the double word value of S3 with the
limited area between S1 and S2 word values.
As a result :
1. If the value of S3 is less than the smaller value of
the two (S1, S2), D bit turns ON.
2. If the value of S3 is equal to the smaller value of
the two, D+1 bit turns ON.
3. If the value of S3 is located between the two
values, D+2 bit turns ON.
4. If the value of S3 is equal to the larger value of the
two, D+3 bit turns ON.
5. If the value of S3 is greater than the larger value of
the two, D+4 bit turns ON.
6. Comparison executes the Signed operation.

© Copyright Reserved Autonics Co., Ltd. 187


5 Instruction

S3 position

A area B area C area D area E area

Smaller number Larger number


between S1 and S2S1 between S1 and S2

If S3 position is A area, D bit is ON


B area, D+1 bit is ON
C area, D+2 bit is ON
D area, D+3 bit is ON
E area, D+4 bit is ON

Ex) In case of S3=h33003300, S1=h10000111, S2=h2020FF00,

S3 is placed at E area. Therefore, D+4 bit is ON

188 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.75 Transmission Instruction (BMOV)

Transmission
Applicable model
instruction BMOV S D
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, T, C, M, UB

S BIT Bit device number you want to transmit


Not applicable 5
Y, F, T, C, M, UB
D BIT Bit device address to save the transmitted data
Not applicable

<Ladder>
Transmits the source bit to the destination bit.

S bit D bit

© Copyright Reserved Autonics Co., Ltd. 189


5 Instruction

5.5.76 Transmission Instruction (MOV)

Transmission
Applicable model
instruction MOV S D
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S WORD Data to transmit or device number which have the data


0(h0000) to 65535(hFFFF) 5
Y, F, Z, T, C, M, S, L, D, UW
D WORD Device number to save transmitted data
0(h0000) to 65535(hFFFF)

<Ladder>
Transmits the source word to the destination word.

S word D word

190 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.77 Transmission Instruction (DMOV)

Transmission
Applicable model
instruction DMOV S D
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S DWORD Data to transmit or device number which have the data


0(h0000) to 4294967295(hFFFFFFFF) 5
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Device number to save transmitted data
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
Transmits the source double word to the destination
double word.

S double D double
word word

© Copyright Reserved Autonics Co., Ltd. 191


5 Instruction

5.5.78 Transmission Instruction (BMOVL)

Transmission
Applicable model
instruction BMOVL S D N
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, T, C, M, UB

S BIT Bit device number you want to transmit


Not applicable 7
Y, F, T, C, M, UB
D BIT Bit device address to save the transmitted data
Not applicable
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N WORD The number of destination bit devices to save the transmitted data
To the remained devices in corresponding D area

<Ladder>
Transmits the source bit to the number of N bits
beginning with D, one by one.

192 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.79 Transmission Instruction (MOVL)

Transmission
Applicable model
instruction MOVL S D N
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S WORD Data to transmit or device number which have the data


0(h0000) to 65535(hFFFF) 7
Y, F, Z, T, C, M, S, L, D, UW
D WORD Device number to save transmitted data
0(h0000) to 65535(hFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N WORD The number of destination bit devices to save the transmitted data
To the remained devices in corresponding D area

<Ladder>
Transmits the source word to the number of N words
beginning with D, one by one.

© Copyright Reserved Autonics Co., Ltd. 193


5 Instruction

5.5.80 Transmission Instruction (DMOVL)

Transmission
Applicable model
instruction DMOVL S D N
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S DWORD Data to transmit or device number which have the data


0(h0000) to 4294967295(hFFFFFFFF) 7
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Device number to save transmitted data
0(h0000) to 4294967295(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N WORD The number of destination bit devices to save the transmitted data
To the remained devices in corresponding D area

<Ladder>
Transmit the source double word to the number of N
double words beginning with D, one by one.

194 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.81 Transmission Instruction (BMOVG)

Transmission
Applicable model
instruction BMOVG S D N
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, T, C, M, UB

S BIT Bit device number you want to transmit


Not applicable 7
Y, F, T, C, M, UB
D BIT Bit device address to save the transmitted data
Not applicable
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of bit devices to save to be transmitted data and the
N WORD transmitted data
To the remained devices in corresponding S, D areas

<Ladder>
Transmits the number of N bit groups beginning with
(S) to the number of N bit groups beginning with (D),
in batches.

© Copyright Reserved Autonics Co., Ltd. 195


5 Instruction

5.5.82 Transmission Instruction (MOVG)

Transmission
Applicable model
instruction MOVG S D N
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW

S WORD Data to transmit or device number which have the data


0(h0000) to 65535(hFFFF) 7
Y, F, Z, T, C, M, S, L ,D, UW
D WORD Device number to save transmitted data
0(h0000) to 65535(hFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of bit devices to save to be transmitted data and the
N WORD transmitted data
To the remained devices in corresponding S, D areas

<Ladder>
Transmit the number of N word groups beginning with
(S), to the number of N word groups beginning with
(D), in batches.

196 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.83 Transmission Instruction (DMOVG)

Transmission
Applicable model
instruction DMOVG S D N
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D ,UW

S DWORD Data to transmit or device number which have the data


0(h0000) to 4294967295(hFFFFFFFF) 7
Y, F, Z, T, C, M, S, L, D ,UW
D DWORD Device number to save transmitted data
0(h0000) to 4294967295(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D ,UW, integer
The number of bit devices to save to be transmitted data and the
N WORD transmitted data
To the remained devices in corresponding S, D areas

<Ladder>
Transmit the number of N double word groups
beginning with (S) to the number of N double word
groups beginning with (D), in batches.

© Copyright Reserved Autonics Co., Ltd. 197


5 Instruction

5.5.84 Transmission Instruction (BCMOV)

Transmission
Applicable model
instruction BCMOV S D
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, T, C, M, UB

S BIT Bit device number you want to transmit


Not applicable 5
Y, F, T, C, M, UB
D BIT Bit device address to save the transmitted data
Not applicable

<Ladder>
Reverses the source device and then transmits it to
the destination bit.

Reverse

198 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.85 Transmission Instruction (CMOV)

Transmission
Applicable model
instruction CMOV S D
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S WORD Data to transmit or device number which have the data


0(h0000) to 65535(hFFFF) 5
Y, F, Z, T, C, M, S, L, D, UW
D WORD Device number to save transmitted data
0(h0000) to 65535(hFFFF)

<Ladder>
Reverses the source word and then transmits it to the
destination word.

Reverse

© Copyright Reserved Autonics Co., Ltd. 199


5 Instruction

5.5.86 Transmission Instruction (DCMOV)

Transmission
Applicable model
instruction DCMOV S D
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S DWORD Data to transmit or device number which have the data


0(h0000) to 4294967295(hFFFFFFFF) 5
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Device number to save transmitted data
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
Reverses the source double word and then
transmits it to the destination double word.

Reverse

200 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.87 Exchange Instruction (XCH)

Exchange
XCH S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S1 WORD Data device number to be exchanged


0(h0000) to 65535(hFFFF) 5
Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data device number to be exchanged
0(h0000) to 65535(hFFFF)

<Ladder>
Exchanges a data in S1 word and a data in S2 word
each other.

© Copyright Reserved Autonics Co., Ltd. 201


5 Instruction

5.5.88 Exchange Instruction (DXCH)

Exchange
DXCH S1 S2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S1 DWORD Data device number to be exchanged


0(h0000) to 4294967295(hFFFFFFFF) 5
Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data device number to be exchanged
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
Exchanges a data in the double word S1 and a data
in the double word S2 each other.

202 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.89 Exchange Instruction (AXCH)

Exchange
AXCH S1 S2 N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, T, C, M, UB

S1 BIT Bit device address of the data to be exchanged


Not applicable 7
Y, F, T, C, M, UB
S2 BIT Bit device address of the data to be exchanged
Not applicable
Y, F, Z, T, C, M, S, L, D, UW, integer
N WORD The number of the data bits to be exchanged
To the device range remained in corresponding S1 and S2 areas.

<Ladder>
Exchanges the number of N bits beginning with S1
with the number of N bits beginning from S2 each
other.

Upper bit

Exchange

Upper bit

Upper bit

Upper bit

© Copyright Reserved Autonics Co., Ltd. 203


5 Instruction

5.5.90 Exchange Instruction (SWAP)

Exchange
SWAP D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

D WORD Data address to exchange upper and lower bit


0(h0000) to 65535(hFFFF) 3

<Ladder>
Exchanges the high order bytes of the designated
word with its low order bytes each other.

204 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.91 Exchange Instruction (DSWAP)

Exchange
DSWAP D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

D DWORD Data address to exchange upper and lower bit


0(h0000) to 4294967295(hFFFFFFFF) 3

<Ladder>
Exchanges the high order word of the designated
double word with its low order word.

Upper WORD Lower WORD

Upper WORD Lower WORD

© Copyright Reserved Autonics Co., Ltd. 205


5 Instruction

5.5.92 Rotation Instruction (ROR)

Rotation
ROR S C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S WORD Data address to execute the operation


0(h0000) to 65535(hFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate right side
0 to 255

<Ladder>
Rotates the source word to the right side by the
number of C bits.

Rotates to the right The lowest bit rotates with


side by the number carry bit and the highest bit
of C bits

206 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.93 Rotation Instruction (DROR)

Rotation
DROR S C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, F, Z, T, C, M, S, L, D, UW

S DWORD Data address to execute the operation


0(h0000) to 4294967295(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate right side
0 to 255

<Ladder>
Rotates the source double word to the right side by
the number of C bits.

Rotates to the right The lowest bit rotates with


side by the number carry bit and the highest bit
of C bits

© Copyright Reserved Autonics Co., Ltd. 207


5 Instruction

5.5.94 Rotation Instruction (AROR)

Rotation
AROR S N C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, T, C, M, UB

S BIT Start address for bit device of the data to execute the operation
Not applicable ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of bit device to execute the operation from start
N WORD address
To the remained device range in corresponding S area
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate right side
0 to 255

<Ladder>
Within the number of N bits, bits rotate to the right
side by the number of C bits beginning with S bit.

Upper bit S bit

Rotates to the right The lowest bit rotates with


side by the number carry bit and the highest bit
of C bits

208 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.95 Rotation Instruction (RORC)

Rotation
RORC S C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S WORD Data address to execute the operation


0(h0000) to 65535(hFFFF) ◎ 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate right side
0 to 255

<Ladder>
Rotates the source word including carry bit, to the
right side by the number of C bits.

Rotates to the The lowest bit moves to carry


right side by the bit, carry bit moves to the
number of N bits highest bit

© Copyright Reserved Autonics Co., Ltd. 209


5 Instruction

5.5.96 Rotation Instruction (DRORC)

Rotation
DRORC S C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S DWORD Data address to execute the operation


0(h0000) to 4294967295(hFFFFFFFF) ◎ 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate right side
0 to 255

<Ladder>
Rotates the source double word including carry bit, to
the right side by the number of C bits.

Rotates to the The lowest bit moves to carry


right side by the bit, carry bit moves to the
number of N bits highest bit

210 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.97 Rotation Instruction (ARORC)

Rotation
ARORC S N C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, T, C, M, UB

S BIT Start address for bit device of the data to execute the operation
Not applicable ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of bit device to execute the operation from start
N WORD address
To the remained device range in corresponding S area
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate right side
0 to 255

<Ladder>
Within the number of N bits, rotates the designated
bits including carry bit to the right side by the number
of C bits.

Upper bit S bit

Rotates to the The lowest bit moves to carry


right side by the bit, carry bit moves to the
number of N bits highest bit

© Copyright Reserved Autonics Co., Ltd. 211


5 Instruction

5.5.98 Rotation Instruction (ROL)

Rotation
ROL S C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S WORD Data address to execute the operation


0(h0000) to 65535(hFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate left side
0 to 255

<Ladder>
Rotates the source word to the left side by the
number of C bits.

The highest bit rotates with Rotates to the left side by


carry bit and the lowest bit the number of N bits

212 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.99 Rotation Instruction (DROL)

Rotation
DROL S C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S DWORD Data address to execute the operation


0(h0000) to 4294967295(hFFFFFFFF) 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate left side
0 to 255

<Ladder>
Rotates the source double word to the left side by the
number of C bits.

The highest bit rotates with Rotates to the left side by


carry bit and the lowest bit the number of N bits

© Copyright Reserved Autonics Co., Ltd. 213


5 Instruction

5.5.100 Rotation Instruction (AROL)

Rotation
AROL S N C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, T, C, M, UB

S BIT Start address for bit device of the data to execute the operation
Not applicable ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of bit device to execute the operation from start
N WORD address
To the remained device range in corresponding S area
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate left side
0 to 255

<Ladder>
Within the number of N bits, rotates the designated
bits beginning with the S bit to the left side by the
number of C bits.

Upper bit S bit

The highest bit rotates with Rotates to the left side by


carry bit and the lowest bit the number of N bits

214 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.101 Rotation Instruction (ROLC)

Rotation
ROLC S C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S WORD Data address to execute the operation


0(h0000) to 65535(hFFFF) ◎ 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate right side
0 to 255

<Ladder>
Rotates the source word including carry bit to the left
side by the number of C bits.

The highest bit moves to carry Rotates to the


bit, carry bit moves to the left side by the
lowest bit number of N bits

© Copyright Reserved Autonics Co., Ltd. 215


5 Instruction

5.5.102 Rotation Instruction (DROLC)

Rotation
DROLC S C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S DWORD Data address to execute the operation


0(h0000) to 4294967295(hFFFFFFFF) ◎ 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate left side
0 to 255

<Ladder>
Rotates the source double word including the carry bit
to the left side by the number of C bits.

The highest bit moves to carry Rotates to the


bit, carry bit moves to the left side by the
lowest bit number of N bits

216 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.103 Rotation Instruction (AROLC)

Rotation
AROLC S N C Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, T, C, M, UB

S BIT Start address for bit device of the data to execute the operation
Not applicable ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of bit device to execute the operation from start
N WORD address
To the remained device range in corresponding S area
X, Y, F, Z, T, C, M, S, L, D, UW, integer
C WORD The number of bits to rotate left side
0 to 255

<Ladder>
Within the range from the source bit to the N bit,
rotates the designated bits including the carry bit to the
left side by the number of C bits beginning with the S
bit.

Upper bit S bit

The lowest bit moves to carry Rotates to the


bit, carry bit moves to the left side by the
highest bit number of C bits

© Copyright Reserved Autonics Co., Ltd. 217


5 Instruction

5.5.104 Movement Instruction (SFTR)

Movement
SFTR S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S WORD Data address to execute the operation


0(h0000) to 65535(hFFFF) ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N WORD The number of bits to rotate right side
0 to 16

<Ladder>
1. Within the S word, moves the 16-bit of S word to the
right side by the number of N bits.
2. If the Nth bit from the low order bit is 1, carry bit is
SET.

Moves to the right side


by the number of N

218 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.105 Movement Instruction (ASFTR)

Movement
ASFTR S N1 N2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, T, C, M, UB

S BIT Start bit position of the data to execute the operation


Not applicable 9
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N1 WORD The number of bits from the designated position as S
0 to 32
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N2 WORD The number of bits to rotate right side
0 to 32

<Ladder>
1. From the source bit, N1 bits moves to the right side
as N2 in the range.
2. The high order bits, which are the number of
movement, have “0” as their value.
3. If the value of N2 is greater than N1, the values
from source bit to N bit are shifted to “0”.

Upper bit S Bit

N1

Moves to the right


side by N2

Ex)
Upper bit S Bit

Moves to the right side


After execution by 3
Upper bit S Bit

© Copyright Reserved Autonics Co., Ltd. 219


5 Instruction

5.5.106 Movement Instruction (SFTL)

Movement
SFTL S N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S WORD Data address to execute the operation


0(h0000) to 65535(hFFFF) ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N WORD The number of bits to rotate left side
0 to 16

<Ladder>
1. Within the source word, move the 16 bits of source
word to the left by the number of N bits.
2. If the Nth bit from the high order bit is 1, carry bit is
SET.

Moves to the left side by the


number of N

220 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.107 Movement Instruction (ASFTL)

Movement
ASFTL S N1 N2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, T, C, M, UB

S BIT Start bit position of the data to execute the operation


Not applicable 9
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N1 WORD The number of bits from the designated position as S
0 to 32
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N2 WORD The number of bits to rotate left side
0 to 32

<Ladder>
1. From the source bit, N1 bits moves to the left side as
N2 in the range.
2. The low order bits, which are the number of
movement, have “0” as their value.
3. If the value of N2 is greater than N1, the values of
designated bits, from source bit to the N1, are shifted
to “0”.

Upper bit S Bit

N1

Moves to the left


side by N2

Ex)
Upper bit S Bit

Moves to the left


After execution side by 3
S Bit

Upper bit

© Copyright Reserved Autonics Co., Ltd. 221


5 Instruction

5.5.108 Movement Instruction (WSFTR)

Movement
WSFTR S N1 N2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S WORD Data address to execute the operation


0(h0000) to 65535(hFFFF) 9
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N1 WORD The number of words from the designated position as S
To the remained device range in corresponding S area
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N2 WORD The number of words to move to the right
To the range not greater than the N1 value

<Ladder>
1. From the source word, N1 words moves to the right
side as N2 in the range by word unit.
2. The high order words, which are the number of
movement, have “0” as their value.

Ex) In case of N1=4, N2=2

Moves to the right side by 2

After execution

222 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.109 Movement Instruction (WSFTL)

Movement
WSFTL S N1 N2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

S WORD Data address to execute the operation


0(h0000) to 65535(hFFFF) 9
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N1 WORD The number of words from the designated position as S
To the remained device range in corresponding S area
X, Y, F, Z, T, C, M, S, L, D, UW, integer
N2 WORD The number of words to move to the left
To the range not greater than the N1 value

<Ladder>
1. From the source word, N1 words moves to the left
side as N2 in the range by word unit.
2. The lower order words, which are the number of
movement, have “0” as their value.

Ex) In case of N1=4, N2=2

Moves to the left


side by 2

After execution

© Copyright Reserved Autonics Co., Ltd. 223


5 Instruction

5.5.110 Arithmetic Operation Instruction (ADD)

Arithmetic
operation ADD S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data address to execute the addition operation with S2

-32768(h8000) to 32767(h7FFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data address to execute the addition operation with S1
-32768(h8000) to 32767(h7FFF)
Y, F, Z, T, C, M, S, L, D, UW
D INT Address to save the operation result
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. Adds the word values of S1 and S2, and then stores
the result into the destination word D
2. Executes the Signed operation.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))
3. If the result value exceeds ‘h7FFF(32767)’, carry
flag is SET.
4. If the result value is h0000, zero flag is SET.

224 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.111 Arithmetic Operation Instruction (DADD)

Arithmetic
operation DADD S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data address to execute the addition operation with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data address to execute the addition operation with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DINT Address to save the operation result
-2147483648(h80000000) to 2147483647(h7FFFFFFF)

<Ladder>
1. Adds the double word values of S1 and S2, and then
stores the result into the destination double word D.
2. Executes the Signed operation.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))
3. If the result value exceeds ‘h7FFFFFFF
(2147483647)’, carry flag is SET.
4. If the result value is ‘h00000000’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 225


5 Instruction

5.5.112 Arithmetic Operation Instruction (ADDU)

Arithmetic
operation ADDU S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the addition operation with S2

0(h0000) to 65535(hFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the addition operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)

<Ladder>
1. Adds the word values of S1 and S2 and then stores
the result into the destination word D.
2. Executes the Unsigned operation.
3. If the result value exceeds ‘hFFFF (65535)’, carry
flag is SET.
4. If the result value is ‘h0000’, zero flag is SET.

226 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.113 Arithmetic Operation Instruction (DADDU)

Arithmetic
operation DADDU S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the addition operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the addition operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
1. Adds the double word values of S1 and S2, and then
stores the result into the destination double word D.
2. Executes the Unsigned operation.
3. If the result value exceeds ‘hFFFFFFFF
(4294967295)’, carry flag is SET.
4. If the result value is ‘h0000’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 227


5 Instruction

5.5.114 Arithmetic Operation Instruction (ADDL)

Arithmetic
operation ADDL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data address to execute the addition operation with S2

-32768(h8000) to 32767(h7FFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 INT Data address to execute the addition operation with S1
-32768(h8000) to 32767(h7FFF)
Y, F, Z, T, C, M, S, L, D, UW
D INT Address to save the operation result
-32768(h8000) to 32767(h7FFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Adds the word value of S1 and the number of N
word values beginning with S2 one by one, and then
stores the number of N results into the number of N
corresponding destination words beginning with word
D.
2. Executes the Signed operation.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))
3. If the result value is ‘h0000’, zero flag is SET.

228 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.115 Arithmetic Operation Instruction (DADDL)

Arithmetic
operation DADDL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data address to execute the addition operation with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DINT Data address to execute the addition operation with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DINT Address to save the operation result
-2147483648(h80000000) to 2147483647(h7FFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Adds the double word value of S1 and the number of
N double word values beginning with S2 one by one,
and then stores their results into the number of N
corresponding destination double words beginning with
double word D respectively.
2. Executes the Signed operation.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))
3. If the result value is ‘h00000000’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 229


5 Instruction

5.5.116 Arithmetic Operation Instruction (ADDLU)

Arithmetic
operation ADDLU S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the addition operation with S2

0(h0000) to 65535(hFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the addition operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Adds the word value of S1 and the number of N
word values beginning with S2 one by one, and then
stores their results into the number of N corresponding
destination words beginning with word D respectively.
2. Executes the Unsigned operation.
3. If the result value exceeds ‘hFFFF (65535)’ carry
flag is SET.
4. If the result value is ‘h0000’, zero flag is SET.

230 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.117 Arithmetic Operation Instruction (DADDLU)

Arithmetic
operation DADDLU S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the addition operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the addition operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Adds the double word value of S1 and the number of
N double word values beginning with S2 one by one,
and then stores their results into the number of N
corresponding destination double words beginning with
double word D respectively.
2. Executes the Unsigned operation.
3. If the result value exceeds ‘hFFFFFFFF
(4294967295)’, carry flag is SET.
4. If the result value is ‘h0000’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 231


5 Instruction

5.5.118 Arithmetic Operation Instruction (SUB)

Arithmetic
operation SUB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data address to execute the subtraction operation with S2

-32768(h8000) to 32767(h7FFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data address to execute the subtraction operation with S1
-32768(h8000) to 32767(h7FFF)
Y, F, Z, T, C, M, S, L, D, UW
D INT Address to save the operation result
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. Subtracts the word value of S2 from the word value
of S1 and then stores the result into the destination
word D.
2. Executes the Signed operation.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))
3. If the result value is ‘h0000’, zero flag occurs.

232 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.119 Arithmetic Operation Instruction (DSUB)

Arithmetic
operation DSUB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data address to execute the subtraction operation with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data address to execute the subtraction operation with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)
Y, F, Z, T, C, M, S, L ,D, UW
D DINT Address to save the operation result
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. Subtracts double word value of S2 from the double
word value of S1 and then stores the result into the
destination double word D.
2. Executes the Signed operation.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))
3. If the result value is ‘h00000000’, zero flag occurs.

© Copyright Reserved Autonics Co., Ltd. 233


5 Instruction

5.5.120 Arithmetic Operation Instruction (SUBU)

Arithmetic
operation SUBU S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the subtraction operation with S2

0(h0000) to 65535(hFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the subtraction operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)

<Ladder>
1. Subtracts the word value of S2 from the word value
of S1 and then stores the result into the destination
word D.
2. Executes the Unsigned operation.
3. If the result value is ‘h0000’ or out of this, borrow
flag occurs.
4. If the result value is ‘h0000’, zero flag occurs.

234 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.121 Arithmetic Operation Instruction (DSUBU)

Arithmetic
operation DSUBU S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer
Data address to execute the subtraction operation with S2
S1 DWORD
0(h0000) to 4294967295(hFFFFFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the subtraction operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
1. Subtract the double word value of S2 from the
double word value of S1 and then store the result into
the destination double word D.
2. Executes the Unsigned operation.
3. If the result value is ‘h00000000’ or out of this,
borrow flag occurs.
4. If the result value ‘h00000000’, zero flag occurs.

© Copyright Reserved Autonics Co., Ltd. 235


5 Instruction

5.5.122 Arithmetic Operation Instruction (SUBL)

Arithmetic
operation SUBL S1 S2 D N N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data address to execute the subtraction operation with S2

-32768(h8000) to 32767(h7FFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 INT Data address to execute the subtraction operation with S1
-32768(h8000) to 32767(h7FFF)
Y, F, Z, T, C, M, S, L, D, UW
D INT Address to save the operation result
-32768(h8000) to 32767(h7FFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Subtracts the number of N word values, which are
from S2 to S2(N-1), from the double word value of S1
respectively, and then stores the result into the
number of N corresponding destination double words
beginning with the word D.
2. Executes the Signed operation.
(h8000(-32768) to hFFFF(-1) < 0 to h7FFF(32767))
3. If the result value is ‘h0000’, zero flag occurs.

236 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.123 Arithmetic Operation Instruction (DSUBL)

Arithmetic
operation DSUBL S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data address to execute the subtraction operation with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DINT Data address to execute the subtraction operation with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DINT Address to save the operation result
-2147483648(h80000000) to 2147483647(h7FFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Subtracts the number of N double word values,
which are from S2 to S2(N-1), from double word value
of S1 respectively, and then stores the result into the
number of N corresponding destination double words
beginning with the double word D.
2. Executes the Signed operation.
(h80000000(-2147483648) to hFFFFFFFF(-1) <
0 to h7FFFFFFF(2147483647))
3. If the result value is ‘h00000000’, zero flag occurs.

© Copyright Reserved Autonics Co., Ltd. 237


5 Instruction

5.5.124 Arithmetic Operation Instruction (SUBLU)

Arithmetic
operation SUBLU S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the subtraction operation with S2

0(h0000) to 65535(hFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the subtraction operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Subtracts the number of N word values, which are
from S2 to S2(N-1), from word value of S1
respectively, and then stores the result into the
number of N corresponding destination words
beginning with the word D.
2. Executes the Unsigned operation.
3. If the result value is ‘h0000’ or out of this, borrow
flag occurs.
4. If the result value is ‘h0000’, zero flag occurs.

238 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.125 Arithmetic Operation Instruction (DSUBLU)

Arithmetic
operation DSUBLU S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the subtraction operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the subtraction operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Subtracts the number of N double word values,
which are from S2 to S2(N-1), from double word value
of S1 respectively, and then stores the result into the
number of N corresponding destination beginning with
the double word D.
2. Executes the Unsigned operation.
3. If the result value is ‘h00000000’ or out of this,
borrow flag occurs.
4. If the result value ‘h00000000’, zero flag occurs.

© Copyright Reserved Autonics Co., Ltd. 239


5 Instruction

5.5.126 Arithmetic Operation Instruction (MUL)

Arithmetic
operation MUL S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero
Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data address to execute the multiplication with S2

-32768(h8000) to 32767(h7FFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data address to execute the multiplication with S1
-32768(h8000) to 32767(h7FFF)
Y, F, Z, T, C, M, S, L, D, UW
D DINT Address to save the operation result
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. Multiplies the word value of S1 and that of S2, and
then stores the result into the destination double word
“D”.
2. Executes the Signed operation.
3. If the result value is ‘0’, zero flag occurs.

240 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.127 Arithmetic Operation Instruction (DMUL)

Arithmetic
operation DMUL S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data address to execute the multiplication with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data address to execute the multiplication with S1
-2147483648(h80000000 to 2147483647(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D QWORD Address to save the operation result

<Ladder>
1. Multiplies the double word value of S1 and that of
S2, and then stores the result into the destination
“Quad Word D”.
2. Executes the Signed operation.
3. If the result value is ‘0’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 241


5 Instruction

5.5.128 Arithmetic Operation Instruction (MULU)

Arithmetic
operation MULU S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the multiplication with S2

0(h0000) to 65535(hFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the multiplication with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
1. Multiplies the word value of S1 and that of S2, and
then stores the result into the destination “Double
Word DW”.
2. Executes the Unsigned operation.
3. If the result value is ‘0’, zero flag occurs.

242 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.129 Arithmetic Operation Instruction (DMULU)

Arithmetic
operation DMULU S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the multiplication with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the multiplication with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D QWORD Address to save the operation result

<Ladder>
1. Multiplies the double word value of S1 and that of
S2, and then stores the result into the destination
“Quad Word D”.
2. Executes the Unsigned operation.
3. If the result value is ‘0’, zero flag occurs.

© Copyright Reserved Autonics Co., Ltd. 243


5 Instruction

5.5.130 Arithmetic Operation Instruction (MULL)

Arithmetic
operation MULL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data address to execute the multiplication with S2

-32768(h8000) to 32767(h7FFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 INT Data address to execute the multiplication with S1
-32768(h8000) to 32767(h7FFF)
Y, F, Z, T, C, M, S, L, D, UW
D DINT Address to save the operation result
-2147483648(h80000000) to 2147483647(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Multiplies the word value of S1 and the number of N
word values, which are from S2 to S2(N-1),
respectively, and then stores the result into the number
of corresponding destination double words beginning
with double word D.
2. Executes the Signed operation.
3. Any one of the results is ‘0’, zero flag occurs.

244 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.131 Arithmetic Operation Instruction (DMULL)

Arithmetic
operation DMULL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data address to execute the multiplication with S2

-2147483648(h80000000) to 2147483647(h7FFFFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DINT Data address to execute the multiplication with S1
-2147483648(h80000000) to 2147483647(h7FFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D QINT Address to save the operation result

X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Multiplies the double word value of S1 and the
number of N double word values, which are from S2 to
S2(N-1), respectively, and then stores the result into
the number of corresponding destination quad words
beginning with D.
2. Executes the Signed operation.
3. Any one of the results is ‘0’, zero flag occurs.

© Copyright Reserved Autonics Co., Ltd. 245


5 Instruction

5.5.132 Arithmetic Operation Instruction (MULLU)

Arithmetic
operation MULLU S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S1 WORD Data address to execute the multiplication with S2
0(h0000) to 65535(hFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the multiplication with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute
N WORD the operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Multiplies the word value of S1 and the number of N
word values, which are from S2 to S2(N-1)
respectively, and then stores the result into the number
of corresponding destination double words beginning
with double word D one by one.
2. Executes the Unsigned operation.
3. Any one of the results is ‘0’, zero flag occurs.

246 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.133 Arithmetic Operation Instruction (DMULLU)

Arithmetic
operation DMULLU S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the multiplication with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the multiplication with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D QWORD Address to save the operation result

X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Multiplies the double word value of S1 and the
number of N double word values, which are from S2 to
S2(N-1), and then stores the result into the number of
N corresponding destination quad words beginning
with quad word D one by one.
2. Executes the Unsigned operation.
3. Any one of the results is ‘0’, zero flag occurs.

© Copyright Reserved Autonics Co., Ltd. 247


5 Instruction

5.5.134 Arithmetic Operation Instruction (DIV)

Arithmetic
operation DIV S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data address to execute the division operation with S2

-32768(h8000) to 32767(h7FFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 INT Data address to execute the division operation with S1
-32768(h8000) to 32767(h7FFF)
Y, F, Z, T, C, M, S, L, D, UW
D INT Address to save the operation result
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. Divides the word value of S1 by that of S2 and then
stores the quotient and the remainder into the
destination “Word D” and “Word D+1” respectively.
2. Executes the Signed operation.
3. If the divisor is 0, error flag is SET.
4. If the dividend is 0, zero flag is SET.

(Quotient)

(Remainder)

248 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.135 Arithmetic Operation Instruction (DDIV)

Arithmetic
operation DDIV S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data address to execute the division operation with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DINT Data address to execute the division operation with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DINT Address to save the operation result
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. Divides the double word value of S1 by that of S2
and then stores the quotient and the remainder into the
destination “Double Word D” and “Double Word D+1”
respectively.
2. Executes the Signed operation.
3. If the divisor is 0, error flag is SET.
4. If the dividend is 0, zero flag is SET.

(Quotient)

(Remainder)

© Copyright Reserved Autonics Co., Ltd. 249


5 Instruction

5.5.136 Arithmetic Operation Instruction (DIVU)

Arithmetic
operation DIVU S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the division operation with S2

0(h0000) to 65535(hFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the division operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)

<Ladder>
1. Divides the word value of S1 by that of S2 and then
stores the quotient and the remainder into the
destination “Word D” and “Word D+1” respectively.
2. Executes the Unsigned operation.
3. If the divisor is 0, error flag is SET.
4. If the dividend is 0, zero flag is SET.

(Quotient)

(Remainder)

250 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.137 Arithmetic Operation Instruction (DDIVU)

Arithmetic
operation DDIVU S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the division operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the division operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
1. Divides the double word value of S1 by that of S2
and then stores the quotient and the remainder into the
destination “Double Word D” and “Double Word D+1”
respectively.
2. Executes the Unsigned operation.
3. If the divisor is 0, error flag is SET.
4. If the dividend is 0, zero flag is SET.

(Quotient)

(Remainder)

© Copyright Reserved Autonics Co., Ltd. 251


5 Instruction

5.5.138 Arithmetic Operation Instruction (DIVL)

Arithmetic
operation DIVL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 INT Data address to execute the division operation with S2

-32768(h8000) to 32767(h7FFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 INT Data address to execute the division operation with S1
-32768(h8000) to 32767(h7FFF)
Y, F, Z, T, C, M, S, L, D, UW
D INT Address to save the operation result
-32768(h8000) to 32767(h7FFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Divides the word value of S1 by the number of N
word values beginning with S2 and then stores the
quotient and the remainder into the destination “Word
D” and “Word D+1” respectively.
2. Executes the Signed operation.
3. If the divisor is 0, error flag is SET.
4. If the dividend is 0, zero flag is SET.

(Quotient)

(Remainder)

252 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.139 Arithmetic Operation Instruction (DDIVL)

Arithmetic
operation DDIVL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DINT Data address to execute the division operation with S2

-2147483648(h80000000) to 2147483647(hFFFFFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DINT Data address to execute the division operation with S1
-2147483648(h80000000) to 2147483647(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DINT Address to save the operation result
-2147483648(h80000000) to 2147483647(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Divides the double word value of S1 by the number
of N double word values beginning with S2 and then
stores the quotient and the remainder into the
destination “Double Word D” and “Double Word D+1”
respectively.
2. Executes the Signed operation.
3. If the divisor is 0, error flag is SET.
4. If the dividend is 0, zero flag is SET.

(Quotient)

(Remainder)

© Copyright Reserved Autonics Co., Ltd. 253


5 Instruction

5.5.140 Arithmetic Operation Instruction (DIVLU)

Arithmetic
operation DIVLU S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the division operation with S2

0(h0000) to 65535(hFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the division operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Divides the word value of S1 by the number of N
word values beginning with S2 and then stores the
quotient and the remainder into the destination “Word
D” and “Word D+1” respectively.
2. Executes the Unsigned operation.
3. If the divisor is 0, error flag is SET.
4. If the dividend is 0, zero flag is SET.

(Quotient)

(Remainder)

254 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.141 Arithmetic Operation Instruction (DDIVLU)

Arithmetic
operation DDIVLU S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the division operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the division operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Divides the double word value of S1 by the number
of N double word values beginning with S2 and then
stores the quotient and the remainder into the
destination “Double Word D” and “Double Word D+1”
respectively.
2. Executes the Unsigned operation.
3. If the divisor is 0, error flag is SET.
4. If the dividend is 0, zero flag is SET.

(Quotient)

(Remainder)

© Copyright Reserved Autonics Co., Ltd. 255


5 Instruction

5.5.142 Arithmetic Operation Instruction (INC)

Arithmetic
operation INC D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

D WORD Data address to execute the operation

0(h0000) to 65535(hFFFF) ◎ ◎ 3

<Ladder>
1. Increases the value of destination word D by ‘1’.
2. If the value is increased from the maximum value by
1 and then becomes 0, zero flag and carry flag are
SET.

256 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.143 Arithmetic Operation Instruction (DINC)

Arithmetic
operation DINC D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

D DWORD Data address to execute the operation

0(h0000) to 4294967295(hFFFFFFFF) ◎ ◎ 3

<Ladder>
1. Increases the value of destination double word D by
‘1’.
2. If the value is increased from the maximum value by
1 and then D value becomes 0, zero flag and carry flag
are SET.

© Copyright Reserved Autonics Co., Ltd. 257


5 Instruction

5.5.144 Arithmetic Operation Instruction (DEC)

Arithmetic
operation DEC D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

D WORD Data address to execute the operation

0(h0000) to 65535(hFFFF) ◎ ◎ 3

<Ladder>
1. Decreases the value of destination word D by ‘1’.
2. If D value is ‘0’, zero flag is SET.
3. If D value is decreased again from ‘0’, borrow flag is
SET.

258 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.145 Arithmetic Operation Instruction (DDEC)

Arithmetic
operation DDEC D Applicable model
Instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

D DWORD Data address to execute the operation

0(h0000) to 4294967295(hFFFFFFFF) ◎ ◎ 3

<Ladder>
1. Decreases the value of destination double word D
by ‘1’.
2. If D value is ‘0’, zero flag is SET.
3. If D value is decreased again from ‘0’, carry flag is
SET.

© Copyright Reserved Autonics Co., Ltd. 259


5 Instruction

5.5.146 Arithmetic Operation Instruction (ADDB)

Arithmetic
operation ADDB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the BCD addition operation with S2

h0000 to h9999 ◎ ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the BCD addition operation with S1
h0000 to h9999
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
h0000 to h9999

<Ladder>
1. Adds the word value of S1 and that of S2, both are
composed of BCD codes, and then stores the result
into the destination word D as BCD code.
2. If any of the value not composed of the BCD code is
detected in S1 and S2, error flag is SET. (Except 0 to
9999)
3. If the result value is out of the range of D, carry flag
is SET.
4. If the result value is ‘0’, zero flag is SET.

260 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.147 Arithmetic Operation Instruction (DADDB)

Arithmetic
operation DADDB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the BCD addition operation with S2

h00000000 to h99999999 ◎ ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the BCD addition operation with S1
h00000000 to h99999999
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
h00000000 to h99999999

<Ladder>
1. Adds the double word values of S1 and S2, both are
composed of BCD codes, and then stores the result
into the destination double word D as BCD codes.
2. If any of the value not composed of the BCD code is
detected in S1 and S2, error flag is SET.
(Except 0 to 99999999)
3. If the result value is out of the range of D, carry flag
is SET.
4. If the result value is ‘0’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 261


5 Instruction

5.5.148 Arithmetic Operation Instruction (ADDBL)

Arithmetic
operation ADDBL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the BCD addition operation with S2

h0000 to h9999 ◎ ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the BCD addition operation with S1
h0000 to h9999
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
h0000 to h9999
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Adds the word value of S1 composed of BCD code
and the number of N word values beginning with S2
also composed of BCD code, respectively, and then
stores the result into the number of N destination
words beginning with D as BCD code.
2. If any of the value not composed of the BCD code is
detected in S1 and S2, error flag is SET.
3. If any of the result value from D to D+N is out of the
D range, carry flag is SET.
4. If any of the result value from D to D+N is 0, zero
flag is SET.

262 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.149 Arithmetic Operation Instruction (DADDBL)

Arithmetic
operation DADDBL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the BCD addition operation with S2

h00000000 to h99999999 ◎ ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the BCD addition operation with S1
h00000000 to h99999999
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
h00000000 to h99999999
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Adds the double word values S1 composed of BCD
code and the number of N double word values
beginning with S2 also composed of BCD code,
respectively, and then stores the result into the number
of N destination double words beginning with D double
word as BCD code.
2. If any of the value not composed of the BCD code is
detected in S1 and S2 error flag is SET.
3. If any of the result value from D and D+N is out of
the D range, carry flag is SET.
4. If any of the result value from D and D+N is 0, zero
flag is SET.

© Copyright Reserved Autonics Co., Ltd. 263


5 Instruction

5.5.150 Arithmetic Operation Instruction (SUBB)

Arithmetic
operation SUBB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the BCD subtraction operation with S2

h0000 to h9999 ◎ ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the BCD subtraction operation with S1
h0000 to h9999
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
h0000 to h9999

<Ladder>
1. Subtracts the word value of S2 composed of BCD
code from the word value of S1 composed of BCD
code, and then stores the result into the destination
word D as BCD code.
2. If any of the value not composed of the BCD code is
detected in S1 and S2, error flag is SET. (Except 0 to
9999)
3. If the result value is negative number, it is stored as
‘h9999’.
4. If the result value is ‘0’, zero flag is SET.

264 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.151 Arithmetic Operation Instruction (DSUBB)

Arithmetic
operation DSUBB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the BCD subtraction operation with S2


h00000000 to h99999999 ◎ ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the BCD subtraction operation with S1
h00000000 to h99999999
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
h00000000 to h99999999

<Ladder>
1. Subtracts the double word value of S2 from double
word value of S1, both are composed of BCD code,
and then stores the result into the destination double
word D as BCD code.
2. If any of the value not composed of the BCD code is
detected in S1 and S2, error flag is SET. (Except 0 to
99999999)
3. If the result value is negative number, it is stored as
‘h9999’.
4. If the result value is ‘0’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 265


5 Instruction

5.5.152 Arithmetic Operation Instruction (SUBBL)

Arithmetic
operation SUBBL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the BCD subtraction operation with S2

h0000 to h9999 ◎ ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the BCD subtraction operation with S1
h0000 to h9999
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
h0000 to h9999
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Subtracts the number of N words values composed
of BCD code beginning with S2 from word value of S1
composed of BCD code and then stores the result into
the number of N destination words beginning with D as
BCD code.
2. If any of the value not composed of the BCD code is
detected in S1 and S2, error flag is SET.
3. If any of the result value in the range from D to D+N
is negative number in word area, it is stored as
‘h9999’.
4. If any of the result value in the range from D to D+N
is ‘0’, zero flag is SET.

266 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.153 Arithmetic Operation Instruction (DSUBBL)

Arithmetic
operation DSUBBL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the BCD subtraction operation with S2

h00000000 to h99999999 ◎ ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the BCD subtraction operation with S1
h00000000 to h99999999
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
h00000000 to h99999999
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Subtracts the number of N double word values from
S2 to S2(N-1), composed of BCD code, from the
double word value of S1 composed of BCD code
respectively, and then stores the result into the number
of N destination double words beginning with D as
BCD code.
2. If any of the value not composed of the BCD code is
detected in S1 and S2, error flag is SET.
3. If any of the result value in the range from D to D+N
is out of the D range, carry flag is SET.
4. If any of the result value in the range from D to D+N
is ‘0’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 267


5 Instruction

5.5.154 Arithmetic Operation Instruction (MULB)

Arithmetic
operation MULB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the BCD multiplication with S2

h0000 to h9999 ◎ ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the BCD multiplication with S1
h0000 to h9999
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
h00000000 to h99999999

<Ladder>
1. Multiplies the word value of S1 and that of S2, both
are composed of BCD code and then stores the
result into the destination double word D as BCD
code.
2. If any of the value not composed of the BCD code
is detected in S1 and S2, error flag is SET. (Except 0
to 9999)
3. If the result value is out of the D range, carry flag is
SET.
4. If the result value is ‘0’, zero flag is SET.

268 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.155 Arithmetic Operation Instruction (DMULB)

Arithmetic
operation DMULB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the BCD multiplication with S2

h00000000 to h99999999 ◎ ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the BCD multiplication with S1
h00000000 to h99999999
Y, F, Z, T, C, M, S, L, D, UW
D QWORD Address to save the operation result

<Ladder>
1. Multiplies the double word value of S1 and that of
S2, both are composed of BCD code, and then stores
the result into the destination quad word D as BCD
code.
2. If any of the value not composed of the BCD code is
detected in S1 and S2, error flag is SET.
(Except 0 to 99999999)
3. If the result value is out of the D range, carry flag is
SET.
4. If the result value is ‘0’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 269


5 Instruction

5.5.156 Arithmetic Operation Instruction (MULBL)

Arithmetic
operation MULBL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the BCD multiplication with S2

h0000 to h9999 ◎ ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the BCD multiplication with S1
h0000 to h9999
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
h00000000 to h99999999
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Multiplies the word value of S1 and the number of N
word values from S2 to S2(N-1), both are composed of
BCD code, one by one, and then stores the result into
the number of N destination double words beginning
with D as BCD code.
2. If any of the value not composed of the BCD code is
detected in S1 and S2, error flag is SET.
3. If any of the result value in the range from D to D+N
is out of the D range, carry flag is SET.
4. If any of the result value in the range from D to D+N
is ‘0’, zero flag is SET.

270 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.157 Arithmetic Operation Instruction (DMULBL)

Arithmetic
operation DMULBL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the BCD multiplication with S2

h00000000 to h99999999 ◎ ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the BCD multiplication with S1
h00000000 to h99999999
Y, F, Z, T, C, M, S, L, D, UW
D QWORD Address to save the operation result

X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Multiplies the double word value of S1 composed of
BCD code and the number of N double words from S2
to S2(N-1) composed of BCD code, one by one, and
then stores the result into the number of N destination
quad words beginning with D as BCD code.
2. If any of the value not composed of the BCD code is
detected in S1 and S2, error flag is SET.
3. If any of the result value in the range from D to D+N
is out of the D range, carry flag is SET.
4. If any of the result value in the range from D to D+N
is ‘0’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 271


5 Instruction

5.5.158 Arithmetic Operation Instruction (DIVB)

Arithmetic
operation DIVB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the BCD division operation with S2

h0000 to h9999 ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the BCD division operation with S1
h0000 to h9999
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
h0000 to h9999

<Ladder>
1. Divides the word value of S1 composed of BCD
code by the word value of S2 composed of BCD code,
and then stores the quotient and the remainder into the
D and D+1 words respectively.
2. If S2 is 0, or either S1 or S2 is not the BCD code,
error flag is SET.
3. If the quotient is ‘0’, zero flag is SET.

(Quotient)

(Remainder)

272 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.159 Arithmetic Operation Instruction (DDIVB)

Arithmetic
operation DDIVB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the BCD division operation with S2

h00000000 to h99999999 ◎ ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the BCD division operation with S1
h00000000 to h99999999
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
h00000000 to h99999999

<Ladder>
1. Divides the double word value of S1 composed of
BCD code by the double word value of S2 composed
of BCD code, and then stores the quotient and the
remainder into the D and D+1 double words
respectively.
2. If S2 is 0, or either S1 or S2 is not the BCD code,
error flag is SET.
3. If the quotient is ‘0’, zero flag is SET.

(Quotient)

(Remainder)

© Copyright Reserved Autonics Co., Ltd. 273


5 Instruction

5.5.160 Arithmetic Operation Instruction (DIVBL)

Arithmetic
operation DIVBL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the BCD division operation with S2

h0000 to h9999 ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the BCD division operation with S1
h0000 to h9999
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
h0000 to h9999
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Divides the word value of S1 composed of BCD
code by the number of N word values from S2 to S2(N-
1) composed of BCD code, and then stores the
quotient and the remainder into the D and D+1 double
words respectively.
2. If S2 is 0, or either S1 or S2 is not the BCD code,
error flag is SET.
3. If the quotient is ‘0’, zero flag is SET.

(Quotient)

(Remainder)

274 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.161 Arithmetic Operation Instruction (DDIVBL)

Arithmetic
operation DDIVBL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the BCD division operation with S2

h00000000 to h99999999 ◎ ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the BCD division operation with S1
h00000000 to h99999999
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
h00000000 to h99999999
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Divides the double word value of S1 composed of
BCD code by the number of N double word values
from S2 to S2(N-1), composed of BCD code, and then
stores the quotient and the remainder into the D and
D+1 double words respectively.
2. If S2 is 0, or either S1 or S2 is not the BCD code,
error flag is SET.
3. If the quotient is ‘0’, zero flag is SET.

(Quotient)

(Remainder)

© Copyright Reserved Autonics Co., Ltd. 275


5 Instruction

5.5.162 Arithmetic Operation Instruction (INCB)

Arithmetic
operation INCB D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

D WORD BCD data address to execute the operation

h0000 to h9999 ◎ ◎ ◎ 3

<Ladder>
1. Increases the word value of D composed of BCD
code by 1 as BCD code.
2. If the word value of D is not the BCD code, error flag
is SET.
3. If the increased result is 0(BCD), zero flag is SET.
4. If the result value is out of the D word range, carry
flag is SET.

276 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.163 Arithmetic Operation Instruction (DINCB)

Arithmetic
operation DINCB D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

D DWORD BCD data address to execute the operation

h00000000 to h99999999 ◎ ◎ ◎ 3

<Ladder>
1. Increases the double word value of D composed of
BCD code by 1 as BCD code.
2. If the double word value of D is not the BCD code,
error flag is SET.
3. If the increased result is 0(BCD), zero flag is SET.
4. If the result value is out of the D double word range,
carry flag is SET.

© Copyright Reserved Autonics Co., Ltd. 277


5 Instruction

5.5.164 Arithmetic Operation Instruction (DECB)

Arithmetic
operation DECB D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

D WORD BCD data address to execute the operation

h0000 to h9999 ◎ ◎ ◎ 3

<Ladder>
1. Decreases the word value of D composed of BCD
code by 1 as BCD code.
2. If the word value of D is not the BCD code, error flag
is SET.
3. If the decreased result is 0(BCD), zero flag is SET.
4. If the result value is out of D word range, borrow flag
is SET.

278 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.165 Arithmetic Operation Instruction (DDECB)

Arithmetic
operation DDECB D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, F, Z, T, C, M, S, L, D, UW

D DWORD BCD data address to execute the operation

h00000000 to h99999999 ◎ ◎ ◎ 3

<Ladder>
1. Decreases the double word of D composed of BCD
code by 1 as BCD code.
2. If the double word value of D is not BCD code, error
flag is SET.
3. If the decreased result is 0(BCD), zero flag is SET.
4. If the result value is out of the D double word range,
borrow flag is SET.

© Copyright Reserved Autonics Co., Ltd. 279


5 Instruction

5.5.166 Logical Operation Instruction (WAND)

Logical
operation WAND S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the ‘&’ operation with S2

0(h0000) to 65535(hFFFF) ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the ‘&’ operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)

<Ladder>
1. Executes the ‘&’ operation for every bit of S1 word
and the corresponding bit of S2 word and then stores
the result into the D word.
2. If the result value is ‘0’, zero flag is SET.

280 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.167 Logical Operation Instruction (DAND)

Logical
operation DAND S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the ‘&’ operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the ‘&’ operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
1. Executes the ‘&’ operation for every bit of S1
double word and the corresponding bit of S2 double
word and then stores the result into the D double
word.
2. If the result value is ‘0’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 281


5 Instruction

5.5.168 Logical Operation Instruction (AAND)

Logical
operation AAND S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, T, C, M, UB

S1 BIT Start address of the bit device to execute the ‘&’ operation with S2

Not applicable ◎ 9
X, Y, F, T, C, M, UB
S2 BIT Start address of the bit device to execute the '&' operation with S1
Not applicable
Y, F, T, C, M, UB
D BIT Start address of the bit device to store the operation result
Not applicable
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of bit device to execute the operation including the
N WORD start address
As many as the number of devices remained in the corresponding
S1, S2, and D area

<Ladder>
Executes the ‘&’ operation for the number of N bits,
from S1 to SN, and the number of N bits, from S2 to
S2(N-1), and then stores the result into the number of
N bits beginning with D.

Upper bit

Upper bit

Upper bit

Upper bit

Upper bit bit

282 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.169 Logical Operation Instruction (WANDL)

Logical
operation WANDL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the ‘&’ operation with S2

0(h0000) to 65535(hFFFF) ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the ‘&’ operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Executes the bitwise ‘&’ operation for every bit of S1
word and the number of N words from S2 to S2 (N-1)
and then stores the result into the number of N words
beginning with D.
2. If the result value is ‘0’ word, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 283


5 Instruction

5.5.170 Logical Operation Instruction (DANDL)

Logical
operation DANDL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the ‘&’ operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the ‘&’ operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Executes the bitwise ‘&’ operation for every bit of S1
double words and the number of N words from S2 to
S2 (N-1) and then stores the result into the number of
N words beginning with D.
2. If the result value is ‘0’ double word, zero flag is
SET.

284 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.171 Logical Operation Instruction (WOR)

Logical
operation WOR S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the ‘OR’ operation with S2

0(h0000) to 65535(hFFFF) ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the ‘OR’ operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)

<Ladder>
1. Executes the logical ‘OR’ operation for every bit in
S1 words and the corresponding bit of S2 words and
then stores the result into the D word.
2. If the result value is ‘0’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 285


5 Instruction

5.5.172 Logical Operation Instruction (DOR)

Logical
operation DOR S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the ‘OR’ operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ 5
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the ‘OR’ operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
1. Executes the logical ‘OR’ operation for every bit of
S1 double words and the corresponding bit of S2
double words, and then stores the result into the D
double word.
2. If the result value is ‘0’, zero flag is SET.

286 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.173 Logical Operation Instruction (AOR)

Logical
operation AOR S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, T, C, M, UB

S1 BIT Data address to execute the ‘OR’ operation with S2

Not applicable ◎ 9
X, Y, F, T, C, M, UB
S2 BIT Data address to execute the ‘OR’ operation with S1
Not applicable
Y, F, T, C, M, UB
D BIT Start address of the bit device to save the operation result
Not applicable
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of bit devices to execute the operation including the
N WORD start address
As many as the number of devices remained in the corresponding
S1, S2, and D area

<Ladder>
Executes the logical ‘OR’ operation for the number of N
bits from S1 to SN and the number of N bits from S2 to
S2(N- 1), and then stores the result into the number of
N bits beginning with D.

Upper bit

Upper bit

Upper bit

Upper bit

Upper bit bit

© Copyright Reserved Autonics Co., Ltd. 287


5 Instruction

5.5.174 Logical Operation Instruction (WORL)

Logical
operation WORL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the ‘OR’ operation with S2

0(h0000) to 65535(hFFFF) ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the ‘OR’ operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Executes the bitwise logical ‘OR’ operation for
every bit of S1 words and the number of N words
from S2 to S2 (N-1), and then stores the result into
the D word.
2. If the result value is ‘0’ word, zero flag is SET.

288 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.175 Logical Operation Instruction (DORL)

Logical
operation DORL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the ‘OR’ operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the ‘OR’ operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Executes the bitwise logical ‘OR’ operation for
every bit of S1 double word and the number of N
double words from S2 to S2(N-1) respectively and
then stores the result into the number of N double
words beginning with D double word.
2. If the result value is ‘0’ double word, zero flag is
SET.

© Copyright Reserved Autonics Co., Ltd. 289


5 Instruction

5.5.176 Logical Operation Instruction (XOR)

Logical
operation XOR S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the ‘XOR’ operation with S2

0(h0000) to 65535(hFFFF) ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the ‘XOR’ operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)

<Ladder>
1. Executes the logical ‘XOR’ operation for every bit
of S1 word and the corresponding bit of S2 word and
then stores the result into the D word.
2. If the result value is ‘0’, zero flag is SET.

290 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.177 Logical Operation Instruction (DXOR)

Logical
operation DXOR S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the ‘XOR’ operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the ‘XOR’ operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
1. Executes the logical ‘XOR’ operation for every bit of
S1 double word and the corresponding bit of S2
double word and then stores the result into the D
double word.
2. If the result value is ‘0’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 291


5 Instruction

5.5.178 Logical Operation Instruction (AXOR)

Logical
operation AXOR S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, T, C, M, UB

S1 BIT Start address of the bit device to execute the ‘XOR’ operation with S2

Not applicable ◎ 9
X, Y, F, T, C, M, UB
S2 BIT Start address of the bit device to execute the ‘XOR’ operation with S1
Not applicable
Y, F, T, C, M, UB
D BIT Address to save the operation result
Not applicable
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of bit devices including the start address to execute
N WORD the operation
As many as the number of devices remained in S1, S2 and D area

<Ladder>
Executes the logical ‘XOR’ operation for the number
of N bits from S1 to SN and the number of N bits from
S2 to S2 (N-1), bit by bit, and then stores the result
into the number of N bits beginning with D destination
bit.

N
Upper bit

Upper bit N

Upper bit

Upper bit

Upper bit

bit

292 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.179 Logical Operation Instruction (XORL)

Logical
operation XORL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the ‘XOR’ operation with S2

0(h0000) to 65535(hFFFF) ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the ‘XOR’ operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Executes the bitwise logical ‘XOR’ operation for
every bit of S1 word and the number of N words, from
S2 to S2 (N-1), then stores the result into the number
of N words beginning with D.
2. If the result value is ‘0’ word, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 293


5 Instruction

5.5.180 Logical Operation Instruction (DXORL)

Logical
operation DXORL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the ‘XOR’ operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the ‘XOR’ operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Executes the bitwise logical ‘XOR’ operation for
every bit of S1 double word and the number of N
double words from S2 to S2 (N-1), and then stores
the result into the number of N double words
beginning with D.
2. If the result value is ‘0’ double word, zero flag is
SET.

294 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.181 Logical Operation Instruction (XNR)

Logical
operation XNR S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the ‘XNR’ operation with S2

0(h0000) to 65535(hFFFF) ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 WORD Data address to execute the ‘XNR’ operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)

<Ladder>
1. Executes the logical ‘XNR’ operation for every bit
of S1 word and the corresponding bit of S2 word, bit
by bit, and then stores the result into the D word.
2. If the result value is ‘0’, zero flag is SET.

© Copyright Reserved Autonics Co., Ltd. 295


5 Instruction

5.5.182 Logical Operation Instruction (DXNR)

Logical
operation DXNR S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the ‘XNR’ operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ 7
X, Y, F, Z, T, C, M, S, L, D, UW, integer
S2 DWORD Data address to execute the ‘XNR’ operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)

<Ladder>
1. Executes the logical ‘XNR’ operation for every bit
of S1 double word and the corresponding bit of S2
double word, and then stores the result into the D
double word.
2. If the result value is ‘0’, zero flag is SET.

296 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.183 Logical Operation Instruction (AXNR)

Logical
operation AXNR S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, T, C, M, UB

S1 BIT Start address of the bit device to execute the ‘XNR’ operation with S2

Not applicable ◎ 9
X, Y, F, T, C, M, UB
S2 BIT Start address of the bit device to execute the ‘XNR’ operation with S1
Not applicable
Y, F, T, C, M, UB
D BIT Start address of the bit device to save the operation result
Not applicable
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of bit devices to execute the operation including the
N WORD start address
As many as the number of devices remained in the corresponding
S1, S2, and D area

<Ladder>
Executes the logical ‘XNR’ operation for the number
of N bits from S1 to SN and the number of N bits from
S2 to S2 (N-1), and then stores the result into the
number of N bits beginning with D destination bit.

Upper bit

Upper bit

Upper bit

Upper bit

Upper bit bit

© Copyright Reserved Autonics Co., Ltd. 297


5 Instruction

5.5.184 Logical Operation Instruction (XNRL)

Logical
operation XNRL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 WORD Data address to execute the ‘XNR’ operation with S2

0(h0000) to 65535(hFFFF) ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 WORD Data address to execute the ‘XNR’ operation with S1
0(h0000) to 65535(hFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Executes the bitwise logical ‘XNR’ operation for
every bit of S1 word and the number of N words from
S2 to S2 (N-1) bit by bit, and then stores the result into
the number of N words from D word.
2. If the result value is ‘0’ word, zero flag is SET.

298 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.185 Logical Operation Instruction (DXNRL)

Logical
operation DXNRL S1 S2 D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S1 DWORD Data address to execute the ‘XNR’ operation with S2

0(h0000) to 4294967295(hFFFFFFFF) ◎ 9
X, Y, F, Z, T, C, M, S, L, D, UW
S2 DWORD Data address to execute the ‘XNR’ operation with S1
0(h0000) to 4294967295(hFFFFFFFF)
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Address to save the operation result
0(h0000) to 4294967295(hFFFFFFFF)
X, Y, F, Z, T, C, M, S, L, D, UW, integer
The number of S2 data address and saved address to execute the
N WORD operation with S1
In the range within the corresponding device area of S2 and D

<Ladder>
1. Executes the logical ‘XNR’ operation for every bit of
S1 double word and the number of N double words
from S2 to S2 (N-1), bit by bit, and then stores the
result into the number of N double words beginning
with D.
2. If the result value is ‘0’ double word, zero flag is
SET.

© Copyright Reserved Autonics Co., Ltd. 299


5 Instruction

5.5.186 BIN/BCD conversion Instruction (BIN2BCD)

BIN/BCD
conversion BIN2BCD S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S WORD Device number which has to be transmitted data or data

0 to 9999(h0000 to h270F) ◎ 5
Y, F, Z, T, C, M, S, L, D, UW
D WORD Device address to save converted data
h0000 to h9999

<Ladder>
1. Converts the BINARY data (0 to h270F) stored in S
device into the BCD data and then stores the result
into the D word.
2. If the converted value is out of the range between
0 to 9999 (BIN data 0 to h270F), error flag is SET.

300 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.187 BIN/BCD conversion Instruction (DBIN2BCD)

BIN/BCD
conversion DBIN2BCD S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, F, Z, T, C, M, S, L, D, UW, integer

S DWORD Device number which has to be transmitted data or data

0 to 99999999(h00000000 to h05F5E0FF) ◎ 5
Y, F, Z, T, C, M, S, L, D, UW
D DWORD Device address to save converted data
h00000000 to h99999999

<Ladder>
1. Converts the BINARY data (0 to h05F5E0FF)
stored in S double word into the BCD data, and then
stores the result into the D double word.
2. If the converted value is out of the range from 0 to
99999999 (BIN data 0 to h05F5E0FF), error flag is
SET.

© Copyright Reserved Autonics Co., Ltd. 301


5 Instruction

5.5.188 BIN/BCD conversion Instruction (BCD2BIN)

BIN/BCD
conversion BCD2BIN S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer

S WORD Device address which saves BCD data to be converted as BIN value

h0000 to h9999 ◎ 5
Y, M, S, T, C, D, Z, F, UW
D WORD Device address to save converted data
0 to 9999(h0000 to h270F)

<Ladder>
1. Converts the BCD code (0 to 9999) stored in S
word into the BINARY data and then stores the result
into the D word.
2. If the S word is not the BCD code, error flag is
SET.

302 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.189 BIN/BCD conversion Instruction (DBCD2BIN)

BIN/BCD
conversion DBCD2BIN S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer

S DWORD Device address which saves BCD data to be converted as BIN value

h00000000 to h99999999 ◎ 5
Y, M, S, T, C, D, Z, F, UW
D DWORD Device address to save converted data
0 to 99999999(h00000000 to h05F5E0FF)

<Ladder>
1. Converts the BCD data stored in S double word
into the BINARY data, and then stores the result into
the D double word.
2. If the S double word is not the BCD code, error flag
is SET.

© Copyright Reserved Autonics Co., Ltd. 303


5 Instruction

5.5.190 String conversion Instruction (BIN2HASC)

String
conversion BIN2HASC S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer

S WORD Device address which saves to be converted data as ASCII value

h0000 to hFFFF 5
Y, M, S, T, C, D, Z, F, UW
D WORD Device address to save converted data
Allowable range per byte(h30 to h39, h41 to h46)

<Ladder>
1. Converts the BINARY data stored in S word into the
HEX ASCII one by one in order from the upper order
value.
2. The converted value is sequentially stored in D
double word beginning with D, by 2 digits per word.
3. The operation range is ‘h0000 to hFFFF’.

Upper Upper
8bit word

Lower Lower
8bit word

304 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.191 String conversion Instruction (DBIN2HASC)

String
conversion DBIN2HASC S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer

S DWORD Device address which saves to be converted data as ASCII value

h00000000 to hFFFFFFFF 5
Y, M, S, T, C, D, Z, F, UW
D QWORD Device address to save converted data
Allowable range per byte (h30 to h39, h41 to h46)

<Ladder>
1. Converts the BINARY data stored in S double word
into the HEX ASCII one by one in order from the
upper order value.
2. The converted value is sequentially stored in D
quad word beginning with D, by 2 digits per word.
3. The operation range is h00000000 to HFFFFFFFF.

Lower 8 bit of D+3 word (Upper)


upper word

Lower 8 bit of D+2 word


upper word

Lower 8 bit of D+1 word


upper word

Lower 8 bit of D word (Lower)


upper word

© Copyright Reserved Autonics Co., Ltd. 305


5 Instruction

5.5.192 String conversion Instruction (HASC2BIN)

String
conversion HASC2BIN S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW
Device address which saves HEX ASCII value to be converted
S WORD data as BIN value
Allowable range per byte (h30 to h39, h41 to h46) ◎ 5
Y, M, S, T, C, D, Z, F, UW
D WORD Device address to save converted data
h0000 to hFFFF

<Ladder>
1. Recognizes the double word value of S as ASCII
and stores the corresponding value into the D word.
2. If the converted value is not the HEX ASCII, error
bit (F34) is SET. (h30 to h39, h41 to h46)

Upper
order word
Upper 8bit
(S+1)

Lower order
Lower 8bit
word (S)

HEX ASCII
value

306 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.193 String conversion Instruction (DHASC2BIN)

String
conversion DHASC2BIN S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW
Device address which saves HEX ASCII value to be converted
S DWORD data as BIN value
Allowable range per byte (h30 to h39, h41 to h46) ◎ 5
Y, M, S, T, C, D, Z, F, UW
D DWORD Device address to save converted data
h00000000 to hFFFFFFFF

<Ladder>
1. Recognizes the quad word value of S as ASCII and
stores the corresponding value into the D double
word.
2. If the converted value is not the HEX ASCII, error
bit (F34) is SET. (h30 to h39, h41 to h46)

High order
word (S+1) Upper 8bit

Lower order
Lower 8bit
word (S)

HEX ASCII
value

© Copyright Reserved Autonics Co., Ltd. 307


5 Instruction

5.5.194 String conversion Instruction (BCD2DASC)

String
conversion BCD2DASC S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the data to be converted data as
S WORD ASCII value
h0000 to hFFFF ◎ 5
Y, M, S, T, C, D, Z, F, UW
D DWORD Device address to save converted data
Allowable range per byte (h30 to h39, h41 to h46)

<Ladder>
1. Recognizes BCD data stored in S word as decimal
number, converts each digit into the ASCII value and
then stores them sequentially into the D double word.
2. The operation range is ‘h0000 to h9999’.
3. If the S word is not the BCD code, error flag is
SET.

Upper Upper
8bit word

Lower
Lower word
8bit

308 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.195 String conversion Instruction (DBCD2DASC)

String
conversion DBCD2DASC S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the BCD data to be converted data
S DWORD
as ASCII value
h00000000 to h999999999 ◎ 5
Y, M, S, T, C, D, Z, F, UW
D QWORD Device address to save converted data
Allowable range per byte (h30 to h39, h41 to h46)

<Ladder>
1. Recognizes BCD data stored in S double word as
decimal number, converts each digit into the ASCII
value and then stores them sequentially into the D
word.
2. The operation range is h00000000 to h99999999.
3. If the S word is not the BCD code, error flag is SET.

Upper 8 bit of
D+3 word (Upper)
upper word

Upper 8 bit of D+2 word


lower word

Lower 8 bit of D+1 word


lower word

Lower 8 bit of D word (Lower)


upper word

© Copyright Reserved Autonics Co., Ltd. 309


5 Instruction

5.5.196 String conversion Instruction (DASC2BIN)

String
conversion DASC2BIN S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW
Device address which saves the Dec ASCII data to be converted
S WORD as BIN value
h30 to h39 per byte except sign bit (h2D, h28) ◎ 5
Y, M, S, T, C, D, Z, F, UW
D WORD Device address to save converted data
-32768(h8000) to 32767(h7FFF)

<Ladder>
1. Recognizes the ASCII data stored in S word as
decimal number, convert each digit into the BINARY
value, and then stores them into the D word.
2. The lower order byte of the first source word
determines the sign of the BINARY value.
3. The sign value is +(H2B), -(H2D).
4. If the sign value is positive, it can be omitted.
5. The D word is stored as Signed.
6. The operation range is -32768(h8000) to 32767
(h7FFF).
7. If the S word is not in the valid ASCII (h30 to h39)
range, corresponding to 0 to 9, error bit (F34) is SET.

S word The highest ASCII code value Sign data value


Code
converting Decimal data BIN data
S word+1 3rd ASCII code value 2nd ASCII code value

S word 5th ASCII code value 4th ASCII code value

Ex) If omitting the sign, the highest ASCII The highest code value is located in the sign data.

Code
S word converting D word
Decimal
BIN data
data
S word +1

310 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.197 String conversion Instruction (DDASC2BIN)

String
conversion DDASC2BIN S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the Dec ASCII data to be converted
S WORD as BIN value
h30 to h39 per byte except sign bit (h2D, h28) ◎ 5
Y, M, S, T, C, D, Z, F, UW
D DINT Device address to save converted data
-2147483648(h80000000) to 2147483647(hFFFFFFFF)

<Ladder>
1. Recognizes the ASCII data stored in S word as
decimal number and convert each digit into the
BINARY value then stores them into the D word.
2. The lower order byte of the first source word
determines the sign of the BINARY value.
3. The sign value is +(H2B), -(H2D).
4. If the sign value is positive, it can be omitted.
5. The D word is stored as Signed.
6. The operation range is -2147483648 (h80000000)
to 2147483647 (h7FFFFFFF).
7. If the S word is not in the valid ASCII (h30 to h39)
range, corresponding to 0 to 9, error bit (F34) is SET.

S word The highest ASCII code value Sign data value

S word+1 3rd ASCII code value 2nd ASCII code value


Code
Decimal data BIN data
converting
5th ASCII code value 4th ASCII code alue
S word+2

S word+3 7th ASCII code value 6th ASCII code value

8th ASCII code value


S word+4 9th ASCII code value

H00 10th ASCII code value


S word+5

© Copyright Reserved Autonics Co., Ltd. 311


5 Instruction

5.5.198 String conversion Instruction (STR2ASC)

String
conversion STR2ASC S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
STRING

S STRING STRING data to convert as ASCII value

String 7
Y, M, S, T, C, D, Z, F, UW
D WORD Device address to save converted data
ASCII value

<Ladder>
1. Converts STRING into the ASCII and then stores it
sequentially into the D.
2. It is available to input up to 128 characters.

D word
ASCII code
S word
converting
D word+1
String

312 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.199 String conversion Instruction (DASC2BCD)

String
conversion DASC2BCD S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the Dec ASCII data to be converted
S WORD as BCD value
h30 to h39 per byte except sign bit (h2D, h28) ◎ 5
Y, M, S, T, C, D, Z, F, UW
D WORD Device address to save converted data
h0000 to h9999

<Ladder>
1. Recognizes the ASCII data stored in S word as
decimal number and convert it into the BCD code
then stores it into the D word.
2. The converted value is stored as Unsigned and the
operation range is h0000 to h9999.
3. If the converted result is not in the valid ASCII
range (h30 to h39), error flag is SET.

Code
S word D word
converting
Decimal
BCD data
S word+1 data

© Copyright Reserved Autonics Co., Ltd. 313


5 Instruction

5.5.200 String conversion Instruction (DDASC2BCD)

String
conversion DDASC2BCD S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the Dec ASCII data to be converted
S WORD as BCD value
Allowable range per byte (h30 to h39) ◎ 5
Y, M, S, T, C, D, Z, F, UW
D DWORD Device address to save converted data
h00000000 to h99999999

<Ladder>
1. Recognizes the ASCII data stored in S word as
decimal number and convert it into the BCD code,
then stores it into the D word one by one.
2. The converted value is stored as Unsigned, and
the operation range is ‘h00000000 to h99999999’.
3. If the converted result is not in the valid ASCII
range (h30 to h39), error flag is SET. (BCD range: 0
to 9)

S word 2nd ASCII code value The highest ASCII code


Code Decimal BCD data
3rd ASCII code value converting data
S word+1 4th ASCII code value

S word+2 6th ASCII code value 5th ASCII code value

S word+3 8th ASCII code value 7th ASCII code value

314 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.201 String conversion Instruction (BIN2DASC)

String
conversion BIN2DASC S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer

S WORD Device address which saves the data to be converted as ASCII value

-32768(h8000) to 32767(h7FFF) 5
Y, M, S, T, C, D, Z, F, UW
D WORD Device address to save converted data
h30 to h39 per byte except sign bit (h2D, h28)

<Ladder>
1. Recognizes the BIN data stored in S word as
decimal number and converts it into the ASCII code,
then stores it sequentially into the D, beginning with D
word, by 2 digits per word.
2. If the word value of S is negative, the sign value ‘–
(H2D)’ will firstly be output on the first byte of D word.
3. Executes the Signed operation, and the operation
range is -32768 (h8000) to 32767 (h7FFF).

D word The highest ASCII code value Sign data value


Code
BIN data Decimal data converting
D word+1 3rd ASCII code value 2nd ASCII code value

D word+2 5th ASCII code value 4th ASCII code value

Ex) When it is positive number

Code
S D word
converting
Decimal
BIN data
data D word+1

Ex) When it is negative number

S Code
D word
converting
Decimal
BIN data
data D word+1

D word+2

© Copyright Reserved Autonics Co., Ltd. 315


5 Instruction

5.5.202 String conversion Instruction (DBIN2DASC)

String
conversion DBIN2DASC S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer

S DINT Device address which saves the data to be converted as ASCII value

-2147483648(h80000000) to 2147483647(hFFFFFFFF) ◎ 5
Y, M, S, T, C, D, Z, F, UW
D WORD Device address to save converted data
h30 to h39 per byte except sign bit (h2D, h28)

<Ladder>
1. Recognizes the BIN data stored in S double word as
decimal number and converts it into the ASC II, then
stores it into the D word beginning with D, by 2 digits
per word.
2. If the word value of S is negative, the sign value ‘–
(H2D)’ will firstly be output on the first byte of D word.
3. Executes the Signed operation, and the operation
range is -2147483648 (h80000000) to 2147483647
(h7FFFFFFF).

D word The highest ASCII code value Sign data value

Code
BIN data Decimal data converting D word+1 3rd ASCII code value 2nd ASCII code value

D word+2 5th ASCII code value 4th ASCII code value

D word+3 7th ASCII code value 6th ASCII code value

D word+4 9th ASCII code value 8th ASCII code value

D word+5 H00 10th ASCII code value

316 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.203 Code conversion Instruction (GRY2BIN)

Code
conversion GRY2BIN S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the GRAY code data to be converted
S WORD as BIN value
0(h0000) to 65535(hFFFF) 5
Y, M, S, T, C, D, Z, F, UW
D WORD Device address to save converted data
0(h0000) to 65535(hFFFF)

<Ladder>
Converts the GRAY code data stored in S word into
the BINARY data and stores it into the D.

S word GRAY code

D word BIN code

© Copyright Reserved Autonics Co., Ltd. 317


5 Instruction

5.5.204 Code conversion Instruction (DGRY2BIN)

Code
conversion DGRY2BIN S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the GRAY code data to be converted
S DWORD as BIN value
0(h00000000) to 4294967295(hFFFFFFFF) 5
Y, M, S, T, C, D, Z, F, UW
D DWORD Device address to save converted data
0(h00000000) to 4294967295(hFFFFFFFF)

<Ladder>
Converts the GRAY code data stored in S double
word into the BINARY data and stores it into the D
double word.

S double GRAY
word code

D double
BIN code
word

318 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.205 Code conversion Instruction (BIN2GRY)

Code
conversion BIN2GRY S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the data to be converted as GRAY
S WORD code value
0(h0000) to 65535(hFFFF) 5
Y, M, S, T, C, D, Z, F, UW
D WORD Device address to save converted data
0(h0000) to 65535(hFFFF)

<Ladder>
Converts the BINARY code data stored in S word into
the GRAY code data and then stores it into the D
word.

S word BIN code

D word GRAY code

© Copyright Reserved Autonics Co., Ltd. 319


5 Instruction

5.5.206 Code conversion Instruction (DBIN2GRY)

Code
conversion DBIN2GRY S D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UM, integer
Device address which saves the data to be converted as GRAY
S DWORD code value
0(h00000000) to 4294967295(hFFFFFFFF) 5
Y, M, S, T, C, D, Z, F, UW
D DWORD Device address to save converted data
0(h00000000) to 4294967295(hFFFFFFFF)

<Ladder>
Converts the BINARY code data stored in S double
word into the GRAY code data and then stores it into
the D double word.

S double
BIN code
word

D double
word GRAY code

320 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.207 Sign reversal Instruction (NEG)

Sign reversal
NEG D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, M, S, T, C, D, Z, F, UW

D WORD Device address to convert sign


0(h0000) to 65535(hFFFF) 3

<Ladder>
Reverses the sign of D word.

Sign
reversing

© Copyright Reserved Autonics Co., Ltd. 321


5 Instruction

5.5.208 Sign reversal Instruction (DNEG)

Sign reversal
DNEG D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, M, S, T, C, D, Z, F, UW

D DWORD Device address to convert sign


0(h00000000) to 4294967295(hFFFFFFFF) 3

<Ladder>
Reverses the sign of D double word.

Sign
reversing

322 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.209 Data conversion Instruction (DECO)

Data
conversion DECO S D N Applicable model
Instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW

S WORD Data address to execute the decoder operation

0(h0000) to 65535(hFFFF) ◎ 7
Y, M, S, T, C, D, Z, F, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)
X, Y, M, S, T, C, D, Z, F, UW, integer
N WORD The number of bits to be decoded
0 to 8

<Ladder>
1. Decodes the number of B bits stored in S word
from 0 to N and stores the result into the D word.
2. If the N is 0, it does not execute the instruction.
3. If the decoded value is not in the range from 0 to 8,
error flag is SET.

2N = 25 = 32 bit

Bit21 is SET

© Copyright Reserved Autonics Co., Ltd. 323


5 Instruction

5.5.210 Data conversion Instruction (ENCO)

Data
conversion ENCO S D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW

S WORD Data address to execute the encoder operation

0(h0000) to 65535(hFFFF) ◎ ◎ 7
Y, M, S, T, C, D, Z, F, UW
D WORD Address to save the operation result
0(h0000) to 65535(hFFFF)
X, Y, M, S, T, C, D, Z, F, UW, integer
N WORD The number of words to be encoded
0 to 8

<Ladder>
1. Encodes the number of N words from S to N and
stores them into the D.
2. If the N is not in the range from 0 to 8, error flag is
SET.
3. If the encoded value is 0, zero flag is SET.
4. If N is 0, it does not execute the instruction.

When N is 3,

Bit 41

324 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.211 Data conversion Instruction (EXT)

Data
conversion EXT D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, M, S, D, UW

D INT Data address to execute the operation

-32768(h8000) to 32767(h7FFF) 3

<Ladder>
1. Extends the value of D word to 32bit.
2. Executes the Signed operation.

Extends to 32 bit

© Copyright Reserved Autonics Co., Ltd. 325


5 Instruction

5.5.212 Refresh Instruction (REF)

Refresh
REF D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range
X, Y

Error

Zero

Carry

Borrow

Step
D BIT Input/Output bit device

Not applicable 5
X, Y, M, S, T, C, D, Z, F, UW, integer
N WORD The number of bit devices to refresh from D bit
0 to 65535

<Ladder>
Refreshes the number of N bit devices beginning with
I/O D bit device.

326 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.213 Display Instruction (SEG)

Display
SEG S D N Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, UB

S BIT Address which saves the data to be decoded as 7 segment


Not applicable 7
Y, M, UB
D BIT Address to save the decoded data
Not applicable
X, Y, M, S, T, C, D, Z, F, UW, integer\
N WORD The number of data to be decoded

<Ladder>
Decodes the number of N data composed of 4 bit per
each to the 7 segment data, one by one, and stores it
as the number of N data composed of 8 bit per each.

[Segment structure]

4 input bit Segment


Segment structure
Hex. Bit display

Segment data decode

© Copyright Reserved Autonics Co., Ltd. 327


5 Instruction

Ex) When N is 3
Upper bit S1 bit

Segment
Decode

Segment display

[The structure when connecting AUTONICS display unit]

Display Negative logic input Positive logic input


Hex. Dec.

“X”: It does not matter whether you input HIGH or LOW level signal.
Blank: It does not display anything even if you input the signal by using input data.
If you connect BI terminal to the VCC (HIGH level) D, it executes the Zero blanking, and if you
connect BI terminal to the GND (LOW level) terminal, it displays 0.
*AUTONICS display unit has embedded DECODER DRIVER, therefore you can use S bit without
D (Destination) bit.

328 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.214 Clock Instruction (TCMP)

Clock
TCMP S1 S2 S3 S4 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the data to be compared with ‘hour’
S1 WORD data of S4
0(h0000) to 23(h0017) ◎ 7
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the data to be compared with ‘minute’
S2 WORD data of S4
0(h0000) to 59(h0038)
X, Y, M, S, T, C, D, Z, F, UW, integer
Device address which saves the data to be compared with
S3 WORD ‘second’ data of S4
0(h0000) to 59(h0038)
X, Y, M, S, T, C, D, Z, F, UW
Device address, which saves the data to be compared with the data
S4 WORD of S1, S2 and S3.
Time data range
Y, M, S, T, C, Z, F, UB
D BIT Bit device address to save the comparison result
Not applicable

<Ladder>
Compares a data composed of S1(hour), S2(minute),
and S3(second) with a data composed of S4 to S4+2
word, and as a result;
1. If the two values are equal, D bit turns ON.
2. If S4 is less than the former, D+1 bit turns ON.
3. If S4 is larger than the former, D+2 bit turns ON.
S4 word (hour)
4. If S4 value is read as TRD instruction and
Compar-
available.
ison 5. If the input value is not time data (hour: 0 to 23,
S1(hour) S2(min) S3(sec) S4 + 1word (min)
minute: 0 to 59, second: 0 to 59) error flag is SET.

S4 + 2word (sec)

D+2 bit ON D+1 bit ON D bit ON

© Copyright Reserved Autonics Co., Ltd. 329


5 Instruction

5.5.215 Clock Instruction (TADD)

Clock
TADD S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW
Device address which saves the data to execute the time addition
S1 WORD operation with S2
Time data range ◎ ◎ 7
X, Y, M, S, T, C, D, Z, F, UW
Device address which saves the data to execute the time addition
S2 WORD operation with S1
Time data range
Y, M, S, T, C, D, Z, F, UW
D WORD Address to save the operation result
Time data range

<Ladder>
1. Executes the addition operation for each word of
S1 device, in which S1(hour), S1+1(minute), or
S1+2(second), is stored, and the corresponding word
of S2 device, in which S2(hour), S2+1(minute), or
S2+2(second) is stored, and store the result into the
designated word of D device respectively.
2. If the time exceeds 24 o’clock, carry flag occurs
and the data is stored from 0 again.
3. If the input value is not time data (hour: 0 to 23,
minute: 0 to 59, second: 0 to 59) error flag is SET.
(Note) Recognizes and displays the data as binary
value.

S1 word (hour) S2 word (hour) D word (hour)

S1 + 1word (min) S2 + 1word (min) D + 1word (min)

S1 + 2word (sec) S2 + 2word (sec) D + 2word (sec)

330 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.216 Clock Instruction (TSUB)

Clock
TSUB S1 S2 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW
Device address which saves the data to execute the time
S1 WORD subtraction operation with S2
Time data range ◎ ◎ ◎ 7
X, Y, M, S, T, C, D, Z, F, UW
Device address which saves the data to execute the time
S2 WORD subtraction operation with S1
Time data range
Y, M, S, T, C, D, Z, F, UW
D WORD Address to save the operation result
Time data range

<Ladder>
1. Executes the subtraction operation for each word of
S1 device, in which S1(hour)/S1+1(minute)/S1+2
(second) is stored, and the corresponding word of S2
in which S2(hour), S2+1(minute) orS2+2 (second) is
stored, and then stores the result into the designated
word of D device.
2. If the time is less than 0 o’clock, borrow flag occurs
and stores the result after converting into 24-hour
data.
3. If the input value is not time data (hour: 0 to 23,
minute: 0 to 59, second: 0 to 59) error flag is SET.
(Note) Recognizes and displays the data as binary
value.

S1 word (hour) S2 word (hour) D word (hour)

S1 + 1word (min) S2 + 1word (min) D + 1word (min)

S1 + 2word (sec) S2 + 2word (sec) D + 2word (sec)

© Copyright Reserved Autonics Co., Ltd. 331


5 Instruction

5.5.217 Clock Instruction (TRD)

Clock
TRD D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, M, S, T, C, D, Z, F, UW

D WORD Device address to save the real time value


Not applicable 3

<Ladder>
The real time value is stored as below.
1. Year in D word
2. Month in D+1 word
3. Date in D+2 word
4. Hour in D+3 word
5. Minute in D+4 word
6. Second in D+5 word
7. Day of week in D+6 word

D word (year)

D+1 word (month)

D+2 word (date)


Real time value
(Special register D+3 word (hour)
from UW6550)
D+4 word (min)

D+5 word (sec)

D+6 word (day)

332 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.218 Clock Instruction (TWR)

Clock
TWR D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Y, M, S, T, C, D, Z, F, UW
Device address which saves the time data to write on special
D WORD register
Time data range 3

<Ladder>
1. Year in D word
2. Month in D+1 word (1 to 12)
3. Date in D+2 word (1 to 31)
4. Hour in D+3 word (1 to 23)
5. Minute in D+4 word (1 to 59)
6. Second in D+5 word (1 to 59)
7. Day of week in D+6 word (0-sunday to 6-saturday)
are stored respectively.
8. Stores the time value into the corresponding
position of special register.
9. The special register (time setting) is also been
running along with executing TWR instruction.
10. If the input data is out of the valid time range,
error flag occurs.

D word (year)

D+1 word (month)

D+2 word (date)


Real time value
D+3 word (hour) (Special register
from UW6550)
D+4 word (min)

D+5 word (sec)

D+6 word (day)

© Copyright Reserved Autonics Co., Ltd. 333


5 Instruction

5.5.219 Clock Instruction (HOUR)

Clock
HOUR S D1 D2 Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW, integer
S WORD Data device address to designate the accumulated time
0(h0000) to 65535(hFFFF) 7
Y, M, S, T, C, D, Z, F, UW
D1 WORD Data device address which saves the executed time value
0(h0000) to 65535(hFFFF)
Y, M, UB
The compared result between the executed time (D1) and the
D2 BIT designated accumulated time(S)
Not applicable

<Ladder>
1. If the input contact retains ON status for the
designated time (time unit) in S word device, D2 bit
turns ON.
2. The ON time value in D1 word device
3. The current value of less than 1 hour is displayed
in D1+1 word device at per one second.

Accumulated ON time of
S word (designated input contact

D2 bit ON

D1 word

Current value per 1 hour

D1+1 word

Current value of less than 1 hour


(per one second)

334 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.220 Clock Instruction (TZCP)

Clock
TZCP S1 S2 S3 D Applicable model
instruction
LP-S044, LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, Y, M, S, T, C, D, Z, F, UW
Device address which saves the data to compare with S2 and S3
S1 WORD data
Time data range ◎ 9
X, Y, M, S, T, C, D, Z, F, UW
Device address which saves the data to compare with S1 and S3
S2 WORD data
Time data range
X, Y, M, S, T, C, D, Z, F, UW
Device address which saves the data to compare with S1 and S2
S3 WORD data
Time data range
Y, M, S, T, C, Z, F, UB
D BIT Bit device address to save comparison result
Not applicable

<Ladder>
Hour in S1 word, minute in S1+1 word, second in
S1+2 word,
hour in S2 word, minute in S2+1 word, second in
S2+2 word,
hour in S3 word, minute in S3+1 word, second in
S3+2 word,
are stored respectively and compares the S3 device
value between S1 device and S2 device. As a result:

1. If S3 value is less than S1 and S2 value, D bit turns ON.


2. If S3 value is equal to the smaller value of S1 or S2, D+1 bit turns ON.
3. If S3 value is between the values of S1 value and S2 value, D+2 bit turns ON.
4. If S3 value is equal to the bigger value of S1 or S2, D+3 bit turns ON.
5. If S3 value is larger than S1 value and S2 value, D+4 bit turns ON.
6. If the source data is out of the time range (hour: 0 to 23, min: 0 to 59, sec: 0 to 59), error flag occurs.

© Copyright Reserved Autonics Co., Ltd. 335


5 Instruction

S1 word (hour) S2 word (hour) S3 word (hour)

S1+1 word (min) S2+1 word (min) S3+1 word (min)

S1+2 word (sec) S2+2 word (sec) S3+2 word (sec)

S3 position

A area B area C area D area E area

Small number Larger number


between S1 and S2 between S1 and S2

If S3 A area, D bit turns ON


position B area, D+1 bit turns ON
C area, D+2 bit turns ON
D area, D+3 bit turns ON
E area, D+4 bit turns ON

336 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.221 Motion Instruction (MTVDM)

Motion
MTVDM S S1 S2 S3 S4 S5 Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, M, D, Z, UW, integer

S WORD Channel(Ch1, Ch2)


1 to 2 ◎ 9
X, M, Z, UB
S1 BIT Motion drive direction
1: Forward, 0: Backward
X, M, D, Z, UW, integer
S2 DWORD Drive speed
0 to 100,000
X, M, D, Z, UW, integer
S3 WORD Dwell time
0 to 65536ms
X, M, D, Z, UW, integer
S4 WORD Acceleration time
Select acceleration time 1 to 5 in common configuration
X, M, D, Z, UW, integer
S5 WORD Deceleration time
Select deceleration time 1 to 5 in common configuration

<Ladder>

Speed direct drive instruction: You can designate direct drive data (drive speed, drive direction, etc.) directly and it
executes speed drive.
[Note]
1. For utilize direct instruction, set ‘TRUE’ at
‘Enable Ch’ of common configuration from
[Parameter] - [MOTION] tab in AtLogic.
2. Select accel/deceleration time 1 to 5 in
common configuration from [Parameter]-
[MOTION] tab in AtLogic.
3. You should check whether the correspond
channel is using or not before using direct
drive instruction.
4. If using channel is input the other
Instruction, using channel error occurs.

※ For more information, refer to Motion of AtLogic user manual.

© Copyright Reserved Autonics Co., Ltd. 337


5 Instruction

5.5.222 Motion Instruction (MTPDM)

Motion
MTPDM S S1 S2 S3 S4 S5 Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, M, D, Z, UW, integer

S WORD Channel (Ch1, Ch2)


1 to 256 ◎ 9
X, M, D, Z, UW, integer
S1 DWORD Target position
-2,147,483,648 to 2,147,483,647 (Enable to set the range)
X, M, D, Z, UW, integer
S2 DWORD Drive speed
0 to 100,000
X, M, D, Z, UW, integer
S3 WORD Dwell time
0 to 65536ms
X, M, D, Z, UW, integer
S4 WORD Acceleration time
Select acceleration time 1 to 5 in common configuration
X, M, D, Z, UW, integer
S5 WORD Deceleration time
Select deceleration time 1 to 5 in common configuration

<Ladder>

Position direct drive instruction: You can designate direct drive data (drive speed, drive direction, etc.) directly and it
executes position drive.
[Note]
1. For utilize direct instruction, set ‘TRUE’ at
‘Enable Ch’ of common configuration from
[Parameter] - [MOTION] tab in AtLogic.
2. Select accel/deceleration time 1 to 5 in
common configuration from [Parameter]-
[MOTION] tab in AtLogic.
3. You should check whether the correspond
channel is using or not before using direct
drive instruction.
4. If using channel is input the other instruction,
using channel error occurs.

※ For more information, refer to Motion of AtLogic user manual.

338 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.223 Motion Instruction (MTIDM)

Motion
MTIDM S S1 Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, M, D, Z, UW, integer

S WORD Channel(Ch1, Ch2)


1 to 2 ◎ 5
X, M, D, Z, UW, integer
S1 WORD Step number
1 to 99

<Ladder>
Indirect designate drive instruction: It operates with
the number of scripted string in the specified pattern
from pattern list.

[Note]
1. For utilize indirect drive instruction, set ‘TRUE’ at ‘Enable Ch’ of common configuration from [Parameter]-
[MOTION]tab in AtLogic.
2. There should be pattern number to execute of pattern list from [Parameter]-[MOTION] tab in AtLogic.
3. You should check whether the correspond channel is using or not before using drive instruction.

[Pattern stop method]


1) F400 or F402 (Action list stop) + MTSRS
: During pattern drive, if currently executed action list type is speed drive and this instruction is executed, speed
drive is finish and it executes the next action list.

2) F401 or F403 (Group stop) + MTSRS


: During group drive, this instruction is executed, it escapes the group and executes the other action list following
the group.

3) Not to set special flag


: Pattern drive is finish.
※ For more information, refer to Motion of AtLogic user manual.

© Copyright Reserved Autonics Co., Ltd. 339


5 Instruction

5.5.224 Motion Instruction (MTMEC)

Motion
MTMEC S Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range
X, M, D, Z, UW, integer

Error

Zero

Carry

Borrow

Step
S WORD Channel(Ch1, Ch2)

1 to 2 ◎ 5

<Ladder>

Error remove instruction: This instruction removes


the error when error flag occurs by error during
motion drive.

※ For more information, refer to Motion of AtLogic user manual.

340 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.225 Motion Instruction (MTEMS)

Motion
MTEMS S Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range
X, M, D, Z, UW, integer

Error

Zero

Carry

Borrow

Step
S WORD Channel(Ch1, Ch2)

1 to 2 ◎ 5

<Ladder>
Emergency stop instruction: If there is emergency
during motion position driving, you can stop all
motion actions by emergency stop instruction.

[Note]
When executing emergency stop instruction, all
currently executing motion instructions stop.

※ For more information, refer to Motion of AtLogic user manual.

© Copyright Reserved Autonics Co., Ltd. 341


5 Instruction

5.5.226 Motion Instruction (MTCPP)

Motion
MTCPP S S1 Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, M, D, Z, UW, integer

S WORD Channel(Ch1, Ch2)


1 to 2 ◎ 5
X, M, D, Z, UW, integer
S1 DWORD Setting value of new position
-2,147,483,648 to 2,147,483,647

<Ladder>

Current position preset instruction: This motion


instruction is for re-set the current position.

[Note]
During motion driving, if this instruction is executed,
error occurs.

※ For more information, refer to Motion of AtLogic user manual.

342 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.227 Motion Instruction (MTFOS)

Motion
MTFOS S Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, M, D, Z, UW, integer

S WORD Channel(Ch1, Ch2)


1 to 2 ◎ 5

<Ladder>

Forced home setting instruction: This instruction


sets the specified position as the set home position
value in AtLogic.

※ For more information, refer to Motion of AtLogic user manual.

© Copyright Reserved Autonics Co., Ltd. 343


5 Instruction

5.5.228 Motion Instruction (MTSRS)

Motion
MTSRS S Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, M, D, Z, UW, integer

S WORD Channel(Ch1, Ch2)


1 to 2 ◎ 5

<Ladder>
Normal stop instruction: It executes normal stop
instruction to the currently motion driving channel.

[Pattern stop method with combination of special flag]


1. F400 or F402 (Action list stop) + MTSRS
: During pattern drive, if currently executed action list type is speed drive and this instruction is executed, speed
drive is finish and it executes the next action list.

2. F401 or F403 (Group stop) + MTSRS


: During group drive, this instruction is executed, it escapes the group and executes the other action list following
the group.

3. Not to set special flag


: Pattern drive is finish.

4. MTSRS during linear interpolation drive


: Two axes decelerately stop at the same time.

※ For more information, refer to Motion of AtLogic user manual.

344 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.229 Motion Instruction (MTOBC)

Motion
MTOBC S Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, M, D, Z, UW, integer

S WORD Channel(Ch1, Ch2)


1 to 2 ◎ 5

<Ladder>
Origin back instruction: During motion position
drive, if you want to return to origin, it goes back to
the preset origin point.
LP-S070 has two methods for returning the origin.
 H/W origin back: It is the origin back method by
home search direction, upper/lower H/W limit,
and home sensing which are set in AtLogic.
 S/W origin back: It is the origin back method to
move directly to the known origin by S/W.

[Origin back type by home search direction during H/W origin back]

Origin position is defined by set value from atLogic.


※ For more information, refer to Motion of AtLogic user manual.

© Copyright Reserved Autonics Co., Ltd. 345


5 Instruction

5.5.230 Motion Instruction (MTOVV)

Motion
MTOVV S S1 Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, M, D, Z, UW, integer

S WORD Channel(Ch1, Ch2)


1 to 2 ◎ 5
X, M, D, Z, UW, integer
S1 DWORD Drive speed
0 to 100kpps

<Ladder>
Speed override: It converts the currently
operating speed set (unit set) to the other
speed and operates with the converted
speed.

1. Operating speed > Changed speed: It


converts to changed speed and operates with
the changed speed.
2. Operating speed Changed speed: It
converts to changed speed and operates with
the changed speed.
3. Changed speed Initial speed: When
changing speed to the slower than initial
speed, it operates constant speed drive
without accel/deceleration.

[Note]
1. If the currently not operated channel is executed this instruction, position/speed override change error occurs.
2. If the currently operated channel is executed the other instruction, enable channel error occurs.
3. Be sure that rapid speed changing may cause the pullout of motor.

※ For more information, refer to Motion of AtLogic user manual.

346 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.231 Motion Instruction (MTOVP)

Motion
MTOVP S S1 Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, M, D, Z, UW, integer

S WORD Channel(Ch1, Ch2)


1 to 2 ◎ 5
X, M, D, Z, UW, integer
S1 WORD Changed position
-2147483647 to 2147483647

<Ladder>

Position override: It changes the set target


position to the designated position by the
instruction.

1. Current position Changed position: It


stops with deceleration.
2. Current position < Changed position: It
stops with deceleration at the changed
position.

[Note]
1. If the currently not operated channel is
executed this instruction, position/speed
override change error occurs.
2. If the currently operated channel is
executed the other instruction, enable
channel error occurs.

※ For more information, refer to Motion of AtLogic user manual.

© Copyright Reserved Autonics Co., Ltd. 347


5 Instruction

5.5.232 Motion Instruction (MTIPT)

Motion
MTIPT S S1 S4 S4 Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer

S WORD Channel number of the first axis(Ch1, Ch2)


1 to 2 ◎ 7
X, M, D, Z, UW, integer
S1 WORD Action number of the first axis(it is not pattern number)
0 to 65535
Integer
S3 WORD Channel number of the second axis (Ch0, Ch1)
1 to 2
X, M, D, Z, UW, integer
S4 WORD Action number of the second axis(it is not pattern number)
0 to 65535

<Ladder>
Line interpolation instruction: It executes
line interpolation drive with two axes.

[Note]
1. The action list designated as speed drive
is not available as the axis between line
interpolations.
2. The axis, which is more distance than the
other, is set as main axis.
3. Drive data of sub axis is decided by the
calculating from the drive data of main axis.
4. If each distance of two axes is same,
CH1 becomes main axis.

※ For more information, refer to Motion of AtLogic user manual.

348 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.233 Motion Instruction (MTUAI)

Motion
MTUAI S S1 Applicable model
instruction
LP-S070,
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
X, M, D, Z, UW, integer

S WORD Channel(Ch1, Ch2)


1 to 2 ◎ 5
X, M, D, Z, UW, integer
S1 WORD Step number
1 to 99

<Ladder>
Action item drive instruction
: It operates one action of motion referring the
number of action item.

[Note]
1. For utilize indirect drive instruction, set ‘TRUE’ at ‘Enable Ch’ of common configuration from [Parameter]-
[MOTION]tab in AtLogic.
2. There should be pattern number to execute of pattern list from [Parameter]-[MOTION] tab in AtLogic.
3. If the currently operated channel is executed the other instruction, enable channel error occurs.

※ For more information, refer to Motion of AtLogic user manual.

© Copyright Reserved Autonics Co., Ltd. 349


5 Instruction

5.5.234 High speed counter Instruction (HSCNT)

High speed
counter HSCNT S S1 S2 D S3 Applicable model
instruction
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer

S WORD Channel(Ch1, Ch2)

1 to 2 ◎ 7
C, UW
S1 WORD Counter contact to use
0 to 65535
Integer
High speed counter match value for triggering interrupt
S2 WORD
(parameter setting)
1 to 3
M, D, F, Z, T, Y, C, L, S, UB, 200, 100, 0
Output device or interrupt option for the current counting value
BIT or which is counted up to the match value
D
CONST (200: up counting→down counting, 100: down counting→up
counting, 0: no output)
None
Integer
S3 WORD Output device ON hold time
1 to 10000(us), 0: output continues

<Ladder>
High speed counting instruction: While the start
signal (M0) is ON, when the high-speed input
signal is applied to the input channel (S), word
device value of the counter contact (S1) counts
by 1. When the device value is counted up to the
match value (S2), interrupt is triggered or output
bit device is ON during set ON hold time (S3).
※ In case of making output pulse through the S3 parameter value, set S3 over 60us

350 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

<Time chart>

※ For more information, refer to High-speed counter of AtLogic user manual.

© Copyright Reserved Autonics Co., Ltd. 351


5 Instruction

5.5.235 High speed counter Instruction (HSSET)

High speed
counter HSSET S S1 S2 Applicable model
instruction
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer

S WORD Channel(Ch1, Ch2)

1 to 2 ◎ 7
Integer
High speed counter setting value
S1 DWORD (The value which is set as current counter value at the
occurrence of interrupt)
0 to 16777215
Integer
High speed counter match value for triggering interrupt
S2 WORD
(parameter setting)
1 to 2

<Ladder>
High speed counter set instruction: While the start
signal (M1) is ON, The current counting value is
counted up to the match value (S2), the current
counting value is set to the high speed counter setting
value (S1)
Use with HSCNT instruction.
※Only activates when the start signal is ON.
<Time chart>

※ For more information, refer to High-speed counter of AtLogic user manual.

352 © Copyright Reserved Autonics Co., Ltd.


5 Instruction

5.5.236 High-speed Counter Instruction (HSRST)

High speed
counter HSRST S S1 Applicable model
instruction
LP-A070, LP-A104
OP DATA type Available device / Description / Range

Error

Zero

Carry

Borrow

Step
Integer

S WORD Channel(Ch1, Ch2)

1 to 2 ◎ 7
Integer
High-speed counter setting value

S1 DWORD (The value which is set as current counter value when the device
M0 is turned ON in a scan time.)
0 to 16777215

<Ladder>
High speed counter reset instruction: When the HSRST
start signal (M1) is ON in a PLC program scan, the
current counting value is set to designated setting value
(S1).
Use with HSCNT instruction.

※There can be scan delay for setting.


<Time chart>

※ For more information, refer to High-speed counter of AtLogic user manual.

© Copyright Reserved Autonics Co., Ltd. 353


5 Instruction

354 © Copyright Reserved Autonics Co., Ltd.


6 Appendix

6 Appendix

6.1 Error Code and Troubleshooting


(1) Self-diagnosis error code
 LP-S044/LP-S070: UW6540(F0140)
 LP-A070/LP-A104: UW74540(F140)
Type Cause of error
0X0010 Watchdog error Scan time excesses watchdog timer setting value
When a certain area of memory is the un-
0X0020 Memory error
approached state.
0x0021 Battery error When battery value is below the standard level
0x0022 RTC setting error Disable to set RTC and RTC operation error
When the program contains instructions that are
0X0030 Program instruction error
not able to read and inappropriate forms.
When there is not the instructions required to
0X0031 Program sequence error process the program, such as user defined
functions, label name, END, RET and IRET, etc.
When there are some problems in settings for
0X0040 Parameter setting error
common and expansion parameters.
When it operates longer than the given time-driven
0X0041 Time-driven error
run-time.
In case, the hardware constructions are different
Extended module setting
0X0050 from previous parameter settings when applying
error
power again and changing the mode.
Extended module attaching When the extended module is attached or
0X0051
and removing error removed in run mode.
When it is received NAK and data format not able
0x0060 Communication fail error
to read.
When there are some problems occurred in
Communication format
0x0061 formats (excess of limited range etc.) and CHECK
error
SUM while download and upload.

© Copyright Reserved Autonics Co., Ltd. 355


6 Appendix

(2) Motion error code


 LP-S044/LP-S070: UW6420(F20),UW6421(F21)
 LP-A070/LP-A104: UW74420(F20), UW74421(F21)
Run
Symptom Troubleshooting
state
When inputting other starting Clear the error by MTMEC(removing
1 instruction signal during using Run error) instruction and executes next
channel start instruction
When giving progress instruction to Edit the pattern list, which has
other direction than current problem. Clear the error by
2 Stop
progressing direction during MTMEC(removing error) instruction
consecutive running ‘C’ and executes motion operation
When setting position preset during Clear the error by MTMEC(removing
3 Run
running error) instruction
When there is no action list to Edit the action list, which has problem.
4 operate during executing pattern Stop Clear the error by MTMEC(removing
action error) instruction
When action list type is position Check and edit action list and S/W limit
drive during executing pattern action value, which have problem. Clear the
5 Stop
and destination position is out of error by MTMEC(removing error)
S/W limit range instruction
Clear the error by MTMEC(removing
10 Excess high low limit error Stop error) instruction and escape limit with
jog operation and execute the next
When speed parameter value is
higher than maximum speed
(100,000PPS) Clear the error by MTMEC(removing
20 Stop error) instruction and check the set
Designated pattern number of parameter values
MTIDM(Indirect designated drive)
instruction is out of 1 to 99
※1. Be sure that errors related with motion are remained even if restarting LP.

356 © Copyright Reserved Autonics Co., Ltd.


6 Appendix

© Copyright Reserved Autonics Co., Ltd. 357


* Dimensions or specifications on this manual are subject to change and some models may be discontinued without notice.

MWL-ALV2P1-V1.1-1907US

You might also like