Table of Contents

Advertisement

Quick Links

PLC

Advertisement

Table of Contents
loading

Summary of Contents for Delta DVP-PLC

  • Page 2: Table Of Contents

    1.5 The Conversion of PLC Command and Each Diagram Structure ......1-12 1.6 Simplified Ladder Diagram ................1-15 1.7 Basic Program Designing Examples ..............1-17 Chapter 2 Functions of Devices in DVP-PLC 2.1 All Devices in DVP-PLC..................2-1 2.2 Values, Constants [K] / [H] ................2-6 2.3 Numbering and Functions of External Input/Output Contacts [X] / [Y]....
  • Page 3: Table Of Contents

    Chapter 4 Step Ladder Instructions 4.1 Step Ladder Instructions [STL], [RET] ............... 4-1 4.2 Sequential Function Chart (SFC) ..............4-2 4.3 How does a Step Ladder Instruction Work? ............4-3 4.4 Things to Note for Designing a Step Ladder Program ......... 4-7 4.5 Types of Sequences ..................
  • Page 4: Table Of Contents

    ● ( API160~ 169) Real Time Calendar ............9-39 ● ( API170~ 171) Gray Code Conversion ............9-49 ● ( API172~ 175) Floating Point Operation ............. 9-51 ● ( API180~ 190) Matrix................. 9-59 ● ( API191~ 199) Positioning Instruction ............9-76 Chapter 10 Application Instructions API 215-246 ●...
  • Page 5: Foreword: Background And Functions Of Plc

    Row 1: Using a normally open (NO) switch X0 (“A” switch or “A" contact). When X0 is not pressed, the contact will be open loop (Off), so Y0 will be Off. When X0 is pressed, the contact will be On, so Y0 will be On. DVP-PLC Application Manual...
  • Page 6: Differences Between Traditional Ladder Diagram And Plc Ladder Diagram

    The time spent in the cyclic process is called the “scan time” and the time can be longer with the expansion of the program. The scan time can cause delay from the input detection to output response of the PLC. The longer the delay, DVP-PLC Application Manual...
  • Page 7: How To Edit Ladder Diagram

    The completion of the ladder diagram by the ladder diagram editor is the completion of the PLC program design. The control flow illustrated by diagram makes the flow more straightforward and acceptable for the technicians of who are familiar with the electric control circuit. Many basic symbols and actions in DVP-PLC Application Manual...
  • Page 8 When you use these devices, you are actually read the contents stored in the form of bit, byte or word. Introductions on the basic internal devices in the PLC (See Ch 2. Functions of Devices in DVP-PLC for more details.)
  • Page 9 Data register kinds of parameters. Every register is able to store a word (16-bit binary value). Double words will occupy 2 adjacent data registers. Device indication: D0, D1,…,D9,999 are indicated as D and numbered in decimal form. DVP-PLC Application Manual...
  • Page 10 X, Y, M, S, T, C connection Rising-edge trigger in parallel X, Y, M, S, T, C connection Falling-edge trigger in parallel X, Y, M, S, T, C connection Block in series connection Block in parallel connection DVP-PLC Application Manual...
  • Page 11 Combination line for block 1 Separation line for block 2 Network: A complete block network is composed of devices and all kinds of blocks. The blocks or devices connectable by a vertical line or continuous line belong to the same network. DVP-PLC Application Manual...
  • Page 12 Take the figure below for example, we will step by step explain the process of a ladder diagram. The numbers in the black circles indicate the order. The order of the instructions: DVP-PLC Application Manual...
  • Page 13 3. OR (ORI) instruction: A single device connects to another single device or a block OR instruction OR instruction OR instruction The structure of ORP and ORF instructions are the same. ORP and ORF instructions only act at the rising edge or falling edge. DVP-PLC Application Manual...
  • Page 14 Since MPP is the last item on the vertical line, the vertical line ends at this point. MPP is recognized as “└”. Using the method given above for the analysis cannot be wrong. However, sometimes the compiling program will ignore the same output status, as shown in the figure. 1-10 DVP-PLC Application Manual...
  • Page 15 8. RET instruction: Placed after the completed step ladder diagram. RET also has be placed after STL instruction. See the example below. See step ladder instructions [STL], [RET] in Ch. 4 for the structure of the ladder diagram. 1-11 DVP-PLC Application Manual...
  • Page 16: The Conversion Of Plc Command And Each Diagram Structure

    End of program Fuzzy Syntax The correct ladder diagram analysis and combination should be conducted from up to down and left to right. However, without adopting this principle, some instructions can make the same ladder diagram. 1-12 DVP-PLC Application Manual...
  • Page 17 (In WPLSoft ladder diagram editing area, the right power line is omitted), from left to right horizontally, one row after another from up to down. See bellows for the frequently seen incorrect diagrams: 1-13 DVP-PLC Application Manual...
  • Page 18 No device in the middle block. Devices and blocks in series should be horizontally aligned. Label P0 should be in the first row of a complete network. Blocks connected in series should be aligned with the upmost horizontal line. 1-14 DVP-PLC Application Manual...
  • Page 19: Simplified Ladder Diagram

    In diagram (a), the block on top is shorter than the block in the bottom, we can switch the position of the two blocks to achieve the same logic. Due to that diagram (a) is illegal, there is a “reverse flow” in it. Ladder diagram complied into instruction Ladder diagram complied into instruction 1-15 DVP-PLC Application Manual...
  • Page 20 Example 1 LO OP 1 X1 0 re ver se fl ow LOOP1 Example 2 LO OP 1 X1 0 re ver se fl ow Re ver se fl ow LOOP1 X 10 LOOP L OO P2 1-16 DVP-PLC Application Manual...
  • Page 21: Basic Program Designing Examples

    DVP series PLC MPU). The circuit can not only be M512 latched when the power is on, but also keep the continuity of M512 the original control when the power is shut down and switched on again. 1-17 DVP-PLC Application Manual...
  • Page 22 Y1 (as the diagram in the left hand side), the circuit can not only make Y1 as the condition for Y2, but also allow the stop of Y1 after Y2 is enabled. Therefore, we can make Y1 and Y2 execute exactly the sequential control. 1-18 DVP-PLC Application Manual...
  • Page 23 The ladder diagram is an oscillating circuit which makes the indicator flash or enables the buzzer alarms. It uses two timer to control the On/Off time of coil Y1. n1 and n2 refer to the set values in T1 and T2 and T is the cycle of the clock. Example 10: Trigger circuit 1-19 DVP-PLC Application Manual...
  • Page 24 Example13: Timing extension circuit The total delay time from input X0 is closed to output Y1 is On = (n1+n2)* T. T refers to the clock cycle. Timer = T11, T12 Clock cycle: T (n1+n2)* T 1-20 DVP-PLC Application Manual...
  • Page 25 Horizontal Horizontal light Light On time 35 secs 5 secs 25 secs 5 secs Timing Diagram: Vertical Light Yellow 25 secs Green 5 secs 5 secs Horizontal Light Yellow Green 25 secs 5 secs 5 secs 1-21 DVP-PLC Application Manual...
  • Page 26 1 Basic Principles of PLC Ladder Diagram SFC Figure: Ladder Diagram: M1002 M1002 ZRST S127 K350 K250 M1013 K250 K350 M1013 K350 K250 M1013 K250 M1013 K350 1-22 DVP-PLC Application Manual...
  • Page 27 Drawn by SFC Internal Ladder Diagram LAD-0 M1002 ZRST S127 LAD-0 Transferring Condition 1 TRANS* M1013 Transferring Condition 4 TRANS* TRANS* TRANS* TRANS* TRANS* TRANS* TRANS* Transferring Condition 7 TRANS* TRANS* TRANS* TRANS* TRANS* TRANS* TRANS* 1-23 DVP-PLC Application Manual...
  • Page 28 1 Basic Principles of PLC Ladder Diagram MEMO 1-24 DVP-PLC Application Manual...
  • Page 29: All Devices In Dvp-Plc

    2 Functions of Devices in DVP-PLC 2.1 All Devices in DVP-PLC ES/EX/SS series MPU: Type Item Range Function Device Corresponds to external External input relay X0 ~ X177, 128 points, octal Total input points 256 points Corresponds to external External output relay...
  • Page 30 2 Functions of Devices in DVP-PLC SA/SX/SC series MPU: Type Item Range Function Device Corresponds to external External input relay X0 ~ X177, 128 points, octal Total input points Corresponds to external points External output relay Y0 ~ Y177, 128 points, octal...
  • Page 31 2 Functions of Devices in DVP-PLC Control point for main For Master control loop N0 ~ N7, 8 points control loop Position index for CJ For CJ, CALL instructions P0 ~ P255, 256 points and CALL External interruption I001, I101, I201, I301, I401, I501, total 6 points I6□□, I7□□, 2 points (□□...
  • Page 32 2 Functions of Devices in DVP-PLC EH/EH2/SV series MPU: Type Item Range Function Device Corresponds to external External input relay X0 ~ X377, 256 points, octal Total input points Corresponds to external External output relay Y0 ~ Y377, 256 points, octal...
  • Page 33 2 Functions of Devices in DVP-PLC Type Item Range Function Device Frequency measurement card I180, 1 point interruption K-32,768 ~ K32,767 (16-bit operation) Decimal form K-2,147,483,648 ~ K2,147,483,647 (32-bit operation) H0000 ~ HFFFF (16-bit operation) Hexadecimal form H00000000 ~ HFFFFFFFF (32-bit operation) *1.
  • Page 34: Values, Constants [K] / [H]

    Hexadecimal form H0 ~ HFFFFFFFF (32-bit operation) For different control purposes, there are five types of values inside DVP-PLC for executing the operations. See the explanations bellows for the functions and works of every type of value. 1. Binary value (BIN) All the operations and storage of values in PLC are conducted in BIN.
  • Page 35 External output: Y0 ~ Y7, Y10 ~ Y17…(device No.) 3. Decimal value (DEC) Occassions of using decimal values in DVP-PLC: Set value in timer T and counter C, e.g. TMR C0 K50 (constant K) No. of device S, M, T, C, D, E, F, P, I, e.g. M10, T30. (device No.) Operands in application instructions, e.g.
  • Page 36: Numbering And Functions Of External Input/Output Contacts [X] / [Y]

    2 Functions of Devices in DVP-PLC Binary Octal Decimal Binary Code Decimal Hexadecimal (BIN) (OCT) (DEC) (BCD) (HEX) Constant K, No. of device For DIP switch and 7-section For PLC internal operation No. of device M, S, T, C, Constant H...
  • Page 37 2 Functions of Devices in DVP-PLC EH2 series MPU: DVP-20EH2 DVP-32EH2 DVP-40EH2 I/O Extension Model DVP-16EH2 DVP-48EH2 DVP-64EH2 DVP-80EH2 (Note 1) (Note1) (Note 2) Unit (Note 3) X0 ~ X7 X0 ~ X13 X0 ~ X17 X0 ~ X27 X0 ~ X27...
  • Page 38 2 Functions of Devices in DVP-PLC The output of Y0 will be determined by circuit 2, i.e. On/Off of X10 will determine the output status of Y0. Y0 is repeated The Handling Process of PLC Program (Batch I/O) Regenerate input signal...
  • Page 39: Numbering And Functions Of Auxiliary Relays [M]

    2 Functions of Devices in DVP-PLC 2.4 Numbering and Functions of Auxiliary Relays [M] No. of auxiliary relays (in decimal) ES/EX/SS series MPU: General purpose M0 ~ M511, M768 ~ M999, 744 points. Fixed to be non-latched. Total 1,280 Auxiliary relay M Latched M512 ~ M767, 256 points.
  • Page 40: Numbering And Functions Of Timers [T]

    2 Functions of Devices in DVP-PLC EH/EH2/SV series MPU: S0 ~ S9, 10 points. Can be modified to be latched by setting up Initial parameters. S10 ~ S19, 10 points, used with IST instruction. Can be modified to be Zero return latched by setting up parameters.
  • Page 41 2 Functions of Devices in DVP-PLC SA/SX/SC series MPU: T0 ~ T199, 200 points. T192 ~ T199 are the timers for subroutine. Fixed to 100ms general purpose be non-latched 100ms accumulative T250 ~ T255, 6 points. Fixed to be latched.
  • Page 42: Numbering And Functions Of Counters [C]

    2 Functions of Devices in DVP-PLC When X0 = On, The PV in timer T250 will count up T MR T 250 K100 by 100ms. When the PV = SV K100, the output coil T 250 T0 will be On.
  • Page 43 2 Functions of Devices in DVP-PLC 1-phase 1 input, for C235 ~ C242, C244, 9 points latched (SA/SX) 32-bit counting Total 16 1-phase 2 inputs, for up/down high-speed C246, C247, C249, 3 points points latched counter C 2-phase 2 inputs, for...
  • Page 44 2 Functions of Devices in DVP-PLC after the power is on again. 3. If you use MOV instruction, WPLSoft or HPP to send a value bigger than the SV to the present value register of C0, next time when X1 goes from Off to On, the contact of counter C0 will be On and its PV will equal SV.
  • Page 45 2 Functions of Devices in DVP-PLC Example: M1200 M1200 C200 C200 DCNT C200 C200 K-5 C200 C200 a) X10 drives M1200 to determine whether C200 is an addition or subtraction counter. b) When X11 goes from Off to On, RST...
  • Page 46 2 Functions of Devices in DVP-PLC as SV can be a positive or negative value and an SV will occupy two consecutive data registers. 5. If using DMOV instruction, WPLSoft or HPP to send a value which is large than the setting to any high-speed counter, next time when the input point X of the counter goes from Off to On, this contact will remain unchanged and it will perform addition and subtraction with the present value.
  • Page 47 2 Functions of Devices in DVP-PLC High-speed counters for SC series MPU, total bandwidth: 130KHz Type 1-phase input 1-phase 2 inputs 2-phase 2 inputs Input C235 C236 C237 C238 C239 C240 C241 C242 C243 C244 C245 C246 C247 C249 C250 C251 C252 C254 C255...
  • Page 48 2 Functions of Devices in DVP-PLC (ii) When DHSZ instruction uses new added high-speed counters, it can only use one group of SV in the comparator. (iii) The number of SVs in high speed comparison instructions offered by SA/SX series MPU will not decrease owing to the increasing of high-speed counters.
  • Page 49 2 Functions of Devices in DVP-PLC speed counter with a total bandwidth of 20KHz, can be used alone with a counting frequency of up to 10KHz. C241 ~ C254 are hardware high speed counter (HHSC). There are four HHSC in EH/EH2/SV series MPU, HHSC0 ~ 3. The pulse input frequency of HHSC0 and HHSC1 can reach 200KHz and that of HHSC2 and HHSC3 can reach 20KHz (1 phase or A-B phase).
  • Page 50 2 Functions of Devices in DVP-PLC a) HHSC0 ~ 3 have reset signals and start signals from external inputs. Settings in M1272, M1274, M1276 and M1278 are reset signals of HHSC0, HHSC1, HHSC2 and HHSC3. Settings in M1273, M1275, M1277 and M1279 are start signals of HHSC0, HHSC1, HHSC2 and HHSC3.
  • Page 51 2 Functions of Devices in DVP-PLC (Normal frequency) (Double frequency) 2-phase 2 inputs (Triple frequency) (4 times frequency) 5. Special registers for relevant flags and settings of high speed counters: Flag Function M1150 DHSZ instruction in multiple set values comparison mode M1151 The execution of DHSZ multiple set values comparison mode is completed.
  • Page 52 2 Functions of Devices in DVP-PLC Flag Function M1290 High speed counter I020 interruption forbidden M1291 High speed counter I030 interruption forbidden M1292 High speed counter I040 interruption forbidden M1293 High speed counter I050 interruption forbidden M1294 High speed counter I060 interruption forbidden...
  • Page 53 2 Functions of Devices in DVP-PLC Flag Function Counting modes of HHSC0 ~ HHSC3 in EH/EH2/SV series MPU (default = 2) 1: Normal frequency counting mode D1225 ~ D1228 2: Double frequency counting mode 3: Triple frequency counting mode 4: 4 times frequency counting mode...
  • Page 54 2 Functions of Devices in DVP-PLC Counting down Contact X11, M1241 Counting up PV in C241 Contact Y0, C241 1-phase 2 inputs high-speed counter Example: C246 C246 DCNT C246 DCNT C246 K5 C246 C246 1. When X10 is On, RST instsruction will be executed.
  • Page 55 2 Functions of Devices in DVP-PLC 2-phase AB input high-speed counter Example: C251 C251 DCNT C251 DCNT C251 K5 C251 C251 When X10 is On, RST instsruction will be executed. The PV in C251 will be cleared to “0” and the output contact will be reset to be Off.
  • Page 56: Numbering And Functions Of Registers [D], [E], [F]

    2 Functions of Devices in DVP-PLC A-phase X0 B-phase X1 PV in C251 Counting down Counting up Contact Y0, C251 2.8 Numbering and Functions of Registers [D], [E], [F] 2.8.1 Data register [D] A data register is for storing a 16-bit datum of values between -32,768 to +32,767. The highest bit is “+” or “-"...
  • Page 57: Index Register [E], [F]

    2 Functions of Devices in DVP-PLC 2. Latched register: When the power of PLC is switched off, the data in the register will not be cleared but will retain at the value before the power is off. You can use RST or ZRST instruction to clear the data in the latched register.
  • Page 58: Functions And Features Of File Registers

    2 Functions of Devices in DVP-PLC When you use index register E, F to modify the operands, the modification range CANNOT exceed the range of special purpose registers D1000 ~ D1999 and special auxiliary registers M1000 ~ M1999 in case errors may occur.
  • Page 59 2 Functions of Devices in DVP-PLC Note: Among the 6 pairs of interruption No. (I001, I010), (I101, I020), (I201, I030), (I301, I040), (I401, I050), (I501, I060), only 1 No. in the pair is allowed to be used in the program. If you use both No. in the pair and write them into the program, there may be syntax errors occurring.
  • Page 60 2 Functions of Devices in DVP-PLC CALL Call Subroutine, SRET Subroutine Return: When X0 = On, CALL instruction will be P*** CALL Call subroutine P*** executed and the program will jump to P2 and executed the designated subroutine. When SRET instruction is executed, the program will FEND return to address 24 and keep on the execution.
  • Page 61: Special Auxiliary Relays And Special Data Registers

    2 Functions of Devices in DVP-PLC interruptions are I130 and I140. You can also set up that the interruption signal is sent out after the last pulse is sent out by enabling flags M1340 and M1341. The corresponding interruptions are I110 and I120.
  • Page 62 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default Data do not exist in the program area of data backup ○ M1007* ╳ ╳ memory card ○ ○ ○ M1008* Scanning watchdog timer (WDT) On Insufficient 24V DC supply, LV signal has been M1009 ○...
  • Page 63 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ES/SA: Y1 pulse output of PLSY, PLSR instructions is completed, or other relevant instructions complete their executions. ○ ○ ○ M1030* EH/EH2/SV: the 2 group pulse output CH1 (Y2, Y3) is completed, or other relevant instructions complete their executions.
  • Page 64 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default Inhibiting I6□□ ○ ○ M1056 ╳ Inhibiting I7□□ ○ M1057 ╳ ╳ ○ ╳ M1059 Inhibiting I010 ~ I060 ╳ ○ ○ ○ M1060 System error message 1...
  • Page 65 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ ○ ○ M1085 Selecting DVP-PCC01 duplicating function Setting up the switch for enabling password function M1086 ○ ○ ○ of DVP-PCC01 M1087* Enabling LV signal ○ ╳...
  • Page 66 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ M1109* Status of SW6 on digital switch card ╳ ╳ M1110* Status of SW7 on digital switch card ○ ╳ ╳ ○ M1111* Status of SW8 on digital switch card ╳...
  • Page 67 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default Special high-speed pulse output Y0 (50KHz) M1134* On: continuous output ○ ╳ ╳ (Not available in SC_V1.4 and above) Special high-speed pulse output Y0 (50KHz) reaches the target number of pulses.
  • Page 68 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default Enabling the deceleration function of adjustable ○ M1154* ╳ ╳ pulse output Y0 8-bit mode ○ ○ ○ M1161 On: in 8-bit mode Switching between decimal integer and binary floating point for SCLP instruction ○...
  • Page 69 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ ○ M1201 Counting mode of C201 (On: counting down) ╳ M1202 Counting mode of C202 (On: counting down) ○ ○ ╳ ○ ○ M1203 Counting mode of C203 (On: counting down) ╳...
  • Page 70 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ ○ M1234 Counting mode of C234 (On: counting down) ╳ M1235 Counting mode of C235 (On: counting down) ○ ○ ○ ○ ○ ○ M1236 Counting mode of C236 (On: counting down)
  • Page 71 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ M1270 Enabling reset function of HHSC3 ╳ ╳ M1271 Enabling start function of HHSC3 ○ ╳ ╳ ○ M1272 Reset control of HHSC0 ╳ ╳ M1273 Start control of HHSC0 ○...
  • Page 72 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ ○ M1303 High/low bits exchange for XCH instruction ╳ M1304* Enabling force On/Off of input point X ○ ○ ╳ Reverse operation of the 1 group pulse CH0 (Y0,...
  • Page 73 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ M1336 Sending out the 1 group pulse output CH0 (Y0, Y1) ╳ ╳ Sending out the 2 group pulse output CH1 (Y2, M1337 ○ ╳ ╳ Enabling offset pulses of the 1...
  • Page 74 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ ○ M1367* Slave ID#8 status on EASY PLC LINK network ╳ M1368* Slave ID#9 status on EASY PLC LINK network ○ ○ ╳ ○ ○ M1369* Slave ID#10 status on EASY PLC LINK network ╳...
  • Page 75 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default Indicating Slave ID#16 data transaction status on ○ ○ M1391* ╳ EASY PLC LINK ○ ○ M1392* Slave ID#1 linking error ╳ M1393* Slave ID#2 linking error ○...
  • Page 76 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ ○ M1424* Indicating writing to Salve ID#1 is completed ╳ M1425* Indicating writing to Salve ID#2 is completed ○ ○ ╳ ○ ○ M1426* Indicating writing to Salve ID#3 is completed ╳...
  • Page 77 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default Indicating Slave ID#18 data transaction status on ○ M1457* ╳ ╳ EASY PLC LINK Indicating Slave ID#19 data transaction status on ○ M1458* ╳ ╳ EASY PLC LINK Indicating Slave ID#20 data transaction status on ○...
  • Page 78 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ M1481* Slave ID#26 linking error ╳ ╳ M1482* Slave ID#27 linking error ○ ╳ ╳ ○ M1483* Slave ID#28 linking error ╳ ╳ M1484* Slave ID#29 linking error ○...
  • Page 79 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default ○ M1514* Indicating writing to Salve ID#27 is completed ╳ ╳ M1515* Indicating writing to Salve ID#28 is completed ○ ╳ ╳ ○ M1516* Indicating writing to Salve ID#29 is completed ╳...
  • Page 80 2 Functions of Devices in DVP-PLC STOP Special Function Attribute Latched Default EH2/SV: CH2 being able to designate deceleration ○ M1536 ╳ ╳ time. Has to be used with D1350. EH2/SV: CH3 being able to designate deceleration ○ M1537 ╳...
  • Page 81 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP D1000* Scanning watchdog timer (WDT) (Unit: ms) ○ ○ ○ Displaying the program version of D1001 ○ ○ ○ DVP-PLC (initial factory setting) ES/SA Program capacity ○...
  • Page 82 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP D1036* COM1 communication protocol ○ ○ ○ H’86 H’86 ○ D1037 Repetition time of HKY key ╳ ╳ Delay time of data response when PLC MPU as slave in RS-485 communication, range: 0 ~ 10,000 (unit: 0.1ms)
  • Page 83 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP High word of the set password in DVP-PCC01 ○ ○ ○ D1086 (displayed in hex corresponded by its ASCII characters) Low word of the set password in DVP-PCC01 ○...
  • Page 84 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP Interruption request for receiving specific word in RS D1127 ○ ╳ ╳ instruction (I150) D1129 Abnormal communication time-out (time: ms) ○ ○ ○ ○ ○ ○...
  • Page 85 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP Table count register in multi-group setting D1150 ○ ╳ ╳ comparison mode of DHSZ commnad Table counting register for DHSZ multiple set values D1151 ○ ╳...
  • Page 86 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP D1183 Index register F1 ○ ○ ╳ ○ ○ D1184 Index register E2 ╳ D1185 Index register F2 ○ ○ ╳ ○ ○ D1186 Index register E3 ╳...
  • Page 87 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP Start latched address for 32-bit high-speed counters D1212* ○ ○ ╳ C235 ~ C255 End latched address for 32-bit high-speed counters D1213* ○ ○ ╳ C235 ~ C255...
  • Page 88 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP Hour in RTC: 00 ~ 23 ○ ○ D1315* ╳ #: read RTC and write Day in RTC: 01 ~ 31 ○ ○ D1316* ╳ #: read RTC and write...
  • Page 89 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP Low word of the remaining number of pulses of the D1334 ○ ╳ ╳ group pulses CH1 (Y2, Y3) High word of the remaining number of pulses of the D1335 ○...
  • Page 90 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP SC: low word of present value of Y11 pulse output ○ ╳ ╳ D1350 EH2/SV: CH2 pulse output. When M1536 = On, it ○ ╳ ╳...
  • Page 91 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP Starting reference for Master to read from Salve D1369* ○ ○ H’1064 ╳ ID#15 Starting reference for Master to read from Salve D1370* ○ ○ H’1064 ╳...
  • Page 92 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP ID of the 7 left-side extension module ○ D1392* ╳ ╳ (available in SV) ID of the 8 left-side extension module ○ D1393* ╳ ╳ (available in SV)
  • Page 93 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP D1444* Data length to be read on Salve ID#11 ○ ○ ╳ ○ ○ D1445* Data length to be read on Salve ID#12 ╳ D1446* Data length to be read on Salve ID#13 ○...
  • Page 94 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP Distance created for 1 revolution of motor at CH1 D1473 ○ ╳ ╳ (high word) D1474 Machine unit of CH0 movement (low word) ○ ╳ ╳...
  • Page 95 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP D1608* ↓ ○ ○ Data buffer to store the data read from Slave ID#5 ╳ D1623* D1624* Data buffer to store the data to be written on Slave ↓...
  • Page 96 2 Functions of Devices in DVP-PLC STOP Special D Function Attribute Latched Default STOP D1816* Data buffer to store the data to be written on Slave ↓ ○ ○ ╳ ID#11 D1831* D1832* ↓ Data buffer to store the data read from Slave ID#12 ╳...
  • Page 97: Functions Of Special Auxiliary Relays And Special Registers

    2 Functions of Devices in DVP-PLC 2.11 Functions of Special Auxiliary Relays and Special Registers PLC Operation Flag Function Group M1000 ~ M1003 Number M1000: M1000 (A contact) is constantly “On” during operation and detection. When PLC is in RUN status, M1000 remains “On”.
  • Page 98 2 Functions of Devices in DVP-PLC M1002 K300 D1000 Initial pulse The maximum set value in the monitor timer is 32,767ms. Please be noted that if the SV is too big, the timing of detecting operational errors will be delayed. Therefore, it is suggested that you remain the scan time of shorter than 200ms.
  • Page 99 2 Functions of Devices in DVP-PLC When the data backup memory card is installed in EH/EH2 MPU, MPU will operate according to the On/Off of switch on the card. If the switch is “On”, the following comparisons will be conducted and the card will be copied to MPU. If the switch is “Off”, MPU will not perform any action.
  • Page 100 2 Functions of Devices in DVP-PLC All PLC MPUs provide four different clock pulses. When PLC is powered, the four clock pulses will start automatically. 10 ms 100 Hz M1011 (10 ms) 100 ms M1012 (100 ms) 10 Hz 1 sec...
  • Page 101 2 Functions of Devices in DVP-PLC From “Off” to “On”, the correction is enabled. ±30 seconds M1017 0 ~ 29 second: minute intact; second reset to 0 correction 30~ 59 second: mimute + 1; second reset to 0 M1076 RTC malfunction Set value exceeds the range;...
  • Page 102 2 Functions of Devices in DVP-PLC D1021 can be used for setting up the response time of receiving pulses at X10 ~X17 for EH/EH2/SV series MPU. (Setup range: 0 ~ 60; Unit: ms) When the power of PLC goes from “Off” to “On”, the content of D1020 and D1021 turn to 10 automatically.
  • Page 103 2 Functions of Devices in DVP-PLC a) When the execution of the instruction is completed, M1029= On. You have to reset M1029. b) M1029 turns “Off” when the instruction is “Off”. API 155 DABSR, API 156 ZRN, API 158 DRVI, API 159 DRVA for EH/EH2/SV series MPU: a) M1029 = On when the 1 output group Y0 and Y1 is completed.
  • Page 104 2 Functions of Devices in DVP-PLC Device No. Cleared Device Contact status of M and S for latched Contact and timing coil of accumulative timer T Contac and timing coil of high-speed counter C for latched M1032 Present value register of D for latched...
  • Page 105 2 Functions of Devices in DVP-PLC M1036 K1000 3. Parameter D0 when X7 = On Start No. of D0 Functions + index value Low 16 bits of the 32-bit speed detected at input point X0. High 16 bits of the 32-bit speed detected at input point X0.
  • Page 106 2 Functions of Devices in DVP-PLC COM2: For master or slave stations. Supports ASCII/RTU communication format, adjustable baud rate with speed of up to 115,200bps, and modification on data length (data bits, parity bits, stop bits). COM3: For slave stations only. Supports ASCII communication format (data bits, parity bits, stop bits) 7, E, 1, adjustable baud rate with speed of up to 38,400bps.
  • Page 107 2 Functions of Devices in DVP-PLC Example 1: Modifying communication format of COM2 1. Add the program code below on top of the program to modify the communication format of COM2. When PLC switches from STOP to TUN, the program will detect whether M1120 is On in the first scan time. If M1120 is On, the program will modify the relevant settings of COM2 according to the value set in D1120.
  • Page 108 2 Functions of Devices in DVP-PLC the program will detect whether M1136 is On in the first scan time. If M1136 is On, the program will modify the relevant settings of COM3 according to the value set in D1109. 2. Modify the baud rate of COM3 into 38,400bps...
  • Page 109 2 Functions of Devices in DVP-PLC M1002 D1120 M1120 M1143 FEND I170 IRET With I170 in the program, when COM2 is in Slave mode and there are communication data coming in, PLC will process the data and respond immediately. Notes: 1.
  • Page 110 2 Functions of Devices in DVP-PLC Particularly for HKY instruction, when the 16-digit button input is operated by 4x4 matrix, the scan time has to be fixed to longer than 20ms. The scan time in D1010 ~ D1012 also includes fixed scan time.
  • Page 111 2 Functions of Devices in DVP-PLC Device Description Latched STOP → RUN RUN → STOP D1067 Operational error code None Cleared Latched D1068 STEP value when operational error occurs None Latched Latched Error code explanation: D1067 error code Cause H’ 0E18 BCD conversion error H’...
  • Page 112 2 Functions of Devices in DVP-PLC See API 109 SWRD for more details. When PLC is in RUN status with 4DI card inserted into the input AX0 (photocoupler isolation), the status of AX0 ~ AX3 correspond respectively to M1104 ~ M1107.
  • Page 113 2 Functions of Devices in DVP-PLC Number of accel/decel sections = (TF-SF)/GF Number of output pulses in every section: Frequency GP = AP/Number of accel/decel sections Number of pulses AP = number of accel/decel pulses Note: this function is applicable only when “all” the conditions below are met.
  • Page 114 2 Functions of Devices in DVP-PLC M1002 K500 D1104 D500 ~ D506 as parameter addresses K1000 D500 Start frequency: 1KHz K100 D501 Interval frequency: 100Hz K10000 D502 Target frequency: 10KHz DMOV K80000 D503 Number of output pulses: 80,000 DMOV K10000...
  • Page 115 2 Functions of Devices in DVP-PLC Function M1133 Output switch for special high-speed pulse Y0 (50KHz) (On = enabled) M1134 On = Continuous output switch for special high-speed pulse Y0 (50KHz) M1135 “Number of pulses reached” flag for special high-speed pulse Y0 (50KHz) D1133 Start No.
  • Page 116 2 Functions of Devices in DVP-PLC Index Function Y10, Y11 2-axis synchronous control; output frequency of 1st section = low 16 bits of 32 bits Y10, Y11 2-axis synchronous control; output frequency of 1st section = high 16 bits of 32 bits Y10, Y11 2-axis synchronous control;...
  • Page 117 2 Functions of Devices in DVP-PLC (5,000, 4,000) (1,000, 3,000) (0,0) Section 1 Section 2 Figure 1) M1002 K200 D1133 D1134 K300 D1135 D1136 M1133 M1135 Figure 2) Axis Section Device D Output frequency Device D Number of output pulses...
  • Page 118 2 Functions of Devices in DVP-PLC (50,000, 50,000) (0,0) 10 sections (Figure 3) Axis Section Device D Output frequency Device D Number of output pulses D201, D200 K1,230 D203, D202 K615 D205, D204 K3,664 D207, D206 K1,832 D209, D208 K6,004...
  • Page 119 2 Functions of Devices in DVP-PLC (50,000, 50,000) (-50,000, 50,000) Y0=Off Y0=On Y1=On Y1=On Quadrant II Quadrant I (0,0) Quadrant IV Quadrant III Y0=On Y0=Off Y1=Off Y1=Off (-50,000, -50,000) (50 000, -50,000) (Figure 4) M1002 K200 D1133 D1134 K300 D1135...
  • Page 120 2 Functions of Devices in DVP-PLC M1002 K300 D1133 D1134 D1135 K200 D1136 M1133 M1135 (Figure 6) M0, M1 = On refers to drawing a 90° arc in Quadrant I; M0, M2 = On refers to drawing a 90° arc in Quadrant II;...
  • Page 121 2 Functions of Devices in DVP-PLC Program explanation: When the direction control pin is On, the direction will be a positive one; otherwier, it will be a negative one (see figure 9). When X0 = On, D0 will accumulate once and the 2 axes will draw a 90°...
  • Page 122 2 Functions of Devices in DVP-PLC = D0 K3 K200 D1133 K300 D1135 = D0 K4 D1133 K300 D1135 K200 M1133 M1135 (Figure 9) Calculate the frequency and number of output pulses in each section Destination: Draw 10 sections of arcs clockwise until they reach (50,000, 50,000) (see figure 10) Rx = target value in X;...
  • Page 123 2 Functions of Devices in DVP-PLC Position With decimal 20,610.67 27,300.42 34,549.11 42,178.25 50,000 point Without 20,610 27,300 34,549 42,178 50,000 decimal point (Table 3) Position With decimal 7,821.74 15,450.88 22,699.57 29,389.32 35,355.40 point Without 7,821 15,450 22,699 29,389 35,355...
  • Page 124 2 Functions of Devices in DVP-PLC 4. D1145: Number of special left-side extension modules (AD, DA, XA, PT, TC…); Max. 8 (available in SV only) Adjustable Pulse Speed Acceleration/Deceleration Function Group M1144 ~ M1149, M1154, D1030, D1031, D1144, D1154, D1155...
  • Page 125 2 Functions of Devices in DVP-PLC + n*6 + 4 Gap frequency of the n section (GFn) + n*6 + 5 Target frequency of the n section (TFn) + n*6 + 6 The lower 16 bits of the 32 bits for the target number of output pulses in the n...
  • Page 126 2 Functions of Devices in DVP-PLC h) When M1148 = On but M1144 = Off, deceleration will not be enabled and M1148 will be reset. Whenever M1144 = Off, M1149 will be reset. The number of sections being executed is determined upon the total number of sections. (Max. number of sections = 10) Acceleration or deceleration is determined upon the start frequency of the next section.
  • Page 127 2 Functions of Devices in DVP-PLC 6. Example 2: Pulse output program for 1 acceleration section and 1 deceleration section M1002 MOV K200 D200 MOV K250 D202 MOV K500 D203 MOV K250 D204 D205 D206 MOV K750 D208 MOV K500 D209...
  • Page 128 2 Functions of Devices in DVP-PLC M1002 M1148 8. Example 4: Program of zero return for 1 acceleration section and 1 deceleration section The timing diagram of relevant flags: Accelerating to Decelerating to zero point zero point Zero return stops...
  • Page 129 2 Functions of Devices in DVP-PLC Settings of acceleration/deceleration time, frequency and number of pulses: Started No. D Setting + index value 250 (Hz) 100 (ms) 500 (Hz) 10,000 (Hz) +6, +7 10 (pulses) 9,750 (Hz) 50 (ms) -500 (Hz)
  • Page 130 2 Functions of Devices in DVP-PLC Device No. Function M1170 Start flag M1171 Action flag D1170 STEP No. of the currently executed instruction 2. The function: a) Execution timing: The flag is valid only when PLC is in RUN status.
  • Page 131 2 Functions of Devices in DVP-PLC There are two output modes. K1 refers to “A-phase ahead of B-phase” and K2 refers to “B-phase ahead of A-phase”. The number of pulses accumulates once whenever a phase gap occurs. For example, the number of pulses in the figure below = 8, and when the number is reached, M1174 turns “On”.
  • Page 132 2 Functions of Devices in DVP-PLC Contents: 1. SA/SX/SC can use external interruption to store the present value in the middle-high-speed counter into D1180 ~ D1181, D1198 ~ D1199 2. The function: a) For SA/SX, X0 (pulse input point) has to work with X4 (external interruption point), C235/C251/C253 (high-speed counter) and I401 (interruption No.).
  • Page 133 2 Functions of Devices in DVP-PLC b) After enabling MODEM (M1184 = On), PLC has to initialize MODEM first (M1185 = On). If PLC fails to initialize MODEM, the auto-answering function of the MODEM will not be enabled. c) After MODEM is initialized, it will enter auto-answering mode automatically.
  • Page 134 2 Functions of Devices in DVP-PLC a) Using Y10 pulse output Mode 1 – Planned deceleration Applicable to: DDRVI and DDRVA instructions Criteria for executing planned deceleration: Shut down the criteria contact for pulse output instruction and turn “Off” M1334.
  • Page 135 2 Functions of Devices in DVP-PLC Frequency X10 triggered Target frequency Start frequency D1340 Time Max. Stop time = 1 pulse time b) Using Y11 pulse output Mode 1 – Planned deceleration Applicable to: DDRVI and DDRVA instructions Criteria for executing planned deceleration: Shut down the criteria contact for pulse output instruction and turn “Off”...
  • Page 136 2 Functions of Devices in DVP-PLC DVP04DA-H H’0401 DVP01HC-H H’0120 DVP04PT-H H’0402 DVP02HC-H H’0220 DVP04TC-H H’0403 DVP01DT-H H’0130 DVP06XA-H H’0604 DVP02DT-H H’0230 Special extension module ID for EH2: Module ID Module ID Module Name Module Name (hex) (hex) DVP04AD-H2 H’6400 DVP01PU-H2 H’6110...
  • Page 137 2 Functions of Devices in DVP-PLC EASY EASY PLC LINK Function Group M1350 ~ M1354, M1360 ~ M1519, D1399, D1355 ~ D1370, D1415 ~ D1465, D1480 ~ D1991 Number Contents: Special D and special M for ID1 ~ ID8 of the 16 stations in EASY EASY PLC LINK (M1353 = Off) for...
  • Page 138 2 Functions of Devices in DVP-PLC Special D and special M for ID9 ~ ID16 of the 16 stations in EASY EASY PLC LINK (M1353 = Off) for SA/SX/SC/EH/EH2/SV: MASTER PLC SLAVE ID 9 SLAVE ID 10 SLAVE ID 11 SLAVE ID 12 SLAVE ID 13 SLAVE ID 14 SLAVE ID 15 SLAVE ID 16...
  • Page 139 2 Functions of Devices in DVP-PLC Special D and special M for ID1 ~ ID8 of the 32 stations in EASY EASY PLC LINK (M1353 = On) for EH/EH2/SV: MASTER PLC SLAVE ID 1 SLAVE ID 2 SLAVE ID 3...
  • Page 140 2 Functions of Devices in DVP-PLC Special D and special M for ID9 ~ ID16 of the 32 stations in EASY EASY PLC LINK (M1353 = On) for EH/EH2/SV: MASTER PLC SLAVE ID 9 SLAVE ID 10 SLAVE ID 11 SLAVE ID 12 SLAVE ID 13 SLAVE ID 14 SLAVE ID 15 SLAVE ID 16...
  • Page 141 2 Functions of Devices in DVP-PLC Special D and special M for ID17 ~ ID24 of the 32 stations in EASY EASY PLC LINK (M1353 = On) for EH/EH2/SV: MASTER PLC SLAVE ID 17 SLAVE ID 18 SLAVE ID 19 SLAVE ID 20 SLAVE ID 21 SLAVE ID 22 SLAVE ID 23 SLAVE ID 24...
  • Page 142 2 Functions of Devices in DVP-PLC Special D and special M for ID25 ~ ID32 of the 32 stations in EASY EASY PLC LINK (M1353 = On) for EH/EH2/SV: MASTER PLC SLAVE ID 25 SLAVE ID 26 SLAVE ID 27 SLAVE ID 28 SLAVE ID 29 SLAVE ID 30 SLAVE ID 31 SLAVE ID 32...
  • Page 143 2 Functions of Devices in DVP-PLC Note: a) EASY EASY PLC LINK is based on MODBUS communication protocol. b) EH/EH2/SV supports 32 stations in the LINK and reading/writing of more than 16 data (SET1353) (M1353 = On). SA/SX/SC supports 16 devices in the LINK and reading/writing of 16 data.
  • Page 144 2 Functions of Devices in DVP-PLC e) Set up the start communication address of the Slave to be read/written. (See the explanations above on special D). The default start communication address of Slave to be read: H1064 = D100. The default start communication address of Slave to be written: H10C8 = D200.
  • Page 145 2 Functions of Devices in DVP-PLC 10. Auto mode and maual mode: a) Auto mode (M1351 = On): Master PLC automatically reads/writes from/to Slave PLC and stops when M1350/M1351 = Off to terminate EASY EASY PLC LINK. b) Manual mode (M1352 = On): When M1352 = On, you also have to set up the times of polling in D1431. One time of polling refers to the completion of reading and writing all Slaves.
  • Page 146 2 Functions of Devices in DVP-PLC 11. Operation Procedure of EASY EASY PLC LINK Set up the Slave ID# to be read Set up the number of data in Slave to be read Set up the Slave ID# to be written...
  • Page 147 2 Functions of Devices in DVP-PLC a) Example 1: Enabling 32 slave units linkage and up to 100 data for exchange in EASY EASY PLC LINK by M1353 M1002 M1353 D1121 D1120 M1120 K2000 D1480 D1496 K3000 D1129 K300 D1434...
  • Page 148 2 Functions of Devices in DVP-PLC You can modify the settings in D1434 ~ D1449, D1544 ~ D1559, D1450 ~ D1465 and D1560 ~ D1575 during the execution of EASY EASY PLC LINK, but the modified results will take effect in the next EASY EASY PLC LINK polling.
  • Page 149 2 Functions of Devices in DVP-PLC M1002 D1121 Master ID# COM2 communication protocol D1120 M1120 Retain communication protocol D1434 Number of data read from Slave ID#1 Number of data written into Slave ID#1 D1450 D1435 Number of data read from Slave ID#2...
  • Page 150 D100 ~ D115 and D200 ~ D215 in every Slave PLC in the tables of special M and special D. d) Example 4: Connection between Delta PLC and Delta VFD-M AC motor drive through EASY PLC LINK for STOP, forward/reverser revolution and writing/reading of frequency.
  • Page 151 2 Functions of Devices in DVP-PLC The Slave can also be Delta temperature controller DTA, DTB, Delta servo ASDA and so on which are compatible to Modbus protocol. Maximum 16 devices are connectable to the LINK. See the tables of special M and special D for the starting ID of Slave to be read/written and the number of data to be read/written.
  • Page 152 2 Functions of Devices in DVP-PLC A p p l i c a b l e t o D e v i c e Range Type Address ES/EX/SS SA/SX/SC EH/EH2/SV 1,536 ~ 1,791 word 1600 ~ 16FF 1,792 ~ 2,047...
  • Page 153: Error Codes

    2 Functions of Devices in DVP-PLC 2.12 Error Codes After you write the program into the PLC, the illegal use of operands (devices) or incorrect syntax in the program will result in flashing of ERROR indicator and M1004 = On. In this case, you can find out the cause of the error by checking the error code (hex) in special register D1004.
  • Page 154 2 Functions of Devices in DVP-PLC Error Error Cause of error Cause of error code code PLC program and data in parameters have not 0D0B Improper use of operands in IST instruction C40F been initialized Invalid RUN/STOP instruction to extension...
  • Page 155: Basic Instructions And Step Ladder Instructions

    97 DCNT 32-bit counter C-K or C-D (32 bits) 10.3 10.3 14.3 Main control instructions Execution speed (us) Instruction Function Operands STEP Page Code Master control start N0 ~ N7 3-10 Master control reset N0 ~ N7 3-10 DVP-PLC Application Manual...
  • Page 156 0.24 Note 1: ES includes ES/EX/SS; SA includes SA/SX/SC; EH includes EH/EH2/SV. Note 2: For EH series MPU, the execution speed in the brackets ( ) refers to the execution speed of designated operand M1536 ~ M4095. DVP-PLC Application Manual...
  • Page 157: Explanations On Basic Instructions

    M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999 Operand Explanations: The AND instruction is used in the series connection of A contact. The functions are to read out the status of present d DVP-PLC Application Manual...
  • Page 158 “OR” operation with the logical operation result obtained. The final result will be store in the accumulative register. Program Example: Ladder diagram: Instruction code: Operation: Loading in contact A of X0 Connecting to contact A of X1 in parallel Driving Y1 coil DVP-PLC Application Manual...
  • Page 159 Loading in contact A of X0 Connecting to contact B of X2 in parallel Loading in contact B of X1 Connecting to contact A of X3 in parallel Block A Block B Connecting circuit block in series Driving Y1 coil DVP-PLC Application Manual...
  • Page 160 Function Program steps Controllers Pops (recalls and removes) the currently stored result Operand Explanations: To retrieve the previous preserved logical operation result and store it into the accumulative register (the pointer of operational result will minus 1) DVP-PLC Application Manual...
  • Page 161 Connecting to contact A of X1 in series Driving Y1 coil Mnemonic Function Program Steps Controllers Latched (On) X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999 Operand Explanations: DVP-PLC Application Manual...
  • Page 162 When TMR instruction is executed, the designated coil of the timer will be On and the timer will start to time. When the set value in the timer is reached (present ≥ set value), the contact will be: NO (Normally Open) contact Open collector NC (Normally Closed) contact Close collector DVP-PLC Application Manual...
  • Page 163 M1200 ~ M1235. For high-speed addition/subtraction counters C235 ~ C255, when the high-speed counting pulse input goes from Off to On, the counting will start its execution. For the input terminals (X0 ~ X17) and counting methods DVP-PLC Application Manual...
  • Page 164 MCR is the main-control end instruction that is placed in the end of the main-control program. There should not be any contact instructions prior to MCR instruction. MC-MCR main-control program instructions support the nested program structure (max. 8 layers) and please use the instruction in the order N0 ~ N7. DVP-PLC Application Manual 3-10...
  • Page 165 See the specification of each model for the range of operands. If the status of a designated rising-edge is On before the PLC is powered, the contact of the rising-edge will be TRUE after PLC is powered. 3-11 DVP-PLC Application Manual...
  • Page 166 ANDF instruction is used in the series connection of the contacts’ falling-edge detection. [Program Example: Ladder diagram: Instruction code: Operation: Loading in A contact of X0 X1 falling-edge detection in series connection ANDF Drive Y1 coil DVP-PLC Application Manual 3-12...
  • Page 167 T0 ~ T255 C0 ~ C255 D0 ~ D9999 Operand Explanations: When X0 goes from Off to On (rising-edge trigger), PLS instruction will be executed and S will send out pulses for once of 1 scan time. 3-13 DVP-PLC Application Manual...
  • Page 168 Ladder diagram: Instruction code: Operation: Loading in A contact of X0 M0 falling-edge output Loading in contact A of M0 Y0 latched (On) Timing Diagram: 1 scan time Mnemonic Function Program steps Controllers Program End Operand Explanations: DVP-PLC Application Manual 3-14...
  • Page 169 Pointer P is used in API 00 CJ and API 01 CALL instructions. The use of P does not need to start from No. 0, and the No. of P cannot be repeated; otherwise, unexpected errors may occur. 3-15 DVP-PLC Application Manual...
  • Page 170 Driving Y1 coil Disabling interruption Pointer of interruption FEND program FEND Main program ends Interruption pointer I001 I 001 Loading in A contact of X2 Interruption subroutine Driving Y2 coil IRET IRET Interruption return DVP-PLC Application Manual 3-16...
  • Page 171: Step Ladder Instructions [Stl], [Ret]

    RET indicates the end of a step. There has to be a RET instruction in the end of a series of steps. One PLC program can be written in maximum 10 steps (S0 ~ S9) and every step should end with a RET. Program Example: Ladder diagram: SFC: M1002 M1002 ZRST S127 DVP-PLC Application Manual...
  • Page 172: Sequential Function Chart (Sfc)

    Alternative convergence. More than 2 steps transfer to the same step by transition condition. Simultaneous divergence. The same step transfers to more than 2 steps by the same transition condition. Simultaneous convergence. More than 2 steps transfer to the same step by a single transition condition. DVP-PLC Application Manual...
  • Page 173: How Does A Step Ladder Instruction Work?

    When S10 = On, Y0 and Y1 will be On. When X0 = On, S20 will be On and Y10 will be On. When S10 = Off, Y0 will be Off and Y1 will be On. 2. Timing Diagram of Step Ladder: DVP-PLC Application Manual...
  • Page 174 Normally in a ladder diagram, avoid repeated use of an output coil. The No. of output coil used by a step should also avoid being used when the step ladder diagram returns to a general ladder diagram. DVP-PLC Application Manual...
  • Page 175 Driving the jumping of step same sequence. Using OUT S24 Jumping up/down to non-adjacent steps in the same sequence. Return to initial step Using OUT S0 S25 returns to the initial step S0 by using OUT. DVP-PLC Application Manual...
  • Page 176 DO NOT use MC/MCR instruction in the step. DO NOT use STL instruction in a general subroutine or interruption subroutine. You can still use CJ instruction in STL instruction, but this will make the actions more complicated. We do not recommend you do so. DVP-PLC Application Manual...
  • Page 177: Things To Note For Designing A Step Ladder Program

    RET instruction. 2. If STL instruction is not in use, step S can be a general-purpose auxiliary relay. 3. When STL instruction is in use, the No. of step S cannot be repeated. 4. Types of sequences: DVP-PLC Application Manual...
  • Page 178 Starting step. Flag for IST instruction. M1042 Enabling pulses. Flag for IST instruction. M1043 Zero return completed. Flag for IST instruction. M1044 Zero point condition. Flag for IST instruction. M1045 Disabling all output reset. Flag for IST instruction. DVP-PLC Application Manual...
  • Page 179: Types Of Sequences

    Single sequence without divergence and convergence After a sequence is completed, the control power on the steps will be given to the initial step. Step ladder diagram SFC: M1002 ZRST S127 M1002 DVP-PLC Application Manual...
  • Page 180 See the diagram in the right hand side. When the condition at S50 is true, S50 will be reset and the sequence will be completed at this time. Complicated Single Sequence: Including simultaneous divergence, alternative divergence, simultaneous convergence and alternative convergence. DVP-PLC Application Manual 4-10...
  • Page 181 Structure of alternative convergence See the diagrams below. Depending on the condition of the input signal of which of S30, S40 and S50 becomes true first, the first one will be first transferred to S60. DVP-PLC Application Manual 4-11...
  • Page 182 4 Step Ladder Instructions Ladder diagram: SFC: Examples of alternative divergence & alternative convergence: Ladder diagram: SFC: M1002 ZRST S127 M1002 DVP-PLC Application Manual 4-12...
  • Page 183 4 Step Ladder Instructions Examples of simultaneous divergence & simultaneous convergence: Ladder diagram: SFC: M1002 M1002 ZRST S127 DVP-PLC Application Manual 4-13...
  • Page 184 4 Step Ladder Instructions Example of the simultaneous divergence & alternative convergence: Ladder diagram: SFC: M1002 M1002 ZRST S127 DVP-PLC Application Manual 4-14...
  • Page 185 4 Step Ladder Instructions Combination Example 1: (Including alternative divergence/convergence and simultaneous divergence/convergence) Ladder diagram: M1002 ZRST S127 SFC: M1002 DVP-PLC Application Manual 4-15...
  • Page 186 4 Step Ladder Instructions Combination Example 2: (Including alternative divergence/convergence and simultaneous divergence/convergence) Ladder diagram: SFC: M1002 M1002 ZRST S127 DVP-PLC Application Manual 4-16...
  • Page 187: Ist Instruction

    4. IST instruction can only be used once in the program. 5. Flags: M1040 ~ M1047. See remarks for more details. 6. IST instruction is a handy instruction specifically for the initial status of step ladder control procedure to accommodate special auxiliary relay. DVP-PLC Application Manual 4-17...
  • Page 188 “auto start” to restart the operation. The operation will resume until it meets the zero point. c) Continuous operation: Press “auto start” button at the zero point to resume the operation. Press “auto stop” to operate until it meets the zero point. 3. The control panel: DVP-PLC Application Manual 4-18...
  • Page 189 Zero Return Mode SFC: Clipping released Descending stops Robot arm ascends to upper limit (X4 On) Right shifting stops Robot arm left shifting to left limit (X1 On) M1043 Enable zero return completed flag Zero return operation completed DVP-PLC Application Manual 4-19...
  • Page 190 Robot arm ascends to upper limit (X4 On) Right shifting stops Robot arm left shifting to left limit (X1 On) Enable zero return completed flag M1043 Zero return operation completed Auto Operation Modes SFC: M1041 M1044 DVP-PLC Application Manual 4-20...
  • Page 191 Right shifting Clipping tightly Robot arm ascending to upper limit (X4 On) Right shifting Robot arm descending Clipping released Robot arm ascending to upper limit (X4 On) Robot arm left shifting to left limit (X1 On) DVP-PLC Application Manual 4-21...
  • Page 192 4 Step Ladder Instructions MEMO DVP-PLC Application Manual 4-22...
  • Page 193: List Of Instructions

    Mean 6-65 Timed Annunciator Set 6-66 Annunciator Reset 6-66 DSQR Square Root 6-72 DFLT Floating Point 6-70 Refresh REFF Refresh and Filter Adjust Input Matrix DHSCS High Speed Counter Set DHSCR High Speed Counter Reset 7-15 – DVP-PLC Application Manual...
  • Page 194 Reverse Running of VFD-A 8-11 104 STOP Stop VFD-A 8-11 105 RDST Read VFD-A Status 8-14 106 RSTEF Reset Abnormal VFD-A 8-16 107 LRC Checksum LRC Mode 8-17 108 CRC Checksum CRC Mode 8-19 109 SWRD Read Digital Switch 8-22 DVP-PLC Application Manual...
  • Page 195 162 TADD Time Addition 9-41 163 TSUB Time Subtraction 9-42 166 TRD Time Read 9-43 167 TWR Time Write 9-45 169 HOUR DHOUR Hour Meter 9-47 170 GRY DGRY Gray Code 9-49 171 GBIN DGBIN Gray Code 9-50 DVP-PLC Application Manual...
  • Page 196 > S 10-12 242 OR< DOR< < S 10-12 ≠ S 244 OR<> DOR<> 10-12 ≦ S 245 OR<= DOR<= 10-12 ≧ S 246 OR>= DOR>= 10-12 Instructions marked with * are available in EH2/SV series MPU. DVP-PLC Application Manual...
  • Page 197 5 Categories & Use of Application Instructions Note: 1. For applicable models, ES includes ES/EX/SS; SA includes SA/SX/SC; EH includes EH/EH2/SV. 2. ES/EX/SS series MPU does not support pulse execution type instructions (P instruction). DVP-PLC Application Manual...
  • Page 198: Composition Of Application Instruction

    Indication of if there is a pulse execution type instruction. If there is a pulse instruction, the column will be marked with “P”. Operands Function of the application instruction DVP-PLC applicable to the application instruction. ES includes ES/EX/SS, SA includes SA/SX/SC, EH includes EH/EH2/SV. Steps occupied by the 16-bit/32-bit/pulse execution instruction DVP-PLC applicable to the pulse/16-bit/32-bit instruction Column marked with * and in grey refers to E, F index register modification is applicable.
  • Page 199 5 Categories & Use of Application Instructions The application instructions for DVP-PLC are represented as API 00 ~ API 246. Every application instruction has its own mnemonic. For example, the mnemonic of API 12 is MOV. If you are using the ladder diagram editing software (WPLSoft) to input API 12 into the program, you only have to enter “MOV”.
  • Page 200 K1M0 refers to 8 bits, M0 ~ M7. When X0 = On, the contents in M0 ~ M7 will be moved to K2M0 bit0 ~ 7 in D10 and bit8 ~ 15 will be set to “0”. DVP-PLC Application Manual...
  • Page 201 Errors occur during the execution of the instruction when the combination of application instructions is incorrect or the devices designated by the operand exceed their range. Other than errors, the flags listed in the table below will be On, and error codes will also appear. DVP-PLC Application Manual...
  • Page 202 (SA/EH), API 70 TKY (SA/EH), API 71 HKY (SA/EH), API 72 DSW (SA), API 74 SEGL (SA), API 75 ARWS, API 80 RS (ES/SA/EH), API 100 MODRD (ES/SA/EH), API 101 MODWR (ES/SA/EH), API 102 FWD (ES/SA/EH), 5-10 DVP-PLC Application Manual...
  • Page 203: Handling Of Numeric Values

    In the 16-bit (or 32-bit) operation, if the contents of the operand are designated as bit devices K1 ~ K3 (or K4 ~ K7), the vacant high bits will be regarded as “0”. Therefore, the operation is a positive-value one. 5-11 DVP-PLC Application Manual...
  • Page 204 32-bit operation, the higher 16 bits will be regarded as “0”. For 32-bit data, please use K8Y0. The operations in DVP-PLC are conducted in BIN integers. When the integer performs division, e.g. 40 ÷ 3 = 13 and the remainder is 1. When the integer performs square root operations, the decimal point will be left out. Use decimal point operation instructions to obtain the decimal point.
  • Page 205 The steps required are the same as those in Example 1. The only difference is you have to alter the sign bit into “1”. DVP-PLC uses registers of 2 continuous No. to combine into a 32-bit floating point. For example, we use registers...
  • Page 206: E, F Index Register Modification

    E and F can modify the devices listed above but cannot modify themselves and Kn. K4M0E0 is valid and K0E0M0 is invalid. Grey columns in the table of operand at the beginning page of each application instruction indicate the operands modifiable by E and F. 5-14 DVP-PLC Application Manual...
  • Page 207 16-bit register, i.e. you can designate E or F. To modify constant K and H in a 32-bit instruction, you have to select a 32-bit register, i.e. you have to designate E. When you use the instruction mode in WPLSoft to modify constant K and H, you have to use @, e.g. "MOV K10@E0 D0F0” 5-15 DVP-PLC Application Manual...
  • Page 208: Instruction Index

    Close Loop Position Control (*) 9-95 05 DI Disable Interrupts 23 DIV DDIV Division 6-37 25 DEC DDEC Decrement 6-40 41 DECO Decode 6-59 72 DSW Digital Switch 7-64 DDEG Radian Angle 8-27 143 DELAY Delay Instruction 8-55 5-16 DVP-PLC Application Manual...
  • Page 209 215 LD& DLD& & S 10-7 10-7 216 LD| DLD| 10-7 217 LD^ DLD^ 10-10 224 LD= DLD= 10-10 225 LD> DLD> > S 10-10 226 LD< DLD< < S 10-10 228 LD<> DLD<> ≠ S 5-17 DVP-PLC Application Manual...
  • Page 210 2-Axis Relative Point to Point Motion (*) 9-76 DPPMA 2-Axis Absolute Point to Point Motion (*) 9-79 DPTPO Single-Axis Pulse Output by Table (*) 9-91 30 ROR DROR Rotation Right 6-46 31 ROL DROL Rotation Left 6-47 5-18 DVP-PLC Application Manual...
  • Page 211 Write CR Data into Special Modules 7-76 DTAN Tangent 8-47 DTANH Hyperbolic Tangent 8-54 160 TCMP Time Compare 9-39 161 TZCP Time Zone Compare 9-40 162 TADD Time Addition 9-41 163 TSUB Time Subtraction 9-42 166 TRD Time Read 9-43 5-19 DVP-PLC Application Manual...
  • Page 212 Instructions marked with * are available in EH2/SV series MPU. Note: 1. For applicable models, ES includes ES/EX/SS; SA includes SA/SX/SC; EH includes EH/EH2/SV. 2. ES/EX/SS series MPU does not support pulse execution type instructions (P instruction). 5-20 DVP-PLC Application Manual...
  • Page 213: Chapter 6 Application Instructions Api

    When X0 = On, the program automatically jumps from address 0 to N (the designated label P1) and keeps its execution. The addresses between 0 and N will not be executed. When X0 = Off, as an ordinary program, the program keeps on executing from address 0. CJ instruction will not be executed at this time. DVP-PLC Application Manual...
  • Page 214 Thus, when using CALL or CJ instructions, the user has to be aware of the pushing-in and obtaining of stacks. M1000 M1000 This function is only available in ES/EX/SS series models V4.9 (and above) and SA/SX/SC/EH/EH2/SV series models. DVP-PLC Application Manual...
  • Page 215 CJ instruction, the timing will resume. After the timing target is reached, the output contact of the timer will be On. *3: When the high-speed counters (C235 ~ C255) are driven and encounter the execution of CJ instruction, the will resume, as well as the action of the output points. counting DVP-PLC Application Manual...
  • Page 216 6 Application Instructions API 00-49 Y1 is a dual output. When M0 = Off, Y1 is controlled by M1. When M0 = On, Y1 is controlled by M12. T127 T127 K1000 T127 DVP-PLC Application Manual...
  • Page 217 CALL instruction. Program Example 1: When X0 = On, CALL instruction is executed and the program jumps to the subroutine designated by P2. When SRET instruction is executed, the program returns to address 24 and continues its execution. DVP-PLC Application Manual...
  • Page 218 When X14 is On, CALL P14 is executed and the program jumps to the subroutine designated by P14. When SRET is executed, the program returns to the previous P※ subroutine and continues its execution. After SRET instruction is executed in P10 subroutine, returning to the main program. DVP-PLC Application Manual...
  • Page 219 6 Application Instructions API 00-49 CALL CALL Main Main subroutine Program Program FEND SRET CALL CALL subroutine subroutine SRET SRET subroutine CALL SRET subroutine SRET DVP-PLC Application Manual...
  • Page 220 ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Explanations: No operand. No contact to drive the instruction is required. EI instruction allows interrupting subroutine in the program, e.g. external interruption, timed interruption, and high-speed counter interruption. DVP-PLC Application Manual...
  • Page 221 Time interruptions: I6□□, 1 point (□□ = 10 ~ 99, time base = 1ms) (support V5.7 and above) Input points occupied by external interruptions cannot be used for inputs of high-speed counters; otherwise grammar check errors may occur when the program is written in PLC. DVP-PLC Application Manual...
  • Page 222 “Disable interruption” flags in SA/SX/SC: Flag Function M1050 Disable external interruption I001 M1051 Disable external interruption I101 M1052 Disable external interruption I201 M1053 Disable external interruption I301 M1054 Disable external interruption I401 M1055 Disable external interruption I501 6-10 DVP-PLC Application Manual...
  • Page 223 Generate interruption I110 after CH0 pulse is sent M1341 Generate interruption I120 after CH1 pulse is sent M1342 Generate interruption I130 when CH0 pulse is being sent M1343 Generate interruption I140 when CH1 pulse is being sent DVP-PLC Application Manual 6-11...
  • Page 224 After FOR instruction is executed, executing FEND before NEXT will result in errors in the program. CJ Instruction Program Flow: The program flow The program flow when X=On when X0=off, and the program jumps to P0. X1=off main program CALL main program main program CALL instruction subroutine Interruption I301 subroutine 6-12 DVP-PLC Application Manual...
  • Page 225 6 Application Instructions API 00-49 CALL Instruction Program Flow: The program flow when X0=off, The program flow X1=off when X0=Off, main X1=On. program CALL main program main program CALL instruction subroutine Interruption I301 subroutine DVP-PLC Application Manual 6-13...
  • Page 226 200ms. 300ms program Dividing the program to two parts so that both parts' scan time are less than 200ms. 150ms program Watchdog timer reset 150ms program 6-14 DVP-PLC Application Manual...
  • Page 227 After program A has been executed for 3 times, it will resume its execution after NEXT instruction. Program B will be executed for 4 times whenever program A is executed once. Therefore, program B will be executed 3 × 4 = 12 times in total. DVP-PLC Application Manual 6-15...
  • Page 228 NEXT Program Example 2: When X7 = Off, PLC will execute the program between FOR ~ NEXT. When X7 = On, CJ instruction jumps to P6 and avoids executing the programs between FOR ~ NEXT. MEXT 6-16 DVP-PLC Application Manual...
  • Page 229 When the programs between FOR ~ NEXT are not to be executed, the user can adopt CJ instruction for a jumping. When the most inner FOR ~ NEXT loop is in the status of X1 = On, CJ instruction executes jumping to P0 and skips the execution on P0. K4X100 NEXT NEXT NEXT NEXT NEXT DVP-PLC Application Manual 6-17...
  • Page 230 If the user need to obtain a comparison result with ≥ ≤, and ≠, make a series parallel connection between Y0 ~ If K10>D10, Y0 = On If K10=D10, Y1 = On If K10<D10, Y2= On To clear the comparison result, use RST or ZRST instruction. ZRST 6-18 DVP-PLC Application Manual...
  • Page 231 M0, M1, and M2 remain their status before X0 = Off. K100 If C10 < K10, M0 = On If K10 < C10 < K100, M1 = On If C10 > K100, M2 = On To clear the comparison result, use RST or ZRST instruction. ZRST DVP-PLC Application Manual 6-19...
  • Page 232 When X2 = Off, the content in (D31, D30) and (D41, D40) will remain unchanged. If X2 = On, the present value of (D21, D20) will be sent to (D31, D30) data register. Meanwhile, the present value of C235 will be moved to (D41, D40) data register. DMOV DMOV C235 6-20 DVP-PLC Application Manual...
  • Page 233 D10(BCD 4 digits) Shift move Unchanged Unchanged D20(BCD 4 digits) Auto conversion D20(BIN 16 bits) Before the execution, assume D10 = K1234 and D20 = K5678. After the execution, D10 will remain unchanged and D20 will become K5128. DVP-PLC Application Manual 6-21...
  • Page 234 Use SMOV instruction to move the 1 digit of D1 to the 3 digit of D2 and combine the two DIP switches into one. X13~X10 X27~X20 M1001 M1168 M1000 (X20~X27)BCD K2X20 2 digits D2(BIN) (X10~X13)BCD K1X10 1 digit D1(BIN) SMOV 6-22 DVP-PLC Application Manual...
  • Page 235 Symbol bit (0=positive, 1=negative) Sending the phase-reversed data No data Program Example 2: The loop below can also adopt CML instruction (see right below). X000 X001 X002 X003 M1000 K1M0 K1X0 X000 Normally on contact X001 X002 X003 DVP-PLC Application Manual 6-23...
  • Page 236 Assume the bit devices KnX, KnY, KnM and KnS are designated for moving, the number of digits of S and D has to be the same, i.e. their n has to be the same. ES/EX/SS do not support the use of KnX, KnY, KnM, KnS and E, F index register modification. M1000 K1M0 K1Y0 6-24 DVP-PLC Application Manual...
  • Page 237 In ESEX/SS/SA/SX/SC, when S < D, avoid the number difference of “1” and the instruction is processed following the order 3→2→1. If the devices have the number difference of “1”, the contents in D11 ~ D13 will all be the content in D10. BMOV DVP-PLC Application Manual 6-25...
  • Page 238 ES/EX/SS do not support the use of KnX, KnY, KnM, KnS and E, F index register modification. Program Example: When X10 = On, K10 will be moved to the 5 consecutive registers starting from D10. FMOV 6-26 DVP-PLC Application Manual...
  • Page 239 M1303 = On, the upper and lower 16 bits in the individual designated device exchange with each other. When X0 = On and M1303 = On, the 16-bit contents in D100 and those in D101 will exchange with each other. DVP-PLC Application Manual 6-27...
  • Page 240 6 Application Instructions API 00-49 Before After execution execution M1303 D100L D100L DXCHP D100 D100 D100H D100H D101L D101L D101H D101H 6-28 DVP-PLC Application Manual...
  • Page 241 When X0 = On, the binary value of D10 will be converted into BCD value, and the 1s digit of the conversion result will be stored in K1Y0 (Y0 ~ Y3, the 4 bit devices). K1Y0 When D10 = 001E (hex) = 0030 (decimal), the execution result will be: Y0 ~ Y3 = 0000(BIN). DVP-PLC Application Manual 6-29...
  • Page 242 When X0 = On, the BCD value of K4X0 is converted into BIN value and sent it to D100. The BIN value of D100 will then be converted into BCD value and sent to K4Y20. K4X0 D100 K4Y20 D100 6-30 DVP-PLC Application Manual...
  • Page 243 4-digit DIP switch in BCD format 4-digit BCD value Using BIN instruction to store the BIN value into D100 Using BCD instruction to convert the content in D100 into a 4-digit BCD value. 4-digit 7-segment display in BCD format DVP-PLC Application Manual 6-31...
  • Page 244 When X0 = On, the content in (D31, D30) will plus the content in (D41, D40) and the sum will be stored in (D51, D50). D30, D40 and D50 are low 16-bit data; D31, D41 and D51 are high 16-bit data. DADD (D31, D30) + (D41, D40) = (D51, D50) 6-32 DVP-PLC Application Manual...
  • Page 245 、 、 、 -2 -1 0 -2,147,483,648 -1 0 1 2,147,483,647 0 1 2 The highest bit of The highest bit of Borrow flag Carry flag the data = 1 (negative) the data = 0 (positive) DVP-PLC Application Manual 6-33...
  • Page 246: Chapter 10 Application Instructions Api

    When X10 = On, the content in (D31, D30) will minus the content in (D41, D40) and the remainder will be stored in (D51, D50). D30, D40 and D50 are low 16-bit data; D31, D41 and D51 are high 16-bit data. DSUB (D31, D30) − (D41, D40) = (D51, D50) 6-34 DVP-PLC Application Manual...
  • Page 247 When D serves as a bit device, it can designate K1 ~ K8 and construct a 32-bit result, occupying consecutive 2 groups of 32-bit data. Program Example: The 16-bit D0 is multiplied by the 16-bit D10 and brings forth a 32-bit product. The higher 16 bits are stored in D21 DVP-PLC Application Manual 6-35...
  • Page 248 6 Application Instructions API 00-49 and the lower 16-bit are stored in D20. On/Off of the most left bit indicates the positive/negative status of the result value. K8M0 6-36 DVP-PLC Application Manual...
  • Page 249 Program Example: When X0 = On, D0 will be divided by D10 and the quotient will be stored in D20 and remainder in D21. On/Off of the highest bit indicates the positive/negative status of the result value. DVP-PLC Application Manual 6-37...
  • Page 250 6 Application Instructions API 00-49 K4Y0 6-38 DVP-PLC Application Manual...
  • Page 251 In 16-bit operation, 32,767 pluses 1 and obtains -32,768. In 32-bit operation, 2,147,483,647 pluses 1 and obtains -2,147,483,648. The operation results will not affect M1020 ~ M1022. Program Example: When X0 = Off→On, the content in D0 pluses 1 automatically. INCP DVP-PLC Application Manual 6-39...
  • Page 252 In 16-bit operation, -32,768 minuses 1 and obtains 32,767. In 32-bit operation, -2,147,483,648 minuses 1 and obtains 2,147,483,647. The operation results will not affect M1020 ~ M1022. Program Example: When X0 = Off→On, the content in D0 minuses 1 automatically. DECP 6-40 DVP-PLC Application Manual...
  • Page 253 D21 D20 0 0 0 0 0 0 0 0 0 0 0 0 After D41 D40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 execution DVP-PLC Application Manual 6-41...
  • Page 254 When X1 = On, the 32-bit (D11, D10) and (D21, D20) will perform DOR, logical OR operation, and the result will be stored in (D41, D40). D11 D10 Before execution D21 D20 0 0 0 0 0 0 After 1 1 1 1 1 1 1 1 1 1 D41 D40 execution 6-42 DVP-PLC Application Manual...
  • Page 255 When X1 = On, the 32-bit (D11, D10) and (D21, D20) will perform DXOR, logical XOR operation, and the result will be stored in (D41, D40). DXOR D11 D10 Before DXOR execution 0 0 0 D21 D20 0 0 0 After 1 0 0 1 1 1 0 0 1 1 D41 D40 execution DVP-PLC Application Manual 6-43...
  • Page 256 Obtaining the absolute value by the remainder of the subtraction. When X0 = On, a) If D0 > D2, M0 = On. b) If D0 = D2, M1 = On. c) If D0 < D2, M2 = On. d) D4 is then able to remain positive. 6-44 DVP-PLC Application Manual...
  • Page 257 1 1 1 (D0=-5) (D0)+1=5 1 1 1 (D0)+1=32,765 (D0=-32,765) 1 0 0 (D0)+1=32,766 (D0=-32,766) 1 0 0 (D0=-32,767) (D0)+1=32,767 1 0 0 (D0=-32,768) (D0)+1=-32,768 1 0 0 1 0 0 Max. absolute value is 32,767 DVP-PLC Application Manual 6-45...
  • Page 258 Rotate to the right h igher bit lower bit Carry 0 1 1 1 0 1 flag 16 bits After one rotation to the right h igher bit lower bit 1 0 1 1 Carry flag 6-46 DVP-PLC Application Manual...
  • Page 259 ※ will be sent to carry flag M1022. Rotate to the left higher bit lower bit 1 1 1 1 0 0 Carry flag 16 bits After one rotation to the left higher bit lower bit 1 0 0 0 Carry flag DVP-PLC Application Manual 6-47...
  • Page 260 The bit marked with ※ will be sent to carry flag M1022. Rotate to the right higher bit lower bit 0 0 0 1 0 0 Carry flag 16 bits After one rotation to the right higher bit lower bit 0 0 0 Carry flag 6-48 DVP-PLC Application Manual...
  • Page 261 The bit marked with ※ will be sent to carry flag M1022. RCLP Rotate to the left lower bit higher bit 1 1 1 1 0 0 Carry flag 16 bits After one rotation to the left higher bit lower bit 1 0 0 0 Carry flag DVP-PLC Application Manual 6-49...
  • Page 262 M11 ~ M8 → M7 ~ M4 M15 ~ M12 → M11 ~ M8 X3 ~ X0 → M15 ~ M12 completed SFTR 4 bits as a group shifting to the right carry M15 M14 M13 M12 M11 M10 6-50 DVP-PLC Application Manual...
  • Page 263 → M11 ~ M8 M3 ~ M0 → M7 ~ M4 X3 ~ X0 → M3 ~ M0 completed SFTR 4 bits as a group shifting to the left carry M15 M14 M13 M12 M11 M10 DVP-PLC Application Manual 6-51...
  • Page 264 D35 ~ D32 → D31 ~ D28 D13 ~ D10 → D35 ~ D32 completed WSFRP Right-shifting for 4 registers D11 D10 D24 D23 D21 D20 D35 D34 D33 D32 D31 D30 D29 D27 D26 Carry 6-52 DVP-PLC Application Manual...
  • Page 265 X27 ~ X20 → Y27 ~ Y20 completed When using Kn type device, please designate the same number of digits. WSFRP K1X20 K1Y10 Right-shifting for 2 digits X25 X24 X21 X20 Y14 Y13 Y11 Y10 Y23 Y22 Y21 Y20 Carry DVP-PLC Application Manual 6-53...
  • Page 266 D23 ~ D20 → D27 ~ D24 D13 ~ D10 → D23 ~ D20 completed WSFLP Left-shifiting for 4 registers D11 D10 Carry D24 D23 D27 D26 D21 D20 D35 D34 D33 D32 D31 D30 D29 6-54 DVP-PLC Application Manual...
  • Page 267 Reset the content of D0 as 0 in advance SFWRP n = 10 points pointer D0 = 3 Remarks: This instruction can be used together with API 39 SFRD for the reading/writing of “first-in, first-out” stack data. DVP-PLC Application Manual 6-55...
  • Page 268 D9 ~ D2 shift to the right for 1 register. The content in D0 minuses 1. SFRDP n = 10 points pointer data read Remarks: This instruction can be used together with API 38 SFWR for the reading/writing of “first-in, first-out” stack data. 6-56 DVP-PLC Application Manual...
  • Page 269 Devices, e.g. bit devices Y, M, S and word devices T, C, D, can use RST instruction. API 16 FMOV instruction is also to send K0 to word devices T, C, D or bit registers KnY, KnM, KnS for reset. DVP-PLC Application Manual 6-57...
  • Page 270 6 Application Instructions API 00-49 FMOV 6-58 DVP-PLC Application Manual...
  • Page 271 = 16 points. When X10 = Off→On, this instruction will decode b2 ~ b0 in D10 to b7 ~ b0 in D20. b15 ~ b8 that have not been used in D20 will all become 0. DVP-PLC Application Manual 6-59...
  • Page 272 The lower 3 bits of D10 are decoded and stored in the lower 8 bits of D20. The higher 8 bits of D20 are all 0. After the execution of this instruction is completed and X10 turns to Off, the content that has been decoded and output keeps acting. DECOP all be 0 6-60 DVP-PLC Application Manual...
  • Page 273 (b0 ~ b7) in D10 and stores the result in the lower 3 bits (b2 ~ b0) of D20. b15 ~ b3 that have not been used in D20 will all become 0. b8 ~ b15 of D10 are invalid data. DVP-PLC Application Manual 6-61...
  • Page 274 6 Application Instructions API 00-49 After the execution of this instruction is completed and X10 turns to Off, the content in D remains unchanged. ENCOP Invalid data all be 0 6-62 DVP-PLC Application Manual...
  • Page 275 When 32- instruction is in use, D will occupy 2 registers. Program Example: When X10 = On, among the 16 bits of D0, the total of bits whose content is “1” will be stored in D2. DVP-PLC Application Manual 6-63...
  • Page 276 When X0 = On, assume the 15 bit of D0 is “1”, and M0 = On. Assume the 15 bit of D0 is “0”, and M0 = Off. When X0 goes Off, M0 will remains in its previous status. M0=Off M0=On 6-64 DVP-PLC Application Manual...
  • Page 277 When X10 = On, the contents in 3 (n = 3) registers starting from D0 will be summed and then divided by 3. The obtained mean value will be stored in D10 and the remainder will be left out. MEAN (D0+D1+D2)/3 K100 K112 K113 Remainder = 3, left out K125 DVP-PLC Application Manual 6-65...
  • Page 278 If X10 and X11 = On at the same time for more than 2 seconds, annuniciator point S910 = On. Even X10 and X11 go Off afterwards, S910 will still keep On. However, T10 will be reset to Off and the present value = 0. 6-66 DVP-PLC Application Manual...
  • Page 279 When Y0 = On for more than 10 seconds and the device fails to reach the frong position X2, S910= On. When Y1 = On for more than 10 seconds and the device fails to reach the back position X3, S920= On. DVP-PLC Application Manual 6-67...
  • Page 280 When backward switch X1 = On and backward device Y1 = On, Y1 will go Off only when the device reaches the back position switch X3. Y2 will be On when any annunciator is enabled. Whenever X4 is on, 1 annunciator in action will be reset. The reset starts from the annunciator with the smallest No. 6-68 DVP-PLC Application Manual...
  • Page 281 The operation result D should be integer only, and the decimal will be left out. Borrow flag M1021 = On. When the operation result D = 0, zero flag M1020 = On. Program Example: When X10 = On, the instruction performs a square root on D0 and stores the result in D12. DVP-PLC Application Manual 6-69...
  • Page 282 If D0 = K10, X10 will be On. The 32-bit value of the converted floating point will be H41200000 and stored in 32-bit register D12 (D13). If 32-bit register D0 (D1) = K100,000, X11 will be On. The 32-bit value of the converted floating point will be H47C35000 and stored in 32-bit register D20 (D21). 6-70 DVP-PLC Application Manual...
  • Page 283 K61.5 (D10) (X7~X0) binary floating point -bit 2-digit BCD (D31,D30) decimal floating point (for monitoring (D301,D300) (D101,D100) (D200) BIN (D41,D40) binary floating point binary floating point -bit integer (D203,D202) binary floating point (D401,D400) binary floating point DVP-PLC Application Manual 6-71...
  • Page 284 D21 and D20 (binary floating point value) are converted to D31 and D30 (decimal floating point value). ○ D21 and D20 (binary floating point value) are converted to D41 and D40 (BIN integer). ○ 6-72 DVP-PLC Application Manual...
  • Page 285 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Refresh ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps K H KnX KnY KnM KnS T C D E F REF, REFP: 5 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: D: Start device to be I/O refreshed n: Number of items to be I/O refreshed...
  • Page 286 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers REFF Refresh and Filter Adjust ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps K H KnX KnY KnM KnS T C D E F REFF, REFFP: 3 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV...
  • Page 287 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Input Matrix ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps K H KnX KnY KnM KnS T C D E F MTR: 9 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device of matrix input : Start device of matrix output...
  • Page 288 7 Application Instructions API 50-99 The figure below illustrates the external wiring of the 2-array matrix input loop constructed by X40 ~ X47 and Y40 ~ Y41. The 16 switches correponds to the internal relays M10 ~ M17, M20 ~ M27. Should be used with MTR instruction.
  • Page 289 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers HSCS High Speed Counter Set ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T DHSCS: 13 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Comparative value : No.
  • Page 290 7 Application Instructions API 50-99 b) When the present value in C249 changes from 99 to 100, the drive contact of C249 will be On immediately. When the execution arrives at SET Y17, Y17 will still be affected by the scan time and will output after END instruction. M1000 DCNT C249...
  • Page 291 7 Application Instructions API 50-99 Remarks: The output contact of the high speed counter and the comparative outputs of API 53 DHSCS, API 34 DHSCR and API 55 DHSZ instructions only perform comparison and contact outputs when there is a counting input. When using data operation instructions, e.g.
  • Page 292 7 Application Instructions API 50-99 High speed counters supported by SC series MPU (total bandwidth: 130KHz): Type 1-phase 1 input 1-phase 2 inputs 2-phase inputs C235 C236 C237 C238 C239 C240 C241 C242 C243 C244 C245 C246 C247 C249 C250 C251 C252 C254 C255 Input U: Progressively increasing input A: A phase input...
  • Page 293 7 Application Instructions API 50-99 Output reaches comparative value C243 Set value 10 C245 Set value 11 C250 High-speed comparison instruction C255 vi) Explanations on high speed counter and high speed comparator: (1) When DHSCS and DHSCR instructions use the high speed counter (C243/C245/C250/C255), they can only use the set values of 2 groups of high speed comparative instructions.
  • Page 294 7 Application Instructions API 50-99 ii) Multiplied frequency mode ( indicates the occurrence of counting) Counting mode Counting wave pattern A-phase B-phase Counting up Counting down A-phase B-phase Counting up Counting down A-phase B-phase Counting up Counting down EH/EH2/SV series MPU supports high speed counters. C235 ~ C240 are program-interruption 1-phase high speed counter with a total bandwidth of 20KHz, can be used alone with a counting frequency of up to 10KHz.
  • Page 295 7 Application Instructions API 50-99 Program-interruption Counter Hardware high speed counter type high speed counter Type 1-phase 1 input 1-phase 1 input 1-phase 2 inputs 2-phase 2 inputs C235 C236 C237 C238 C239 C240 C241 C242 C243 C244 C246 C247 C248 C249 C251 C252 C253 C254 Input U: Progressively increasing input A: A phase input...
  • Page 296 7 Application Instructions API 50-99 HHSC0 HHSC1 HHSC2 HHSC3 Present value in counter Counting reaches set value C ounting pulses HHSC0 HHSC1 Comparator 8 set values HHSC0 HHSC1 HHSC2 HHSC3 HHSC2 C ounting pulses HHSC3 DHSCS occupies 1 group of set values DHSCR occupies 1 group of set values HHSC0 HHSC1 HHSC2 HHSC3 Output reaches...
  • Page 297 7 Application Instructions API 50-99 Special registers for relevant flags and settings of high speed counters: Flag Function M1150 DHSZ instruction in multiple set values comparison mode M1151 The execution of DHSZ multiple set values comparison mode is completed. M1152 Set DHSZ instruction as frequency control mode M1153 DHSZ frequency control mode has been executed.
  • Page 298 7 Application Instructions API 50-99 Flag Function M1314 C237 Start input point control M1315 C238 Start input point control M1316 C239 Start input point control M1317 C240 Start input point control M1320 C235 Reset input point control M1321 C236 Reset input point control M1322 C237 Reset input point control M1323...
  • Page 299 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers HSCR High Speed Counter Reset ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T DHSCR: 13 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Comparative value : No.
  • Page 300 7 Application Instructions API 50-99 M1000 DCNT C251 K200 DHSCR K100 C251 C251 Program Example 2: When DHSCR instruction designates the same high speed counter, and the present value in the high speed counter C251 changes from 999 to 1,000 or 1,001 to 1,000, C251 will be reset to Off. 1,000 M1000 Not affected by scan time...
  • Page 301 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers High Speed Zone Compare ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T DHSZ: 17 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Lower bound of the comparison zone : Upper bound of the comparison zone...
  • Page 302 7 Application Instructions API 50-99 Program Example 2: Use DHSZ instruction for high/low speed stop control. C251 is an A-B phase high speed counter and DHSZ only performs comparison output when there is a C251 counting pulse input. Therefore, even when the present value in the counter is 0, Y10 will not be On.
  • Page 303 7 Application Instructions API 50-99 In this mode, : start device in the comparison table. S can only designate data register D and can be modified by E and F. Once this mode is enabled, S will not be changed even the E and F has been changed. : number of group data to be compared.
  • Page 304 7 Application Instructions API 50-99 The comparison table: 32-bit data for comparison Table counting No. of Y output On/Off indication register D1150 High word Low word (K0) (K100) (K10) (K1) (K0) (K200) (K11) (K1) (K0) (K300) D10 (K10) D11 (K0) D13 (K0) D12 (K400) D14 (K11)
  • Page 305 7 Application Instructions API 50-99 - D: Designated mode (can only be M1152) This mode can only be used once. For EH/EH2/SV series MPU, this mode can only be used in the hardware high speed counter C241 ~ C254. Please enter the set values in every register in the table before executing the instruction.
  • Page 306 7 Application Instructions API 50-99 Present value in C251 (Hz) 15,000 10,000 5,000 M1153 D1151 12. Special registers for flags and relevant settings: Flag Function M1152 DHSZ instruction in frequency control mode M1153 The execution of DHSZ frequency control mode is completed. Special D Function D1151...
  • Page 307 7 Application Instructions API 50-99 DMOVP K200 DMOVP K300 K400 DMOVP DHSZ C251 M1152 DPLSY D1152 Frequency Number Output point pulses 14. During the execution of DHSZ instruction, do not modify the set values in the comparison table. 15. The designated data will be arranged into the the above program diagram when the program executes to END instruction.
  • Page 308 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Speed Detection ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T SPD: 7 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : External pulse input terminal : Pulse receiving time (ms)
  • Page 309 7 Application Instructions API 50-99 at the same time with a total bandwidth of 40KHz. See 2.11 for more details for how to use M1036. 11. There is no limitation on the times of using this instruction in the program, but only one instruction will be executed at a time.
  • Page 310 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers PLSY Pulse Y Output ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T PLSY: 7 steps DPLSY: 13 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Pulse output frequency : Number of output pulses...
  • Page 311 7 Application Instructions API 50-99 EH series MPU has two groups of A-B phase pulse output from CH0 (Y0, Y1) and CH1 (Y2, Y3); EH2/SV series MPU has four groups of A-B phase pulse output from CH0 (Y0, Y1), CH1 (Y2, Y3), CH2 (Y4, Y5) and CH3 (Y6, Y7).
  • Page 312 7 Application Instructions API 50-99 0.5ms Y0 output Remarks: 1. Flags and special registers for ES/EX/SS series MPU: M1010: When On, Y0 output will be continuous with no limitation on the number of pulses. When Off, the number of output pulses from Y0 will be decided by S M1023: When On, Y1 output will be continuous with no limitation on the number of pulses.
  • Page 313 7 Application Instructions API 50-99 3. Flags and special registers for EH/EH2/SV series MPU: M1010: (EH/EH2/SV) When On, CH0, CH1, CH2 and CH3 will output pulses at END instruction. Off when the output starts. M1029: (EH/EH2/SV) On when CH0 pulse output is completed. M1030: (EH/EH2/SV) On when CH1 pulse output is completed.
  • Page 314 7 Application Instructions API 50-99 D1229: (EH2/SV) Phase setting of CH2 (Y4, Y5): D1229 determines the phase by the last two bits; other bits are invalid. 1. K0: Y4 output 2. K1: Y4, Y5 AB-phase output; A ahead of B. 3.
  • Page 315 7 Application Instructions API 50-99 Program Example 1: FEND M1000 I 001 DPLSY K1000 K1000 M1347 IRET M1000 I 101 DPLSY K1000 K1000 M1348 IRET Explanations: a) Whenever X0 is triggered, Y0 will output 1,000 pulses; whenever X1 is triggered, Y2 will output 1,000 pulses. b) When X triggers Y pulse output, there should be an interval of at least one scan time between the end of Y pulse output and the next X-triggered output.
  • Page 316 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Pulse Width Modulation ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T PWM: 7 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Pulse output width : Pulse output period...
  • Page 317 7 Application Instructions API 50-99 Program Example: When X0 = On, Y1 will output the pulses as below. When X0 = Off, Y1 output will also be Off. K1000 K2000 t=1,000ms Y1 output T=2,000ms Remarks: 1. Flags for ES/EX/SS/SA/SX/SC series MPU: M1070: Y1 pulse output time unit switch.
  • Page 318 7 Application Instructions API 50-99 D1373: (EH2/SV) Time unit of CH2 output pulses when M1530 = On. D1374: (EH2/SV) Time unit of CH3 output pulses when M1531 = On. D1375: (EH2/SV) Low word of the current number of output pulses from CH2. D1376: (EH2/SV) High word of the current number of output pulses from CH2.
  • Page 319 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers PLSR Pulse Ramp ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T PLSR: 9 steps DPLSR: 17 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Maximum speed of pulse output : Total number of output pulses...
  • Page 320 7 Application Instructions API 50-99 D for all series MPU: ES/EX/SS/SA/SX/SC EH2/SV Output point Y0, Y1 Y0, Y2 Y0, Y2, Y4, Y6 EH series MPU has two groups pf A-B phase pulse output CH0 (Y0, Y1) and CH1 (Y2, Y3). EH2/SV series MPU has four groups pf A-B phase pulse output CH0 (Y0, Y1), CH1 (Y2, Y3), CH2 (Y4, Y5) and CH3 (Y6, Y7).
  • Page 321 7 Application Instructions API 50-99 Output: Y0 or Y2 Pulse speed (Hz) Time interval among Targeted speed: 10 ~ 200,000Hz pulse outputs 10 10 x 1/10 Every speed variation x 1/10 10-step 10-step variations variations 16-bit command:110~32,767PLS 32-bit command:110~2,147,483,647PLS Time(Sec) Accel time Decel time below 5,000ms...
  • Page 322 7 Application Instructions API 50-99 Frequency F Maximum speed: 10 ~ 200,000Hz Total number of output pulses 16-bit instruction: 110 ~ 32,767PLS Start 32-bit instruction: 110 ~ 2,147,483,647PLS frequency Accel time Decel time 1 ~ 5,000ms 1 ~ 5,000ms The acceleration/deceleration of EH/EH2/SV series MPU is based on the number of pulses. If the output cannot reach the maximum acceleration frequency within the acceleration/deceleration time offered, the instruction will automatically adjust the acceleration/deceleration time and the maximum frequency.
  • Page 323 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Initial State ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T IST: 7 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device in the designated operation mode : The smallest No.
  • Page 324 7 Application Instructions API 50-99 Program Example 2: 1. Robot arm control (by IST instruction): a) Motion request: Separate the big ball and small ball and move them to different boxes. Configure the control panel for the control. b) Motions of the robot arm: descending, clipping ball, ascending, right shifting, releasing ball, ascending, left shifting.
  • Page 325 7 Application Instructions API 50-99 Manual Operation Mode Clipping tightly Clipping released X22 Y1 Ascending Interlocked X23 Y0 Descending X24 X4 Right shifting Interlocked X25 X4 Robot arm ascends to upper limit (X4 On) Left shifting Zero Return Mode SFC: Clipping released Descending stops Robot arm ascends to upper limit (X4 On)
  • Page 326 7 Application Instructions API 50-99 Auto Operation Modes SFC: M1041 M1044 7 - 4 2 D V P - P L C A P P L I C AT I O N M A N U A L...
  • Page 327 7 Application Instructions API 50-99 Ladder Diagram: M1041 M1044 Enter auto operation mode Robot arm descending X5 X0 Clipping tightly Robot arm ascending to upper limit (X4 On) Right shifting Clipping tightly Robot arm ascending to upper limit (X4 On) Right shifting Robot arm descending Clipping released...
  • Page 328 7 Application Instructions API 50-99 Remarks: Flag explanations: M1040: When On, all step operations are forbidden. 1. Manual mode: M1040 keeps being On 2. Zero return/one cycle operation mode: Between the timing of pressing “auto stop” and “auto start” buttons, M1040 will keep being On. 3.
  • Page 329 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Search a Data Stack ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T SER, SERP: 9 steps DSER, DSERP: 17 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Start device for data stack comparison...
  • Page 330 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers ABSD Absolute Drum Sequencer ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T ABSD: 9 steps DABSD: 17 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Start device in the data table : No.
  • Page 331 7 Application Instructions API 50-99 Lower bound value Upper bound value Present value in C10 Output D104 = 140 D105 = 170 140 ≦ C10 ≦ 170 M12 = On 150 ≦ C10 ≦ 390 D106 = 150 D107 = 390 M13 = On If the lower bound value >...
  • Page 332 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers INCD Incremental Drum Sequencer ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T INCD: 9 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Start device in the data table : No.
  • Page 333 7 Application Instructions API 50-99 Present value Present value M1029 7 - 4 9 D V P - P L C A P P L I C AT I O N M A N U A L...
  • Page 334 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers TTMR Teaching Timer ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T TTMR: 5 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: D: Device No.
  • Page 335 7 Application Instructions API 50-99 Program Example 2: Use TMR instruction to write in 10 groups of set time. Write the set values into D100 ~ D109 in advance. The timing unit for timer T0 ~ T9 is 0.1 sec. The timing unit for the teaching timer is 1 sec. Connect the 1-bit DIP switch to X0 ~ X3 and use BIN instruction to convert the set value of the switch into a bin value and store it in E.
  • Page 336 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers STMR Special Timer ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T STMR: 7 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: No.
  • Page 337 7 Application Instructions API 50-99 STMR 5 sec 5 sec 7 - 5 3 D V P - P L C A P P L I C AT I O N M A N U A L...
  • Page 338 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Alternate State ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T ALT, ALTP: 3 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: D: Destination device Explanations:...
  • Page 339 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers RAMP Ramp Variable Value ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T RAMP: 9 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Start of ramp signal : End of ramp signal...
  • Page 340 7 Application Instructions API 50-99 Remarks: D12 for enabling On/Off of M1026: M1026=ON M1026=OFF Start signal Start signal M1029 M1029 7 - 5 6 D V P - P L C A P P L I C AT I O N M A N U A L...
  • Page 341 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers SORT Sort Tabulated Data ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T SORT: 11 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device for the original data : Groups of data to be sorted...
  • Page 342 7 Application Instructions API 50-99 Columns of data: m Data Column Column Students No. Physics English Math Chemistry (D0) 1 (D5) 90 (D10) 75 (D15) 66 (D20) 79 (D1) 2 (D6) 55 (D11) 65 (D16) 54 (D21) 63 (D2) 3 (D7) 80 (D12) 98 (D17) 89...
  • Page 343 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Ten Key Input ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T TKY: 7 steps DTKY: 13 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device for key input : Device for storing keyed-in value...
  • Page 344 7 Application Instructions API 50-99 number key BCD value 1-digit BCD code overflow BCD value BIN value As shown in the timing chart below, the 4 points X5, X3, X0, and X1 connected to the keys are entered in order and you can obtain the result 5,301.
  • Page 345 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Hexadecimal Key Input ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T HKY: 9 steps DHKY: 17 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device for key scan input : Start device for key scan output...
  • Page 346 7 Application Instructions API 50-99 Key in numbers: number key 1-digit BCD code BCD value overflow BCD value BIN value Function keys input: When A is pressed, M0 will be On and retained. When D is pressed next, M0 will be Off, M3 will be On and retained.
  • Page 347 7 Application Instructions API 50-99 Remarks: When this instruction is being executed, it will require 8 scans to obtain one valid keyed-in value. A scan period that is too long or too short may result in poor keyed-in effect, which can be avoided by the following methods: If the scan period is too short, I/O may not be able to respond in time, resulting in not being able to read the keyed-in value correctly.
  • Page 348 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Digital Switch ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T DSW: 9 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device for switch scan input : Start device for switch scan output...
  • Page 349 7 Application Instructions API 50-99 Cyclic operation 0.1s 0.1s 0.1s 0.1s Interruption 0.1s 0.1s M1029 Execution completed Wiring for DIP swich input: DIP switches for BCD wiring Must connect to a diode (1N4148) in series +24V The second group The first group Remarks: 1.
  • Page 350 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers SEGD Seven Segment Decoder ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T SEGD, SEGDP: 5 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Source device to be decoded D: Output device after the decoding...
  • Page 351 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers SEGL Seven Segment with Latch ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T SEGL: 7 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Source device to be displayed in 7-segment display D: Start device for 7-segment display scan output...
  • Page 352 7 Application Instructions API 50-99 When there is 1 group of 4-digit 7-segment display, n = 0 ~ 3. a) Connect the already decoded 7-segment display terminals 1, 2, 4, 8 in parallel an connect them to Y10 ~ Y13 on the PLC. Connect the latch terminals of each digit to Y14 ~ Y17 on the PLC. b) When X10 = On, the instruction will be executed and the content in D10 will be sent to the 7-segment displays in sequence by the circulation of Y14 ~ Y17.
  • Page 353 7 Application Instructions API 50-99 Pull-up resistor Drive Y Signal output Positive logic (negative polarity) output of BCD code BCD value Y output (BCDcode) Signal output Negative logic (positive polarity) output of BCD code BCD value Y output (BCDcode) Signal output Scan latched signal display Positive logic (negative polarity) Negative logic (positive polarity)
  • Page 354 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers ARWS Arrow Switch ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T ARWS: 9 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device for key input : Device to be displayed in 7-segment display...
  • Page 355 7 Application Instructions API 50-99 Add up Digit indication Move to left Move to right Minus down 7-segment display for the 4-digit set value The 4 switches are used for moving the digits and increasing/decreasing set values. 7 - 7 1 D V P - P L C A P P L I C AT I O N M A N U A L...
  • Page 356 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers ASCII Code Conversion ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T ASC: 11 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: English letter to be converted into ASCII code D: Device for storing ASCII code...
  • Page 357 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Print (ASCII Code Output) ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T PR: 5 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Device for storing ASCII code D: External ASCII code output points...
  • Page 358 7 Application Instructions API 50-99 Program Example 2: PR instruction is for outputing a string of 8 bits. When the special auxiliary relay M1027 = Off, PR is able to execute an output of maximum 8 letters in string. When M1027 = On, PR is able to execute an output of 1 ~ 16 letters in string.
  • Page 359 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Read CR Data in Special FROM ES/EX/SS SA/SX/SC EH/SV Modules Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T FROM, FROMP: 9 steps DFROM, DFROMP: 17 steps PULSE 16-bit 32-bit...
  • Page 360 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Write CR Data into Special ES/EX/SS SA/SX/SC EH/SV Modules Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T TO, TOP: 9 steps DTO, DTOP: 17 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV...
  • Page 361 7 Application Instructions API 50-99 Lower 16-bit Higher 16-bit CR #10 CR #9 Designated CR number d) Number of groups “n” to be transmitted: n = 2 in 16-bit instructions and n = 1 in 32-bit instructions mean the same. Designated device Designated CR Designated device Designated CR...
  • Page 362 7 Application Instructions API 50-99 CR#24. FROM/TO Application Example 2: Adjust the A/D conversion curve of DVP-04AD. Set the OFFSET value of CH2 as 2mA (= K400 ) and GAIN value as 18mA (= K3,600 M1002 K400 K3600 1. Write H18 to CR#1 of anlog input module No. 0 and set CH2 as mode 3 (current input: -20mA ~ +20mA). 2.
  • Page 363 7 Application Instructions API 50-99 M1002 K400 K3600 FROM/TO Application Example 5: When DVP-04AD-S is used with DVP-02DA-S M1000 FROM H3030 FROM M1000 FROM M1013 D100 D101 D101 K4000 D100 D100 K4000 D101 D101 D100 1. Read CR#0 of the extension module No. 0 and see if it is DVP-04AD-S: H88. 2.
  • Page 364 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Serial Communication Instruction ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T RS: 9 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device for the data to be transmitted m: Length of data to be transmitted...
  • Page 365 7 Application Instructions API 50-99 Off (DO NOT use the program to execute RST M1122). After 1ms of waiting, PLC will start to receive the 10 data. Store the data in consecutive registers starting from D120. When the receiving of data is completed, M1123 will automatically be On. After the program finishes processing the received data, M1123 has to be reset to Off and the PLC will start to wait for the sending and receiving of data again.
  • Page 366 7 Application Instructions API 50-99 D120L D121L D122L D123L D124L D125L D126L Tail code Tail code Head received data register, starting from code the lower 8 bits of D120 length = 7 When receiving data, PLC will receive the head code and tail code of the data from the external equipment; therefore, the user has to be aware of the setting of data length n.
  • Page 367 7 Application Instructions API 50-99 M1002 D1120 Set up communication protocol 9600,7,E,1 Retain communication protocol M1120 Set up communication time-out 100ms K100 D1129 Sending request pulses Write in data to be transmitted in advance Set up sending request M1122 D100 D120 Receiving completed...
  • Page 368 7 Application Instructions API 50-99 Register Data Explanation D123 high ‘0’ 30 H D124 low ‘1’ 31 H Content of address 2101 H D124 high ‘0’ 30 H D125 low ‘0’ 30 H D125 high ‘1’ 31 H D126 low ‘7’...
  • Page 369 7 Application Instructions API 50-99 M1002 D1120 Set up communication protocol 9600,7,E,1 Retain communication protocol M1120 K100 D1129 Set up communication time-out 100ms 8-bit mode M1161 Sending request pulses Write in data to be transmitted in advance Set up sending request M1122 D100 D120...
  • Page 370 7 Application Instructions API 50-99 Flag Function Action For retain the communication setting. After the first program scan is completed, the communication setting will be reset according to the setting in the special data register D1120. When the second program scan starts and RS instruction is being executed, the communication settings will all be reset according Set up and reset by the M1120...
  • Page 371 7 Application Instructions API 50-99 Special data register for the RS-485 communication of RS/MODRD/MODWR/FWD/REV/STOP/RDST/RSTEF /MODRW instructions Special D Function For setting up the data responding delay time when a PLC MPU using RS-485 D1038 communication is used as a slave. Range: 0 ~ 10,000 (unit: 0.1ms) When MODRD/RDST instruction is executed, PLC will automatically convert the ASCII D1050 ~ D1055 characters in D1070 ~ D1085 into hex and store the hex value in D1050 ~ D1055.
  • Page 372 7 Application Instructions API 50-99 How to set up RS-485 communication protocol in D1120 Content Data length 00: None Parity bits 01: Odd 11: Even Stop bits 1 bit 2 bits (H1) : 0001 (H2) : 0010 (H3) : 0011 0100 (H4) : 0101...
  • Page 373 7 Application Instructions API 50-99 When STX, ETX1 and EXT2 are in use, please be aware of the On and Off of the special auxiliary relays M1126 and M1130. M1143 is for the selection of ASCII mode or RTU mode. On = RTU mode; Off = ASCII mode. Take the standard Modbus format for example: In ASCII mode (M1143 = Off) Start word = ‘:’...
  • Page 374 7 Application Instructions API 50-99 Fixed as END Hi = CR (0DH), END Lo = LF (0AH) For example: Read 2 continuous data stored in the registers of the driver at address 01H (see the table below). The start register is at address 2102H. Inquiry message: Responding message: ‘: ’...
  • Page 375 7 Application Instructions API 50-99 06H: Write 1 word to register 10H: Write in contents of many registers Data characters: The data sent by the user. CRC checksum: Starting from Address and ending at Data Content. Step 1: Make the 16-bit register (CRC register) = FFFFH Step 2: Exclusive OR the first 8-bit message and the low 16-bit CRC register.
  • Page 376 7 Application Instructions API 50-99 Timing diagram of RS-485 communication flag: M1002 D1120 Set up communication protocol 9600,7,E,1 M1120 Retain communication protocol K100 D1129 Setting communication time out 100ms Sending request pulses Write the data to be transmitted in advance Set up sending request M1122 D100...
  • Page 377 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers PRUN Parallel Run ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T PRUN, PRUNP: 5 steps DPRUN, DPRUNP: 9 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Source device D: Destination device...
  • Page 378 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers ASCI Converts Hex to ASCII ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T ASCI, ASCIP: 7 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device for source data D: Start device for storing the converted result...
  • Page 379 7 Application Instructions API 50-99 When n = 6, the bit structure will be as: D10 = H 0123 D11 = H 4567 0 0 1 1 1 1 Converted to H 37 H 36 H 31 H 30 1 0 0 0 1 0 H 33 H 32...
  • Page 380 7 Application Instructions API 50-99 Program Example 2: M1161 = On: The 8-bit conversion mode When X0 = On, convert the 4 hex values in D10 into ASCII codes and send the result to registers starting from D20. M1000 M1161 ASCI Assume (D10) = 0123 H...
  • Page 381 7 Application Instructions API 50-99 When n = 1 ~ 16: “3” “2” “1” “0” “7” “6” “5” “4” “3” “2” “1” “0” “7” “6” “5” “3” “2” “1” “0” “7” “6” “3” “2” “1” “0” “7” “3” “2” “1” “0”...
  • Page 382 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Converts ASCII to Hex ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T HEX, HEXP: 7 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device for source data D: Start device for storing the converted result...
  • Page 383 7 Application Instructions API 50-99 When n = 1 ~ 16: ***C H **CD H *CDE H CDEF H ***C H DEF8 H undesignated **CD H EF89 H parts in the *CDE H F89A H registers in use CDEF H 89AB H are all 0.
  • Page 384 7 Application Instructions API 50-99 When n = 2, the bit structure will be as: When n = 1 ~ 16: ***C H **CD H *CDE H CDEF H ***C H DEF8 H The used registers **CD H EF89 H which are not *CDE H F89A H...
  • Page 385 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Check Code ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T CCD, CCDP: 7 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: Start device for source data D: Device for storing the sum check result...
  • Page 386 7 Application Instructions API 50-99 Content of data D0 low byte K100 = 0 1 1 0 0 1 0 0 K111 = 0 1 1 0 1 1 1 1 D0 high byte D1 low byte K120 = 0 1 1 1 1 0 0 0 D1 high byte K202 = 1 1 0 0 1 0 1 0 D2 low byte...
  • Page 387 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers VRRD Volume Read ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T VRRD, VRRDP: 5 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: No.
  • Page 388 7 Application Instructions API 50-99 D100 Y000 D107 Y007 Operation of FOR ~ NEXT instruction: a) In the area between FOR ~ NEXT instruction, FOR designating K8 indicates the loop between FOR ~ NEXT will be executed repeatedly for 8 times before the next instruction is executed. b) Between FOR ~ NEXT (INC E), E will be 0, 1, 2, …7 plusing 1.
  • Page 389 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers VRSC Volume Scale ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T VRSC, VRSCP: 5 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: S: No.
  • Page 390 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers Absolute Value ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T ABS, ABSP: 3 steps DABS, DABSP: 5 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: D: Device of the absolute value Explanations:...
  • Page 391 7 Application Instructions API 50-99 Mnemonic Operands Function Controllers PID Control Loop ES/EX/SS SA/SX/SC EH/SV Type Bit Devices Word Devices Program Steps H KnX KnY KnM KnS T PID : 9 steps DPID: 17 steps PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV Operands: : Set value (SV) : Present value (PV)
  • Page 392 7 Application Instructions API 50-99 Device No. Function Setup Range Explanation If T is less than 1 program scan time, PID instruction will be executed for 1 program scan Sampling time (T 1 ~ 2,000 time. If T = 0, PID instruction will not be enabled. (unit: 10ms) (unit: 10ms) The minimum T...
  • Page 393 7 Application Instructions API 50-99 of DVP04AD/04DA/06XA/04PT/04TC for PID operation, please be aware of the A/D conversion time of these modules. For the 32-bit instruction, If S designates the parameter setting area of PID instruction as D100 ~ D120, S occupies 21 registers.
  • Page 394 7 Application Instructions API 50-99 11. The explanation of 32-bit S and 16-bit S are almost the same. The difference is the capacity of S +5 ~ S +20. PID Equations: The PID operation is conducted according to the speed and the differential PV. The PID operation has three control directions: automatic, foreward and inverse.
  • Page 395 7 Application Instructions API 50-99 If you have no idea how to adjust the parameters, you can select K3 (auto-tuning) and after all the parameters are adjusted (the control direction will be automatically set as K4), you can modify your parameters to better ones according to the result of the control.
  • Page 396 7 Application Instructions API 50-99 b) PID instruction can only be used once in ES/EX/SS (v5.6 and below) series MPU. There is no limitation on the times of using PID instruction in ES/EX/SS (v5.7 and above) series and SA/SX/SC/EH/EH2/SV series MPU.
  • Page 397 7 Application Instructions API 50-99 Example 3: Diagram of using PID instruction in temperature control (S + 4 = 1) Heating (MV) Temperature instruction (SV) Heater Temperature detection Actual temperature device (PV) Example 4: How to adjust PID parameters Assume that the transfer function of the controlled device G(S) in a control system is a first-order function (most models of motors are first-order function), SV = 1, and sampling time (T ) = 10ms, we suggest you to follow the steps below for adjusting the parameters.
  • Page 398 7 Application Instructions API 50-99 PV=SV K =10,K =8,K =0.2 Time (sec) Note: This example is only for your reference. Please adjust your parameters to proper ones according to your actual condition of the control system. Application Examples: Application 1 Using PID instruction in the pressure control system (use the diagram of Example 1). Purpose: Enabling the control system to reach the target pressure.
  • Page 399 7 Application Instructions API 50-99 The example program of the instruction delay: M1002 > < K-50 > < D1116 Application 2 Speed control system and pressure control system work individually (use diagram of Example 2). Purpose: After the speed control operates in open loop for a period of time, adding into it the pressure control system (PID instruction) for close loop control.
  • Page 400 7 Application Instructions API 50-99 Part of the example program: M1002 K1000 > K3000 K3000 < > K255 K255 D1116 D1110 Application 3 Using auto-tuning on the parameter for the temperature control. Purpose: Using auto-tuning to calculate the most suitable parameters for PID temperature control. Explanation: You may not be familiar with the temperature environment for the first time, so you can use auto-tuning + 4 = K3) for an initial adjustment.
  • Page 401 7 Application Instructions API 50-99 D200 GPWM The experiment result of auto-tuning: Auto tuning area Auto tuning area PID control area PID control area +4 = k3 +4 = k3 +4 = k4 +4 = k4 The experiment result of using the adjusted parameter exclusively for temperature control after auto-tuning: From the figure above, we can see that the temperature control after auto-tuning is working fine and we use only 7 - 11 7 D V P - P L C A P P L I C AT I O N M A N U A L...
  • Page 402 7 Application Instructions API 50-99 approximately 20 minutes for the control. Next, we modify the target temperature from 80°C to 100°C and obtain the result below. From the result above, we can see that when the parameter is 100°C, we can still control the temperature without spending too much time.
  • Page 403 MODRD is a drive instruction exclusively for peripheral communication equipment in MODBUS ASCII mode /RTU mode. The built-in RS-485 communication ports in Delta VFD drives (except for VFD-A series) are all compatible with MODBUS communication format. MODRD can be used for controlling communication (read data) of Delta drives.
  • Page 404 30 H PLC automatically convert D1077 high ‘0’ 30 H Content of ASCII codes to numerals address 2103 H and store the numeral in D1078 low ‘0’ 30 H D1052 = 0000 H D1078 high ‘0’ 30 H DVP-PLC Application Manual...
  • Page 405 21 H Starting data address D1092 low 02 H D1093 low 00 H Number of data (counted by words) D1094 low 02 H D1095 low 6F H CRC CHK Low D1096 low F7 H CRC CHK High DVP-PLC Application Manual...
  • Page 406 The received data are stored in D1070~D1085 in ASCII handle received data format. PLC will automatically convert the data into numerals and store them in D1050~D1055. M1127 Sending/receiving of data is completed. The flag is reset. M1129 M1129 Communication time-out. The flag is reset. DVP-PLC Application Manual...
  • Page 407 (LDF, ANDF, ORF); otherwise, the data stores in the receiving registers will be incorrect. There is no limitation on the times of using this instruction in the program, but only one instruction is allowed to be executed at a time. DVP-PLC Application Manual...
  • Page 408 MODWR is a drive instruction exclusively for peripheral communication equipment in MODBUS ASCII mode/RTU mode. The built-in RS-485 communication ports in Delta VFD drives (except for VFD-A series) are all compatible with MODBUS communication format. MODRD can be used for controlling communication (write data) of Delta drives.
  • Page 409 D1075 high ‘0’ 30 H D1076 low ‘7’ 37 H LRC CHK 1 D1076 high ‘1’ 31 H LRC CHK 0 Program Example 2: Communication between PLC and VFD-S series AC motor drives (RTU Mode, M1143 = On) DVP-PLC Application Manual...
  • Page 410 4. M1140 will be On when data receiving error occurs. The program will trigger M1140 and send request to M1122 for writing the data again. 5. M1141 will be On when sending address error occurs. The program will trigger M1141 and send request to M1122 for writing the data again. DVP-PLC Application Manual...
  • Page 411 Times of Retry = D0 (default = 3) 5. M1141 will be On when sending address error occurs. The program will trigger M1141 and send request to M1122 for writing the data again. Times of Retry = D0 (default = 3) DVP-PLC Application Manual...
  • Page 412 Code H06, H10), cannot use rising-edge contacts (LDP, ANDP ORP) and falling-edge contacts (LDF, ANDF, ORF) and have to enable sending request M1122 first. There is no limitation on the times of using this instruction in the program, but only one instruction is allowed to be executed at a time. DVP-PLC Application Manual 8-10...
  • Page 413 Flags: See API 80 RS for explanations on M1120 ~ M1131, M1140 ~ M1143 FWD/REV/STOP are handy instructions exclusively for Delta VFD-A/H series AC motor drive to perform forward running/reverse running/stop. Be sure to set up communication time-out (D1129) when executing this instruction.
  • Page 414 30 H Communication address D1094 low ‘0’ 30 H D1095 low ‘1’ 31 H D1096 low ‘0’ 30 H D1097 low ‘5’ 35 H Running instruction D1098 low ‘0’ 30 H D1099 low ‘0’ 30 H DVP-PLC Application Manual 8-12...
  • Page 415 D1079 low ‘0’ 30 H D1080 low ‘0’ 30 H Remarks: There is no limitation on the times of using this instruction in the program, but only one instruction is allowed to be executed at a time. DVP-PLC Application Manual 8-13...
  • Page 416 PLC will automatically convert the ASCII characters of ”ABCD” into numerals and store the numeral in D1050. For example, assume ”ABCD” = “0600”, PLC will convert ABCD into K0600 (0258 H) and store it in the special register D1050. DVP-PLC Application Manual 8-14...
  • Page 417 For the registers for flag settings, see explanations in API 80 RS. There is no limitation on the times of using this instruction in the program, but only one instruction is allowed to be executed at a time. DVP-PLC Application Manual 8-15...
  • Page 418 Flags: See API 80 RS for explanations on M1120 ~ M1131, M1140 ~ M1143 RSTEF is a handy communication instruction exclusively for Delta VFD-A series AC motor drives and is used for reset when the AC motor drive operates abnormally.
  • Page 419 K100 D1129 sending request pulse Write in sent data in advance pulse Set up transmission request M1122 D100 D120 receiving completed Process of receiving data M1123 Sending/receiving of data is completed. M1123 The flag is reset. DVP-PLC Application Manual 8-17...
  • Page 420 LRC checksum: 2’s complement of the summed up value of communication address and data. For example, 01 H + 03 H + 21 H + 02 H + 00 H + 02 H = 29 H. Obtain 2’s complement = D7H. DVP-PLC Application Manual 8-18...
  • Page 421 2 registers. n = the number of calculated bits. (All higher 8 bits in D are “0”.) Program Example: When PLC communicates with VFD-S series AC motor drives (In RTU mode, M1143 = On), (In 16-bit mode, M1161 = On), the sent data write in advance H12 into H2000 of VFD-S. DVP-PLC Application Manual 8-19...
  • Page 422 Data content: ……. n × 8-bit data DATA 0 CRC CHK Low CRC checksum: 16-bit CRC checksum consists of 2 8-bit binaries CRC CHK High Time interval CRC checksum starts from Address and ends at Data content. DVP-PLC Application Manual 8-20...
  • Page 423 Step 6: Repeat Steps 2 ~ 5 for obtaining the next 8-bit message instruction until all the message instructions are calculated. In the end, the obtained CRC register value is the CRC checksum. Be aware that CRC checksum should be placed in the checksum of the message instruction. DVP-PLC Application Manual 8-21...
  • Page 424 When SWRD instruction uses the data in digital switch function card, it can read minimum 4 bits (K1Y*, K1M* or K1S*). Remarks: When digital switch function card is inserted, the status of the 8 DIP switches will correspond to M1104 ~ M1111. DVP-PLC Application Manual 8-22...
  • Page 425 , serial-parallel M10 ~ M12. ≧ ≦ Use RST or ZRST instruction to clear the result. DECMP D100 On when (D1,D0)>(D101,D100) On when (D1,D0)=(D101,D100) On when (D1,D0)<(D101,D100) Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-23...
  • Page 426 Use RST or ZRST instruction to clear the result. DEZCP On when (D1,D0) > (D21, D20) On when (D1,D0) < (D21, D20) < (D11, D10) On when (D21, D20) > (D11, D10) Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-24...
  • Page 427 When X0 = Off, the content in (D11、D10) remains unchanged. When X0 = On, the present value F1.20000004768372 will be moved to data registers (D11, D10). DMOVR F1.20000004768372 Remarks: This instruction only supports ES V6.1, SA/SX_V1.1, SV_V1.2, EH_V1.2, EH2/SV_V1.0 and above versions. DVP-PLC Application Manual 8-25...
  • Page 428 (D11, D10). DRAD Angle binary floating point π Radian ( degree 180) D 11 D 10 binary floating point Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-26...
  • Page 429 (D11, D10). DDEG Radian binary floating point π Angle (radian 180/ ) D 11 D 10 binary floating point Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-27...
  • Page 430 Floating Point 1 bit for symbol bit 1 bit for symbol bit Exponent Real number Exponent Real number Decimal [D3] [D2] * 10 Floating Point Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-28...
  • Page 431 When X0 = On, move K3,140 to D0 and K-3 to D1 to generate decimal floating point (3.14 = 3140 × 10 [D1] K3140 MOVP K3140 3140 10 [D0] MOVP (D1, D0) (D3, D2) DEBIN 3140 10 Binary floating point DVP-PLC Application Manual 8-29...
  • Page 432 8 Application Instructions API 100-149 Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-30...
  • Page 433 When X2 = On, binary floating point (D11, D10) + K1234 (automatically converted into binary floating point) and the result is stored in (D21, D20). DEADD K1234 Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-31...
  • Page 434 When X2 = On, K1234 (automatically converted into binary floating point) - binary floating point (D1, D0) and the result is stored in (D11, D10). K1234 DESUB Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-32...
  • Page 435 When X2 = On, K1234 (automatically converted into binary floating point) × binary floating point (D1, D0) and the result is stored in (D11, D10). DEMUL K1234 Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-33...
  • Page 436 When X2 = On, binary floating point (D1, D0) ÷ K1234 (automatically converted into binary floating point) and the result is stored in (D11, D10). K1234 DEDIV Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-34...
  • Page 437 When M2 = On, convert the binary floating point (D21, D20) into decimal floating point (D30 × 10 ) and store it in register (D31, D30). M1081 DFLT DEXP DEBCD Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-35...
  • Page 438 When M2 = On, convert the binary floating point (D21, D20) into decimal floating point (D30 × 10 ) and store it in register (D31, D30). M1081 DFLT DEBCD Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-36...
  • Page 439 32-bit register (D21, D20). [D31] When M2 = On, convert the binary floating point (D21, D20) into decimal floating point (D30 × 10 ) and store it in register (D31, D30). M1081 DFLT DFLT DLOG DEBCD Remarks: DVP-PLC Application Manual 8-37...
  • Page 440 8 Application Instructions API 100-149 For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-38...
  • Page 441 When M2 = On, calculate the square root of K1,234 (automatically converted into binary floating point) and store the result in register (D11, D10). DESQR K1234 Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-39...
  • Page 442 D12) and store the result in the 32-bit register (D21, D20). [D31] When M2 = On, convert the binary floating point (D21, D20) into decimal floating point (D30 × 10 ) and store it in register (D31, D30). M1081 DFLT DFLT DPOW DEBCD Remarks: DVP-PLC Application Manual 8-40...
  • Page 443 8 Application Instructions API 100-149 For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-41...
  • Page 444 When X1 = On, the binary floating point (D21, D20) will be converted into BIN integer and the result will be stored in (D31, D30). The decimal of BIN integer will be left out. DINT Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-42...
  • Page 445 Program Example 2: When M1018 = Off, the program is in radian mode. Input terminals X0 and X1 select the angle. The angles are converted into RAD value for calculating the SIN value. DVP-PLC Application Manual 8-43...
  • Page 446 (D11, D10). (0° ≤ angle < 360°) M1002 M1018 DSIN angle value SIN value D 11 D 10 (binary floating point) Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-44...
  • Page 447 COS value binary floating point Program Example 2: When M1018 = On, the program is in angle mode. When X0 = On, use the angle of (D1, D0) to obtain COS value and DVP-PLC Application Manual 8-45...
  • Page 448 (D11, D10). (0° ≤ angle < 360°) M1002 M1018 DCOS angle value COS value D 10 (binary floating point) Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-46...
  • Page 449 TAN value binary floating point Program Example 2: When M1018 = On, the program is in angle mode. When X0 = On, use the angle of (D1, D0) to obtain TAN value and DVP-PLC Application Manual 8-47...
  • Page 450 (D11, D10). (0° ≤ angle < 360°) M1002 M1018 DTAN angle value TAN value D 11 D 10 (binary floating point) Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-48...
  • Page 451 When X0 = On, obtain the ASIN value of binary floating point (D1, D0) and store the binary floating point result in (D11, D10). DASIN binary floating point ASIN value binary floating point Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-49...
  • Page 452 When X0 = On, obtain the ACOS value of binary floating point (D1, D0) and store the binary floating point result in (D11, D10). DACOS binary floating point ACOS value binary floating point Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-50...
  • Page 453 When X0 = On, obtain the ATAN value of binary floating point (D1, D0) and store the binary floating point result in (D11, D10). DATAN binary floating point ATAN value binary floating point Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-51...
  • Page 454 3. If the absolute value of the result < minimum floating point available, the borrow flag M1021 = On. 4. If the result = 0, the zero flag M1020 = On. Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-52...
  • Page 455 6. If the absolute value of the result < minimum floating point available, the borrow flag M1021 = On. 7. If the result = 0, the zero flag M1020 = On. Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-53...
  • Page 456 3. If the absolute value of the result < minimum floating point available, the borrow flag M1021 = On. 4. If the result = 0, the zero flag M1020 = On. Remarks: For floating point operations, see “5.3 Handling of Numeric Values”. DVP-PLC Application Manual 8-54...
  • Page 457 The delay time may increase due do the influences from communication, high-speed counters and high-speed pulse output instructions. The delay time of designated external output (transistor or relay) will increase due to the delay on the transistor DVP-PLC Application Manual 8-55...
  • Page 458 8 Application Instructions API 100-149 or relay itself. See 2.3 for more information. DVP-PLC Application Manual 8-56...
  • Page 459 This instruction counts by the scan cycle; therefore the maximum offset will be one PLC scan cycle. S ) should > PLC scan cycle; otherwise, errors will occur during GPWM outputs. Please note that placing this instruction in a subroutine or interruption will cause inaccurate GPWM outputs. DVP-PLC Application Manual 8-57...
  • Page 460 Set up the parameter before executing FTC instruction. When X0 = On, the instruction will be executed and and result will be stored in D150. When X0 = Off, the instruction will not be executed and the previous data remain unchanged. D100 D150 DVP-PLC Application Manual 8-58...
  • Page 461 +1 are for the control speed. If the user does not set up the parameter, FTC will automatically activate “general heating environment”. When the user finds that the control is too slow to reach SV, select “slow DVP-PLC Application Manual 8-59...
  • Page 462 Assume parameter settings: D10 = K1,500 (target temperature), D12 = K60 (sampling time: 6 secs.), D13 = K8 (bit3=1), D30 = K6,000 (=D12*100) The example control program is indicated as: M1002 K1500 FROM K6000 GPWM M1013 FROM DVP-PLC Application Manual 8-60...
  • Page 463 1 hour and 15 minutes to reach the target temperature with C inaccuracy. It seems that we have chosen the right environment, but the sampling time is too long, resulting in the extension of heating time. DVP-PLC Application Manual 8-61...
  • Page 464 2 seconds (D12 = K20, D30 = K2,000). The results are shown in the diagram below. From the diagram below, we see that the sampling time that is too short will cause the control system to become too sensitive and lead to up and down fluctuations. DVP-PLC Application Manual 8-62...
  • Page 465 0 and execute the instruction for S (time) before sending in the correct target control time. Program Example 1: 1. The control valve Fully-closed Fully-open 2. Definitions of the control valve: a) When Y0 and Y1 = Off: No valve action DVP-PLC Application Manual 8-63...
  • Page 466 (Y0 = Off, Y1 = On) for 2 seconds, moving the valve to the position of 1 second. Phase : Switch off X0 and no actions at the valve (Y0 = Off, Y1 = Off). Program Example 2: 1. Timing diagram and program of the control: 4sec 5sec 2sec D0=k40 D0=1 D0=k10 DVP-PLC Application Manual 8-64...
  • Page 467 (Y0 = Off, Y1 = On) for 3 seconds, moving the valve to the position of 1 second. Phase : Switch off M0 and the valve will no longer move (Y0 = Off, Y1 = Off). DVP-PLC Application Manual 8-65...
  • Page 468 When X0 = On, the high 8 bytes and low 8 bytes in D11 will swap with each other and the high 8 bytes and low 8 bytes in D10 will swap with each other. DSWAPP High Byte Low Byte High Byte Low Byte DVP-PLC Application Manual 8-66...
  • Page 469 The 32-bit instruction DMEMR reads 100 data at address 20 in the file register and store the read data in register D starting from D3000. When X0 = On, the instruction will be executed. When X0 = Off, the instruction will not be executed and the previously read data will remain unchanged. DMEMR D3000 K100 DVP-PLC Application Manual 8-67...
  • Page 470 K0 ~ K9,999), D1102 (number of data to be read in file register K1 ~ k8,000), and D1103 (device for storing read data, starting from designated D, K2,000 ~ K9,999). In EH/EH2/SV, the reading of data from file register to data register D will not be executed if D1101 < 0, D1101 DVP-PLC Application Manual 8-68...
  • Page 471 Number of data to be read in file register. SA/SX/SC: K1 ~ K1,600; D1102 EH/EH2/SV: K1 ~ K8,000; latched; default = 0 Device for storing read data, starting from designated D. SA/SX/SC: K2,000 ~ K4,999; EH/EH2/SV: K2,000 ~ K9,999; latched; default = D1103 2,000 DVP-PLC Application Manual 8-69...
  • Page 472 8 Application Instructions API 100-149 MEMO DVP-PLC Application Manual 8-70...
  • Page 473 : Funcation code. For example, H03 is for AC motor drive or DVP-PLC to read many data; H06 is for AC motor drive or DVP-PLC to write a single data; H10 is for AC motor drive or DVP-PLC to write many data. Only these function codes are available currently;...
  • Page 474 Sending/receiving of data is completed. The flag is reset. ASCII Mode: When PLC is connected to VFD-S AC motor drive. VFD-S, PLC sends: “01 03 2100 0006 D5” VFD-S PLC, PLC receives: “01 03 0C 0100 1766 0000 0000 0136 0000 3B” DVP-PLC Application Manual...
  • Page 475 PLC automatically convert ASCII codes to numerals and address store the numeral in D1301 = H0000 D14 Low ‘0’ 30 H 2105H D14 High ‘0’ 30 H D15 Low ‘3’ 33 H LRC CHK 1 D15 High ‘B’ 42 H LRC CHK 0 DVP-PLC Application Manual...
  • Page 476 When In ASCII mode or RTU mode, PLC will store the data to be sent in D1256 ~ D1295. If necessary, the user can move the data to other general registers by using MOV, DMOV or BMOV instruction. Other instructions of ES/EX/SS do not function on the data in D1256 ~ D1295. DVP-PLC Application Manual...
  • Page 477 The content of register D50 (H1770 = K6,000) D1261 Low ‘7’ 37 H D1261 High ‘0’ 30 H D1262 Low ‘7’ 37 H LRC CHK 1 LRC CHK (0,1) is error check D1262 High ‘1’ 31 H LRC CHK 0 DVP-PLC Application Manual...
  • Page 478 When PLC is connected to VFD-S AC motor drive: M1143 = On, in RTU mode When in ASCII mode, the user stores the data to be written in the designated register D50 in hex format. The data sent back from AC motor drive are stored in D1070 ~ D1076. DVP-PLC Application Manual...
  • Page 479 30 H Data Address D1259 Low ‘0’ 30 H D1259 High ‘0’ 30 H D1260 Low ‘0’ 30 H D1260 High ‘0’ 30 H Number of Registers D1261 Low ‘0’ 30 H D1261 High ‘2’ 32 H DVP-PLC Application Manual...
  • Page 480 D1264 Low 12 H D1265 Low 17 H Data content 2 The content of register D51 (H1770 = K6,000) D1266 Low 70 H D1267 Low C4 H CRC CHK Low D1268 Low 7F H CRC CHK High DVP-PLC Application Manual...
  • Page 481 D1256 ~ D1295. The user can check whether the instruction is correct by the contents in the registers. PLC will automatically convert the ASCII data stored in the register designated by the user D1296 ~ D1311 into hex format. DVP-PLC Application Manual...
  • Page 482 There is no limitation on the times of using this instruction. However, only one instruction can be executed at a time. Program Example: When X0 = On, record the time span of X10 = On and store it in D1 and D0. DVP-PLC Application Manual 9-10...
  • Page 483 When X0 goes from Off to On, the program will enter I001 interruption subroutine. RTMU will activate an 8-bit timer (unit: 10us) and RTMD (when D = K0) will shut down the timer and store the time in the timer in special D registers (D1156 ~ D1165, designated by K0 ~ K9). DVP-PLC Application Manual 9-11...
  • Page 484 If you activate RTMU but do not activate RTMD before the end of the interruption, the interruption will not be shut down. RTMU instruction activates 1 timer interruption in PLC. Therefore, if many RTMU or RTMD are executed at the same time, confusion in the timer may occur. Please be aware of the situation. DVP-PLC Application Manual 9-12...
  • Page 485 On and D1067 records the error code 0E1A (hex). Program Example: When X10 = On, RAND will produce the random number between the lower bound D0 and upper bound D10 and store the result in D20. RAND DVP-PLC Application Manual 9-13...
  • Page 486 (D1339, D1338) of CH1 pulse (Y2, Y3) in EH series MPU; therefore, we suggest you designate the two corresponding registers. If you designate other devices as the registers, you still have to DVP-PLC Application Manual 9-14...
  • Page 487 If the reading of the absolute position is not completed after 5 seconds, M10 will be On, indicating that the reading of absolute position encounters abnormality. When enabling the connection to the system, please synchronize the power input of DVP-PLC EH/EH2/SV and SERVO AMP or activate the power of SERVO AMP earlier than DVP-PLC.
  • Page 488 After using JOG or manual operation to adjust the zero point position, input a reset signal in SERVO AMP. See the figure of external switch below for whether to use DVP-PLC for output. For the wiring of DVP-PLC and Mitsubishi MR-H2-□A, see remarks of API 159 DRVA instruction.
  • Page 489 10Hz or higher than maximum output frequency will be output by 10Hz. The default setting in EH/EH2/SV series MPU is 200Hz. For SC series MPU, the speed has to be 100 ~ 100KHz. Frequency lower than 100Hz will be output by 100Hz and frequency higher than DVP-PLC Application Manual 9-17...
  • Page 490 D1350, D1351: (For SC series MPU) Registers for the second group (Y11) output pulse present value of position control instructions (API 156 ZRN, API 158 DRVI, API 159 DRVA). The present value increases or decreases according to the corresponding rotation direction. D1351 is for high word; D1350 is for low word. DVP-PLC Application Manual 9-18...
  • Page 491 Y10, Y11 Y0, Y2 Y0, Y2, Y4, Y6 When executing API 158 DRVI (releative positioning) or API 159 DRVA (absolute positioning), PLC will automatically store the increasing or decreasing forward/reverse pulses in the present value registers. For DVP-PLC Application Manual 9-19...
  • Page 492 When ZRN instruction is executed, the frequency of the first acceleration segment of CH0 (CH1) in EH/EH2/SV series MPU is set by D1340 (D1352). In SC series MPU, CH0 (CH1) will set creep speed as the DVP-PLC Application Manual 9-20...
  • Page 493 When the drive contact of ZRN instruction is On, CH0 (CH1) will read the acceleration/deceleration time set in D1343 (D1353) and accelerate to the zero return speed, waiting for the DOG and decelerate to creep speed. When the DOG is Off, the pulse output will stop immediately. DVP-PLC Application Manual 9-21...
  • Page 494 For SC series MPU, after the instruction is executed, all parameters cannot be modified unless the execution of the instruction stops. p) For SC series MPU, when the execution of the stops, all outputs will stop immediately no matter what type of the output it is. DVP-PLC Application Manual 9-22...
  • Page 495 When S is “-“, the output will operate towards a backward direction and the flag will go On. Program Example: When M10 = On, Y0 will output pulses at 20KHz. Y5 = On indicates forward pulses. PLSV K20000 DVP-PLC Application Manual 9-23...
  • Page 496 - The 32-bit data stored in the present value registers D1376 (high word) and D1375 (low word) of CH2 (Y4, Y5). - The 32-bit data stored in the present value registers D1378 (high word) and D1377 (low word) of CH3 (Y5, DVP-PLC Application Manual 9-24...
  • Page 497 DRVI K20000 K2000 Remarks: Explanations on EH/EH2/SV series MPU: a) Relative position control: Designating the traveling distance starting from the current position by “+/ -“ signs; also known as a relative driving method. DVP-PLC Application Manual 9-25...
  • Page 498 The first acceleration segment segment Y10 (D1340) Y10 (D1340) Y11 (D1352) Y11 (D1352) Min: 100Hz Min: 100Hz accel/decel time accel/decel time Default: 200ms Default: 200ms Current Output pulse Y10 (D1343) Y10 (D1343) position numbers Y11 (D1353) Y11 (D1353) DVP-PLC Application Manual 9-26...
  • Page 499 For EH2/SV, M1037 = On after CH3 pulse output is completed. For EH/EH2/SV, direction signal of CH0. M1305: For EH/EH2/SV, direction signal of CH1. M1306: M1334: For EH, CH0 pulse output pauses. For EH2/SV, CH0 pulse output stops. DVP-PLC Application Manual 9-27...
  • Page 500 For EH2/SV, phase setting of CH3 (Y6, Y7): D1230 determines the phase by the last two bits; D1230: other bits are invalid. 1. K0: Y6 output 2. K1: Y6, Y7 AB-phase output; A ahead of B. 3. K2: Y6, Y7 AB-phase output; B ahead of A. 4. K3: Y7 output DVP-PLC Application Manual 9-28...
  • Page 501 For EH2/SV, settings of acceleration/deceleration time for CH3 pulse output. D1383: For EH2/SV, the time difference between the direction signal and pulse output sent by CH2. D1384: For EH2/SV, the time difference between the direction signal and pulse output sent by CH3. DVP-PLC Application Manual 9-29...
  • Page 502 - The 32-bit data stored in the present value registers D1376 (high word) and D1375 (low word) of CH2 (Y4, Y5). - The 32-bit data stored in the present value registers D1378 (high word) and D1377 (low word) of CH3 (Y5, DVP-PLC Application Manual 9-30...
  • Page 503 When M10= On, Y0 will output 20,000 pulses (absolute designation) at 2KHz. Y5 = On indicates the pulses are executed in forward direction. DRVA K20000 K2000 Remarks: Explanations on EH/EH2/SV series MPU: a) Absolute position control: Designating the traveling distance starting from the zero point (0); also known as a absolute driving method. DVP-PLC Application Manual 9-31...
  • Page 504 First acceleration segment Y10 (D1340) Y10 (D1340) Y11 (D1352) Y11 (D1352) Min: 100Hz Min: 100Hz accel/decel time accel/decel time Current Output pulse Default: 200ms Default: 200ms position Y10 (D1343) numbers Y10 (D1343) Y11 (D1353) Y11 (D1353) DVP-PLC Application Manual 9-32...
  • Page 505 M1335 corresponds to Y11 output and applies the same rule. See remarks of DDRVI instruction for more details on the flags. Wiring of DVP-EH series and Delta ASDA servo drive: Delta Servo Drive EH MPU...
  • Page 506 The forward/reverse limit switch should be connected to SERVO AMP. The “clear pulse” signal will clear the current number of pulses left inside the servo. Wiring of DVP-SC series and Delta ASDA servo drive: Delta Servo Drive SC MPU + 16SP...
  • Page 507 DVP32EH00T Note: (a) When detecting an absolute position by using DABSR instruction, the parameter setting of a Mitsubishi MR-J2-□A servo drive that connects to Delta EH series PLC: P0: position mode. P1: using absolute value. P21: pulse input type as Pulse+DIR.
  • Page 508 For the wiring, see the wiring drawing of DVP-EH series and Mitsubishi MR-J2-□A servo drive One operation mode performs positioning by absolute position: 500,000 500Hz Output pulse frequency 200,000Hz Zero point 500Hz Acceleration/ Deceleration time 200ms DVP-PLC Application Manual 9-36...
  • Page 509 S 24 ※2. The max. traveling distance of a JOG operation equals to the max. number of output pulses (-2,147,483,648 ~ +2,147,483,647) of API 158 DDRVI instruction. Please re-execute JOG of the traveling distance exceeds the range. DVP-PLC Application Manual 9-37...
  • Page 510 Pulse output position frequency r eve rse sig na ls device M102 9 M4 SE T Backward positioning completed flag Execution completed M133 6 M3 Backward positioning is completed M100 0 Time-out: 1 scan period DVP-PLC Application Manual 9-38...
  • Page 511 On/Off stauts prior to M10 ~ M12 will remain. Connect M10 ~ M12 in series or in parallel to obtain the result of ≧, ≦, and ≠. TCMP ON when 12:20:45 > ON when 12:20:45 ON when 12:20:45 < DVP-PLC Application Manual 9-39...
  • Page 512 When X10= On, TZCP instruction will be executed and one of M10 ~ M12 will be On. When X10 = Off, TZCP instruction will not be executed and the status of M10 ~ M12 prior to X10 = Off will remain unchanged. TZCP ON when ON when ON when DVP-PLC Application Manual 9-40...
  • Page 513 ~ D2 will plus the hour, minute and second in RTC designated in D10 ~ D12. The sum is stored in the hour, minute and second of the register designated in D20 ~ D22. TADD 08:10:20 06:40:06 14:50:26 If the sum is larger than 24 hours, M1022 will be On. TADD 18:40:30 11:30:08 06:10:38 DVP-PLC Application Manual 9-41...
  • Page 514 ~ D2 will minus the hour, minute and second in RTC designated in D10 ~ D12. The remainder is stored in the hour, minute and second of the register designated in D20 ~ D22. TSUB 20:20:05 14:30:08 05:49:57 If the subtraction result is a negative value, M1021 will be On. TSUB 05:20:30 19:11:15 10:09:15 DVP-PLC Application Manual 9-42...
  • Page 515 Content General D Item D1319 Year (A.D.) 00~99 Year (A.D.) D1318 (Mon ~ Sun) (Mon ~ Sun) D1317 Month 1~12 Month D1316 1~31 Date D1315 Hour 0~23 Hour D1314 Minute 0~59 Minute D1313 Second 0~59 Second DVP-PLC Application Manual 9-43...
  • Page 516 If you wish to write in new time in the 4-digit year display mode, you can only write in a 2-digit year (0 ~ 99, indicating year 2000 ~ 2099). For example, 00=year 2000, 50=year 2050 and 99=year 2099. DVP-PLC Application Manual 9-44...
  • Page 517 Set the current time in the RTC as 15:27:30, Tuesday, August 19, 2003. D0 ~ D6 indicate the new set time in the RTC. X10 = On for changing the current time in the RTC and make the changed value the new set value. DVP-PLC Application Manual 9-45...
  • Page 518 When the second hand locates at 30 ~ 59, the second will be automatically reset to “0” and the minute hand will increase by 1 minute. Year (2003) Day (Tuesday) Month (August) Date Hour Minute Second Write the set time into RTC M1017 30 seconds correction DVP-PLC Application Manual 9-46...
  • Page 519 In 16-bit instruction, when X0 = On, Y10 will be On and the timing will start. When the timing reaches 100 hours, Y0 will be On and D0 will record the current time measured (in hour) and D1 will record the current time that is less than an hour (0 ~ 3,599; unit: second). HOUR K100 DVP-PLC Application Manual 9-47...
  • Page 520 In 32-bit instruction, when X0 = On, Y10 will be On and the timing will start. When the timing reaches 40,000 hours, Y0 will be On. D1 and D0 will record the current time measured (in hour) and D2 will record the current time that is less than an hour (0 ~ 3,599; unit: second). DHOUR K40000 DVP-PLC Application Manual 9-48...
  • Page 521 When X0 = On, the instruction will convert constant K6,513 into Gray code and store the result in K4Y20. K6513 K4Y20 K6513=H1971 0 0 0 1 1 0 1 1 1 0 0 0 GRAY6513 0 0 0 0 0 1 K4Y20 DVP-PLC Application Manual 9-49...
  • Page 522 When X20 = On, the Gray code in the absolute position encoder connected at X0 ~ X17 will be converted into BIN value and stored in D10. GBIN K4X0 K4X0 GRAY6513 0 0 0 1 H1971=K6513 0 0 0 0 0 1 DVP-PLC Application Manual 9-50...
  • Page 523 DADDR F1.20000004768372 F1.20000004768372 F2.20000004768372 Program Example 2: When X0 = On, the floating point value (D1, D0) + floating point value (D3, D2) and the result will be stored in the registers designated in (D11, D10). DADDR DVP-PLC Application Manual 9-51...
  • Page 524 9 Application Instructions API 150-199 Remarks: The functions of this instruction are in V6.6 of ES/EX/SS series, V1.6 of SA/SX series and V1.4 of SC series. DADDR instruction supports EH2/SV series, but not EH series. DVP-PLC Application Manual 9-52...
  • Page 525 DSUBR F1.20000004768372 F1.20000004768372 F2.20000004768372 Program Example 2: When X0 = On, the floating point value (D1, D0) – floating point value (D3, D2) and the result will be stored in the registers designated in (D11, D10). DSUBR DVP-PLC Application Manual 9-53...
  • Page 526 9 Application Instructions API 150-199 Remarks: The functions of this instruction are in V6.6 of ES/EX/SS series, V1.6 of SA/SX series and V1.4 of SC series. DADDR instruction supports EH2/SV series, but not EH series. DVP-PLC Application Manual 9-54...
  • Page 527 DMULR F1.20000004768372 F1.20000004768372 F2.20000004768372 Program Example 2: When X1 = On, the floating point value (D1, D0) × floating point value (D11, D10) and the result will be stored in the registers designated in (D21, D20). DVP-PLC Application Manual 9-55...
  • Page 528 9 Application Instructions API 150-199 Remarks: The functions of this instruction are in V6.6 of ES/EX/SS series, V1.6 of SA/SX series and V1.4 of SC series. DADDR instruction supports EH2/SV series, but not EH series. DVP-PLC Application Manual 9-56...
  • Page 529 F1.20000004768372 F1.20000004768372 F2.20000004768372 Program Example 2: When X1 = On, the floating point value (D1, D0) ÷ floating point value (D11, D10) and the quotient will be stored in the registers designated in (D21, D20). DDIVR DVP-PLC Application Manual 9-57...
  • Page 530 9 Application Instructions API 150-199 Remarks: The functions of this instruction are in V6.6 of ES/EX/SS series, V1.6 of SA/SX series and V1.4 of SC series. DADDR instruction supports EH2/SV series, but not EH series. DVP-PLC Application Manual 9-58...
  • Page 531 1 1 1 1 1 1 1 1 1 1 0 0 0 0 Before MAND execution After execution Remarks: Explanations on the matrix instruction: a) A matix consists of more than 1 consecutive 16-bit registers. The number of registers in the matrix is the DVP-PLC Application Manual 9-59...
  • Page 532 Example: The matrix is composed of D0, n = 3; D0 = HAAAA, D1 = H5555, D2 = HAAFF Example: The matrix is composed of K2X0, n = 3; K2X0 = H37, K2X10 = H68, K2X20 = H45 Fill “0” into the blank in R0(C ), R1(C ), and R2(C DVP-PLC Application Manual 9-60...
  • Page 533 When X0 = On, the 3 arrays of 16-bit registers D0 ~ D2 and the 3 arrays of 16-bit registers D10 ~ D12 will perform a matrix ‘OR’ operation. The result will be stored in the 3 arrays of 16-bit registers D20 ~ D22. Before Execution After Execution DVP-PLC Application Manual 9-61...
  • Page 534 When X0 = On, the 3 arrays of 16-bit registers D0 ~ D2 and the 3 arrays of 16-bit registers D10 ~ D12 will perform a matrix ‘XOR’ operation. The result will be stored in the 3 arrays of 16-bit registers D20 ~ D22. MXOR Before MXOR Execution After Execution DVP-PLC Application Manual 9-62...
  • Page 535 When X0 = On, the 3 arrays of 16-bit registers D0 ~ D2 and the 3 arrays of 16-bit registers D10 ~ D12 will perform a matrix ‘XNR’ operation. The result will be stored in the 3 arrays of 16-bit registers D20 ~ D22. MXNR Before MXNR Execution After Execution DVP-PLC Application Manual 9-63...
  • Page 536 When X0 = On, the 3 arrays of 16-bit registers D0 ~ D2 perform a matrix inverse operation. The result will be stored in the 3 arrays of 16-bit registers D20 ~ D22. MINV Before Execution MINV After Execution DVP-PLC Application Manual 9-64...
  • Page 537 Set the Pr value D20 = 2. When X0 goes from Off to On for 4 times, we can obtain the 4 execution results D20 = 5, M1091 = 1, M1089 = 0. D20 = 45, M1091 = 1, M1089 = 0. DVP-PLC Application Manual 9-65...
  • Page 538 Matrix search start flag. Comparing from bit 0 (M1090 = 1). Matrix bit search flag. When the comparison is completed, the comparison will stop M1091 immediately (M1091=1). M1092 Matrix pointer error flag. When the pointer Pr exceeds its range, M1092 = 1. DVP-PLC Application Manual 9-66...
  • Page 539 Set the Pr value D20 = 45. When X0 goes from Off to On for 3 times, we can obtain the 3 execution results D20 = 46, M1095 = 0, M1089 = 0. D20 = 47, M1095 = 1, M1089 = 0. D20 = 47, M1095 = 1, M1089 = 1. MBRDP DVP-PLC Application Manual 9-67...
  • Page 540 Matrix pointer error flag. When the pointer Pr exceeds its range, M1092 = 1. M1093 Matrix pointer increasing flag. Adding 1 to the current value of the Pr. M1094 Matrix pointer clear flag. Clearing the current value of the Pr to 0. M1095 Matrix rotation/displacement/output carry flag. DVP-PLC Application Manual 9-68...
  • Page 541 Set the Pr value D20 = 45 and M1096 = 1. When X0 goes from Off to On for 1 time, we can obtain the execution results: D20 = 45, M1096 = 1, M1089 = 0. MBWRP DVP-PLC Application Manual 9-69...
  • Page 542 Matrix pointer error flag. When the pointer Pr exceeds its range, M1092 = 1. M1093 Matrix pointer increasing flag. Adding 1 to the current value of the Pr. M1094 Matrix pointer clear flag. Clearing the current value of the Pr to 0. M1096 Matrix displacement/input complement flag. DVP-PLC Application Manual 9-70...
  • Page 543 D0 ~ D2 will perform a left matrix displacement and the result will be stored in the matrix of the 16-bit registers D20 ~ D22. The carry flag M1095 will be “1”. M1097 MBSP M1096 Complement b 15 flag Before execution M1095 Carry flag M1097=0 After the execution of left matrix displacement M1095 Carry flag DVP-PLC Application Manual 9-71...
  • Page 544 Carry flag M1096 Complement flage M1097=1 M1095 After the execution of Carry flag right matrix displacement Explanations: Flag explanations: Flags Function M1095 Matrix rotation/displacement/output carry flag. M1096 Matrix displacement/input complement flag. M1097 Matrix rotation/displacement direction flag. DVP-PLC Application Manual 9-72...
  • Page 545 16-bit registers D20 ~ D22. The carry flag M1095 will be “1”. M1097 MBRP Before Execution M1095 M1097=0 After left rotation M1095 DVP-PLC Application Manual 9-73...
  • Page 546 16-bit registers D20 ~ D22. The carry flag M1095 will be “0”. M1097 MBRP Before M1095 Execution M1095 M1097=0 After right rotation Remarks: Flag explanations: Flags Function M1095 Matrix rotation/displacement/output carry flag. M1097 Matrix rotation/displacement direction flag. DVP-PLC Application Manual 9-74...
  • Page 547 “1” and store the number in D10. When M1098 = 0, the instruction counts the total number of bits which are “0” and store the number in D10. M1098=0 M1098=1 Remarks: Flag explanations: Flags Function M1098 Counting the number of bits which are “1” or “0” M1099 On when the counting result is “0”. DVP-PLC Application Manual 9-75...
  • Page 548 10ms. Default setting = 100ms. If the maximum output frequency setting is less than 10Hz, the output will be operated at 10Hz. If the setting is more than 200KHz, the output will be operated at 200KHz. DVP-PLC Application Manual 9-76...
  • Page 549 When PLC RUN and M0 = On, PLC will start the first point-to-point motion by 100KHz. D0 will plus 1 whenever a point-to-point motion is completed and the second point-to-point motion will start to execute automatically. The same motion will keep executing until the fourth point-to-point motion is completed. DVP-PLC Application Manual 9-77...
  • Page 550 DPPMA. D1381 : Time settings of the first acceleration and last deceleration segment for the Y4 output of the group X-axis motion and Y6 of the Y-axis motion for API 191 DPPMR and API 192 DPPMA. DVP-PLC Application Manual 9-78...
  • Page 551 10ms. Default setting = 100ms. 6. If the maximum output frequency setting is less than 10Hz, the output will be operated at 10Hz. If the setting is more than 200KHz, the output will be operated at 200KHz. DVP-PLC Application Manual 9-79...
  • Page 552 When PLC RUN and M0 = On, PLC will start the first point-to-point motion by 100KHz. D0 will plus 1 whenever a point-to-point motion is completed and the second point-to-point motion will start to execute automatically. The same motion will keep executing until the fourth point-to-point motion is completed. DVP-PLC Application Manual 9-80...
  • Page 553 (S , S ) (S , S ) (0, 0) (0, 0) 20 se gment s 10 se gment s F igur e 2 F igur e 1 DVP-PLC Application Manual 9-81...
  • Page 554 10. When the 2-axis motion is being executed in 20 segments (of high resolution), the operation time of the instruction when the instruction is first enabled is approximately 10ms. The number of output pulses cannot be less than 1,000 and more than 10,000,000; otherwise, the instruction cannot be enabled. DVP-PLC Application Manual 9-82...
  • Page 555 32-bit (D200, D202), (D204, D206), (D208, D210), (D212, D214). b) Select “draw clockwise arc” and “average resolution” (S = K0). c) Write program codes as follows. d) PLC RUN. Set M0 as On and start the drawing of the ellipse. DVP-PLC Application Manual 9-83...
  • Page 556 Select “draw clockwise arc” and “average resolution” (S = K0). c) Select DCIMR instruction for drawing arc and write program codes as follows. d) PLC RUN. Set M0 as On and start the drawing of the ellipse. DVP-PLC Application Manual 9-84...
  • Page 557 When PLC RUN and M0 = On, PLC will start the drawing of the first segment of the arc. D0 will plus 1 whenever a segment of arc is completed and the second segment of the arc will start to execute automatically. The same motion will keep executing until the fourth segment of arc is completed. DVP-PLC Application Manual 9-85...
  • Page 558 (S , S ) (S , S ) (0, 0) (0, 0) 10 se gment s 20 se gment s F igur e 2 F igur e 1 DVP-PLC Application Manual 9-86...
  • Page 559 10. When the 2-axis motion is being executed in 20 segments (of high resolution), the operation time of the instruction when the instruction is first enabled is approximately 10ms. The number of output pulses cannot be less than 1,000 and more than 10,000,000; otherwise, the instruction cannot be enabled. DVP-PLC Application Manual 9-87...
  • Page 560 Select “draw clockwise arc” and “average resolution” (S = K0). c) Select DCIMA instruction for drawing arc and write program codes as follows. d) PLC RUN. Set M0 as On and start the drawing of the ellipse. DVP-PLC Application Manual 9-88...
  • Page 561 Select “draw clockwise arc” and “average resolution” (S = K0). c) Select DCIMA instruction for drawing arc and write program codes as follows. d) PLC RUN. Set M0 as On and start the drawing of the ellipse. DVP-PLC Application Manual 9-89...
  • Page 562 When PLC RUN and M0 = On, PLC will start the drawing of the first segment of the arc. D0 will plus 1 whenever a segment of arc is completed and the second segment of the arc will start to execute automatically. The same motion will keep executing until the fourth segment of arc is completed. DVP-PLC Application Manual 9-90...
  • Page 563 = D0, frequency (S + 0) = D0, number of output pulses (D300 = K60) + 2) K1 (1 segment) D1, D0 D3, D2 K2 (2 segment) D5, D4 D7, D6 K60 (60 segment) D237, D236 D239, D238 DVP-PLC Application Manual 9-91...
  • Page 564 D1338, D1339: Pulse present value register of CH1 (Y2) (D1339 high word, D1338 low word) D1375, D1376: Pulse present value register of CH2 (Y4) (D1376 high word, D1375 low word) D1377, D1378: Pulse present value register of CH3 (Y6) (D1378 high word, D1377 low word) DVP-PLC Application Manual 9-92...
  • Page 565 When M1015 = Off, D1015 will stop the timing when encountering END or HST instruction. SA/SX/SC series MPU do not use this instruction and use special M and special D directly for the timer. a) Special M and special D are applicable when PLC RUN or STOP. DVP-PLC Application Manual 9-93...
  • Page 566 When M1015 = On, the high speed timer D1015 will be enabled. The minimum timing unit of D1015: 100us. c) Timing range of D1015: K0 ~ K32,767. When the timing reaches K32,767, the next timing will restart from d) When M1015 = Off, D1015 will stop the timing immediately. DVP-PLC Application Manual 9-94...
  • Page 567 6. D can only designate Y0, Y2, Y4 and Y6 and the direction signals repectively are Y1, Y3, Y5 and Y7. When there is a direction signal output, the direction signal will not be Off immediately after the pulse output is completed. The direction signal will be Off only when the drive contact is Off. DVP-PLC Application Manual 9-95...
  • Page 568 Therefore, when the content in the special D for displaying the actial number of output pulses is smaller or larger than the calculated number of output pulses (taget number of feedbacks x percentage value/100), you can improve the situation by adjusting the percentage value, acceleration/decelartion time or target frequency. DVP-PLC Application Manual 9-96...
  • Page 569 The actual output number 49,200 – estimated output number 50,000 = -800 (a negative value). A negative value indicates that the entire execution finishes earlier and has not completed yet. b) Try to shorten the acceleration time (D1343) into 250ms and deceleration time (D1348) into 550ms. DVP-PLC Application Manual 9-97...
  • Page 570 (D1348) = 600ms; precentage value (D1198) = 100; current number of output pulses (D1336, D1337) = 0. 2. Write the program codes as follows: M1002 K100 D1198 K300 D1343 K600 D1348 M1534 DMOV D1336 C251 DCNT C251 K100000 DCLLM C251 K50000 K100000 FEND M1000 I 010 IRET DVP-PLC Application Manual 9-98...
  • Page 571 On when CH1 pulse output is completed. M1036: On when CH2 pulse output is completed. M1037: On when CH3 pulse output is completed. M1334: When On, CH0 pulse output will be forbidden. M1335: When On, CH1 pulse output will be forbidden. DVP-PLC Application Manual 9-99...
  • Page 572 D1223: Time difference between the direction signal and pulse output of CH1 D1383: Time difference between the direction signal and pulse output of CH2 D1384: Time difference between the direction signal and pulse output of CH3 DVP-PLC Application Manual 9-100...
  • Page 573 D1343: Acceleration/deceleration time of CH0 pulse output (default: K100) D1353: Acceleration/deceleration time of CH1 pulse output (default: K100) D1381: Acceleration/deceleration time of CH2 pulse output (default: K100) D1382: Acceleration/deceleration time of CH3 pulse output (default: K100) DVP-PLC Application Manual 9-101...
  • Page 574 9 Application Instructions API 150-199 MEMO DVP-PLC Application Manual 9-102...
  • Page 575 = 168, S = -4. When X0 = On, SCAL instruction will be executed and obtain the proportional value at D0. 2. Equation: D0 = (500 × 168) ÷ 1,000 + (-4) = 80 SCAL K500 K168 10-1 DVP-PLC Application Manual...
  • Page 576 4. If the value of D > 32,767, D = 32,767; if the value of D < -32,768, D = -32,768. 5. Only ES_V6.2, SA/SX_V1.6, SC_V1.4, EH2/SV_V1.0 and versions above support this instruction. EH series MPU does not support this instruction. 10-2 DVP-PLC Application Manual...
  • Page 577 Bring all the parameters into equation y = kx + b and obtain the equation in the instruction: y = kx + b = D = k S + b = slope ×S + offset = slope ×S + min. destination value – min. source value × slope 10-3 DVP-PLC Application Manual...
  • Page 578 2. Equation: D10 = [(500 – 200) × (500 – 30)] ÷ (3,000 – 200) + 30 = 80.35. Round off the result into an integer D10 = 80. K3000 K200 K500 SCLP K500 Destination value =500 =500 Source value 10-4 DVP-PLC Application Manual...
  • Page 579 2. Equation: D10 = [(F500 – F200) × (F500 – F30)] ÷ (F3000 – F200) + F30 = F80.35. Round off the result into an integer D10 = F80. M1162 DMOVR F500 D100 DMOVR F3000 F200 DMOVR F500 DMOVR DMOVR DSCLP D100 10-5 DVP-PLC Application Manual...
  • Page 580 4. Please be aware that the max. source value must > min. source value, but it is not necessary that max. destination value > min. destination value. 5. Only ES_V6.2, SA/SX_V1.6, SC_V1.4, EH2/SV_V1.0 and versions above support this instruction. EH series MPU does not support this instruction. 10-6 DVP-PLC Application Manual...
  • Page 581 When the result of logical OR operation of D200 and D300 ≠ 0 and X1 = On, Y11 = On will be retained. When the result of logical XOR operation of C201 and C200 ≠ 0 or M3 = On, M50 = On. & D200 D300 Y011 C201 C200 10-7 DVP-PLC Application Manual...
  • Page 582 2. When X1 = Off and the result of logical OR operation of D10 and D0 ≠ 0 and X1 = On, Y11 = On will be retained. 3. When X2 = On and the result of logical XOR operation of 32-bit register D200 (D201) and 32-bit register D100 (D101) ≠ 0 or M3 = On, M50 = On. & D200 D100 DAND 10-8 DVP-PLC Application Manual...
  • Page 583 2. M60 will be On when X2 = On and M30 = On, or the result of logical OR operation of 32-bit register D10 (D11) and 32-bit register D20 (D21) ≠ 0, or the result of logical XOR operation of 32-bit register D200 (D201) and 32-bit counter C235 ≠ 0. & D100 D200 10-9 DVP-PLC Application Manual...
  • Page 584 When the content in D200 > K-30 and X1 = On, Y11= On will be retained. When the content in C200 < K678,493 or M3 = On, M50 = On. K200 D200 K-30 LD> DLD> K678493 C200 10-10 DVP-PLC Application Manual...
  • Page 585 2. When X1 = Off and the content in D0 ≠ K-10, Y11= On will be retained. 3. When X2 = On and the content in 32-bit register D0 (D11) < 678,493 or M3 = On, M50 = On. K200 AND= K-10 AND<> DAND> K678493 10-11 DVP-PLC Application Manual...
  • Page 586 When X1 = On and the present value of C10 = K200, Y0 = On. M60 will be On when X2 = On, M30 = On and the content in 32-bit register D100 (D101) ≥ K100,000. K200 D100 K100000 DOR> 10-12 DVP-PLC Application Manual...

Table of Contents