Inovance H3U Series Programming Manual

Inovance H3U Series Programming Manual

Plc
Hide thumbs Also See for H3U Series:
Table of Contents

Advertisement

Quick Links

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the H3U Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Inovance H3U Series

  • Page 2: Introduction

    The H3U series programmable logic controller (PLC) is a third-generation high-performance compact-sized PLC developed by Inovance Technology based on the MCU and FPGA architecture. The product has a high-speed input frequency of 8 x 200 kHz, and a high-speed output frequency of 5 x 200kHz, supporting more and faster high-speed pulse output ports.
  • Page 3: Revision History

    Introduction Revision History Version Date Remarks July 2017 Released the first issue.
  • Page 4: Table Of Contents

    Guide on Quick Reference........4.4.4 Table Operations ...........130 4.4.5 Exponent Operations..........142 Chapter 1 Overview ..........4.5 Data Processing ............1.1 Introduction to the H3U Series PLC ......4.5.1 Data Conversion............149 1.2 PLC Operating Principle ..........4.5.2 Data Transfer............169 4.5.3 Table Operation .............179 Chapter 2 Pre-programming Precautions ...
  • Page 5 Contents 7.8 List of Motion Control Instructions Supported by 4.12.2 Bit Switch Access ..........313 G-code Subprograms ..........4.12.3 7-segment LED Display........319 7.9 Format and Use of G-code Subprograms ....4.12.4 Other Peripheral Instructions.......322 7.10 General Positioning Instructions Supported by the 4.13 Electronic Cam Instructions ........
  • Page 6 Contents 9.5.1 Protocol Setting Method for Modbus 11.4.1 Overview ..............690 Configuration Table ..........613 11.4.2 Type of High-speed Counting Interrupt ....690 9.5.2 Setting the Modbus Configuration Table ....614 11.4.3 Application ............690 9.6 CANlink Communication..........11.5 Pulse Complete Interrupt .......... 9.6.1 Principle of CANlink3.0 Communication....616 11.5.1 Overview ..............691 9.6.2 CANlink Network ...........617 11.5.2 Application ............692...
  • Page 7 Instructions Lookup Sheet Instructions Lookup Sheet 1 Applicable Model Instruction Description Page   H2U-XP H3U Note: Instructions in gray background in the table only support BAND AND bit contact of bit data √ √ H3U-PM motion control models. BANI ANI bit contact of bit data √...
  • Page 8 Instructions Lookup Sheet Applicable Applicable Model Model Instruction Description Page Instruction Description Page     H2U-XP H3U H2U-XP H3U Conversion from decimal ASCII Conductive when floating point DABIN × √ format to BIN format FAND< number < comparative AND state ×...
  • Page 9 Instructions Lookup Sheet Applicable Applicable Model Model Instruction Description Page Instruction Description Page     H2U-XP H3U H2U-XP H3U High-speed positioning × √ Marker instruction √ √ Linear interpolation × √ Loading of NO contacts √ √ Clockwise arc interpolation ×...
  • Page 10 Instructions Lookup Sheet Applicable Applicable Model Model Instruction Description Page Instruction Description Page     H2U-XP H3U H2U-XP H3U End of the main program with Parallel connection of NO contacts √ √ × √ auxiliary function code 0xxxx OR& OR logical AND operation ×...
  • Page 11 Instructions Lookup Sheet Applicable Applicable Model Model Instruction Description Page Instruction Description Page     H2U-XP H3U H2U-XP H3U Program return to the primary bus √ √ Auxiliary function code × √ Start to read from the right of the TADD Clock data addition operation √...
  • Page 12 Instructions Lookup Sheet Instructions Lookup Sheet 2 Alternate output √ √ BOUT Bit data output √ √ Note: Instructions in gray background in the table only support BSET Bit data setting √ √ H3U-PM motion control models. BRST Bit data reset √...
  • Page 13 Instructions Lookup Sheet Model Supported Model Supported Type Page Type Page H2U-XP H2U-XP LD contact comparison larger Conductive when floating point √ √ LD>= than or equal to FAND > number > comparative AND × √ state contact S1 > S2 LD contact comparison smaller √...
  • Page 14 Instructions Lookup Sheet Model Supported Model Supported Type Page Type Page H2U-XP H2U-XP Conductive when absolute Data logical operations ANDZ value >= comparative AND state × √ WAND Binary data logical AND √ √ >= contact |S1 – S2| ≧ |S3| Binary data logical OR √...
  • Page 15 Instructions Lookup Sheet 5 Data Processing Model Supported Type Page H2U-XP Model Supported Type Page Carry-included cyclic right-shift √ √ H2U-XP Carry-included cyclic left-shift √ √ Data conversion SFTR Bit right-shift √ √ Conversion from binary floating- SFTL Bit left-shift √...
  • Page 16 Instructions Lookup Sheet Model Supported Model Supported Type Page Type Page H2U-XP H2U-XP Matrix read/write Conversion from seconds STOH to hours:minutes:seconds × √ × MBRD Matrix bit read operation √ format × MBWR Matrix bit write operation √ Clock read/write Matrix replacement Clock data read √...
  • Page 17 Instructions Lookup Sheet Model Supported Model Supported Type Page Type Page H2U-XP H2U-XP SETR Electrical zero setting × √ Communication positioning (robot) DRVZ Mechanical zero return reset × √ AXISENAB Axis enabling × √ DRVR Electrical zero return × √ AXISSTOP Axis stop positioning ×...
  • Page 18 Instructions Lookup Sheet 13 Electronic Cam Instructions Model Supported Type Page H2U-XP Model Supported Type Page Auxiliary function code used H2U-XP for setting the rotational speed × √ CAMRD Electronic cam data reading × √ for the spindle CAMWR Electronic cam data writing ×...
  • Page 19: Guide On Quick Reference

    Guide on Quick Reference Guide on Quick Reference The following table is for your quick reference if you have doubts on any of the following items: Item Page “5.1 H3U Standard Model” on page 336 “5.3 H3U-PM Motion High-speed counter and input interrupt Control Model”...
  • Page 20 1 Overview 1.1 Introduction to the H3U Series PLC ....... 1.2 PLC Operating Principle ..........
  • Page 21: Chapter 1 Overview

    Chapter 1 Overview 1.1 Introduction to the H3U Series PLC The H3U series PLC is a third-generation high-performance PLC developed by Inovance. Thanks to the latest industrial-strength CPU and FPGA hardware structure and embedded software with independent intelligent property rights, the product performance and capacity has been substantially improved. In addition, it provides a wide range of functions including positioning, trajectory tacking control, and network communication.
  • Page 22: Plc Operating Principle

    1 Overview 1.2 PLC Operating Principle • [1]: The three channels of AB phase counters support differential or single-ended inputs. • [2] High-speed outputs are only applicable to models with transistor outputs. H3U standard models use open-drain outputs. Motion models use differential outputs. •...
  • Page 23 1.2 PLC Operating Principle 1 Overview Power on the PLC Initialize the PLC and reset the working cache Check the PLC main template system hardware System initialization Check the expansion module Read the X port to the process image area Clear the Y process image area and the port From Stop to RUN? Reset the WDG...
  • Page 24 1 Overview 1.2 PLC Operating Principle After all the networks of the main program are scanned from top to the bottom, all timers are refreshed, and routine communication and other data are processed, the PLC system program outputs the status of the variable in the Y register buffer to the Y hardware port.
  • Page 25 1.2 PLC Operating Principle 1 Overview Memo NO. ___________ Date ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ___________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ___________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________...
  • Page 26 2 Pre-programming Precautions 2.1 Programming Software ........... 2.2 Communication Cable ............ 2.3 Introduction to AutoShop ..........
  • Page 27: Chapter 2 Pre-Programming Precautions

    2 Pre-programming Precautions Chapter 2 Pre-programming Precautions 2.1 Programming Software The H3U series PLC uses AutoShop V2.50 or later versions. The minimum configuration of AutoShop is as follows: Operating system: Windows XP, Windows 7, Windows 8, or Windows 10 Memory: 1 GB or above...
  • Page 28 2 Pre-programming Precautions 2.3 Introduction to AutoShop 2) Project input AutoShop supports three programming languages: instruction list, ladder chart, and SFC. The ladder chart is the default programming language. The following describes how to input an instruction in ladder chart mode: a) Click an instruction icon on the toolbar, and the Application Instruction window is displayed.
  • Page 29 2.3 Introduction to AutoShop 2 Pre-programming Precautions 4) Project uploading/downloading a) Use a programming cable to connect the PLC to a PC. b) Choose Tool > Communication Setting to set the communication mode. c) Choose PLC > Download/Upload or click the shortcut buttons to upload or download the project.
  • Page 30 2 Pre-programming Precautions 2.3 Introduction to AutoShop ANB instruction not required c) Dual-coil solution Ignored M100 M101 M100 M101 The dual-coil design does not go against the project editing rule, but the output status may not be what the user expects. Because the actual port I/O status of the PLC is refreshed when the project is finished, only the last status of the project is refreshed, and intermediate status changes cannot be shown.
  • Page 31 2.3 Introduction to AutoShop 2 Pre-programming Precautions...
  • Page 32 3 Elements 3.1 Table of Elements ............3.2 Input/Output Relay............3.2.1 Input Relay X ............34 3.2.2 Output Relay Y ............35 3.3 Auxiliary Relay ............3.4 Status Relay ............... 3.5 Timer................3.6 Counter ............... 3.6.1 16-bit Counter............40 3.6.2 32-bit Counter............41 3.6.3 High-speed Counter ..........42 3.7 Register ..............
  • Page 33: Chapter 3 Elements

    3 Elements Chapter 3 Elements The following table lists types of elements supported by H3U. Type Function and Classification Corresponding to the PLC's bit element X for hardware boolean input Input/Output relay Corresponding to the PLC's bit element Y for output control Ordinary auxiliary relay M Auxiliary relay...
  • Page 34: Table Of Elements

    3 Elements 3.1 Table of Elements 3.1 Table of Elements Name Description Input/Output relay Input relay X0 to X377 256 points Numbered with an octal number, 512 input and output points in total Output relay Y0 to Y377 256 points Auxiliary relay For general purpose M0 to M499...
  • Page 35: Input/Output Relay

    3.2 Input/Output Relay 3 Elements Name Description 1024 For special purpose (16-bit) SD0 to SD1023 Retained upon power failure points For address indexing (16-bit) V0 to V7, 0 to Z7 16 points Retained upon power failure File register 32,768 Extended register (16-bit) R0 to R32767 Retained upon power failure points...
  • Page 36: Output Relay Y

    3 Elements 3.3 Auxiliary Relay • The ports of extension modules are always numbered from an octal number starting with 0. 3.2.2 Output Relay Y The output relay is an element that is directly associated with the hardware ports of external user control devices, and logically corresponds to the PLC's physical output port in one-to-one manner.
  • Page 37: Status Relay

    3.4 Status Relay 3 Elements You can use parameters to adjust the regions for the PLC's general auxiliary relays and auxiliary relays which can be retained upon power failure. The PLC has many special auxiliary relays with different functions. For details, see “Appendix A Allocation of .
  • Page 38 3 Elements 3.5 Timer 1 ms 100 ms 100 ms 10 ms accumulation- accumulation- type type T0 to T191 T256 to T511 T192 to T199 T200 to T245 T246 to T249 T250 to T255 192 points 256 points 8 points ※2 46 points ※1 4 points ※3 6 points ※4...
  • Page 39: Counter

    3.6 Counter 3 Elements Example 2: The driving signal of a cumulative timer T250 which can be retained upon power failure is OFF, or the next driving signal is ON when the PLC is powered off and the internal timing value is retained. Timing continues until the preset value is reached, and the output contact is closed.
  • Page 40 3 Elements 3.6 Counter • [1] It cannot be retained upon power failure. It can be set to be retained upon power failure through parameter setting. • [2] It can be retained upon power failure. It can be set to be not retained upon power failure through parameter setting.
  • Page 41: 16-Bit Counter

    3.6 Counter 3 Elements 3.6.1 16-bit Counter You can use the system parameter configurations to set and change allocation of counters for general purpose use and retention purpose use. The valid value of a 16-bit counter ranges from K1 to K32,767 (a decimal constant). The value K0 and K1 have the same effect;...
  • Page 42: 32-Bit Counter

    3 Elements 3.6 Counter 3.6.2 32-bit Counter The value range for a 32-bit incremental/decremental counter is -2,147,483,648 to +2,147,483,647 (a decimal constant). You can use the constant K or the content of the data register D to set the value. You can use the special auxiliary relays M8200 to M8234 to specify the counting incremental/decremental direction.
  • Page 43: High-Speed Counter

    3.7 Register 3 Elements 3.6.3 High-speed Counter High-speed counters can be used for counting external input signals and supports single-phase sin- gle-counting, single-phase dual-counting, and A/B-phase fundamental or quadruplicated frequency. For details about use of high-speed counters, see “Chapter 5 High-speed Input” on page 336 3.7 Register Registers are used for data computation and storage of parameters of timers, counters, and analog values.
  • Page 44: Address Indexing Registers V And Z

    3 Elements 3.7 Register The special register is used to realize some special functions of PLC by specific values are written into. It is a special unit used for data interaction between the user project and the PLC system project. For example, in D8000, the time of the monitoring timer is initially set through the system ROM.
  • Page 45: File Register R

    3.7 Register 3 Elements 1) Example of 16-bit address indexing applications: Because: D10Z0 = D (10 + 2) = D12 D100V5 = D (100 + 7) = D107 Which is equivalent to: MOV D12 D107 2) Example of 32-bit address indexing applications: Because: D10Z0=D[10+(V0,Z0)]=D[10+12]=D22 D100Z5=D[100+(V5,Z5)]=D[100+34]=D134...
  • Page 46: Marker And Subprogram

    3 Elements 3.8 Marker and Subprogram 3.8 Marker and Subprogram The marker/jump pointer (P) is used to mark the portal address of the jump program. The subprogram SBR is used to mark the starting address of a subprogram. The motion control subprogram is marked with MC. The interrupt subprogram (I) is used to mark the starting address of an interrupt program, and is numbered with a decimal number.
  • Page 47: Constant

    3.9 Constant 3 Elements page 686 3.9 Constant Five types of numerical values can be used based on the use and purpose of the PLC. Their roles and functions are listed in the following table below. Type Description of Application in Programming It is used to set the value of the timer and counter (constant K).
  • Page 48: Table Operations

    4 Instructions 4.1 Program Logic Instructions ....4.6.3 Matrix Read/Write ..... 4.6.4 Matrix Rotation and Shift ... 4.1.1 Contact Instructions ....4.1.2 Combined Instructions ....4.7 String Instructions ......4.1.3 Output Instructions ....4.8 Clock Instructions ......4.1.4 Main Control Instructions ..4.8.1 Clock Comparison Output ..
  • Page 49: Program Logic Instructions

    4 Instructions 4.1 Program Logic Instructions Chapter 4 Instructions This chapter describes the instructions supported by H3U. 4.1 Program Logic Instructions Loading of normally open (NO) contacts Loading of normally closed (NC) contacts Serial connection of NO contacts Serial connection of NC contacts Parallel connection of NO contacts Parallel connection of NC contacts Use of rising edge pulse...
  • Page 50: Contact Instructions

    4 Instructions 4.1.1 Contact Instructions 4.1.1 Contact Instructions Loading of NO contacts Loading of NC contacts Use of rising edge pulse Use of falling edge pulse Serial connection of NO contacts Serial connection of NC contacts ANDP Serial connection for AND rising pulse detection ANDF Serial connection for AND falling pulse (F) detection Parallel connection of NO contacts...
  • Page 51: Loading Of No Contacts

    4.1.1 Contact Instructions 4 Instructions LD, LDI, LDP, LDF, AND, ANI, ANDP, ANDF, OR, ORI, ORP, ORF, and INV Loading of NO contacts Loading of NC contacts Operand types: S, X, Y, M, T, and C Use of rising edge pulse Number of steps: 1 step Use of falling edge pulse Instruction...
  • Page 52 4 Instructions 4.1.1 Contact Instructions AND X2 (M1) (Y0) ANI X0 (Y4) ANDP X1 (Y7) ANDF X2 Parallel connection of NO contacts Operand types: S, X, Y, M, T, and C Number of steps: 1 step Parallel connection of NC contacts Parallel connection for OR rising pulse detection...
  • Page 53 4.1.1 Contact Instructions 4 Instructions BLD: Bit contact of bit data ◆ Overview The execution result (ON or OFF) of the BLD instruction is determined based on the status (ON or OFF) of the designated bit of the source data (node A directly connected to the left-hand bus). Bit contact of bit Applicable model: H3U data...
  • Page 54 4 Instructions 4.1.1 Contact Instructions BLDI: Inverse bit contact of bit data ◆ Overview The execution result (ON or OFF) of the BLDI instruction is determined based on the status (ON or OFF) of the designated bit of the source data (node B directly connected to the left-hand bus). Inverse bit contact BLDI Applicable model:...
  • Page 55 4.1.1 Contact Instructions 4 Instructions BAND: AND bit contact of bit data ◆ Overview The execution result (ON or OFF) of the BAND instruction is determined based on the status (ON or OFF) of the designated bit of the source data (node A connected to another node in series). AND bit contact of BAND Applicable model:...
  • Page 56: Bani Ani Bit Contact Of Bit Data

    4 Instructions 4.1.1 Contact Instructions BANI: ANI bit contact of bit data ◆ Overview The execution result (ON or OFF) of the BANI instruction is determined based on the status (ON or OFF) of the designated bit of the source data (node B connected to another node in series). ANI bit contact of BANI Applicable model:...
  • Page 57 4.1.1 Contact Instructions 4 Instructions BOR: OR bit contact of bit data ◆ Overview The execution result (ON or OFF) of the BOR instruction is determined based on the status (ON or OFF) of the designated bit of the source data (node A connected to another node in parallel). OR bit contact of Applicable model: bit data...
  • Page 58: Combined Instructions

    4 Instructions 4.1.2 Combined Instructions BORI: ORI bit contact of bit data ◆ Overview The execution result (ON or OFF) of the BORI instruction is determined based on the status (ON or OFF) of the designated bit of the source data (node B connected to another node in parallel). ORI bit contact of BORI Applicable model:...
  • Page 59 4.1.2 Combined Instructions 4 Instructions MPS: Stack-based storage; MRD: Stack read; MPP: Stack read Serial connection of circuit blocks Number of steps: 1 step Parallel connection of circuit blocks Number of steps: 1 step Instruction Operand None The objects of a block operation are the computing flows within the latest two LD (or LDI, LDP, or LDF) ranges.
  • Page 60 4 Instructions 4.1.2 Combined Instructions MEP and MEF: Generate falling/rising edge pulse for operation results ◆ Overview The MEP and MEF instructions generate falling/rising edge pulse for operation results. No element number needs to be specified. The operation result until the MEP instruction is enabled upon OFF-to-ON switching. Use the MEP instruction to enable simple pulsed processing when multiple contacts are connected in series.
  • Page 61: Output Instructions

    4.1.3 Output Instructions 4 Instructions 4.1.3 Output Instructions Coil drive SET action storage coil instruction Contact or cache clearance Rising pulse detection coil instruction Output instructions Falling pulse (F) detection coil instruction Alternate output BOUT [Note] Bit data output [Note] BSET Bit data setting [Note]...
  • Page 62 4 Instructions 4.1.3 Output Instructions OUT, SET, RST, PLS, and PLF Coil drive Operand types: S, Y, and M Number of steps: 1 step SET action storage coil instruction Operand types: S, Y, M, T, C, and D Contact or cache clearance Number of steps: 3 steps Rising pulse detection coil instruction Falling pulse (F) detection coil instruction...
  • Page 63: Alternate Output

    4.1.3 Output Instructions 4 Instructions Instruction Operand M0–M7679 X0–X377 Y0–Y377 S0–S4095 SM0–SM1023 T0–T511 C0–C255 M8000–M8511 √ √ √ When the PLS instruction is driven by the rising edge, the element designated by this instruction is set to ON and remains so within only one scan cycle. When the PLF instruction is driven by the falling edge, the element designated by this instruction is set to ON and remains so within only one scan cycle.
  • Page 64: Bout Bit Data Output

    4 Instructions 4.1.3 Output Instructions Example 1: Y10 〕 〔ALTP The action generated by the following instruction is the same as that generated by the ALTP instruction: Y10 〕 〔ALT Example 2: Introduce a timer to the instruction flow for convenient output of an oscillator. (The STMR instruction achieves the same result).
  • Page 65: Bit Data Setting

    4.1.3 Output Instructions 4 Instructions When R200 = 4 and M100 = ON, bit 4 of D100 is set to get the result D100 = 2#11110 (decimal K30). When M100 = OFF, bit 4 of D100 is reset to get the result D100 = 2#1110 (decimal K14). BSET : Bit data setting ◆...
  • Page 66: Bit Data Reset

    4 Instructions 4.1.3 Output Instructions When M100 = OFF: BRST: Bit data reset ◆ Overview When the BRST instruction is driven, the bit designated by this instruction is set to OFF. BRST Bit data reset Applicable model: Output 32-bit instruction (9 Element number of the output data 16-bit instruction (5 data...
  • Page 67: Main Control Instructions

    4.1.4 Main Control Instructions 4 Instructions 4.1.4 Main Control Instructions Coil instruction for serial contacts used by the main control Main control instructions Release instruction for serial contacts used by main control reset Instruction Operand N0–N7 markers (word parameters), 3 steps MC is the main control starting instruction.
  • Page 68 4 Instructions 4.1.5 End Instructions FEND: End of the main program ◆ Overview The FEND instruction ends the main program. End of the main FEND Applicable model: program 16-bit instruction (1 step) An independent instruction without operands and contact driving FEND: Continuous execution ◆...
  • Page 69: Other Processing Instructions

    4.1.6 Other Processing Instructions 4 Instructions END: End of all programs ◆ Overview The END instruction ends all programs. End of all programs Applicable model: 16-bit instruction (1 step) An independent instruction without operands and contact driving END: Continuous execution ◆...
  • Page 70: Watchdog Timer Reset

    4 Instructions 4.1.6 Other Processing Instructions WDT: Watchdog timer reset ◆ Overview The WDT instruction resets the watchdog timer. Watchdog timer Applicable model: reset 16-bit instruction (1 step) WDT: Continuous An independent instruction without operands execution WDTP: Pulse execution ◆ Function The PLC has a timer used to monitor the duration of a user program execution.
  • Page 71: Program Flow Instructions

    4.2.1 Subprogram 4 Instructions 4.2 Program Flow Instructions CALL Subprogram call SRET Subprogram return Subprogram SSRET Conditional subprogram return IRET Interrupt return Enable interrupt Interrupt Disable interrupt Conditional jump Jump Marker instruction CJEND Conditional jump to the program end Start of a loop Loop NEXT End of a loop...
  • Page 72: Sret Subprogram Return

    4 Instructions 4.2.1 Subprogram • A subprogram must end with the SRET statement. • The subprogram starting from P*** can be called in multiple locations or by another subprogram, but the number of nested layers cannot exceed five. • A subprogram cannot be called within itself; otherwise, an infinite loop or program running timeout occurs. •...
  • Page 73: Conditional Subprogram Return

    4.2.1 Subprogram 4 Instructions Example 2: SSRET: Conditional subprogram return ◆ Overview The SSRET instruction executes a conditional return to a subprogram. Conditional SSRET Applicable model: subprogram return 16-bit instruction (1 step) An independent instruction without operands and contact driving SSRET: Continuous execution...
  • Page 74: Interrupt

    4 Instructions 4.2.2 Interrupt ◆ Function The IRET statement is located at the end of an interrupt subprogram. After the IRET instruction is executed, the PLC returns to the statement that calls the interrupt subprogram and continues program execution. Interrupt programs are programmed in an independent window in AutoShop. The IRET instruction does not need to be programed at the end of an interrupt program.
  • Page 75 4.2.2 Interrupt 4 Instructions External signal input interrupt pointers and setting (H1U-XP and H2U-XP): Pointer Number Input Number DI Instruction Rising pulse Falling pulse interrupt interrupt X000 I001 I000 M8050 X001 I101 I100 M8051 X002 I201 I200 M8052 X003 I301 I300 M8053 X004...
  • Page 76 4 Instructions 4.2.2 Interrupt Interrupt programming specification and execution features: • An interrupt that occurs within the interrupt disabled range (between the Dl and EI instructions) can be memorized and executed after the EI instruction. • An interrupt subprogram must be programmed after the FEND instruction and appended with IRET. In AutoShop, an interrupt subprogram cannot be programmed in the main program, and IRET can be omitted at the end of the subprogram.
  • Page 77: Jump

    4.2.3 Jump 4 Instructions Each interrupt is generated based on the high-speed counter value and record unit value. Example: The process of compiling the left-hand program in AutoShop is as follows: Right-click the interrupt program INT_01 or INT_02 in the program block and choose Property, and then name 01 or 02 as Insertion range with needed.
  • Page 78: Marker Instruction

    4 Instructions 4.2.3 Jump ◆ Function 1) When the flow is active, the CJ (or CJP) instruction forces a program to jump from the instruction address to the address designated by P***. Program execution continues after the jump by skipping the program instructions within the intermediate address range.
  • Page 79: Loop

    4.2.4 Loop 4 Instructions CJEND: Conditional jump to the program end ◆ Overview The CJEND instruction executes a jump to the program end when conditions are met. Then the current scan cycle ends. Conditional jump to CJEND Applicable model: the program end 16-bit instruction (3 steps) An independent instruction without operands and contact driving...
  • Page 80 4 Instructions 4.2.4 Loop NEXT: End of a loop ◆ Overview The NEXT instruction identifies the end position of a loop. NEXT End of a loop Applicable model: 16-bit instruction (1 step) An independent instruction without operands NEXT: Continuous execution ◆...
  • Page 81: Step Sequential Control

    4.2.5 Step Sequential Control 4 Instructions Example 2: CJ P2 FOR K3 Use the CJ instruction to skip FOR–NEXT FOR K4 instructions. When X0 = OFF, loops 1 and 2 are executed. When X0 = ON, the CJ Loop 1 Loop 2 instruction jumps to P2.
  • Page 82 4 Instructions 4.2.5 Step Sequential Control If the S contact of the STL instruction is connected, the circuit connected to Use the STL this contact becomes active. If the S contact is disconnected, the circuit instruction marker becomes inactive. The instruction is no longer executed (in the jump state) after a scan cycle.
  • Page 83: Data Comparison

    4.3.1 Contact Comparison 4 Instructions The following table lists the sequential control commands with support for intra-state processing: LD/LDI/LDP/LDF, AND/ANI/ Command ANB/ORB ANDP/ANDF, OR/ORI/ORF, INV, OUT, MC/MCR State MPS/MRD/MPP SET/RST, and PLS/PLF Initial and general states Available Available Unavailable Output Available Available Unavailable...
  • Page 84 4 Instructions 4.3.1 Contact Comparison Enabled when floating-point number > comparative FLD> state contact S1 > S2 Enabled when floating-point number >= comparative FLD>= state contact S1 ≥ S2 Enabled when floating-point number < comparative FLD< state contact S1 < S2 Enabled when floating-point number <= comparative FLD<= state contact S1 ≤...
  • Page 85 4.3.1 Contact Comparison 4 Instructions Enabled when absolute value > comparative state LDZ> contact |S1 – S2| > |S3| Enabled when absolute value >= comparative state LDZ>= contact |S1 – S2| ≥ |S3| Enabled when absolute value < comparative state LDZ<...
  • Page 86 4 Instructions 4.3.1 Contact Comparison ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 87 4.3.1 Contact Comparison 4 Instructions : Data comparison ☼ ◆ Overview The AND☼ instruction compares two operands and outputs the comparison result as a logical state. The variables in comparison are processed as signed numbers. Contact data S1 S2 Applicable model: ☼...
  • Page 88 4 Instructions 4.3.1 Contact Comparison Use the 32-bit instruction ANDD ☼ to compare 32-bit counters (C200–C255). If a different instruction is used, an error will occur. : Data comparison ☼ ◆ Overview The OR☼ instruction compares two operands and outputs the comparison result as a logical state. The variables in comparison are processed as signed numbers.
  • Page 89 4.3.1 Contact Comparison 4 Instructions LD#: Contact status bit operation ◆ Overview Whether the LD# instruction is enabled is determined based on the bit logical operation result (a node directly connected to the left-hand bus). Contact status bit S1 S2 Applicable model: operation Data 1...
  • Page 90 4 Instructions 4.3.1 Contact Comparison AND#: AND contact status bit operation ◆ Overview Whether the AND# instruction is enabled is determined based on the bit logical operation result (a node connected to another node in series). AND contact AND# S1 S2 status bit Applicable model: operation...
  • Page 91 4.3.1 Contact Comparison 4 Instructions OR#: OR contact status bit operation ◆ Overview Whether the OR# instruction is enabled is determined based on the bit logical operation result (a node connected to another node in parallel). OR contact status S1 S2 Applicable model: bit operation Data 1...
  • Page 92 4 Instructions 4.3.1 Contact Comparison FLD#: Floating-point contact comparison ◆ Overview The FLD# instruction compares two operands and uses the comparison result to determine whether to set a contact to ON or OFF (a node directly connected to the left-hand bus). Floating- FLD# S1 S2...
  • Page 93 4.3.1 Contact Comparison 4 Instructions FAND#: Floating-point AND contact comparison ◆ Overview The FAND# instruction compares two operands and uses the comparison result to determine whether to set a contact to ON or OFF (a node connected to another node in series). Floating-point FAND# S1 S2...
  • Page 94 4 Instructions 4.3.1 Contact Comparison FOR#: Floating-point OR contact comparison ◆ Overview The FOR# instruction compares two operands and uses the comparison result to determine whether to set a contact to ON or OFF (a node connected to another node in parallel). Floating-point FOR# S1 S2...
  • Page 95 4.3.1 Contact Comparison 4 Instructions LDZ#: Absolute value comparison contact ◆ Overview The LDZ# instruction compares the absolute value of the S1 and S2 subtraction result with the absolute value in S3 and uses the comparison result to determine whether to set a contact to ON or OFF (a node directly connected to the left-hand bus).
  • Page 96 4 Instructions 4.3.1 Contact Comparison ANDZ#: Absolute value comparison AND contact ◆ Overview The ANDZ# instruction compares the absolute value of the S1 and S2 subtraction result with the absolute value in S3 and uses the comparison result to determine whether to set a contact to ON or OFF (a node connected to another node in series).
  • Page 97 4.3.1 Contact Comparison 4 Instructions ORZ#: Absolute value comparison OR contact ◆ Overview The ORZ# instruction compares the absolute value of the S1 and S2 subtraction result with the absolute value in S3 and uses the comparison result to determine whether to set a contact to ON or OFF (a node connected to another node in parallel).
  • Page 98: Comparison Output

    4 Instructions 4.3.2 Comparison Output 4.3.2 Comparison Output Data comparison ECMP Binary floating point comparison Comparison output Range comparison EZCP Binary floating-point range comparison CMP: Data comparison ◆ Overview When driving conditions are met, the CMP instruction compares the values in S1 and S2 and then sets the end-address bit element D (D+1 or D+2) to ON based on the comparison result (S1 >...
  • Page 99 4.3.2 Comparison Output 4 Instructions Example: CMP K100 … M0 = ON when K100 > C23's current value. … M1 = ON when K100 = C23's current value. … M2 = ON when K100 < C23's current value. M0, M1, or M2 = ON when X0 = ON. The CMP instruction is not executed when X0 switches from ON to OFF, and M0 to M2 remain in the state prior to X0 = OFF.
  • Page 100: Range Comparison

    4 Instructions 4.3.2 Comparison Output Example: DECMP D100 D200 Floating-point number (D101, D100) > (D201, D200), M10=ON Floating-point number (D101, D100) = (D201, D200), M11=ON Floating-point number (D101, D100) < (D201, D200), M12=ON When X10 = ON, M10, M11, or M12 switches to ON. The DECP instruction is not executed when X10 switches from ON to OFF, and M10 to M12 remain in the state prior to X10 = OFF.
  • Page 101 4.3.2 Comparison Output 4 Instructions Example: ZCP K100 K200 C30 M3 = ON when K100 > C30's current value M4 = ON when K100 <= C30's current value <= K200 M5 = ON when C30's current value > K200 M3, M4, or M5 switches to ON when X0 = ON. The ZCP instruction is not executed when X0 switches from ON to OFF, and M3 to M5 remain in the state prior to X0 = OFF.
  • Page 102: Data Operation

    4 Instructions 4.3.2 Comparison Output D is the comparison result storage unit, which occupies three (bit) variables. Example: DEZCP D100 D120 Floating-point number (D101, D100) > (D21, D20), M0=ON Floating-point number (D101, D100) <= (D21, D20) <= (D121, D120), M1=ON Floating-point number (D21, D20) >...
  • Page 103: Four Arithmetic Operations

    4.4.1 Four Arithmetic Operations 4 Instructions WSUM Value summation MEAN Mean value calculation LIMIT Upper/Lower limit control Table operations BZAND Dead zone control ZONE Zone control Coordinate determination (coordinates of different points) SCL2 Coordinate determination 2 (X and Y coordinates) Binary floating-point exponent operation LOGE Binary floating-point natural logarithm operation...
  • Page 104 4 Instructions 4.4.1 Four Arithmetic Operations ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number S SM D SD KnX KnY KnM KnS KnSM Modification S SM D SD KnX KnY KnM KnS KnSM Modification S SM D SD KnX KnY KnM KnS KnSM...
  • Page 105 4.4.1 Four Arithmetic Operations 4 Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number SD KnX KnY KnM KnS KnSM Modification SD KnX KnY KnM KnS KnSM Modification SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 106 4 Instructions 4.4.1 Four Arithmetic Operations MUL: Binary number multiplication ◆ Overview The MUL instruction multiplies two binary numbers together. Binary number MUL S1 S2 D Applicable model: multiplication Multiplicand Data, or address of the word element that stores the data 16-bit instruction 32-bit instruction (7 steps)
  • Page 107 4.4.1 Four Arithmetic Operations 4 Instructions Example: Ladder chart Instruction list D100 D110 D120 D100 D110 D120 When M8 is set, the product of D100 (multiplicand) and D110 (multiplier) is stored in D120. D120 = 5 x 9 = K45 if D100 = K5 and D110 = K9. D120, d121 = 1234 x 5678 = K7006652 if D100 = K1234 and D110 = K5678.
  • Page 108 4 Instructions 4.4.1 Four Arithmetic Operations Dividend Quotient Remainder Divider 16-bit division Sign bit Sign bit Sign bit Sign bit Dividend Quotient Remainder Divider b0 b31 32-bit division Sign bit Sign bit Sign bit Sign bit Example: Ladder chart Instruction list D100 D110 D120 D100 D110 D120 When M8 is set, D100 (dividend) is divided by D110 (divider).
  • Page 109: Esub Binary Floating-Point Subtraction

    4.4.1 Four Arithmetic Operations 4 Instructions The carry flag M8022 is set if the absolute value of the calculation result is greater than the maximum floating-point value. The borrow flag M8021 is set if the absolute value of the calculation result is less than the minimum floating-point value.
  • Page 110 4 Instructions 4.4.1 Four Arithmetic Operations The zero flag M8020 is set if the result of the calculation is 0. The carry flag M8022 is set if the absolute value of the calculation result is greater than the maximum floating-point value. The borrow flag M8021 is set if the absolute value of the calculation result is less than the minimum floating-point value.
  • Page 111 4.4.1 Four Arithmetic Operations 4 Instructions ◆ Function Two binary floating-point numbers are multiplied together. ● S1 and S2 are respectively the multiplicand and multiplier of a binary floating point multiplication. ● D is the unit that stores the product of a binary floating point multiplication. ●...
  • Page 112 4 Instructions 4.4.1 Four Arithmetic Operations ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number S SM D SD KnX KnY KnM KnS KnSM Modification S SM D SD KnX KnY KnM KnS KnSM Modification S SM D SD KnX KnY KnM KnS KnSM...
  • Page 113 4.4.1 Four Arithmetic Operations 4 Instructions INC: Binary number incremented by 1 ◆ Overview The INC instruction increments a binary number by 1. Binary number INC D Applicable model: incremented by 1 32-bit instruction 16-bit instruction (5 steps) (3 steps) DINC: Address of the word element that stores the INC: Continuous...
  • Page 114 4 Instructions 4.4.1 Four Arithmetic Operations DEC: Binary number decremented by 1 ◆ Overview The DEC instruction decrements a binary number by 1. Binary number DEC D Applicable model: decremented by 1 32-bit instruction 16-bit instruction (5 steps) (3 steps) DDEC: Address of the word element that stores the regressive DEC: Continuous...
  • Page 115: Logical Operations

    4.4.2 Logical Operations 4 Instructions 4.4.2 Logical Operations WAND Binary number logical AND Binary number logical OR Logical operations WXOR Binary number logical XOR Binary number negation ENEG Binary floating-point sign negation WAND: Binary number logical AND ◆ Overview When driving conditions are met, the WAND instruction performs a logical AND on S1 and S2 bit by bit. The result is stored in D.
  • Page 116 4 Instructions 4.4.2 Logical Operations ◆ Application Logical AND S1 . S2 . WAND D 20 D 22 D 24 0 0 1 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 0 WOR: Binary number logical OR ◆...
  • Page 117 4.4.2 Logical Operations 4 Instructions ◆ Application Logical OR S1 . S2 . D 20 D 22 D 24 0 0 1 0 0 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 0 0 1 1 WXOR: Binary number logical XOR ◆...
  • Page 118 4 Instructions 4.4.2 Logical Operations ◆ Application Logical XOR S1 . S2 . WXOR D 20 D 22 D 24 0 0 1 0 0 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 0 0 0 1 NEG: Binary number negation ◆...
  • Page 119 4.4.2 Logical Operations 4 Instructions ◆ Example: The following example gets the absolute value of the difference in a subtraction: M10 = ON if D2 > D4; M11 = ON if D2 = D4; M12 = ON if D2 < D4. This ensures that the value in D10 is positive.
  • Page 120 4 Instructions 4.4.2 Logical Operations Max. absolute value: 32 ENEG: Binary floating-point sign negation ◆ Overview The ENEG instruction inverts the sign of a binary floating-point number (real number). Binary floating- ENEG S/D Applicable model: point sign negation 32-bit instruction (5 steps) Start number of elements that store the binary floating-point DENEG: Continuous...
  • Page 121: Trigonometric Functions

    4.4.3 Trigonometric Functions 4 Instructions After execution of the instruction 4.4.3 Trigonometric Functions Floating point SIN operation Floating point COS operation Floating point TAN operation ASIN Binary floating point ARCSIN operation ACOS Binary floating point ARCCOS operation Trigonometric functions ATAN Binary floating point ARCTAN operation Binary floating point degree-to-radian conversion Binary floating point radian-to-degree conversion...
  • Page 122 4 Instructions 4.4.3 Trigonometric Functions ◆ Function The sine of the designated angle (measured in radians) is calculated. The variable is in binary floating-point number format. S is the angular variable whose sine is to be calculated, in the unit of rad and in binary floating-point number format.
  • Page 123: Floating-Point Tan Operation

    4.4.3 Trigonometric Functions 4 Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number S SM SD KnX KnY KnM KnS KnSM Modification S SM SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported. ◆...
  • Page 124 4 Instructions 4.4.3 Trigonometric Functions ◆ Function The tangent of the designated angle (measured in radians) is calculated. The variable is in binary floating- point number format. Example: The tangent of the angle measured in radians in (D21, D20) DTAN is calculated.
  • Page 125 4.4.3 Trigonometric Functions 4 Instructions Example 1: DASIN D0 D2 DASINP D10 D12 When M10 = ON, the sine-1 of the binary floating-point number in (D1, D0) is calculated. The result is stored in (D3, D2). (D3 D2) (D1 D0) Example 2: DASIN D0 D2 Assume that the value in (D1, D0) is 0.707106781.
  • Page 126 4 Instructions 4.4.3 Trigonometric Functions Example 1: DACOS D0 D2 DACOSP D10 D12 When M10 = ON, the cosine-1 of the binary floating-point number in (D1, D0) is calculated. The result is stored in (D3, D2). (D3 D2) (D1 D0) Example 2: DCOS D0 Assume that the value in (D1, D0) is 0.866025404.
  • Page 127 4.4.3 Trigonometric Functions 4 Instructions ◆ Function The tangent in radians is calculated. Example 1: DATAN D0 D2 DATANP D10 D12 When M10 = ON, the tangent-1 of the binary floating-point number in (D1, D0) is calculated. The result is stored in (D3, D2). (D3 D2) (D1 D0) Example 2:...
  • Page 128 4 Instructions 4.4.3 Trigonometric Functions ◆ Function Binary floating-point degrees are converted to radians. The calculation formula is [Angle in radians = Angle in degrees x π/180]. Example 1: DRAD D0 DRADP D10 When M10 = ON, degree-to-radian conversion is performed on the binary floating-point number in (D1, D0).
  • Page 129 4.4.3 Trigonometric Functions 4 Instructions ◆ Function Binary floating-point radians are converted to degrees. The calculation formula is [Angle in degrees = Angle in radians x 180/π]. Example 1: DDEG D0 D2 DDEGP D10 D12 When M10 = ON, radian-to-degree conversion is performed on the binary floating-point number in (D1, D0).
  • Page 130 4 Instructions 4.4.3 Trigonometric Functions Example: DSINH D0 D2 DSINHP D10 D12 When M10 = ON, the sinh of the binary floating-point number in (D1, D0) is calculated. The result is stored in (D3, D2). COSH: Binary floating point COSH operation ◆...
  • Page 131: Table Operations

    4.4.4 Table Operations 4 Instructions TANH: Binary floating point TANH operation ◆ Overview The TANH instruction calculates the tanh of a binary floating-point number. The calculation formula is Tanh = (e – e ) (/e Floating point TANH TANH S D Applicable model: operation Data...
  • Page 132 4 Instructions 4.4.4 Table Operations WSUM: Value summation ◆ Overview The WSUM instruction calculates the sum of consecutive 16- or 32-bit data entries. WSUM S D n Value summation Applicable model: Source Start number of elements that store the data entries 32-bit instruction (13 16-bit instruction (7 data...
  • Page 133 4.4.4 Table Operations 4 Instructions MEAN: Mean value calculation ◆ Overview When driving conditions are met, the MEAN instruction calculates the mean value of K data entries from head address S. The result is stored in D. Mean value MEAN S D n Applicable model: calculation Data...
  • Page 134: Upper/Lower Limit Control

    4 Instructions 4.4.4 Table Operations LIMIT: Upper/Lower limit control ◆ Overview The LIMIT instruction sets the upper and lower limits of an input value and outputs the resulting value. Upper/Lower limit LIMIT S1 S2 S3 D Applicable model: control Lower limit Minimum output limit 16-bit instruction 32-bit instruction...
  • Page 135 4.4.4 Table Operations 4 Instructions 32-bit instruction The output value in [D+1, D] is generated based on the input value in [S3+1, S3] and controlled within the range defined by the lower and upper limits respectively set in [S1+1, S1] and [S2+1, S2]. [S1+1, S1] ->...
  • Page 136 4 Instructions 4.4.4 Table Operations BZAND: Dead zone control ◆ Overview The BZAND instruction controls an output value based on whether the input value is within the range (defined by upper and lower limits) of the designated dead zone. Dead zone BZAND S1 S2 S3 D Applicable model:...
  • Page 137: Zone Control

    4.4.4 Table Operations 4 Instructions 32-bit instruction A dead zone range is set in [S1+1, S1] and [S2+1, S2] and applied to the input value in [S3+1, S3]. The resulting value is output to the element [D+1, D]. [S3+1, S3] – [S1+1, S1] -> [D+1, D] when [S1+1, S1] > [S3+1, S3]; [S3+1, S3] –...
  • Page 138 4 Instructions 4.4.4 Table Operations ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification...
  • Page 139 4.4.4 Table Operations 4 Instructions SCL: Coordinate determination (coordinates of different points) ◆ Overview The SCL instruction determines the coordinates of an input value based on the designated data table and outputs the resulting value. Coordinate determination S1 S2 D Applicable model: (coordinates of different points)
  • Page 140 4 Instructions 4.4.4 Table Operations Element Assignment for the Setting Data Table Assume that the number of coordinate [S2] points is 5. X coordinate [S2+1] Point 1 Y coordinate [S2+2] X coordinate [S2+3] Point 2 Y coordinate [S2+4] X coordinate [S2+5] Point 3 Y coordinate...
  • Page 141 4.4.4 Table Operations 4 Instructions ◆ Application SCL2: Coordinate determination 2 (X and Y coordinates) ◆ Overview The SCL2 instruction determines the coordinates of an input value based on the designated data table and outputs the resulting value. Coordinate SCL2 S1 S2 D determination 2 Applicable model:...
  • Page 142 4 Instructions 4.4.4 Table Operations The instruction is executed as follows: Point 2 Output value Point 1 Point 5 Point 3 [S] Input value Point 4 Valid input range The [S2] data organizational form in the 16-bit instruction is as follows: Element Assignment for the Setting Data Table...
  • Page 143: Exponent Operations

    4.4.5 Exponent Operations 4 Instructions An error is returned in the following conditions. The error flag M8067 is set to ON to identify this error and the error code is stored in D8067. • Error 6706 is returned when the x coordinates of table data are not sorted in ascending order. •...
  • Page 144: Binary Floating-Point Natural Logarithm

    4 Instructions 4.4.5 Exponent Operations ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number Y M T C S SM D R C SD KnX KnY KnM KnS KnSM Modification Y M T C S SM D R C SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 145 4.4.5 Exponent Operations 4 Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number Y M T S SM D R C SD KnX KnY KnM KnS KnSM Modification Y M T S SM D R C SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 146: Esqr Binary Floating-Point Square Root Operation

    4 Instructions 4.4.5 Exponent Operations ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number Y M T C SD KnX KnY KnM KnS KnSM Modification Y M T C SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 147 4.4.5 Exponent Operations 4 Instructions ◆ Function The square root of a binary floating-point number is calculated. If the constant K or H is used as the operand S, the value is converted to a floating-point number before square root calculation. The zero flag M8020 is set if the result of the calculation is 0.
  • Page 148: Floating-Point Weight Instruction

    4 Instructions 4.4.5 Exponent Operations Example: SQR D0 D12 If D0 = K100, then D12 = K10 when X2 = ON. If D0 = K110, then D12 = K10 when X2 = ON and the fractional part is discarded. POW: Floating-point weight instruction ◆...
  • Page 149: Integer Format

    4.4.5 Exponent Operations 4 Instructions 4.5 Data Processing Conversion from binary floating-point number format to BIN integer format Conversion from binary to BCD format Conversion from BCD to binary format Conversion from binary integer format to binary floating- point number format EBCD Conversion from binary to decimal floating-point number format...
  • Page 150: Data Conversion

    4 Instructions 4.5.1 Data Conversion SWAP Higher and lower byte swap ON bit check Total number of ON bits Other data processing Random number generation Data exchange Annunciator setting Annunciator reset 4.5.1 Data Conversion Conversion from binary floating-point number format to BIN integer format Conversion from binary to BCD format Conversion from BCD to binary format...
  • Page 151: Bcd Conversion From Binary To Bcd Format

    4.5.1 Data Conversion 4 Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number S SM D R C SD KnX KnY KnM KnS KnSM Modification S SM D R C SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 152: Bin Conversion From Bcd To Binary Format

    4 Instructions 4.5.1 Data Conversion ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number SM D R T C SD KnX KnY KnM KnS KnSM Modification SM D R T C SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 153 4.5.1 Data Conversion 4 Instructions ◆ Function The BIN instruction requires contact driving and has two operands. It converts the BCD value in S to a BIN number. The result is stored in D. The instruction is generally used to convert the data (for example, encoder disk setting) read by external ports to BIN data that can be directly used in operation.
  • Page 154: Number Format

    4 Instructions 4.5.1 Data Conversion Example 1: FLT D10 D120 DFLT D20 D130 When M8 = ON, the 16-bit BIN integer in D10 is converted to a binary floating-point number. The result is stored in (D121, D120). When M10 = ON, the 32-bit BIN integer in (D21, D20) is converted to a binary floating-point number.
  • Page 155: Ebin Conversion From Decimal To Binary Floating-Point Number

    4.5.1 Data Conversion 4 Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R C SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 156: Decimal Floating-Point Number

    4 Instructions 4.5.1 Data Conversion ◆ Function Decimal floating-point numbers are converted to binary equivalents. Example: K3142 D10〕 〔MOVP D11〕 〔MOVP D2〕 〔DEBIN The decimal floating-point number 3.142 (stored in D11 and D10) is converted to a binary equivalent. The result is stored in (D3, D2).
  • Page 157 4.5.1 Data Conversion 4 Instructions ● The value stored in [S] to [S+2] ranges from –32,768 to +32,767. ● When the number to be converted is positive, the sign (lowest byte) is set to 20H (space). When the number to be converted is negative, the sign is set to 2DH (minus sign). ●...
  • Page 158 4 Instructions 4.5.1 Data Conversion ◆ Application BINDA: Conversion from BIN format to decimal ASCII format ◆ Overview The BINDA instruction converts BIN numbers to ASCII-encoded decimal numbers (30H to 39H). Conversion from BIN BINDA format to decimal Applicable model: ASCII format Input Number of the element that stores the BIN number to...
  • Page 159 4.5.1 Data Conversion 4 Instructions ◆ Function 16-bit instruction ● Every digit of the 16-bit BIN number in [S] is ASCII encoded (30H to 39H) in decimal format. The result is stored in elements from head address [D]. b15------------------b8---b7---------------------b0 [D+0] ASCII ten-thousands place ASCII sign bit ASCII hundreds place...
  • Page 160: Wtob Data Separation By Byte

    4 Instructions 4.5.1 Data Conversion ◆ Application WTOB: Data separation by byte ◆ Overview The WTOB instruction separates consecutive 16-bit data entries byte by byte (every eight bits). Data separation WTOB S D n Applicable model: by byte Source Start number of elements that store the data to be 16-bit instruction (7 data separated byte by byte...
  • Page 161: Btow Data Combination By Byte

    4.5.1 Data Conversion 4 Instructions ◆ Function The 16-bit data in elements from head address [S] is saved to the lower eight bits in each of n elements from head address [D]. The higher eight bits store 00H. The data is stored byte by byte. [ S+0 ] Higher byte Lower byte...
  • Page 162 4 Instructions 4.5.1 Data Conversion ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R...
  • Page 163: Uni 4-Bit Combination Of 16-Bit Data

    4.5.1 Data Conversion 4 Instructions UNI: 4-bit combination of 16-bit data ◆ Overview The UNI instruction combines the lower four bits of each of consecutive 16-bit data entries together. 4-bit combination of UNI S D n Applicable model: 16-bit data Source Start number of elements that store the data to be 16-bit instruction...
  • Page 164: Dis 4-Bit Separation Of 16-Bit Data

    4 Instructions 4.5.1 Data Conversion ◆ Application The lower four bits of each of the three elements from head address D100 are combined into 16-bit data, and the remaining bits are filled with 0s. The result is stored in D120. DIS: 4-bit separation of 16-bit data ◆...
  • Page 165: Asci Conversion From Hex To Ascii Format

    4.5.1 Data Conversion 4 Instructions ◆ Function The 16-bit data in S is separated by every four bits. The data after separation is stored in the lower four bits of each of the elements from head address D. The other 12 bits are filled with 0s. n ranges from 1 to 4.
  • Page 166 4 Instructions 4.5.1 Data Conversion ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number S SM D R C SD KnX KnY KnM KnS KnSM Modification S SM D R C SD KnX KnY KnM KnS KnSM Modification S SM D R C SD KnX KnY KnM KnS KnSM...
  • Page 167 4.5.1 Data Conversion 4 Instructions D 10=1234H 0 0 0 1 0 1 0 0 0 0 1 0 0 D 11=8765H 1 0 0 0 1 1 1 0 1 0 1 0 1 Bit composition when M8161 = OFF and n = 5 Bit composition when M8161 = OFF and n = 6 Conversion of D10 and D11 Conversion of D10 and D11...
  • Page 168: Hex Conversion From Ascii To Hex Format

    4 Instructions 4.5.1 Data Conversion HEX: Conversion from ASCII to HEX format ◆ Overview The HEX instruction converts the values of variables from head address S to hexadecimal equivalents. The result is stored in variables from head address D. The number of converted characters and storage mode are configurable.
  • Page 169 4.5.1 Data Conversion 4 Instructions Example: D100 Data from head M8161 = OFF, 16-bit mode M8161 = ON, 8-bit mode address D100: D 1 0 0 D 1 00 D 1 0 1 D 1 0 1 D 1 0 2 D 1 0 2 D 1 0 3 D 1 0 3...
  • Page 170: Data Transfer

    4 Instructions 4.5.2 Data Transfer 4.5.2 Data Transfer MOV: Value transfer ◆ Overview The MOV instruction copies the data at the source address S to the destination address D. MOV S D Value transfer Applicable model: Data to be transferred, or address of the word 16-bit instruction 32-bit instruction (9 Data source...
  • Page 171: Emov Binary Floating Point Transfer

    4.5.2 Data Transfer 4 Instructions EMOV: Binary floating point transfer ◆ Overview The EMOV instruction transfers binary floating-point numbers. Contact driving is required. After the instruction is executed, the value of the binary floating-point number in S is copied to D. Binary floating EMOV S D Applicable model:...
  • Page 172: Smov Shifted Transfer

    4 Instructions 4.5.2 Data Transfer SMOV: Shifted transfer ◆ Overview The SMOV instruction transfers m2 bits starting from the m1th bit in S to m2 bits starting from the nth bit in D. SMOV S m1 m2 D n Shifted transfer Applicable model: Address of the word element that stores Data source...
  • Page 173: Bmov Batch Data Transfer

    4.5.2 Data Transfer 4 Instructions ◆ Example: When M4 = 0, the calculation is as follows: D8 (binary 16-bit) (Automatic conversion) D8 (BCD 4-bit) (Bit shift) (Unchanged) (Unchanged) D2 (BCD 4-bit) (Automatic conversion) D2 (binary 16-bit) When M4 = 1, the calculation is as follows: D8 (hexadecimal 4-bit) (Bit shift) (Unchanged)
  • Page 174: Fmov One-To-Multiple Data Transfer

    4 Instructions 4.5.2 Data Transfer ◆ Function The BMOV instruction requires contact driving and has three operands. It copies the values of n variables from head address S to n units from head address D. The value of n ranges from 1 to 512. When the special variable M8024 is set to 1, the batch transfer direction is inverted.
  • Page 175: Cml Inverted Data Transfer

    4.5.2 Data Transfer 4 Instructions ◆ Function The FMOV instruction requires contact driving and has three operands. It copies the data in S to n units from head address D. The value of n ranges from 1 to 512. FMOV is a 16-bit multi-point transfer instruction, whereas DFMOV is 32-bit. ◆...
  • Page 176 4 Instructions 4.5.2 Data Transfer Example 1: Ladder chart Instruction list CML D0 D10 CML D0 D10 0 1 0 0 1 0 1 0 1 0 0 1 0 1 1 0 1 1 0 1 1 0 1 0 1 0 Example 2: The preceding two programs can be executed by the CML instruction as follows:...
  • Page 177 4.5.2 Data Transfer 4 Instructions ◆ Function The data of index registers Z0–Z7 and V0–V7 is copied in batches to elements from head address [D]. The number of batch storing times is incremented by 1 on every execution of the instruction. Use the ZPOP instruction to read the data copied by the ZPUSH instruction.
  • Page 178 4 Instructions 4.5.2 Data Transfer ◆ Application ● The data of V and Z is as follows: The result of an execution is as follows. R100 indicates the number of batch storing times, and R101 to R116 store the values of index registers.
  • Page 179 4.5.2 Data Transfer 4 Instructions ZPOP: Index register batch recovery ◆ Overview The ZPOP instruction recovers the content of index registers V0–V7 and Z0–Z7 that is copied by the ZPUSH instruction for temporary storage. Index register ZPOP D Applicable model: batch recovery 16-bit instruction (3 steps)
  • Page 180: Zrst Full Data Reset

    4 Instructions 4.5.3 Table Operation ● After the ZPOP instruction is executed, the data in R101 to R116 is copied to the corresponding index registers, and the value 1 in R100 changes to 0. 4.5.3 Table Operation ZRST Full data reset SORT Data sorting SORT2...
  • Page 181: Full Data Reset

    4.5.3 Table Operation 4 Instructions ZRST: Full data reset ◆ Overview The ZRST instruction resets data in batches. ZRST D1 D2 Full data reset Applicable model: Batch 16-bit instruction Head address of elements whose data will be reset in reset head (5 steps) batches address...
  • Page 182: Sort Data Sorting

    4 Instructions 4.5.3 Table Operation ◆ Additional information The bit elements Y, M, and S and the word elements T, C, and D can also use the RST instruction for data reset. The word elements T, C, and D and the bit registers KnY, KnM, and KnS can also use the FMOV instruction for multi-point data clearance.
  • Page 183 4.5.3 Table Operation 4 Instructions ◆ Function The parameters in the nth column of a range of arrays which occupy an area of m1 (rows) x m2 (columns) from head address S are sorted. The result is stored in a variable area from head address D. S is the start unit for the first variable in the first row (or record).
  • Page 184: Sort2: Data Sorting 2

    4 Instructions 4.5.3 Table Operation SORT2: Data sorting 2 ◆ Overview The SORT2 instruction sorts the data of the designated column in ascending or descending order by row. Data is stored consecutively by row for easy addition of row data. SORT2 S m1 m2 D n Data sorting 2 Applicable model:...
  • Page 185 4.5.3 Table Operation 4 Instructions ● Before sorting Row Number Column Number ● Table data after sorted in ascending order based on the second column Row Number Column Number ◆ Note: • The operands cannot be modified when the SORT2 instruction is executed. •...
  • Page 186: Ser Data Search

    4 Instructions 4.5.3 Table Operation ◆ Application Data from head address D100 is sorted in ascending order based on the data of the second column. The result is stored in elements from head address R100. SER: Data search ◆ Overview When driving conditions are met, the SER instruction searches k data entries from head address S1 to find the address of the data compliant with the condition set in D2.
  • Page 187 4.5.3 Table Operation 4 Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number S SM D SD KnX KnY KnM KnS KnSM Modification S SM D SD KnX KnY KnM KnS KnSM Modification S SM D SD KnX KnY KnM KnS KnSM...
  • Page 188 4 Instructions 4.5.3 Table Operation FDEL: Deletion of data from a table ◆ Overview The FDEL instruction deletes any data from a table. Deletion of data FDEL S D n Applicable model: from a table Number of the element that stores the data to be Deleted data deleted 16-bit instruction (7...
  • Page 189 4.5.3 Table Operation 4 Instructions ◆ Application ● Before execution of the instruction ● After execution of the instruction...
  • Page 190 4 Instructions 4.5.3 Table Operation FINS: Insertion of data to a table ◆ Overview The FINS instruction inserts data at any position in a table. Insertion of data FINS Applicable model: to a table Number of the element that stores the data to be Inserted data inserted 7-bit instruction (5...
  • Page 191 4.5.3 Table Operation 4 Instructions 1. Error 6705 is returned when the number of stored data entries is out of range. 2. Error 6705 is returned when the table after data insertion is out of range. 3. Error 6706 is returned when n > [D]. 4.
  • Page 192 4 Instructions 4.5.3 Table Operation POP: Last-in data read ◆ Overview The POP instruction reads the data that is last written by the SFWR instruction which is used for shifted write operation with first in last out (FILO) control. Last-in data read Applicable model: Start number of elements that store first-in data (including pointer data)
  • Page 193 4.5.3 Table Operation 4 Instructions Data area Pointer [S]+3 [S]+2 [S]+n-1 [S]+n-2 [S]+6 [S]+5 [S]+4 [S]+1 Data area unchanged Pointer [S]+n-1 [S]+n-2 [S]+6 [S]+5 [S]+4 [S]+3 [S]+2 [S]+1 When the pointer in [S] is 0, the zero flag M8020 is set to ON and the POP instruction is not executed. Use a comparison instruction to check whether the pointer is in the range 1 ≤...
  • Page 194: Ramp Ramp Instruction

    4 Instructions 4.5.3 Table Operation RAMP: Ramp instruction ◆ Overview When driving conditions are met, the RAMP instruction changes the value in D linearly from S1 to S2 after a number (indicated by S3) of scan cycles are completed. RAMP S1 S2 D n Ramp instruction Applicable model: Start...
  • Page 195: Data Rotation And Shift

    4.5.4 Data Rotation and Shift 4 Instructions The RAMP instruction has two modes, which mode to use is selected by the M8026 flag. M8029 is set to ON when interpolation is completed. The execution is shown as follows: 〔RAMP D10 D11 D12 K100 〕...
  • Page 196 4 Instructions 4.5.4 Data Rotation and Shift ROR: Rotation right ◆ Overview When driving conditions are met, the bit pattern in D is rotated K bit places to the right on every execution of the ROR instruction. The lower bits that are rotated out of D fill the higher bits of D. ROR D n Rotation right Applicable model:...
  • Page 197 4.5.4 Data Rotation and Shift 4 Instructions ROL: Rotation left ◆ Overview When driving conditions are met, the bit pattern in D is rotated K bit places to the left on every execution of the ROL instruction. The higher bits that are rotated out of D fill the lower bits of D. ROL D n Rotation left Applicable model:...
  • Page 198 4 Instructions 4.5.4 Data Rotation and Shift RCR: Rotation right with carry ◆ Overview When driving conditions are met, the bit pattern in D with the carry flag M8022 is rotated K bit places to the right on every execution of the RCR instruction. The lower bits with the carry flag that are rotated out of D fill the higher bits of D.
  • Page 199 4.5.4 Data Rotation and Shift 4 Instructions RCL: Rotation left with carry ◆ Overview When driving conditions are met, the bit pattern in D with the carry flag M8022 is rotated K bit places to the left on every execution of the ROL instruction. The higher bits with the carry flag that are rotated out of D fill the lower bits of D.
  • Page 200 4 Instructions 4.5.4 Data Rotation and Shift SFTR: Bit shift right ◆ Overview When driving conditions are met, the SFTR instruction shifts a combination of bit elements with a length of K1 from head address D to the right by K2 bit places, to accommodate a combination of bit elements with a length of K2 from head address S that fill the higher bits.
  • Page 201 4.5.4 Data Rotation and Shift 4 Instructions SFTL: Bit shift left ◆ Overview When driving conditions are met, the SFTL instruction shifts a combination of bit elements with a length of K1 from head address D to the left by K2 bit places, to accommodate a combination of bit elements with a length of K2 from head address S that fill the lower bits.
  • Page 202 4 Instructions 4.5.4 Data Rotation and Shift Example: M15 ~ M12 Overflow M 11~ M 8 M 15~ M 12 M 7~ M 4 M 11~ M 8 SFTLP X0 M0 K16 K4 M 3~ M 0 M 7~ M 4 X 20 X3~X0 M 3~ M 0...
  • Page 203 4.5.4 Data Rotation and Shift 4 Instructions ◆ Function n1 word variables from head address D are shifted n2 word places to the right, to accommodate n2 word variables from head address S that fill the higher words. The instruction of the pulse execution type is generally used.
  • Page 204 4 Instructions 4.5.4 Data Rotation and Shift ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number Y M T C S SM D R C SD KnX KnY KnM KnS KnSM Modification Y M T C S SM D R C SD KnX KnY KnM KnS KnSM Modification...
  • Page 205 4.5.4 Data Rotation and Shift 4 Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification...
  • Page 206 4 Instructions 4.5.4 Data Rotation and Shift ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification...
  • Page 207 4.5.4 Data Rotation and Shift 4 Instructions ◆ Function The 16 bits of the word with the carry flag in the element [D] are shifted n bit places to the right. n is a number in the range 0 to 15. When n ≥...
  • Page 208 4 Instructions 4.5.4 Data Rotation and Shift SFL: 16-bit data shift left with carry by n bits ◆ Overview The SFL instruction shifts the 16 bits of a word element to the left by n bit places. 16-bit data shift left with carry by Applicable model: n bits...
  • Page 209: Other Data Processing

    4.5.5 Other Data Processing 4 Instructions ◆ Application ● Before execution of the instruction ● After execution of the instruction 4.5.5 Other Data Processing SWAP: Higher and lower byte swap ◆ Overview The SWAP instruction exchanges the higher and lower bytes of the variable in S. Higher and lower SWAP S Applicable model:...
  • Page 210 4 Instructions 4.5.5 Other Data Processing ◆ Function The higher and lower bytes of the variable in S are exchanged. In 16-bit operation, the higher eight bits and the lower eight bits are exchanged. In 32-bit operation, the higher eight bits and the lower eight bits of two registers are exchanged. The instruction of the pulse execution type is generally used.
  • Page 211: Sum Total Number Of On Bits

    4.5.5 Other Data Processing 4 Instructions ◆ Function The status of the nth bit in S is checked. The result is stored in D. Example: BON D10 M10 K14 M10 is set when the (n = 14)th bit in D10 is 1. M 10=ON M10 is reset when the (n = 14)th bit in D10 is 0.
  • Page 212 4 Instructions 4.5.5 Other Data Processing Example: Bits with a value of 1 in D1 are counted. SUM D1 D2 The result is stored in D2. RND: Random number generation ◆ Overview The RND instruction generates random numbers. Random number RND D Applicable model: generation...
  • Page 213: Xch Data Exchange

    4.5.5 Other Data Processing 4 Instructions XCH: Data exchange ◆ Overview When driving conditions are met, the XCH instruction exchanges the data in S and D. XCH S D Data exchange Applicable model: 16-bit instruction 32-bit instruction (9 Data 1 Word element 1 that stores the data to be exchanged (5 steps) steps)
  • Page 214 4 Instructions 4.5.5 Other Data Processing ANS: Annunciator setting ◆ Overview When driving conditions are met, the ANS instruction starts the timer in S. When the timer completes its cycle K, the selected annunciator flag (D) is set. Annunciator ANS S K D Applicable model: setting Timer T...
  • Page 215: Matrix Instructions

    4.5.5 Other Data Processing 4 Instructions ANR: Annunciator reset ◆ Overview When driving conditions are met, the ANR instruction resets the annunciators in the range S900 to S999 in batches. Annunciator reset Applicable model: 16-bit instruction (1 step) ANR: Continuous No operand execution ANRP: Pulse...
  • Page 216: Matrix Operations

    4 Instructions 4.6.1 Matrix Operations 4.6.1 Matrix Operations Matrix addition operation Matrix subtraction operation MAND Matrix AND operation Matrix OR operation Matrix operations MXOR Matrix XOR operation MXNR Matrix XNR operation MINV Matrix inverse operation Matrix bit status counting operation BK+: Matrix addition operation ◆...
  • Page 217 4.6.1 Matrix Operations 4 Instructions [S1+0] K1111 [S2+0] K1111 [D+0] K2222 [S1+1] K1111 [S2+1] K-2222 [D+1] K-1111 [S1+n-2] K1111 [S2+n-2] K3333 [D+n-2] K4444 [S1+n-1] K1111 [S2+n-1] K4444 [D+n-1] K5555 A signed constant (16- or 32-bit) can be directly set in [S2]. [S1+0] K1111 [D+0]...
  • Page 218: Matrix Operation

    4 Instructions 4.6.1 Matrix Operations BK-: Matrix subtraction operation ◆ Overview The BK- instruction subtracts the BIN number stored at one source address from another in matrix format. Matrix BK- S1 S2 D n subtraction Applicable model: operation Source Start number of elements that store the data address subjected to a subtraction operation 16-bit instruction (9...
  • Page 219: Mand Matrix And Operation

    4.6.1 Matrix Operations 4 Instructions An error is returned in the following conditions. The instruction is not executed. The error flag M8067 is set to ON to identify this error and the error code is stored in D8067. 1. Error 6705 is returned when elements from head addresses [S1] and [S2] are out of range. 2.
  • Page 220 4 Instructions 4.6.1 Matrix Operations ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnY KnM KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM...
  • Page 221: Mor Matrix Or Operation

    4.6.1 Matrix Operations 4 Instructions MOR: Matrix OR operation ◆ Overview The MOR instruction performs OR operation in matrix format. Matrix OR S1 S2 D n Applicable model: operation Matrix 1 Operand element 1 in an operation 16-bit instruction (9 Matrix 2 Operand element 2 in an operation steps)
  • Page 222: Mxor Matrix Xor Operation

    4 Instructions 4.6.1 Matrix Operations ◆ Application MXOR: Matrix XOR operation ◆ Overview The MXOR instruction performs XOR operation in matrix format. Matrix XOR MXOR S1 S2 D n Applicable model: operation Matrix 1 Operand element 1 in an operation 16-bit instruction (9 Matrix 2 Operand element 2 in an operation...
  • Page 223 4.6.1 Matrix Operations 4 Instructions ◆ Function An XOR operation is performed on the bit patterns of the n bytes of data from head addresses [S1] and [S2]. The result is stored in elements from head address [D]. The result is 1 when the values of two bits are different; otherwise, the result is 0. Assume that n = 4.
  • Page 224: Mxnr Matrix Xnr Operation

    4 Instructions 4.6.1 Matrix Operations MXNR: Matrix XNR operation ◆ Overview The MXNR instruction performs XNR operation in matrix format. Matrix XNR MXNR S1 S2 D n Applicable model: operation Matrix 1 Operand element 1 in an operation 16-bit instruction (9 Matrix 2 Operand element 2 in an operation steps)
  • Page 225: Minv Matrix Inverse Operation

    4.6.1 Matrix Operations 4 Instructions ◆ Application MINV: Matrix inverse operation ◆ Overview The MINV instruction inverts the bit pattern of the designated matrix. Matrix inverse MINV S D n Applicable model: operation Matrix Operand element in an operation 16-bit instruction (7 steps) Operation Start number of elements that store the operation...
  • Page 226: Mbc Matrix Bit Status Count

    4 Instructions 4.6.1 Matrix Operations ◆ Function The bit pattern of the n bytes of data from head address [S] is inverted. The result is stored in elements from head address [D]. 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1 [S+0] 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 1 [+1]...
  • Page 227: Matrix Comparison

    4.6.2 Matrix Comparison 4 Instructions ◆ Function Bits with a value of 0 or 1 are counted in a matrix composed of n 16-bit data entries from head address [S]. The result is stored in elements from head address [D]. When M8331 = ON, bits with a value of 1 are counted;...
  • Page 228: Matrix Comparison

    4 Instructions 4.6.2 Matrix Comparison BKCMP=, >, <, <>, <=, and >=: Matrix comparison ◆ Overview These instructions perform matrix comparison based on comparison conditions. Matrix BKCMP# S1 S2 D n Applicable model: comparison Comparative Comparative value, or number of the value element that stores the comparative value 16-bit instruction (9...
  • Page 229: Mcmp Matrix Comparison Operation

    4.6.2 Matrix Comparison 4 Instructions [S2+0] K1111 [D+0] [S2+1] K-2222 [D+1] K1111 [S2+n-2] K500 [D+n-2] [S2+n-1] K3333 [D+n-1] M8333 is set to ON when all of n results from head address [D] are ON. An error is returned in the following conditions. The instruction is not executed. The error flag M8067 is set to ON to identify this error and the error code is stored in D8067.
  • Page 230 4 Instructions 4.6.2 Matrix Comparison ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnSM Modification X Y M T C S SM D R T C SD KnSM Modification X Y M T C S SM D R T C SD...
  • Page 231: Matrix Read/Write

    4.6.3 Matrix Read/Write 4 Instructions ● Flags M8320: Matrix comparison flag. When it is set to OFF, different values are compared; when it is set to ON, same values are compared. M8321: Matrix search end flag. It is set to ON after the last bits from [S1] and [S2] are compared. M8322: Matrix search start flag.
  • Page 232 4 Instructions 4.6.3 Matrix Read/Write 2) The value in [D] ranges from 0 to (16n – 1). If [D] is out of range, the pointer error flag M8324 is set to ON and the instruction is not executed. ◆ Application 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D100 Before...
  • Page 233: Mbwr Matrix Bit Write Operation

    4.6.3 Matrix Read/Write 4 Instructions MBWR: Matrix bit write operation ◆ Overview The MBWR instruction writes bits in a matrix. Matrix bit write MBWR S n D Applicable model: operation Matrix Operand element in an operation 16-bit instruction (7 steps) Number of data entries in an operation;...
  • Page 234: Mbs Matrix Bit Shift Operation

    4 Instructions 4.6.4 Matrix Rotation and Shift The initial value of R100 is set to 45, and writing starts from bit 45 (the 46th bit). M8325 and M8328 (placeholder flag of matrix shift input) are both set to ON. The following results are returned in sequence when M100 switches from OFF to ON: R100 = 45, bit 45 in D102 is set to 1, and the matrix search end flag M8321 is set to OFF.
  • Page 235 4.6.4 Matrix Rotation and Shift 4 Instructions ◆ Function 1) The bit pattern of a matrix composed of n 16-bit data entries in the range [S] to [S + n – 1] is shifted to the left or right. If M8329 is set to ON, the shift direction is right; if it is set to OFF, the shift direction is left.
  • Page 236 4 Instructions 4.6.4 Matrix Rotation and Shift MBR: Matrix bit rotation operation ◆ Overview The MBR instruction rotates bits in a matrix. Matrix bit rotation S D n Applicable model: operation Matrix Operand element in an operation 16-bit instruction (7 steps) Operation Start number of elements that store the operation...
  • Page 237: String Instructions

    4.6.4 Matrix Rotation and Shift 4 Instructions ◆ Application Assume that M8329 = OFF. The bit pattern of the following matrix is rotated to the left: 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D100 Before execution...
  • Page 238 4 Instructions 4.6.4 Matrix Rotation and Shift STR: Conversion from BIN to string format ◆ Overview The STR instruction converts BIN numbers into ASCII-encoded strings. Conversion from STR S1 S2 D Applicable model: BIN to string format Start number of elements that store the total Character 16-bit instruction (7 32-bit instruction...
  • Page 239 4.6.4 Matrix Rotation and Shift 4 Instructions b7-----b0 b15-----b8 ASCII code of the (total character ASCII code of the sign count minus 1)th character All characters ASCII code of the (total character S1+1 Characters in ASCII code of the (total character count minus 2)th character count minus 3)th character the fractional...
  • Page 240: The String

    4 Instructions 4.6.4 Matrix Rotation and Shift Total number of characters Number of characters 12.3 in the fractional part -123 16-bit BIN data Changed to 20H (space) • The string after conversion is appended with 00H to indicate the end of the string. •...
  • Page 241: The String

    4.6.4 Matrix Rotation and Shift 4 Instructions • When the 32-bit BIN number in [S2] is positive, the sign is encoded into 20H (space); when it is negative, the sign is encoded into 2DH (minus sign). • When a number other than 0 is set in [S1+1], a decimal point (2EH) is inserted at the immediate position prior to a number of characters indicated by [S1+1].
  • Page 242: Val Conversion From String To

    4 Instructions 4.6.4 Matrix Rotation and Shift ● Elements from head address [D] for string storage are out of range. (Error code: K6705) ◆ Application When M0 = ON, the 16-bit BIN number in D10 is converted to a string by inserting a decimal point at the position collectively specified by D0 and D1.
  • Page 243 4.6.4 Matrix Rotation and Shift 4 Instructions ◆ Function 16-bit operation (VAL and VALP) ① The string stored in elements from head address [S] is converted to a 16-bit BIN number. The total number of characters contained in the string is stored in [D1], and the number of characters in the fractional part is stored in [D+1].
  • Page 244 4 Instructions 4.6.4 Matrix Rotation and Shift 32-bit operation (DVAL and DVALP) ① The string stored in elements from head address [S] is converted to a 32-bit BIN number. The total number of characters contained in the string is stored in [D1], and the number of characters in the fractional part is stored in [D+1].
  • Page 245 4.6.4 Matrix Rotation and Shift 4 Instructions When a string is converted to a 32-bit BIN number, the spaces (20H) or 0s (30H) between the sign and a set of digits other than 0 are ignored. Total number of characters Total number 0.000543212 of characters...
  • Page 246 4 Instructions 4.6.4 Matrix Rotation and Shift b15-----b8 b7-----b0 31(1) 2DH(-) -1654 2EH(.) 36H(6) 34H(4) 35H(5) 0000H 2) After M0 is set to ON, the string stored in D20 to D24 is converted in integer format to a BIN number. The result is stored in [D1, D0].
  • Page 247 4.6.4 Matrix Rotation and Shift 4 Instructions ◆ Function 32-bit operation (DESTR) The binary floating-point number in [S+1, S] is converted to a string based on the content of [S2, S2+1, S2+2]. The result is stored in elements from head address D. 0: Decimal form The conversion result varies 1: Exponential form...
  • Page 248 4 Instructions 4.6.4 Matrix Rotation and Shift ● The total number of characters (max.: 24) is specified in [S2+1] based on the following rules: Total number of characters ≥ 6 when the number of characters in the fractional part is equal to 0 Total number of characters ≥...
  • Page 249 4.6.4 Matrix Rotation and Shift 4 Instructions When M100 = ON, the binary floating-point number in D0 and D1 is converted based on the content (exponential form) of D10 to D12.The result is stored in elements from head address D20. b7-----b0 b15-----b8 Exponential form...
  • Page 250 4 Instructions 4.6.4 Matrix Rotation and Shift ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnSM Modification X Y M T C S SM D R T C SD KnX KnSM Modification Note: The elements in gray background are supported.
  • Page 251 4.6.4 Matrix Rotation and Shift 4 Instructions If the source string contains more than seven characters excluding the sign, decimal point, and exponent, the eighth character and subsequent ones are discarded. -2.563697453 Discarded -1.35689004E-6 Discarded ● In decimal form, if the sign is encoded into 2BH (plus sign) in [S] or omitted, the string is converted to a positive number.
  • Page 252 4 Instructions 4.6.4 Matrix Rotation and Shift ◆ Application 1) When M101 = ON, the string stored in elements from head address D0 is converted to a binary floating- point number (in decimal form). The result is stored in D10 and D11. b7-----b0 b15-----b8 2DH(-)
  • Page 253: String Combination

    4.6.4 Matrix Rotation and Shift 4 Instructions $+: String combination ◆ Overview The $+ instruction connects strings together. $+ S1 S2 D String combination Applicable model: String to be Start number of elements that store the source appended string to be appended with another string, or a with another directly designated string 16-bit instruction (7...
  • Page 254 4 Instructions 4.6.4 Matrix Rotation and Shift • When the number of characters contained in the new string is even, 0000H is stored in the element after the one that stores the last character. • When the value in [S1] or [S2] starts from 00H (which indicates the number of characters is 0), 0000H is stored in [D].
  • Page 255 4.6.4 Matrix Rotation and Shift 4 Instructions LEN: String length check ◆ Overview The LEN instruction counts the characters (bytes) contained in a designated string.. LEN S D String length check Applicable model: Checked Start number of elements that store the string whose 16-bit instruction (5 data characters will be counted...
  • Page 256 4 Instructions 4.6.4 Matrix Rotation and Shift INSTR: String retrieval ◆ Overview The INSTR instruction retrieves one string from another. String INSTR S1 S2 D n Applicable model: retrieval Start number of elements that store the string to be Source data retrieved 16-bit instruction (7 Retrieval...
  • Page 257 4.6.4 Matrix Rotation and Shift 4 Instructions String to be Source string retrieved b15-----b8 b7-----b0 “AB” 32H (2) 31H (1) Search starting from the third 34H (4) 33H (3) S2+1 character (n = 3) Fifth character counted from 42H (B) 41H (A) D100 S2+2...
  • Page 258 4 Instructions 4.6.4 Matrix Rotation and Shift RIGHT: String read right ◆ Overview The RIGHT instruction retrieves a designated number of characters at the right end of a string. RIGHT S D n String read right Applicable model: Source data Start number of elements that store a string 16-bit instruction (7 steps)
  • Page 259 4.6.4 Matrix Rotation and Shift 4 Instructions An error is returned in the following conditions. The error flag M8067 is set to ON to identify this error and the error code is stored in D8067. 1. Error 6705 is returned due to out-of-range search when 00H is not found in elements from head address [S].
  • Page 260 4 Instructions 4.6.4 Matrix Rotation and Shift ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnSM Modification X Y M T C S SM D R T C SD KnX KnSM Modification X Y M T C S SM D R T C SD KnX...
  • Page 261 4.6.4 Matrix Rotation and Shift 4 Instructions ◆ Application MIDR: Reading of one string from another ◆ Overview The MIDR instruction reads one string from another. Reading of one string from MIDR S1 D S2 Applicable model: another Source data Start number of elements that store a string 16-bit instruction (7 Retrieval...
  • Page 262 4 Instructions 4.6.4 Matrix Rotation and Shift ◆ Function A number (indicated by [S2+1]) of characters starting from the character indicated by [S2] are retrieved at the left end (beginning) of a string from head address [S1]. The result is stored in elements from head address [D].
  • Page 263 4.6.4 Matrix Rotation and Shift 4 Instructions MIDW: String replacement at any position ◆ Overview The MIDW instruction replaces one string with another contained in a designated string. String replacement at any MIDW S1 D S2 Applicable model: position Start number of elements that store the string that will Source data replace another string 16-bit instruction (7...
  • Page 264 4 Instructions 4.6.4 Matrix Rotation and Shift The character indicated by [S2] and subsequent characters contained in the string from head address [D] are replaced by a number (indicated by [S2+1]) of characters at the left end (beginning) of the string from head address [S1].
  • Page 265: Mov String Transfer

    4.6.4 Matrix Rotation and Shift 4 Instructions $MOV: String transfer ◆ Overview The $MOV instruction transfers strings. String $MOV Applicable model: transfer String (which contains a maximum of 32 characters) 16-bit instruction (5 Source directly designated in the transfer source, or start steps) address number of elements that store the a string...
  • Page 266: Clock Instructions

    4 Instructions 4.6.4 Matrix Rotation and Shift The string from head address [S] is copied to elements from head address [D]. All characters of the string that starts from [S] and ends with the first 00H are transferred at a time, together with the terminator 00H or 0000H.
  • Page 267: Tcmp Clock Data Comparison

    4.8.1 Clock Comparison Output 4 Instructions 4.8.1 Clock Comparison Output TCMP: Clock data comparison ◆ Overview The TCMP instruction compares the specified time (hours:minutes:seconds) with the time of an internal real-time clock and outputs the comparison result. Clock data TCMP S1 S2 S3 S D Applicable model: comparison Hours...
  • Page 268: Tzcp Clock Data Range Comparison

    4 Instructions 4.8.1 Clock Comparison Output Example: TCMP 12 (Hours) D10 (Hours) M20 (hours) = ON 30 (Minutes) D11 (Minutes) 45 (Seconds) D12 (Seconds) 12 (Hours) D10 (Hours) M21 (hours) = ON 30 (Minutes) D11 (Minutes) 45 (Seconds) D12 (Seconds) 12 (Hours) D10 (Hours) M22 (hours) = ON...
  • Page 269: Clock Operations

    4.8.2 Clock Operations 4 Instructions ◆ Function The time of an internal real-time clock is compared with a time range defined by two time values in hours:minutes: seconds format. The result is stored in three consecutive variable units. Example: TZCP D10 (Hours) D40 (Hours) D11 (Minutes)
  • Page 270: Tsub Clock Data Subtraction Operation

    4 Instructions 4.8.2 Clock Operations ◆ Function Two time values in hours:minutes:seconds format are added together. The result is stored in designated variables. If the addition of two time values results in a value greater than 24 hours, the carry flag M8022 is set to ON and the actually displayed time is equal to the addition result minus 24:00:00.
  • Page 271: Clock Conversion

    4.8.3 Clock Conversion 4 Instructions ◆ Function One time value is subtracted from another in hours:minutes:seconds format. The result is stored in designated variables. If the subtraction of two time values results in a negative value, the borrow flag M8021 is set to ON and the actually displayed time is equal to the subtraction result plus 24:00:00.
  • Page 272 4 Instructions 4.8.3 Clock Conversion ◆ Function 16-bit instruction The time value in hours:minutes:seconds format stored in [S, S+1, S+2] is converted to seconds. The result is stored in D. Hours' range: 0 to 9 Minutes' range: 0 to 59 Seconds' range: 0 to 59 32-bit instruction The time value in hours:minutes:seconds format stored in [S, S+1, S+2] is converted to seconds.
  • Page 273: Conversion From Seconds

    4.8.3 Clock Conversion 4 Instructions STOH: Conversion from seconds to hours:minutes:seconds format ◆ Overview The STOH instruction converts time values represented in seconds to the hours:minutes:seconds format. Conversion from seconds STOH S D to hours:minutes:seconds Applicable model: format Source Number of the element that stores a time value 16-bit instruction (5 32-bit instruction (9 data...
  • Page 274: Clock Read/Write

    4 Instructions 4.8.4 Clock Read/Write ◆ Application The seconds in D100 are converted to the hours:minutes:seconds format. The result is stored in R100, R101, and R102. 4.8.4 Clock Read/Write TRD: Clock data read ◆ Overview The TRD instruction reads the current time and date of the internal real-time clock of the PLC. The time and date include the year, month, date, hours, minutes, seconds, and day, which are stored in designated registers.
  • Page 275: Twr Clock Data Write

    4.8.4 Clock Read/Write 4 Instructions Example: D0 〕 〔TRD Operation: Item System Variable D After Operation Year (2000–2099) D8018 → Month (1–12) D8017 → Date (1–31) D8016 → Hours (0–23) D8015 → Minutes (0–59) D8014 → Seconds (0–59) D8013 → Day (0–6: Sun–Sat) D8019 →...
  • Page 276: Hour Hour Meter

    4 Instructions 4.8.5 Timing Item Data Source D System Variable Year (2000–2099) → D8018 Month (1–12) → D8017 Date (1–31) → D8016 Hours (0–23) → D8015 Minutes (0–59) → D8014 Seconds (0–59) → D8013 Day (0–6: Sun–Sat) → D8019 All the seven data entries year, month, date, hours, minutes, seconds, and day are used to set a new current value of the real-time clock.
  • Page 277 4.8.5 Timing 4 Instructions HOUR S D1 D2 Hour meter Applicable model: Preset time, measured in hours. When the cumulative Preset time time reaches the preset one, a designated output becomes active. 16-bit instruction 32-bit instruction (7 steps) Cumulative (13 steps) Start number of units that store the cumulative time HOUR: time...
  • Page 278 4 Instructions 4.8.5 Timing to increase. Timing stops when the current time value in D300 reaches 32,767 hours or the value in D301 reaches 3599s. To restart timing, clear the values in D300 and D301. TTMR: Teaching timer ◆ Overview The TTMR instruction measures the duration when driving conditions remain ON.
  • Page 279: Stmr Special Timer

    4.8.5 Timing 4 Instructions Assume that the key hold time of X10 is T seconds. The following table lists the relationships among D10, D11, and n. D11 (unit: 100 ms) K0 (unit: s) 1 x T D11 = D10 x 10 K1 (unit: 100 ms) 10 x T D11 = D10...
  • Page 280 4 Instructions 4.8.5 Timing ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification...
  • Page 281: Duty Timing Pulse Generation

    4.8.5 Timing 4 Instructions DUTY: Timing pulse generation ◆ Overview The DUTY instruction considers the period required to complete a specified number of operations as one cycle and generates timed signals. Timing pulse DUTY S1 S2 D Applicable model: generation ON cycle Number of scan (operation) cycles mapping the ON count...
  • Page 282: High-Speed Input, Pulse Positioning, And Communication Positioning

    4 Instructions 4.8.5 Timing Reserved by the system 4.9 High-speed Input, Pulse Positioning, and Communication Positioning HSCS (High-speed counter) Comparison setting HSCR (High-speed counter) Comparison reset (High-speed counter) Range comparison High-speed comparison HSOS High-speed interrupt comparison setting HSOR High-speed interrupt comparison reset HSTP High-speed comparative interrupt output Pulse input...
  • Page 283: High-Speed Comparison

    4.9.1 High-speed Comparison 4 Instructions 4.9.1 High-speed Comparison [Note] HSCS (High-speed counter) Comparison setting [Note] HSCR (High-speed counter) Comparison reset (High-speed counter) Range comparison [Note] High-speed interrupt comparison setting (only applicable HSOS High-speed comparison to the H3U-PM motion control model) High-speed interrupt comparison reset (only applicable to HSOR the H3U-PM motion control model)
  • Page 284 4 Instructions 4.9.5 Communication Positioning 4.9.5 Communication Positioning AXISENAB Axis enabling AXISSTOP Axis positioning stop AXISESTOP Axis emergency stop (used for stopping the servo in case of exceptions) Communication positioning (manipulator) AXISDRVA Absolute axis positioning AXISZRN Axis zero return AXISJOGA Axis jog AXISALMRST Axis alarm reset...
  • Page 285 4.9.5 Communication Positioning 4 Instructions Pulse Count Servo Rotational Current Axis Current Axis Setting of Axis Corresponding to Speed Corresponding Axis Position Display Speed Display Positioning Unit Mechanical to Unit Mechanical Number (Floating-point (Floating-point Deviation Pulse Displacement Speed (Floating-point Number/Integer) Number/Integer) Count (Integer) (Floating-point...
  • Page 286: Axisenab Axis Enabling

    4 Instructions 4.9.5 Communication Positioning Effective VDI H31-00 Bit Function Description Bit 0 S-ON Enabled Bit 1 JOGCMD+ Forward jog Bit 2 JOGCMD- Reverse jog Bit 3 PoslnSen Multi-segment enabled Bit 4 HomingStart Home attaining Bit 5 EmergencyStop Emergency stop Bit 6 ALM-RST Alarm reset...
  • Page 287 4.9.5 Communication Positioning 4 Instructions ◆ Function The servo that corresponds to a designated station or axis number is enabled when the flow is active. The servo can be kept enabled during normal use. The axis number must be an immediate value. ◆...
  • Page 288 4 Instructions 4.9.5 Communication Positioning occurs during positioning. The axis number must be an immediate value. ● Example Servo enabled in multisegment mode When M1 = 1, servo 1 stops positioning. (The internal multi-segment enabling function of the servo is disabled.) •...
  • Page 289 4.9.5 Communication Positioning 4 Instructions ◆ Example Servo emergency stop bit When M2 = 0, servo 1 disables emergency stop; when M2 = 1, servo 1 enables emergency stop. (The internal emergency stop bit of the servo is driven.) • This instruction can be executed only once for every axis.
  • Page 290 4 Instructions 4.9.5 Communication Positioning ◆ Function ① Axis number: The value ranges from K1 to K16. A maximum of 16 axes are supported. The servo station number must be set to the corresponding axis number. The axis number must be an immediate value.
  • Page 291 4.9.5 Communication Positioning 4 Instructions K1: Axis number D200: Position D202: Speed D210: Acceleration/Deceleration time M170: Positioning completed M171: Positioning incorrect 1) If M5 is disabled during positioning, the servo continues movement toward a destination, but the complete flag M170 is not set. 2) If a servo data write error occurs when the instruction is executed, the servo stops movement and the error flag M171 is set.
  • Page 292 4 Instructions 4.9.5 Communication Positioning ◆ Function ① Axis number: Number of the axis that requires home attaining, in the range K1 to K16. ② Origin position offset: It can be set when necessary. It is typically set to 0 and stored in a D or R element.
  • Page 293: Axisjoga Axis Jog

    4.9.5 Communication Positioning 4 Instructions AXISJOGA: Axis jog ◆ Overview The AXISJOGA instruction implements axis jog based on CANlink. AXISJOGA S1 S2 S3 S4 S5 Axis jog Applicable model: Axis Servo station number, in the range 1 to 16 number 16-bit instruction (11 Jog speed (which occupies four elements and cannot be the Speed...
  • Page 294 4 Instructions 4.9.5 Communication Positioning ◆ Example Net 2 Net Comment (3) Servo rotating (1) Servo (2) Instruction in the forward and not in error reverse directions motion Motion of the servo M50/M51 M100 K1: Axis number D100: Jog speed M50: Forward jog M51: Reverse jog M100: Instruction error...
  • Page 295: Refreshing

    4.9.6 Refreshing 4 Instructions AXISALMRST: Axis alarm reset ◆ Overview The AXISALMRST instruction resets axis alarms based on CANlink. AXISALMRST Axis alarm reset Applicable model: 16-bit instruction (3 steps) Axis Servo station number, in the range 1 to 16 number AXISALMRST: Continuous execution ◆...
  • Page 296: Ref Input/Output Refreshing

    Other I/O ports use hardware filter with a filter time of about 10 ms. For details about related parameters, see the User Guide – H3U Series Programmable Logic Controller (PLC) – Higher Performance & Pulse Motion Control. (Please visit http://www.inovance.cn/es to obtain the latest version.) •...
  • Page 297 4.9.6 Refreshing 4 Instructions ◆ Example 1: 〔REF X0 K16 〕 When the preceding program is executed, if X20 = ON, the input statuses of X0 to X17 are read immediately and input signals are updated. No input delay is incurred. ◆...
  • Page 298: Motion Control

    4 Instructions 4.10.1 H3U Model Interpolation ◆ Example 〔REFF K5 〕 〔REFF K15 〕 / 〔END 〕 When X10 = ON, the input filter time of X0 to X7 is set to 5 ms. When X10 = OFF, the input filter time of X0 to X7 is set to 15 ms.
  • Page 299: Communication Instructions

    4.11.1 Communication Instructions 4 Instructions 4.11 Communication Serial data transfer (For details, see “9.4 Modbus Protocol” on Page 598 “9.5 Modbus Configuration and Usage” on Page 613.) Communication instructions MODBUS Modbus communication (For details, see section “9.4 Modbus Protocol” on Page 598 “9.5 Modbus Configuration and Usage”...
  • Page 300 4 Instructions 4.11.1 Communication Instructions ◆ Function The RS instruction is used for data sending/reception during communication. The data of a designated register area is automatically sent to serial ports in sequence, and then the data received by serial ports is stored in a designated area.
  • Page 301: Modbus Communication

    4.11.1 Communication Instructions 4 Instructions MODBUS: Modbus communication ◆ Overview The MODBUS instruction reads and writes data during Modbus communication. Applicable model: Modbus MODBUS S1 S2 n D communication Communication Slave address (higher byte) and communication command address and (lower byte, defined in the Modbus protocol) parameter number 16-bit instruction (9 steps)
  • Page 302: Verification

    4 Instructions 4.11.2 Verification The MODBUS instruction is used for the communication of Modbus-enabled slave devices (for example, MD320, MD300, and MD280 series AC drives). In example 1, the PLC continuously reads data from registers from head address K100 of slave 1 and stores the data in units from head address D10. Usage: Different from the RS instruction, multiple MODBUS instructions can be executed simultaneously in a program.
  • Page 303 4.11.2 Verification 4 Instructions ● Example: D100 K7〕 〔CCD The M8161 flag determines which variable width mode to use. When M8161 = OFF, the 16-bit mode is enabled, whereby the higher and lower bytes of variables are taken for the operation. When M8161 = ON, the 8-bit mode is enabled, whereby only the lower bytes of variables are taken for the operation and the higher bytes are discarded.
  • Page 304 4 Instructions 4.11.2 Verification CRC: CRC code calculation ◆ Overview A cyclic redundancy check (CRC) is a verification method used during communication. The CRC instruction is used to calculate the CRC code. CRC code CRC S n D Applicable model: calculation Source Head address of elements that store the data for CRC...
  • Page 305 4.11.2 Verification 4 Instructions The program is running M8161 = OFF and the 16-bit conversion mode is enabled. The lower eight bits of elements D100 to D105 are taken for CRC code calculation. The result is stored in the higher eight bits and lower eight bits of D200. LRC: LRC code calculation ◆...
  • Page 306 4 Instructions 4.11.2 Verification ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification...
  • Page 307: Peripheral Instructions

    4.11.2 Verification 4 Instructions 8-bit mode (M8161 = ON) The LRC code is acquired by calculating the two's complement of the sum of values within the range from the communication address to the end of data content. For example: 01 H + 03 H + 21 H + 02 H + 00 H + 02 H = 29 H, and the two's complement of the sum is D7H (which corresponds to the ASCII codes 44H and 37H).
  • Page 308: Pid Calculation

    Position-type PID instruction Calculation Higher-8-bit control instruction S3 + 1 Special instruction (with the same mode selection operation mode 0x02** function as the Inovance AC drive (customized version 307) Occupied S3 + 25…S3 + 30 by internal  -  - operation...
  • Page 309 4.12.1 PID Calculation 4 Instructions ● Incremental PID instruction The following table lists the functions and setting methods of the parameters from head address S3. Unit Function Setting The sampling time ranges from 1 ms to 32,767 ms and must be greater Sampling time (TS) than the PLC's scan cycle.
  • Page 310 4 Instructions 4.12.1 PID Calculation ● Position-type PID instruction (0x01** selected for S3+1) Address Name Setting Range Meaning 1 to 32,767, in S3 + 0 Sampling cycle PID calculation cycle; default value: 10 0x0100: Forward direction (default) S3 + 1 Control mode 0x0101: Reverse direction Proportional...
  • Page 311 4.12.1 PID Calculation 4 Instructions Principle of position-type PID calculation ● PID calculation formula: u(k) = Kp x e(k) + Ki x T x ∑e(i) + (Kd/T) x [Pv(k) – Pv(k-1)] Feedback value Current output u(k) Pv(k-1) at the last time value point e(k)
  • Page 312 4 Instructions 4.12.1 PID Calculation Special instruction (0x02** selected for S3+1, with the same operation principle as the Inovance AC drive (customized version 307) Wire AC Drive Wire Wire Drawing Address Name Setting Range Meaning Function Take-up Take-off Machine Code...
  • Page 313 4.12.1 PID Calculation 4 Instructions Wire AC Drive Wire Wire Drawing Address Name Setting Range Meaning Function Take-up Take-off Machine Code Parameter Parameter Parameter Deviation end point or Upper deviation 0 to 32,767 S3 + 19 user-defined switching FA-20 limit (0.1%) end point Switching reference...
  • Page 314: Bit Switch Access

    4 Instructions 4.12.2 Bit Switch Access 4.12.2 Bit Switch Access Ten key input Hexadecimal key input Bit switch access Digital switch DECO Data decoding ENCO Data encoding TKY: Ten key input ◆ Overview The TKY instruction assigns a 4- or 8-digit value to a word element through 10 consecutive bit elements and drives the corresponding bit elements to act.
  • Page 315 4.12.2 Bit Switch Access 4 Instructions To input 2013, press keys ② , 0 , ① , and ③ (X2, X0, X1, and X3) in sequence. The following figure shows the actions of the PLC's internal variables. • Based on parameter setting, X0 to X11 represent numeric keys 0 to 9, and M0 to M9 indicate the key status.
  • Page 316 4 Instructions 4.12.2 Bit Switch Access ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number S SM D C SD KnX KnY KnM KnS KnSM Modification S SM D C SD KnX KnY KnM KnS KnSM Modification S SM D C SD KnX KnY KnM KnS KnSM...
  • Page 317: Dsw Digital Switch

    4.12.2 Bit Switch Access 4 Instructions DSW: Digital switch ◆ Overview The DSW instruction reads digital switch setting. Applicable model: DSW S D1 D2 n Digital switch If n = 1, Start number of X ports used for key scan input Input port head four consecutive X ports are occupied;...
  • Page 318: Deco Data Decoding

    4 Instructions 4.12.2 Bit Switch Access 〔SET M1〕 〔DSW X0 K2 〕 M8029 〔RST M1〕 DECO: Data decoding ◆ Overview The DECO instruction is used for data decoding. DECO S D n Data decoding Applicable model: Data Address of the word element that stores the source data, 16-bit instruction (7 source to or head address of bit elements...
  • Page 319: Enco Data Encoding

    4.12.2 Bit Switch Access 4 Instructions Example: DECOP D2 D4 K3 DECOP X0 M10 K3 Other bits cleared 7 6 5 4 2 1 0 M17 M16 M15 M14 M13 M12 M11 M10 ENCO: Data encoding ◆ Overview When driving conditions are met, the ENCO instruction converts active (ON) bit elements from head address S or active (ON) bits in a word element to binary numbers.
  • Page 320: 7-Segment Led Display

    4 Instructions 4.12.3 7-segment LED Display Example: ENCOP M10 D10 K3 ENCOP D0 D1 K3 M 16 M 15 M 14 M 13 M 12 M 11 7 6 5 4 2 1 0 Invalid data Cleared Cleared 4.12.3 7-segment LED Display SEGD 7-segment decoding 7-segment LED display...
  • Page 321 4.12.3 7-segment LED Display 4 Instructions Data 7-segment LED Internal Decoding Table Value Decoded Display Combination Character Each bit corresponding to one segment 1 = Segment ON 0 = Segment OFF SEGL: Seven segment with latch ◆ Overview The SEGL instruction drives 4- or 8-digit latched 7-segment LED displays by using 8 or 12 Y ports. The display mode is scan-driven.
  • Page 322 4 Instructions 4.12.3 7-segment LED Display PLC (MT type) COM1 COM2 COM3 Ones Tens Hundreds Thousands place place place place Bit gating Thousands Hundreds Tens Ones Thousands Hundreds Tens Ones place place place place place place place place data First data set Second data set In the preceding hardware wiring diagram, the first 7-segment LED display shows the content of D0, and the second one shows the content of D1.
  • Page 323: Other Peripheral Instructions

    4.12.4 Other Peripheral Instructions 4 Instructions 4.12.4 Other Peripheral Instructions ASCII code conversion ASCII code printing Input matrix PRUN Octal bit transfer ARWS Arrow switch Other peripheral instructions ABSD Absolute cam control mode INCD Incremental cam control mode ROTC Rotary table control Gray code conversion GBIN Gray code inverse conversion...
  • Page 324: Output

    4 Instructions 4.12.4 Other Peripheral Instructions Higher bytes Lower bytes 53 S D200 54 t D201 4F o D202 50 p D203 50 p D204 45 e D205 44 d D206 D207 Appendix: ASCII code mapping table ASCII ASCII ASCII English English Decimal...
  • Page 325 4.12.4 Other Peripheral Instructions 4 Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 326 4 Instructions 4.12.4 Other Peripheral Instructions MTR S D1 D2 n Input matrix Applicable model: Input operand Head address of eight consecutive input bit elements with head address numbers whose lowest bit is 0, such as X0 and X10 16-bit Output operand Head address of n (2 to 8) consecutive output bit elements instruction (9...
  • Page 327: Prun Octal Bit Transfer

    4.12.4 Other Peripheral Instructions 4 Instructions PRUN: Octal bit transfer ◆ Overview The PRUN instruction batch copies consecutive bit variables from head address S1 to a set of bit variables from head address D1. The copy operation uses the octal width unit. PRUN S D Octal bit transfer Applicable model:...
  • Page 328 4 Instructions 4.12.4 Other Peripheral Instructions ARWS: Arrow switch ◆ Overview The ARWS instruction enables easy editing of parameters stored in registers. X ports are used to provide edit keys, and Y ports are used to drive 4-digit 7-segment LED displays. ARWS S D1 D2 n Arrow switch Applicable model:...
  • Page 329: Absd Absolute Cam Control

    4.12.4 Other Peripheral Instructions 4 Instructions -> ones place -> thousands place in sequence. If the forward key (X13) is pressed, the switching sequence is reversed. The cursor position is indicated by the LED indicator connected to the gating pulse signal (Y004 to Y007). 3) Each time the increment key (X11) is pressed, the content pointed by the cursor is changed through 0 ->...
  • Page 330 4 Instructions 4.12.4 Other Peripheral Instructions Example: 〔ABSD D100 C20 M0 K4 〕 M8013 〔C20 K400〕 C20〕 〔RST Assume that related variables are assigned values as follows. When X10 = ON, the execution result is shown in the following figure. Comparison Comparison output status Rising point...
  • Page 331 4.12.4 Other Peripheral Instructions 4 Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM...
  • Page 332 4 Instructions 4.12.4 Other Peripheral Instructions ROTC: Rotary table control ◆ Overview When driving conditions are met, the ROTC instruction aids the movement of a workpiece at a designated position to a specified destination along the optimal path. ROTC S m1 m2 D Rotary table control Applicable model: Counter value...
  • Page 333: Gry Gray Code Conversion

    4.12.4 Other Peripheral Instructions 4 Instructions ◆ Application 〔ROTC D200 K10 K2 M0 〕 The variable space occupied by the preceding code is as follows: Variable Function Operation Used as a counter D200 register Called window number D201 The three units are preset by the user program. setting Called workpiece D202...
  • Page 334: Gbin Gray Code Inverse Conversion

    4 Instructions 4.12.4 Other Peripheral Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 335: Electronic Cam Instructions

    4.12.4 Other Peripheral Instructions 4 Instructions ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM Modification Note: The elements in gray background are supported.
  • Page 336: Spd Pulse Density Detection

    5 High-speed Input 5.1 H3U Standard Model ......5.1.1 High-speed Counter ....5.1.2 Input Interrupts ......5.1.3 Pulse Capture ......5.2 High-speed Pulse Comparison Instructions of H3U Standard Model ..........5.2.1 HSCS Comparison Setting ..5.2.2 HSCR Comparison Reset ..5.2.3 HSZ Range Comparison ...
  • Page 337: H3U Standard Model

    200 kHz 200 kHz 5.1 H3U Standard Model 5.1.1 High-speed Counter As shown in the following table, the built-in high-speed counters of H3U series PLC are assigned to X00 to X07 inputs by number. Single-phase Unidirectional Counter Input Input Assignment...
  • Page 338 5 High-speed Input 5.1.1 High-speed Counter [U]: up counter input; [D]: down counter input; [R]: reset counter input; [S]: start counter input [A]: A-phase pulse input; [B]: B-phase pulse input 1) Special M element for single-phase unidirectional up/down counter Single-phase Unidirectional Counter C235 C236 C237...
  • Page 339 5.1.1 High-speed Counter 5 High-speed Input By enabling quadruplicated frequency with the special M element, A/B phase counters can count at a fundamental or quadruplicated frequency. A/B Phase Counter C251 C252 C253 C254 C255 Enabling quadruplicated M8195 M8196 M8197 M8198 M8199 frequency Counting up at a doubled frequency...
  • Page 340: Input Interrupts

    5 High-speed Input 5.1.2 Input Interrupts 5.1.2 Input Interrupts Input interrupts include interrupts on the rising/falling edge and counter interrupts. Interrupt numbers (Ixxx) are shown below: Interrupt on the Rising/Falling Edge Counter Interrupt H3U Standard Model Port Rising Edge Falling Edge I001 I000 I010...
  • Page 341: Pulse Capture

    5.1.3 Pulse Capture 5 High-speed Input executes the interrupt subprogram (HSCS) and gives priority to control of counting results. High-speed counter interrupt is used when the target output of the HSCS instruction is set to I010–I080. To use the interrupt function, program corresponding interrupt subprograms and turn on the corresponding "Enable Interrupts"...
  • Page 342: High-Speed Pulse Comparison Instructions Of H3U Standard Model

    5 High-speed Input 5.1.3 Pulse Capture Turn on "Enable Global Interrupts" Set "Enable Pulse Capture” The program starts running Enable Pulse Capture at X0 Generate the pulse capture flag and process pulse events Pulse capture flag bit at X0 Clear the pulse capture flag Pulse capture flag bit at X0 Enable Global Interrupts M8080...
  • Page 343: Comparison Setting

    5.2.1 HSCS Comparison Setting 5 High-speed Input 5.2.1 HSCS Comparison Setting ◆ Overview Compare the present value of the counter with the comparison value. If the values are equal, immediately set the comparison output, independent of the scan duration. (High-speed Counter) HSCS S1 S2 D Applicable Model:...
  • Page 344 5 High-speed Input 5.2.1 HSCS Comparison Setting 1) Instruction for use: Before the HSCS instruction is executed, the counter used must have been enabled (see Example 1); otherwise, ● the value of the counter will not change. The counter responds to input signals in interrupt mode and timely compare values. If the compared values are ●...
  • Page 345: Comparison Reset

    5.2.2 HSCR Comparison Reset 5 High-speed Input • With Y output: when the present value of C252 changes from 99 to 100 or from 101 to 100, Y is set to ON immediately and remains ON. Even if values of C252 and K100 are not equal by comparison, Y remains ON, unless there is an additional reset operation.
  • Page 346 5 High-speed Input 5.2.2 HSCR Comparison Reset When the present value of C255 changes from 99 to 100, C255 contact is immediately connected. When the ● instruction is executed at OUT Y10, Y10 will still be affected by the scan cycle and the value will be output after the program execution and I/O refresh are finished.
  • Page 347: Hsz Range Comparison

    5.2.3 HSZ Range Comparison 5 High-speed Input 5.2.3 HSZ Range Comparison ◆ Overview Compare the present value of the counter with the comparison value. If the values are equal, immediately reset the comparison output, independent of the scan duration. (High-speed counter) S1 S2 S D Applicable Model: Range Comparison...
  • Page 348 5 High-speed Input 5.2.3 HSZ Range Comparison • When [D] is set to special auxiliary relay M8130, the instruction is in high-speed table comparison mode, and variables of the instruction will be resolved in table mode. • When [D] is set to the special auxiliary relay M8132, the instruction is in frequency control mode. In combination with DPLSY instruction, it can control the output frequency of DPLSY by the present value of high-speed counter.
  • Page 349 5.2.3 HSZ Range Comparison 5 High-speed Input The following is an equivalent comparison table: ● Comparison Value (32 Bits) The initial variable Y Output Number ON/OFF Table Counter D8130 of [S1] table is D0 (High-order, Low-order) (D1, D0) (D5, D4) The number of rows of [S2] table is K4 (D9, D8)
  • Page 350 5 High-speed Input 5.2.3 HSZ Range Comparison [S1] only corresponds to variables of register D and indicates the head address of the comparison table. V can be used. After the instruction is enabled, [S1] will no longer be affected by V. [S2] can use the constant K or H only to indicate the number of rows of the table.
  • Page 351 5.2.3 HSZ Range Comparison 5 High-speed Input Notes to actions: ● Count value of C251 3000 2000 1500 1000 Y0 output frequency 9000 5000 3000 2000 The preset data is written into data registers constituting the table and the high-speed counter C251 specified by [S] is started by the instruction.
  • Page 352: Spd Pulse Density Detection

    5 High-speed Input 5.2.4 SPD Pulse Density Detection 5.2.4 SPD Pulse Density Detection ◆ Overview The number of pulses at the specified port is detected within the set time for pulse frequency detection. S1 S2 D Pulse density detection Applicable Model: Source data Specified pulse signal input port 16-bit instruction...
  • Page 353 5.2.4 SPD Pulse Density Detection 5 High-speed Input 1) Note: X00 to X07 ports used for the SPD instruction can be used for high-speed counters or interrupt inputs. 2) Example: Notes to actions: ● Measured pulse value within the set time Instant count value in the measured period 1000ms...
  • Page 354: H3U-Pm Motion Control Model

    5 High-speed Input 5.3.1 High-speed Counter 5.3 H3U-PM Motion Control Model 5.3.1 High-speed Counter H3U-PM model has three-channel high-speed inputs. Each channel has two differential inputs, which correspond to the PLC inputs Ax+/-, Bx+/- (x: 1, 2, and 3 indicating X, Y, and Z axes respectively). The three high-speed counters integrated within the PLC correspond to three-channel input counters as follows: High-speed Counter C252...
  • Page 355 5.3.1 High-speed Counter 5 High-speed Input A/B phase counting up at a quadruplicated frequency A/B phase counting down at a quadruplicated frequency CW/CCW counting 3) Use of counters High-speed counters use hardware for counting based on the transition edge of relevant signals, and provide real- ●...
  • Page 356: Input Interrupts

    5 High-speed Input 5.3.2 Input Interrupts 5.3.2 Input Interrupts Input interrupts include interrupts on the rising/falling edge and counter interrupts. The interrupt numbers (Ixxx) are shown below: Interrupts on the Rising/Falling Edge Counter Interrupts I010 Port Rising Edge Falling Edge I020 X-axis PG0 I001...
  • Page 357: Pulse Capture

    5.3.3 Pulse Capture 5 High-speed Input Settings of Enable/Disable Interrupts Enable/Disable I00x M8050 PG input interrupts: Six interrupts Each flag bit corresponds to Enable/ Interrupts correspond to interrupts on the rising/ Disable Interrupt control of one external Enable/Disable I10x falling edge of PG0 to PG2 ports. input.
  • Page 358: High-Speed Comparison Instructions For H3U-Pm Motion Control Model

    5 High-speed Input 5.3.3 Pulse Capture Enable Global Interrupts M8080 Enable Pulse Capture at PG0 PG0 input pulse width should be greater than the high-speed filter time (D8021*0.25 us) M8090 Pulse capture flag Clear the pulse capture flag In this program, turn on the "Enable Global Interrupts", and set Enable Pulse Capture M8080 to ON at PG0. When the external PG0 input switches from OFF to ON, set the pulse capture flag M8090 interrupt to ON.
  • Page 359: Hsz (High-Speed Counter)

    5.4.1 Operation Mode of High-speed Comparison Instructions 5 High-speed Input 5.4.1 Operation Mode of High-speed Comparison Instructions Instruction and usage mode of H3U-PM motion control model: Instruction Comparison Object Comparison Result Output Y, M, and S bit elements HSCS High-speed Counter I010-I080 counter interrupts Starting electronic cams Y, M, and S bit elements...
  • Page 360 5 High-speed Input 5.4.2 HSCS Comparison Setting [S2] variables must be high-speed counters C252–C254. As all counters involved are 32-bit counters, the 32-bit instruction DHSCS must be used. C252 and other 32-bit high-speed counters: Set value Remarks C252 Corresponding to X axis C253 Corresponding to Y axis C254...
  • Page 361 5.4.2 HSCS Comparison Setting 5 High-speed Input For example, if the DHSOS instruction is used by X axis to compare the output value of X axis (K0), the comparison object of the other simultaneously active instruction must be the output value of X axis (K0) and can be neither the position value of the electronic cam (K11) nor the high-speed counter comparison instruction (for C252).
  • Page 362 5 High-speed Input 5.4.2 HSCS Comparison Setting 4) Example 2: Main program: ● The program is running I010 interrupt subprogram ● The program is running The D operand range of the DHSCS instruction can also be specified as I0x0 (x = 1–8). When the counter reaches the set value, interrupt routines are triggered.
  • Page 363: Comparison Reset

    5.4.3 HSCR Comparison Reset 5 High-speed Input 5.4.3 HSCR Comparison Reset ◆ Overview The present value of the counter is compared with the comparison value. If the values are equal, the comparison output is immediately reset, independent of the scan duration. (High-speed counter) HSCR S1 S2 D...
  • Page 364 5 High-speed Input 5.4.3 HSCR Comparison Reset The difference between Y outputs of common instructions and Y outputs of the DHSCR instruction is as follows: (Example 1) When the present value of C252 changes from 99 to 100, C252 contact is immediately connected. When the ●...
  • Page 365: Hsz Range Comparison

    5.4.4 HSZ Range Comparison 5 High-speed Input 4) Example: Action delay of Y10 related to the scan cycle The program is running Immediate action of Y10 5.4.4 HSZ Range Comparison ◆ Overview The present value of the counter is compared with the comparison value. If the values are equal, the comparison output is immediately reset, independent of the scan duration.
  • Page 366 5 High-speed Input 5.4.4 HSZ Range Comparison [D] is the head address of three consecutive storage units for the comparison result: when it is Y0 to Y17 port, the result is immediately output; when it is a port with the number greater than Y20, the result is output after the user program is scanned;...
  • Page 367 5.4.4 HSZ Range Comparison 5 High-speed Input 3) Example: a) Common mode M8000 C252 K100000 The program is running DHSZ K2000 K3000 C252 When the present value of C252 < K2000, Y0 is ON When K2000 ≤ the present value of C252 < K3000, Y1 is ON When the present value of C252 ≥...
  • Page 368 5 High-speed Input 5.4.4 HSZ Range Comparison Notes to actions: ● Count value of C252 M8131 When the present value of a high-speed counter C251 specified by [S] is equal to the set value (D1, D0), the Y output specified by D2 copies the state of OFF (D3 = K0) or ON (D3 = K1) and remains in that state. The action of the Y output is processed completely in interrupt mode.
  • Page 369 5.4.4 HSZ Range Comparison 5 High-speed Input Example: The following describes instruction programming. ● The program is running HSZPLSY speed mode Execute when the DPLSY instruction lags behind the DHSZ instruction by one scan cycle HSZ_PLSY speed and frequency (lower 16 bits) The program controls the operation mode of Y0 output frequency based on the present counting value of C251.
  • Page 370 5 High-speed Input 5.4.4 HSZ Range Comparison Notes to actions: ● Count value of C252 3000 2000 1500 1000 Y0 output frequency 9000 5000 3000 2000 The predetermined data is written into data registers constituting the table and the high-speed counter C251 specified by [S] is started by the instruction.
  • Page 371: Dhsos High-Speed Interrupt Comparison Setting

    5.4.5 DHSOS High-speed Interrupt Comparison Setting 5 High-speed Input 5.4.5 DHSOS High-speed Interrupt Comparison Setting ◆ Overview By high-speed counter interrupt comparison setting, the PLC system sets bit elements, enables counter interrupts, and starts electronic cams. Interrupt comparison DHSOS S1 S2 D Applicable Model: H3U-PM setting Target comparison...
  • Page 372 5 High-speed Input 5.4.5 DHSOS High-speed Interrupt Comparison Setting Set Value Interrupt Output Result Y, M, and S Bit element output I interrupts High-speed counter interrupts SM60 Starting X-axis electronic cam SM160 Starting Y-axis electronic cam SM260 Starting Z-axis electronic cam For starting electronic cams, see Section 8.4.
  • Page 373: Dhsor High-Speed Interrupt Comparison Setting

    5.4.6 DHSOR High-speed Interrupt Comparison Setting 5 High-speed Input 5.4.6 DHSOR High-speed Interrupt Comparison Setting ◆ Overview Bit elements are reset by high-speed interrupt comparison reset. DHSOR S1 S2 D Interrupt comparison reset Applicable model: H3U-PM Target comparison Set interrupt comparison value value 32-bit instruction (13 steps)
  • Page 374 5 High-speed Input 5.4.6 DHSOR High-speed Interrupt Comparison Setting 1) Note: DHSOS and DHSOR can be used for multiple times, but there should be no more than two instructions driven by ● one axis (see the description of comparison objects below). For example: Comparison objects of DHSCS, DHSCR, DHSZ, DHSOS, and DHSOR instructions (see the description of ●...
  • Page 375 6 Positioning and Interpolation 6.1 Overview ........... 6.1.1 Table of Attributes of High-speed Output Instructions ..... 6.1.2 Use of Special Elements ... 6.1.3 Output Frequency-Time Relationship and Acceleration/ Deceleration Process ..... 378 6.2 Positioning Instruction ...... 6.3 Interpolation Instruction ....6.4 High-speed Processing Instruction ...
  • Page 376: Overview

    6 Positioning and Interpolation 6.1.1 Table of Attributes of High-speed Output Instructions Chapter 6 Positioning and Interpolation This chapter describes the H3U-supported positioning instructions in detail. 6.1 Overview Both the positioning instructions and trajectory control are executed through application instructions in the H3U standard models.
  • Page 377: Use Of Special Elements

    6.1.2 Use of Special Elements 6 Positioning and Interpolation • √ (Fixed) indicates that the pulse direction output port is fixed, and √ (M) indicates that the function can be used only after the special element is set. • The acceleration/deceleration of H3U high-speed output instructions is determined by the instruction attribute, and is unrelated to the acceleration/deceleration time.
  • Page 378 6 Positioning and Interpolation 6.1.2 Use of Special Elements The special M elements are defined in the following table. Attribute M8340 M8360 M8380 M8400 M8420 Pulse output status Valid output label for the DSZR/ZRN and M8341 M8361 M8381 M8401 M8421 other clearing signals Designation of DSZR instruction zero M8342...
  • Page 379: Output Frequency-Time Relationship And Acceleration/Deceleration Process

    6.1.3 Output Frequency-Time Relationship and Acceleration/Deceleration Process 6 Positioning and Interpolation Attribute D8354 D8374 D8394 D8414 D8434 Reserved D8355 D8375 D8395 D8415 D8435 Reserved D8356 D8376 D8396 D8416 D8436 Reserved D8357 D8377 D8397 D8417 D8437 Reserved D8358 D8378 D8398 D8418 D8438 Reserved D8359...
  • Page 380: Positioning Instruction

    6 Positioning and Interpolation 6.2 Positioning Instruction Vset (Hz) Vmin = 2 × Tacc (ms) / 1000 That is, even a value lower than the above result is specified, the calculated value is used. The frequency at the beginning and end of acceleration/deceleration shall not be lower than the calculated value. For example, if the output frequency is 50,000 Hz, and the acceleration/deceleration time is 100 ms, 50000 (Hz) 2 ×...
  • Page 381: Plsy Pulse Output

    PLSY: Pulse output 6 Positioning and Interpolation PLSY: Pulse output ◆ Overview A specified number of pulses are output at the specified pulse frequency. PLSY S1 S2 D Pulse Output Applicable model: Output 16-bit instruction Specified pulse output frequency 32-bit instruction frequency (7 steps) (13 steps)
  • Page 382 6 Positioning and Interpolation PLSY: Pulse output Frequency Time Flow ON Target position The following figure shows an infinite pulse output diagram. Frequency Time Flow ON Flow OFF ◆ Note: 1) The user may monitor the corresponding special register for checking current pulse position, as shown in the following table.
  • Page 383 PLSY: Pulse output 6 Positioning and Interpolation Attribute [Positioning instruction] Enable the separate setting of the acceleration/ M8350 M8370 M8390 M8410 M8430 deceleration time and modification to the pulse Note that the modified position must be larger than the current pulse position. See the following figure. Frequency Time Current...
  • Page 384 6 Positioning and Interpolation PLSY: Pulse output Frequency The pulse count set Time Setting a limited number Target Flow ON of pulses position 8) You can enable the flag bit to release the high-speed output port resources, so that the next pulse output instruction is started immediately without disabling the previous instruction flow.
  • Page 385 PLSY: Pulse output 6 Positioning and Interpolation 9) Pulse output complete interrupts The "interrupt enabling flag bit" of special elements must be set. See the following table. Attribute Output complete M8352 M8372 M8392 M8412 M8432 interrupt enabling Y0 output Y1 output Y2 output Y3 output Y4 output...
  • Page 386: Plsv Variable-Speed Pulse Output

    6 Positioning and Interpolation PLSV: Variable-speed pulse output PLSV: Variable-speed pulse output ◆ Overview Pulses are output through the specified output port at the specified frequency and direction. Acceleration/ deceleration is not supported. If the flow is inactive, the pulse output stops immediately. Variable Pulse PLSV S1 D1 D2 Applicable model:...
  • Page 387 PLSV: Variable-speed pulse output 6 Positioning and Interpolation Frequency Time Flow ON Flow OFF ◆ Note 1) The user may monitor the corresponding special register for checking current pulse position, as shown in the following table. Attribute D8340 D8360 D8380 D8400 D8420 Current value register (PLS) (32-bit)
  • Page 388 6 Positioning and Interpolation PLSV: Variable-speed pulse output When the output frequency is a positive value, the output direction is forward; otherwise, the output direction is reverse. Frequency … Time Speed change Speed change Flow OFF Flow ON during running during running 5) You can enable the flag bit to release the high-speed output port resources, so that the next pulse output instruction is started immediately without disabling the previous instruction flow.
  • Page 389 PLSV: Variable-speed pulse output 6 Positioning and Interpolation 6) The pulse output complete interrupt is not supported in speed control mode. 7) The pulse output is stopped. The pulse output can be stopped by setting the "pulse output stop flag bit" of special elements. See the following table.
  • Page 390: Plsv2 Variable-Speed Pulse Output

    6 Positioning and Interpolation PLSV2: Variable-speed pulse output with acceleration/deceleration PLSV2: Variable-speed pulse output with acceleration/deceleration ◆ Overview Pulses are output through the specified output port at the specified frequency and direction. Acceleration/ deceleration is supported. When the flow is inactive, the pulse output is decelerated to stop. Variable-speed pulse output with PLSV2 S1 D1 D2...
  • Page 391 PLSV2: Variable-speed pulse output with acceleration/deceleration 6 Positioning and Interpolation decelerated to stop. Frequency … Time Speed change Speed change Flow ON Flow OFF during running during running The pulse output direction can be modified by modifying the set output frequency during pulse output. When the output frequency is a positive value, the output direction is forward;...
  • Page 392 6 Positioning and Interpolation PLSV2: Variable-speed pulse output with acceleration/deceleration Attribute M8340 M8360 M8380 M8400 M8420 Pulse output status 2) Only trapezoid acceleration/deceleration is supported. 3) The acceleration/deceleration time can be set separately, within the range 10 to 5000 ms. The maximum speed, base speed, acceleration/deceleration time, and other parameters of the high- speed output axes can be set uniformly or separately for each axis.
  • Page 393 PLSV2: Variable-speed pulse output with acceleration/deceleration 6 Positioning and Interpolation Frequency V2 = 50 kHz V1= 100 kHz Time Startup Frequency switchover Tacc 100 ms Tacc 50 ms 5) The actual minimum output frequency (that is, the minimum base output frequency) is calculated according to the following formula: Vset (Hz) Vmin =...
  • Page 394 6 Positioning and Interpolation PLSV2: Variable-speed pulse output with acceleration/deceleration instruction driven by M200 occupies the high-speed output port Y0, and the set high-speed output starts immediately. 7) The pulse output complete interrupt is not supported in speed control mode. 8) The pulse output is stopped.
  • Page 395 ZRN: Regression through the origin 6 Positioning and Interpolation ZRN: Regression through the origin ◆ Overview After the system is started, it accelerates to the set regression output frequency to drive the actuator to move toward the origin (DOG). After a DOG signal is detected, the system decelerates to the creep speed. When the DOG signal is OFF, pulse output is stopped.
  • Page 396 6 Positioning and Interpolation ZRN: Regression through the origin Frequency Inverse regression Origin regression speed Creep speed Clearing the current pulse Base value speed Falling edge Rising edge signal Clearing signal 20 ms + 1 scan cycle ◆ Note 1) The user may monitor the corresponding special register for checking current pulse position, as shown in the following table.
  • Page 397 ZRN: Regression through the origin 6 Positioning and Interpolation Attribute D8500/D8501 Maximum speed (Hz) (32-bit) D8502 Base speed (Hz) (16-bit) D8503 Acceleration/deceleration time (ms) (16-bit) When the separate setting flag bit is set to ON for an axis, the following registers are used for the parameter of the axis.
  • Page 398 6 Positioning and Interpolation ZRN: Regression through the origin As shown in the preceding figure, M100 is active, and drives Y0 to output 20,000 pulses at a frequency of 1000 Hz. If the output is driven by M100 but the user wants to set M200 to ON to immediately start the output (SET M8351 in the preceding figure), the high-speed output driven by M100 stops immediately, the instruction driven by M200 occupies the high-speed output port Y0, and the set high-speed output starts immediately.
  • Page 399 DSZR: DOG search return to origin 6 Positioning and Interpolation DSZR: DOG search return to origin ◆ Overview After the system is started, it accelerates to the regression output frequency set by the special register to drive the actuator to move toward the origin (DOG) according to the set action sequence. After a DOG signal is detected, the system decelerates to the creep speed.
  • Page 400 6 Positioning and Interpolation DSZR: DOG search return to origin D2 indicates the rotational direction output port. ON indicates rotating in the forward direction (the current value increases with pulse output); OFF indicates rotating in the reverse direction (the current value decreases with pulse output).
  • Page 401 DSZR: DOG search return to origin 6 Positioning and Interpolation • Select appropriate parameters based on the set parameter value range. It is suggested that the creep speed be smaller than or equal to the zero return speed. The zero return speed ranges from 10 to 200,000 Hz. The creep speed ranges from 10 to 32,767 Hz.
  • Page 402 6 Positioning and Interpolation DSZR: DOG search return to origin 3) DOG search When DSZR with DOG search is executed when forward and reverse rotation limits are designed. At this time, the zero return action is subject to the corresponding start position of zero return. Origin regression Backend Front end...
  • Page 403 DSZR: DOG search return to origin 6 Positioning and Interpolation ⑦ The system decelerates to the creep speed upon detecting the DOG frontend. ⑧ When detecting the DOG backend, the system stops upon detecting the first origin signal. D) When the limit switch (reverse rotation limit 1) of the zero return direction is set to ON: ①...
  • Page 404 6 Positioning and Interpolation DSZR: DOG search return to origin Attribute D8500/D8501 Maximum speed (Hz) (32-bit) D8502 Base speed (Hz) (16-bit) Acceleration/deceleration time (ms) D8503 (16-bit) When the separate setting flag bit is set to ON for an axis, the following registers are used for the parameter of the axis.
  • Page 405 DSZR: DOG search return to origin 6 Positioning and Interpolation output (SET M8351 in the preceding figure), the high-speed output driven by M100 stops immediately, the instruction driven by M200 occupies the high-speed output port Y0, and the set high-speed output starts immediately.
  • Page 406: Pulse Output With Acceleration

    6 Positioning and Interpolation PLSR: Pulse output with acceleration/deceleration PLSR: Pulse output with acceleration/deceleration ◆ Overview A specified number of pulses are output at the specified pulse frequency and the set acceleration/ deceleration time. Pulse output with PLSR S1 S2 S3 D acceleration/ Applicable model: deceleration...
  • Page 407 PLSR: Pulse output with acceleration/deceleration 6 Positioning and Interpolation pulse output resumes. When the instruction execution is complete, the M8029 flag is set to ON. The following figure shows a pulse output diagram. Frequency Output frequency Number of pulses to be output Vbias Vbias...
  • Page 408 6 Positioning and Interpolation PLSR: Pulse output with acceleration/deceleration F5 F6 Speed S-curve acceleration/deceleration with continuous speed change Trapezoid acceleration/ deceleration with discontinuous step Time Positioning complete time T0 Time saved Positioning complete time T1 The advanced pulse-by-pulse modulation algorithm is used for S-curve acceleration/deceleration. Frequency of each pulse is adjusted to ensure more smooth positioning.
  • Page 409 PLSR: Pulse output with acceleration/deceleration 6 Positioning and Interpolation Attribute D8342 D8362 D8382 D8402 D8422 Maximum speed (Hz) (32-bit) [default value: 200,000] D8343 D8363 D8383 D8403 D8423 D8347 D8367 D8387 D8407 D8427 Base speed (Hz) [The default value is 500] Acceleration time (ms) [The default value Setting of the instruction parameters is 100]...
  • Page 410: Plsr Pulse Output With Acceleration/Deceleration

    6 Positioning and Interpolation PLSR: Pulse output with acceleration/deceleration matter whether the pulse output is finished. No pulse will be output no matter whether the flow of the pulse output instruction B using the output port is active. Because the resources of this high-speed output port have been occupied by the instruction A, an error indicating port duplication or conflict is returned.
  • Page 411: Drva Absolute Position

    DRVA: Absolute positioning 6 Positioning and Interpolation DRVA: Absolute positioning ◆ Overview A specified number of pulses are output at the specified pulse frequency in the specified direction through the specified output port. The action is based on the absolute position. DRVA S1 S2 D1 D2 Absolute positioning Applicable model:...
  • Page 412 6 Positioning and Interpolation DRVA: Absolute positioning a 32-bit instruction, the range is 10 to 200,000 Hz. D1 indicates the pulse output port which can be Y0, Y1, Y2, Y3, or Y4. D2 indicates the running direction of the output port or the bit variable, which is determined by the difference between S1 and the current position.
  • Page 413 DRVA: Absolute positioning 6 Positioning and Interpolation Attribute S-curve acceleration/deceleration M8347 M8367 M8387 M8407 M8427 enabling DRVI, DRVA, and PLSR support S-curve acceleration/deceleration. Therefore, at given mechanical stability, the target speed is increased, the positioning time is shortened, and the processing efficiency is improved. F5 F6 Speed S-curve acceleration/deceleration...
  • Page 414 6 Positioning and Interpolation DRVA: Absolute positioning Attribute D8500/D8501 Maximum speed (Hz) (32-bit) D8502 Base speed (Hz) (16-bit) Acceleration/deceleration time (ms) D8503 (16-bit) When the separate setting flag bit is set to ON for an axis, the following registers are used for the parameter of the axis.
  • Page 415 DRVA: Absolute positioning 6 Positioning and Interpolation 6) You can enable the flag bit to release the high-speed output port resources, so that the next pulse output instruction is started immediately without disabling the previous instruction flow. The "port output initialization flag bit" of special elements must be set. See the following table.
  • Page 416: Drvi Relative Position

    6 Positioning and Interpolation DRVI: Relative positioning ◆ Program example This instruction is used to control the actuator to move from the specified origin to the destination. Origin Target position DRVI: Relative positioning ◆ Overview A specified number of pulses are output at the specified pulse frequency in the specified direction through the specified output port.
  • Page 417 DRVI: Relative positioning 6 Positioning and Interpolation S1 indicates the specified number of pulses to be output. For a 16-bit instruction, the range is –32768 to +32,767. For a 32-bit instruction, the range is –2,147,483,648 to +2,147,483,647. The "-" indicates the reverse direction.
  • Page 418 6 Positioning and Interpolation DRVI: Relative positioning flag bit will be set during pulse output and will be automatically reset when pulse output is finished. See the following table. Attribute M8340 M8360 M8380 M8400 M8420 Pulse output status 2) Trapezoid acceleration/deceleration and S-curve acceleration/deceleration are supported. The two acceleration/deceleration modes can be distinguished by setting the "S-curve acceleration/ deceleration enabling flag bit"...
  • Page 419 DRVI: Relative positioning 6 Positioning and Interpolation Attribute [Positioning instruction] Enable the separate setting of the acceleration/ M8350 M8370 M8390 M8410 M8430 deceleration time and modification to the pulse When the separate setting flag bit is set to OFF, the following registers are used for parameters of corresponding axes: Attribute D8500/D8501...
  • Page 420 6 Positioning and Interpolation DRVI: Relative positioning Frequency Time Current Position Position Flow ON Target position position modified modified (decrease) (increase) 6) You can enable the flag bit to release the high-speed output port resources, so that the next pulse output instruction is started immediately without disabling the previous instruction flow. The "port output initialization flag bit"...
  • Page 421 DVIT: Interrupt positioning 6 Positioning and Interpolation 7) Pulse output complete interrupts. The "interrupt enabling flag bit" of special elements must be set. See the following table. Attribute Output complete M8352 M8372 M8392 M8412 M8432 interrupt enabling Y0 output Y1 output Y2 output Y3 output Y4 output...
  • Page 422 6 Positioning and Interpolation DVIT: Interrupt positioning ◆ Operands Bit Element Word Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number C SD KnX KnY KnM KnS KnSM V Z Modification C SD KnX KnY KnM KnS KnSM V Z Modification C SD KnX KnY KnM KnS KnSM V Z Modification...
  • Page 423 DVIT: Interrupt positioning 6 Positioning and Interpolation Frequency The pulse count Time Target position Startup Interrupt generated The pulse output frequency at the speed segment before the interrupt may be different from that at the position segment after the interrupt, as shown in the figure below: Frequency A: Running time at the accelerated...
  • Page 424 6 Positioning and Interpolation 6.2 Positioning Instruction 3) The acceleration/deceleration time can be set separately, within the range 10 to 5000 ms. The maximum speed, base speed, acceleration/deceleration time, and other parameters of the high- speed output axes can be set uniformly or separately for each axis. The separate setting flag bit (M8350, M8370, M8390, M8410, or M8430.
  • Page 425 DVIT: Interrupt positioning 6 Positioning and Interpolation Frequency V2 = 150 kHz V1 = 100 kHz Time Frequency switchover Startup Tacc Tacc 100 ms 50 ms 5) The actual minimum output frequency (that is, the minimum base output frequency) is calculated according to the following formula: Vset (Hz) Vmin =...
  • Page 426 6 Positioning and Interpolation DVIT: Interrupt positioning 7) Pulse output complete interrupts. The "interrupt enabling flag bit" of special elements must be set. See the following table. Attribute Output complete M8352 M8372 M8392 M8412 M8432 interrupt enabling Y0 output Y1 output Y2 output Y3 output Y4 output...
  • Page 427: Multi-Speed Pulse Output

    PLSN: Multi-speed pulse output 6 Positioning and Interpolation PLSN: Multi-speed pulse output ◆ Overview This instruction is used to continuously output a specified number of output pulses at the output frequency specified at each segment through the specified output port. The action is based on the relative position. During running, acceleration/deceleration is supported, but the direction cannot be changed.
  • Page 428: Plsn Multi-Speed Pulse Output

    6 Positioning and Interpolation PLSN: Multi-speed pulse output The number of pulses to be output is used as the position relative to the current value registers listed in the following table. Attribute D8340 D8360 D8380 D8400 D8420 Current value register (PLS) (32-bit) D8341 D8361 D8381...
  • Page 429 PLSN: Multi-speed pulse output 6 Positioning and Interpolation You can monitor the "pulse output stop flag bit" of special elements, and view the pulse output status. This flag bit will be set during pulse output and will be automatically reset when pulse output is finished. See the following table.
  • Page 430 6 Positioning and Interpolation PLSN: Multi-speed pulse output Frequency V2 = 150 kHz V1 = 100 kHz Time Frequency switchover Startup Tacc Tacc 100 ms 50 ms The actual minimum output frequency (that is, the minimum base output frequency) is calculated according to the following formula: Vset (Hz) Vmin =...
  • Page 431: Interpolation Instruction

    PLSN: Multi-speed pulse output 6 Positioning and Interpolation instruction driven by M200 occupies the high-speed output port Y0, and the set high-speed output starts immediately. 6) Pulse output complete interrupts. The "interrupt enabling flag bit" of special elements must be set. See the following table. Attribute Output complete M8352...
  • Page 432: 2-Axis Linear Absolute Position

    6 Positioning and Interpolation G90G01: 2-axis linear absolute position interpolation G90G01: 2-axis linear absolute position interpolation ◆ Overview This instruction is used to output the set interpolation path at the set combined output frequency. The action is based on the absolute position. 2-axis linear absolute G90G01 S1 S2 S D1 D2 Applicable Model:...
  • Page 433 G90G01: 2-axis linear absolute position interpolation 6 Positioning and Interpolation The following table lists the absolute position current values. Attribute D8340 D8360 D8380 D8400 D8420 Current value register (PLS) (32-bit) D8341 D8361 D8381 D8401 D8421 The numerical value of the current value register decreases in the reverse direction. ●...
  • Page 434 6 Positioning and Interpolation G90G01: 2-axis linear absolute position interpolation ◆ Note 1) When an interpolation instruction (G90G01, G91G01, G90G02, G91G02, G90G03, or G91G03) is used, parameters of the x-axis (Y0) such as the acceleration/deceleration time prevail. 2) The user may monitor the corresponding special register for checking current pulse position, as shown in the following table.
  • Page 435 G90G01: 2-axis linear absolute position interpolation 6 Positioning and Interpolation Attribute D8342 D8362 D8382 D8402 D8422 Maximum speed (Hz) (32-bit) [default value: 200,000] D8343 D8363 D8383 D8403 D8423 Base speed (Hz) [The default value is D8347 D8367 D8387 D8407 D8427 500] Acceleration time (ms) [The default value D8348...
  • Page 436 6 Positioning and Interpolation G90G01: 2-axis linear absolute position interpolation 1) Interpolation at the x- and y-axes (Y0/Y1) results in output complete interrupt of only one pulse. The "interrupt enabling flag bit" of special elements must be set. See the following table. Attribute Output complete interrupt M8352...
  • Page 437: 2-Axis Linear Relative Position

    G91G01: 2-axis linear relative position interpolation 6 Positioning and Interpolation G91G01: 2-axis linear relative position interpolation ◆ Overview This instruction is used to output the set interpolation path at the set combined output frequency. The action is based on the relative position. 2-axis linear relative G91G01 S1 S2 S D1 D2 Applicable model:...
  • Page 438 6 Positioning and Interpolation G91G01: 2-axis linear relative position interpolation The numerical value of the current value register decreases in the reverse direction. ● S indicates the combined pulse output frequency of the specified x- and y-axes, ranging from 0 to 280,000 Hz.
  • Page 439 G91G01: 2-axis linear relative position interpolation 6 Positioning and Interpolation Attribute D8340 D8360 D8380 D8400 D8420 Current value register (PLS) (32-bit) D8341 D8361 D8381 D8401 D8421 You can monitor the "pulse output stop flag bit" of special elements, and view the pulse output status. This flag bit will be set during pulse output and will be automatically reset when pulse output is finished.
  • Page 440 6 Positioning and Interpolation G91G01: 2-axis linear relative position interpolation 5) The actual minimum combined output frequency (that is, the minimum combined base output frequency S) is calculated according to the following formula: Vset (Hz) Vmin = 2 × Tacc (ms) / 1000 6) You can enable the flag bit to release the high-speed output port resources, so that the next pulse output instruction is started immediately without disabling the previous instruction flow.
  • Page 441 G90G02: 2-axis clockwise absolute position arc interpolation 6 Positioning and Interpolation G90G02: 2-axis clockwise absolute position arc interpolation ◆ Overview This instruction is used to output the set clockwise arc interpolation path at the set combined output frequency. The action is based on the absolute position. G90G02 S1 S2 S3 S4 S Clockwise absolute position arc...
  • Page 442 6 Positioning and Interpolation G90G02: 2-axis clockwise absolute position arc interpolation specified target position according to the clockwise arc interpolation. This instruction is applicable only to the PLC of the transistor output type. Wherein: S1 indicates the specified destination position (absolute position) of the X-axis. The range is –2,147,483,648 to +2,147,483,647.
  • Page 443 G90G02: 2-axis clockwise absolute position arc interpolation 6 Positioning and Interpolation The following figure shows a pulse output diagram. Y axis (Y1) Segment 1 R = -50 Target position (end point) I = 0, J = 50 (150, 100) Segment 2 R = 50 I = 50, J = 0 Current position (start point) (100, 50)
  • Page 444 6 Positioning and Interpolation G90G02: 2-axis clockwise absolute position arc interpolation ◆ Note 1) When an interpolation instruction (G90G01, G91G01, G90G02, G91G02, G90G02, or G91G03) is used, parameters, such as the acceleration/deceleration time, of the X-axis (Y0) prevail. 2) The user may monitor the corresponding special register for checking current pulse position, as shown in the following table.
  • Page 445 G90G02: 2-axis clockwise absolute position arc interpolation 6 Positioning and Interpolation Attribute D8342 D8362 D8382 D8402 D8422 Maximum speed (Hz) (32-bit) [default value: 200,000] D8343 D8363 D8383 D8403 D8423 Base speed (Hz) D8347 D8367 D8387 D8407 D8427 [The default value is 500] Acceleration time (ms) D8348 D8368...
  • Page 446 6 Positioning and Interpolation G90G02: 2-axis clockwise absolute position arc interpolation Attribute Output complete M8352 M8372 M8392 M8412 M8432 interrupt enabling Y0 output Y1 output Y2 output Y3 output Y4 output Corresponding complete complete complete complete complete interrupt interrupt interrupt interrupt interrupt interrupt...
  • Page 447 G91G02: 2-axis clockwise relative position arc interpolation 6 Positioning and Interpolation G91G02: 2-axis clockwise relative position arc interpolation ◆ Overview This instruction is used to output the set clockwise arc interpolation path at the set combined output frequency. The action is based on the relative position. G91G02 S1 S2 S3 S4 S Clockwise relative position arc...
  • Page 448 6 Positioning and Interpolation G91G02: 2-axis clockwise relative position arc interpolation (offset). The range is –2,147,483,648 to +2,147,483,647. The "-" indicates the reverse direction. The number of pulses to be output is used as the position relative to the current value registers listed in the following table.
  • Page 449 G91G02: 2-axis clockwise relative position arc interpolation 6 Positioning and Interpolation The following figure shows a pulse output diagram. Y axis (Y1) Segment 1 R = -50 Target position (end point) I = 0, J = 50 Offset (50, 50) Segment 2 R = 50 I = 50, J = 0 Current position (start point)
  • Page 450 6 Positioning and Interpolation G91G02: 2-axis clockwise relative position arc interpolation ◆ Note 1) When an interpolation instruction (G90G01, G91G01, G90G02, G91G02, G90G02, or G91G03) is used, parameters, such as the acceleration/deceleration time, of the X-axis (Y0) prevail. 2) The user may monitor the corresponding special register for checking current pulse position, as shown in the following table.
  • Page 451 G91G02: 2-axis clockwise relative position arc interpolation 6 Positioning and Interpolation Attribute D8342 D8362 D8382 D8402 D8422 Maximum speed (Hz) (32-bit) [default value: 200,000] D8343 D8363 D8383 D8403 D8423 Base speed (Hz) [The default value is D8347 D8367 D8387 D8407 D8427 500] Acceleration time (ms) [The default value...
  • Page 452 6 Positioning and Interpolation G91G02: 2-axis clockwise relative position arc interpolation 7) Interpolation at x- and y-axes (Y0/Y1) results in output complete interrupt of only one pulse. The "interrupt enabling flag bit" of special elements must be set. See the following table. Attribute Output complete M8352...
  • Page 453 6.3 Interpolation Instruction 6 Positioning and Interpolation G90G03: 2-axis counterclockwise absolute position arc interpolation ◆ Overview This instruction is used to output the set counterclockwise arc interpolation path at the set combined output frequency. The action is based on the absolute position. Anticlockwise G90G03 S1 S2 S3 S4 S absolute position arc...
  • Page 454 6 Positioning and Interpolation G90G03: 2-axis counterclockwise absolute position arc interpolation S2 indicates the specified destination (absolute position) of the y-axis. The range is –2,147,483,648 to +2,147,483,647. The "-" indicates the reverse direction. The following table lists the absolute position current values. Attribute D8340 D8360...
  • Page 455 G90G03: 2-axis counterclockwise absolute position arc interpolation 6 Positioning and Interpolation Y axis (Y1) Target position (end point) (150, 100) Segment 2 R = 50 I = 0, J = 50 Current position Segment 1 R = -50 (start point) I = 50, J = 0 (100, 50) X axis (Y0)
  • Page 456 6 Positioning and Interpolation G90G03: 2-axis counterclockwise absolute position arc interpolation Attribute D8340 D8360 D8380 D8400 D8420 Current value register (PLS) (32-bit) D8341 D8361 D8381 D8401 D8421 You can monitor the "pulse output stop flag bit" of special elements, and view the pulse output status. This flag bit will be set during pulse output and will be automatically reset when pulse output is finished.
  • Page 457 G90G03: 2-axis counterclockwise absolute position arc interpolation 6 Positioning and Interpolation 5) The actual minimum combined output frequency (that is, the minimum combined base output frequency S) is calculated according to the following formula: Vset (Hz) Vmin = 2 × Tacc (ms) / 1000 6) You can enable the flag bit to release the high-speed output port resources, so that the next pulse output instruction is started immediately without disabling the previous instruction flow.
  • Page 458 6 Positioning and Interpolation G91G03: 2-axis counterclockwise relative position arc interpolation G91G03: 2-axis counterclockwise relative position arc interpolation ◆ Overview This instruction is used to output the set counterclockwise arc interpolation path at the set combined output frequency. The action is based on the relative position. G91G03 S1 S2 S3 S4 S Anticlockwise relative position arc...
  • Page 459 G91G03: 2-axis counterclockwise relative position arc interpolation 6 Positioning and Interpolation ◆ Functions and actions This instruction is used to output a specified number of pulses at the specified frequency and in the specified direction through the specified port; perform the 2-axis counterclockwise arc interpolation; and drive the servo actuator to perform 2-axis counterclockwise arc interpolation with the given offset based on the current position.
  • Page 460 6 Positioning and Interpolation G91G03: 2-axis counterclockwise relative position arc interpolation used, parameters of Y0 such as the acceleration/deceleration time prevail. ● When the instruction flow switches to OFF during instruction execution , the system decelerates to stop. The execution complete flag M8029 remains unchanged. After the instruction flow switches to OFF, when the flag of pulse output is ON, the instruction is no longer driven by the instruction flow.
  • Page 461 G91G03: 2-axis counterclockwise relative position arc interpolation 6 Positioning and Interpolation ◆ Note 1) When an interpolation instruction (G90G01, G91G01, G90G02, G91G02, G90G02, or G91G03) is used, parameters, such as the acceleration/deceleration time, of the X-axis (Y0) prevail. 2) The user may monitor the corresponding special register for checking current pulse position, as shown in the following table.
  • Page 462 6 Positioning and Interpolation G91G03: 2-axis counterclockwise relative position arc interpolation Attribute D8342 D8362 D8382 D8402 D8422 Maximum speed (Hz) (32-bit) [default value: 200,000] D8343 D8363 D8383 D8403 D8423 Base speed (Hz) [The default value is D8347 D8367 D8387 D8407 D8427 500] Acceleration time (ms) [The default value...
  • Page 463: Pwm Pulse-Width Modulation

    PWM: Pulse width modulation 6 Positioning and Interpolation 7) Interpolation at x- and y-axes (Y0/Y1) results in output complete interrupt of only one pulse. 8) The "interrupt enabling flag bit" of special elements must be set. See the following table. Attribute M8352 M8372...
  • Page 464 6 Positioning and Interpolation PWM: Pulse width modulation S1 indicates the pulse output width. S1 must be less than or equal to S2. The range is 0 to 32,767 ms. S2 indicates the pulse output period. S1 must be less than or equal to S2. The range is 1 to 32,767 ms. D indicates the pulse output port which cannot be occupied by other high-speed instructions.
  • Page 465 6.4 High-speed Processing Instruction 6 Positioning and Interpolation Memo NO. ___________ Date ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ___________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ___________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________...
  • Page 466: Mode

    7 Motion Control 7.1 Difference Between H3U Standard Model and H3U-PM Motion Control Model ..........7.2 H3U-PM Terminal Description ..7.3 Execution and Call of Motion Control Subprogram ........7.4 Motion Control Instructions ....7.5 Similarities and Differences Between MC Subprograms and G-code Subprograms ........
  • Page 467: Difference Between H3U Standard

    7.1 Difference Between H3U Standard Model and H3U-PM Motion Control Model 7 Motion Control Chapter 7 Motion Control This chapter describes the motion control instructions, G-code, electronic cam, and other functions supported by the PLC of the H3U-PM motion control model. 7.1 Difference Between H3U Standard Model and H3U-PM Motion Control Model The following table lists the main differences between PLCs of the standard and motion control models.
  • Page 468: H3U-Pm Terminal Description

    7 Motion Control 7.2 H3U-PM Terminal Description 7.2 H3U-PM Terminal Description S/S0 STOP0 LSP0 S/S1 STOP1 LSP1 PG1- S/S2 STOP2 LSP2 PG2- S/S3 DOG0 LSN0 START0 START1 DOG1 LSN1 PG1+ DOG2 LSN2 PG2+ START2 CLR0+ FP0+ RP0+ CLR1+ FP1+ RP1+ CLR2+ FP2+ RP2+ CLR0- FP0-...
  • Page 469: Execution And Call Of Motion Control Subprogram

    7.3 Execution and Call of Motion Control Subprogram 7 Motion Control 7.3 Execution and Call of Motion Control Subprogram 1) Execution of motion control subprograms (MC subprograms and G-code subprograms) The motion control subprograms supported by the H3U-PM Series PLC are classified into two types: MC and G-code.
  • Page 470 7 Motion Control 7.3 Execution and Call of Motion Control Subprogram 2) Calling a motion control subprogram (an MC subprogram or a G-code subprogram) General subprograms, encrypted subprograms, and parameter-carrying subprograms in H3U-PM are the same, but have different attributes. Like the main program, motion control subprograms can be called. The following table shows the call relationship between subprograms.
  • Page 471 7.3 Execution and Call of Motion Control Subprogram 7 Motion Control b) Creating and calling an MC subprogram Creating an MC subprogram: Right-click Program Block and choose Insert MC Subprogram (M). Motion control subprogram label set Motion control subprogram enable After an MC subprogram is created, run an MC instruction to program the MC subprogram.
  • Page 472 7 Motion Control 7.3 Execution and Call of Motion Control Subprogram c) Creating a G-code subprogram Create a G-code subprogram to enable the main program to call CNC00 (MC10000), as shown in the following figure. Motion control subroutine label Motion control subroutine enable The CNC subprogram is a G-code subprogram input in text.
  • Page 473: Motion Control Instructions

    7.4 Motion Control Instructions 7 Motion Control General H3U-PM High-speed Instruction for High-speed Motion Control Quantity and Counting and Supported Logic and Process Output Instruction Flag Input Instruction Instruction Control Main program √ √ √ × √ (MAIN) General √ √...
  • Page 474 7 Motion Control 7.4 Motion Control Instructions • Whether the H3U-PM motion control instructions support acceleration/deceleration is determined by the acceleration/deceleration time. Some instructions can run in both acceleration/deceleration and non-acceleration/ deceleration modes. The acceleration/deceleration time of positioning and interpolation instructions ranges from 10 ms to 5000 ms and 10 ms to 500 ms respectively.
  • Page 475: Similarities And Differences Between Mc Subprograms And G-Code Subprograms

    7.5 Similarities and Differences Between MC Subprograms and G-code Subprograms 7 Motion Control 2) Use of motion control instructions The following table lists modals supported by the instructions. Instruction Running Plane Position Mode Default Interpolation Speed Inherited from Maximum XYP/ZXP/YZP G17/G18/G19 ABST/INCT G90/G91...
  • Page 476 7 Motion Control 7.5 Similarities and Differences Between MC Subprograms and G-code Subprograms Their similarities include: Both of MC subprograms and G-code subprograms use the special elements SM0 to SM299 and SD0 to SD299 for motion control (interpolation instruction and electronic cam) setting. The following table lists same functions of the two.
  • Page 477: List Of Motion Control Instructions Supported By Mc Subprograms

    7.6 List of Motion Control Instructions Supported by MC Subprograms 7 Motion Control 7.6 List of Motion Control Instructions Supported by MC Subprograms The following table lists instructions supported by MC subprograms. “DRV: High-speed positioning” “LIN and INTR: Linear interpolation” “CW: Clockwise arc interpolation;...
  • Page 478 7 Motion Control 7.7 Format and Use of MC Subprograms The following table lists the types of elements of operands used for the above instructions. Element Floating-point Integer Supported Number Bit element Mxxxx SMxxxx 16-bit Kxxxx Hxxxx Dxxxx SDxxxx Rxxxxx parameter 32-bit KKxxxx...
  • Page 479 7.7 Format and Use of MC Subprograms 7 Motion Control Motion Parameter Parameter Parameter Parameter Parameter Parameter Parameter Control Attribute Instruction High-speed Combination positioning Linear Combination interpolation Combination Clockwise arc interpolation Default Default Combination Counter- Combination clockwise arc Default Default Combination interpolation Delay waiting...
  • Page 480 7 Motion Control 7.7 Format and Use of MC Subprograms Motion Parameter Parameter Parameter Parameter Parameter Parameter Parameter Control Attribute Instruction Motion compensation CANC cancellation Subprogram MCALL P integer call Subprogram MRET return X, Y, and Z indicate the positions of the x-axis, y-axis, and z-axis; R indicates the radius; F indicates the feed speed;...
  • Page 481: Drv High-Speed Positioning

    7.7 Format and Use of MC Subprograms 7 Motion Control DRV: High-speed positioning ◆ Overview The DRV instruction is used to drive three axes to move to the target position or output the specified number of pulses at the specified output frequency of each axis. High-speed DRV X_ F_ Y_ F_ Z_ F_ H3U-PM...
  • Page 482 7 Motion Control DRV: High-speed positioning Frequency Output frequency Number of pulses to be output Vbias Vbias Time Tacc Tdec ◆ Note Multiple instruction forms are supported. The axis for which the F function word is omitted runs at the maximum speed.
  • Page 483 DRV: High-speed positioning 7 Motion Control Instruction Form Description DRV X_ Y_ Z_ DRV X_ F_ Y_ Z_ DRV X_ Y_ F_ Z_ DRV X_ Y_ Z_ F_ 3-axis DRV X_ F_ Y_ F_ Z_ DRV X_ Y_ F_ Z_ F_ DRV X_ F_ Y_ Z_ F_ The user may monitor the special registers for checking current pulse position.
  • Page 484 7 Motion Control DRV: High-speed positioning X100 indicates 100 mm. After conversion, the number of pulses is 100 x 2000 x 1000/1000 = 200,000. F60 indicates 60 mm/min. After conversion, the output frequency is 2000 Hz. Trapezoid acceleration/deceleration and S-curve acceleration/deceleration are supported. The two acceleration/deceleration modes can be distinguished by setting the "S-curve acceleration/ deceleration enabling flag"...
  • Page 485 DRV: High-speed positioning 7 Motion Control The minimum output frequency that can be realized actually (that is, the minimum base output frequency) is calculated according to the following formula: Vset (Hz) Vmin = 2 × Tacc (ms) / 1000 ◆ Program example It indicates that, in absolute position mode, 10,000,000 pules are output at the x-axis at a frequency of 200,000 Hz, and 10,000,000 pules are output at the y-axis at a frequency of 200,000 Hz.
  • Page 486 7 Motion Control LIN and INTR: Linear interpolation LIN and INTR: Linear interpolation ◆ Overview These instructions are used to perform linear interpolation at up to three axes at the combined output frequency. LIN X_ Y_ Z_ F_ H3U-PM Linear interpolation Applicable model: X-axis position X-axis target position...
  • Page 487 LIN and INTR: Linear interpolation 7 Motion Control X-axis Y-axis Z-axis Attribute Current position (PLS), only for display SD36, SD37 SD136, SD137 SD236, SD237 purpose Current position (mechanical, floating SD40, SD41 SD140, SD141 SD240, SD241 point), only for display purpose D8340, D8341 D8360, D8361 D8380, D8381...
  • Page 488 7 Motion Control LIN and INTR: Linear interpolation Instruction Form Description LIN X_ Y_ Z_ F_ Standard format LIN X_ LIN X_ F_ LIN Y_ Single-axis LIN Y_ F_ LIN Z_ LIN Z_ F_ LIN X_ Y_ LIN X_ Y_ F_ LIN Y_ Z_ 2-axis LIN Y_ Z_ F_...
  • Page 489 LIN and INTR: Linear interpolation 7 Motion Control X100 indicates 100 mm. After conversion, the number of pulses is 100 x 2000 x 1000/1000 = 200,000. F60 indicates 60 mm/min. After conversion, the output frequency is 2000 Hz. Only trapezoid acceleration/deceleration is supported. The acceleration/deceleration time can be set separately, within the range 10 to 500 ms.
  • Page 490: Cw Clockwise Arc Interpolation

    7 Motion Control CW: Clockwise arc interpolation; CCW: Counterclockwise arc interpolation CW: Clockwise arc interpolation; CCW: Counterclockwise arc interpolation ◆ Overview These instructions are used to perform clockwise or counterclockwise arc interpolation at combined output frequency at two axes. 3-axis helix interpolation on three planes is supported. CW X_ Y_ Z_ I_ J_ K_ F_ Clockwise arc H3U-PM...
  • Page 491 CW: Clockwise arc interpolation; CCW: Counterclockwise arc interpolation 7 Motion Control ◆ Operands Parameter Bit Element Word Element Immediate Operand Note: The floating-point immediate operand type is not displayed. For example, X100 indicates the X floating point 100.00. ◆ Functions and actions These instructions are used to perform 2-axis arc interpolation or 3-axis helix interpolation on three planes.
  • Page 492 7 Motion Control CW: Clockwise arc interpolation; CCW: Counterclockwise arc interpolation It indicates an counterclockwise arc interpolation, wherein (150, 100) indicates the target absolute position of the x- and y-axes. When the target position is the same, an example is provided on generation of an arc less than 180 degrees and more than 180 degrees in IJ (center coordinate) mode and in R (radius) mode respectively.
  • Page 493 CW: Clockwise arc interpolation; CCW: Counterclockwise arc interpolation 7 Motion Control During arc interpolation (CW, CCW, G02, or G03), interpolation parameters, such as the acceleration/ deceleration time, of the master axis prevail. For example, parameters of the x-axis prevail on the XY plane;...
  • Page 494 7 Motion Control CW: Clockwise arc interpolation; CCW: Counterclockwise arc interpolation Instruction Form Description CW/CCW X_ I_ CW/CCW X_ I_ F_ CW/CCW X_ J_ CW/CCW X_ J_ F_ CW/CCW Y_ I_ CW/CCW Y_ I_ F_ CW/CCW Y_ J_ CW/CCW Y_ J_ F_ CW/CCW X_ I_ J_ 2-axis arc interpolation on the XY plane...
  • Page 495 CW: Clockwise arc interpolation; CCW: Counterclockwise arc interpolation 7 Motion Control Instruction Form Description CW/CCW Y_ J_ CW/CCW Y_ J_ F_ CW/CCW Z_ K_ CW/CCW Z_ K_ F_ CW/CCW Y_ K_ CW/CCW Y_ K_ F_ CW/CCW Z_ J_ CW/CCW Z_ J_ F_ CW/CCW Y_ J_ K_ 2-axis arc interpolation on the YZ plane...
  • Page 496 7 Motion Control CW: Clockwise arc interpolation; CCW: Counterclockwise arc interpolation Instruction Form Description CW/CCW X_ I_ CW/CCW X_ I_ F_ CW/CCW X_ K_ CW/CCW X_ K_ F_ CW/CCW Z_ I_ CW/CCW Z_ I_ F_ CW/CCW Z_ K_ CW/CCW Z_ K_ F_ CW/CCW X_ I_ K_ 2-axis arc interpolation on the ZX plane...
  • Page 497 CW: Clockwise arc interpolation; CCW: Counterclockwise arc interpolation 7 Motion Control The user may monitor the special registers for checking current pulse position. The following table lists details about 32-bit registers. X-axis Y-axis Z-axis Attribute Current position (PLS), only for display SD36, SD37 SD136, SD137 SD236, SD237...
  • Page 498 7 Motion Control CW: Clockwise arc interpolation; CCW: Counterclockwise arc interpolation X-axis Y-axis Z-axis Attribute SD10, SD11 SD110, SD111 SD210, SD211 Maximum speed (Vmax) SD12, SD13 SD112, SD113 SD212, SD213 Base speed (starting speed) (Vbias) SD20 SD120 SD220 Acceleration time (Vacc) SD21 SD121 SD221...
  • Page 499: Tim Delay Waiting

    TIM: Delay waiting 7 Motion Control TIM: Delay waiting ◆ Overview The TIM instruction is used to set the delay before the next motion control instruction is executed. TIM 1 H3U-PM Delay waiting Applicable model: Delay Delay, in ms ◆ Operands Parameter Bit Element Word Element...
  • Page 500 7 Motion Control MCALL: Motion control subprogram calling MCALL: Motion control subprogram calling ◆ Overview The MCALL instruction is used to call the specified motion control subprogram continuously for the specified times. Motion control MCALL P_ L_ H3U-PM Applicable model: subprogram calling Subprogram Serial number of the motion control subprogram to be...
  • Page 501 MRET: Motion control subprogram return 7 Motion Control MRET: Motion control subprogram return ◆ Overview The MRET instruction is used to return to the call layer of the previous level after execution of the current motion control subprogram is finished. Motion control MRET H3U-PM...
  • Page 502: Abst Absolute Position Modal

    7 Motion Control ABST: Absolute position modal; INCT: Relative position modal ABST: Absolute position modal; INCT: Relative position modal ◆ Overview The ABST and INCT modal instructions are used to configure the current motion control coordinate system in absolute or relative position mode. Absolute position ABST H3U-PM...
  • Page 503 XYP, YZP, and ZXP: Setting a modal for the current plane 7 Motion Control XYP, YZP, and ZXP: Setting a modal for the current plane ◆ Overview The XYP, YZP, and ZXP modal instructions are used to configure the main plane of the current motion control coordinate system as the XY plane, YZ plane, or ZX plane.
  • Page 504 7 Motion Control SETT: Setting the current position SETT: Setting the current position ◆ Overview The SETT instruction is used to set the current position of the x-, y, and z-axes to the designated value. Setting current SETT X_ Y_ Z_ H3U-PM Applicable model: position...
  • Page 505 SETT: Setting the current position 7 Motion Control ◆ Note: Multiple instruction forms are supported. Instructions can be used in combination. The current position of the axis not involved in the instruction remains unchanged. Instruction Form Description SETT X_ Y_ Z_ Standard format SETT X_ SETT Y_...
  • Page 506 7 Motion Control SETR: Setting the electrical origin SETR: Setting the electrical origin ◆ Overview The SETR instruction is used to set the current position of the x-, y, and z-axes to the electrical origin. It is related to DRVR. Setting electrical SETR H3U-PM...
  • Page 507 DRVZ: Mechanical zero return 7 Motion Control DRVZ: Mechanical zero return ◆ Overview The x-, y-, and z-axes regress to the mechanical origin independently. Each axis searches for the DOG signal and moves toward the origin (DOG). After a DOG signal is detected, the system decelerates to the creep speed.
  • Page 508 7 Motion Control DRVZ: Mechanical zero return The creep speed ranges from 10 to 32,767 Hz. ② The base speed ranges from 10 to 32,767 Hz. ③ ● When the PLC works in combination with the servo driver, this instruction is used to output pulses at the pulse speed specified by the special register through the pulse output port, so that the actuator moves to the action origin according to the preset action sequence;...
  • Page 509 DRVZ: Mechanical zero return 7 Motion Control 1) When the start position is before DOG (including the case where the forward rotation limit 1 is set to ON): ● The system executes the zero return instruction to start the zero return action. ●...
  • Page 510 7 Motion Control DRVZ: Mechanical zero return ● The system executes the zero return instruction to start the zero return action. ● The system moves to the direction opposite to the zero return direction at the zero return speed. ● The system decelerates to stop upon detecting the DOG frontend. (Detecting [Leaving] DOG) ●...
  • Page 511 DRVZ: Mechanical zero return 7 Motion Control X-axis Y-axis Z-axis Attribute SM12 SM112 SM212 Flag of DRVZ zero return direction Disabling zero return for a specific axis The axis zero return disabling function of special elements can be used to disable the specified axis to return to the origin, and allow other axes to return to the origin.
  • Page 512: Drvr Electrical Zero Return

    7 Motion Control DRVR: Electrical zero return DRVR: Electrical zero return ◆ Overview The DRVR instruction is used to enable the x-, y-, and z-axes to return to the electrical origin independently at their specified maximum speed. It is related to SETR. DRVR H3U-PM Electrical zero return...
  • Page 513 DRVR: Electrical zero return 7 Motion Control Frequency Output frequency Number of pulses to be output Vbias Vbias Time Tacc Tdec ◆ Note The user may monitor the special registers for checking current pulse position. The following table lists details about 32-bit registers. X-axis Y-axis Z-axis...
  • Page 514 7 Motion Control SINTR: Single-speed interrupt positioning; DINTR: Double-speed interrupt positioning The advanced pulse-by-pulse modulation algorithm is used for S-curve acceleration/deceleration. The frequency of each pulse is adjusted to ensure more smooth positioning. The acceleration/deceleration time can be set separately, within the range 10 to 5000 ms. The time of trapezoid acceleration/deceleration and S-curve acceleration/deceleration can be set separately.
  • Page 515 SINTR: Single-speed interrupt positioning; DINTR: Double-speed interrupt positioning 7 Motion Control Single-speed SINTR X/Y/Z_ F_ H3U-PM Applicable model: interrupt positioning Interrupt fixed Number of pulses to be output after interrupt in relative length position mode Interrupt fixed Number of pulses to be output after interrupt in relative length position mode Interrupt fixed...
  • Page 516 7 Motion Control SINTR: Single-speed interrupt positioning; DINTR: Double-speed interrupt positioning The pulse output frequency at the speed segment before DINTR interrupts may be different from that at the position segment after the interrupt, as shown in the following figure. ◆...
  • Page 517 SINTR: Single-speed interrupt positioning; DINTR: Double-speed interrupt positioning 7 Motion Control Floating-point number format Integer format XKK100 indicates 100 Pls. Position (XYZ) X100 indicates 100 (mm). XDD100 indicates DD100 Pls. FKK200 indicates 200 Hz. Speed (F) F60 indicates 60 (mm/min). FRR200 indicates RR200 Hz.
  • Page 518 7 Motion Control SINTR: Single-speed interrupt positioning; DINTR: Double-speed interrupt positioning...
  • Page 519: Movc Linear Displacement Compensation

    MOVC: Linear displacement compensation 7 Motion Control MOVC: Linear displacement compensation ◆ Overview The MOVC instruction is used to compensate each axis according to the specified value during linear interpolation. The compensation value is a relative value independent of the coordinate system. This instruction relates to LIN, INTR, and G01.
  • Page 520: Cntc Arc Center Compensation

    7 Motion Control CNTC: Arc center compensation CNTC: Arc center compensation ◆ Overview The CNTC instruction is used to compensate the center according to the specified value during arc interpolation in IJK (center) mode. The compensation value is a relative value independent of the coordinate system.
  • Page 521: Radc Arc Radius Compensation

    RADC: Arc radius compensation 7 Motion Control RADC: Arc radius compensation ◆ Overview The RADC instruction is used to compensate the radius according to the specified value during arc interpolation in R (radius) mode. The compensation value is a relative value independent of the coordinate system.
  • Page 522: Canc Motion Compensation Cancellation

    7 Motion Control CANC: Motion compensation cancellation CANC: Motion compensation cancellation ◆ Overview The CANC instruction is used to cancel the setting of displacement compensation, arc center compensation, and arc radius compensation. Motion compensation CANC H3U-PM Applicable model: cancellation ◆ Operands None ◆...
  • Page 523 CANC: Motion compensation cancellation 7 Motion Control 2) Displaying the compensation value X-axis Y-axis Z-axis Attribute Axis offset compensation value (DRV, LIN, and SD50 and SD51 SD150 and SD151 SD250 and SD251 INTR) (only for display purpose) Axis center coordinate offset compensation SD52 and SD53 SD152 and SD153 SD252 and SD253...
  • Page 524 7 Motion Control MSET and MRST: Setting and resetting the bit element M MSET and MRST: Setting and resetting the bit element M ◆ Overview The MSET and MRST instructions are used to set and reset bit elements. They are used for interaction with main programs or logic control.
  • Page 525: Addition Operation

    MMOV: Value assignment; MADD, MSUB, MMUL, MDIV: Addition, subtraction, multiplication, and division 7 Motion Control MMOV: Value assignment; MADD, MSUB, MMUL, MDIV: Addition, subtraction, multiplication, and division ◆ Overview These instructions are used for value assignment, addition, subtraction, multiplication, and division operation in subprograms.
  • Page 526 7 Motion Control MMOV: Value assignment; MADD, MSUB, MMUL, MDIV: Addition, subtraction, multiplication, and division ◆ Operands Parameter Bit Element Word Element Immediate Operand Note: The elements in gray background are supported. ◆ Functions and actions MMOV is used for value assignment. MADD, MSUB, MMUL, and MDIV are used for addition, subtraction, multiplication, and division operations respectively.
  • Page 527: Motion Control

    MMOV: Value assignment; MADD, MSUB, MMUL, MDIV: Addition, subtraction, multiplication, and division 7 Motion Control 7.8 List of Motion Control Instructions Supported by G-code Subprograms The following table lists instructions supported by G-code subprograms. High-speed positioning; moving to the specified “G00: High-speed positioning”...
  • Page 528: Format And Use Of G-Code Subprograms

    7 Motion Control MMOV: Value assignment; MADD, MSUB, MMUL, MDIV: Addition, subtraction, multiplication, and division 7.9 Format and Use of G-code Subprograms X 100 ① G-code instructions, as shown in the following table ② Type of function words ③ Parameter value The following table lists supported instructions and function words.
  • Page 529 7.9 Format and Use of G-code Subprograms 7 Motion Control G-code instructions support only immediate operands of the floating-point type (the immediate operands can be converted to the target number of pulses according to the manually set conversion coefficient ). Parameter Supported Floating-point Number Integer...
  • Page 530 7 Motion Control 7.9 Format and Use of G-code Subprograms Towards the positioning or trajectory control, it supports the setting of acceleration/deceleration type/time, maximum speed, base speed, and they must be set in the special elements. The parameters must be set correctly;...
  • Page 531 7.9 Format and Use of G-code Subprograms 7 Motion Control G00: High-speed positioning ◆ Overview The G00 instruction is used to drive three axes to move to the target position or output the specified number of pulses at the specified maximum output frequency of each axis. High-speed G00 X_ Y_ Z_ H3U-PM...
  • Page 532 7 Motion Control 7.9 Format and Use of G-code Subprograms Frequency Output frequency Number of pulses to be output Vbias Vbias Time Tacc Tdec ◆ Note 1) Multiple instruction forms are supported. Instruction Form Description G00 X_ Y_ Z_ Standard format, 3-axis G00 X_ G00 Y_ Single-axis...
  • Page 533 7.9 Format and Use of G-code Subprograms 7 Motion Control Floating-point number format Integer format XKK100 indicates 100 Pls. Position (XYZ) X100 indicates 100 (mm). XDD100 indicates DD100 Pls. FKK200 indicates 200 Hz. Speed (F) F60 indicates 60 (mm/min). FRR200 indicates RR200 Hz. The conversion ratio shall be set based on the special register.
  • Page 534 7 Motion Control G00: High-speed positioning The advanced pulse-by-pulse modulation algorithm is used for S-curve acceleration/deceleration. The frequency of each pulse is adjusted to ensure more smooth positioning. 4) The acceleration/deceleration time can be set separately, within the range 10 to 5000 ms. The time of trapezoid acceleration/deceleration and S-curve acceleration/deceleration can be set separately.
  • Page 535: G01 Linear Interpolation

    G01: Linear interpolation 7 Motion Control G01: Linear interpolation ◆ Overview The G01 instruction is used to perform linear interpolation at up to three axes at the combined output frequency. Linear G01 X_ Y_ Z_ F_ combination H3U-PM Applicable model: interpolation X-axis position X axis target position...
  • Page 536 7 Motion Control G01: Linear interpolation 3D linear interpolation of any type is supported. ◆ Note 1) Interpolation parameters, such as the acceleration/deceleration time, of the master axis prevail. Parameters of the x-axis prevail in case of x-y-z-axes interpolation, x-y-axes interpolation, and x-z-axes interpolation;...
  • Page 537 G01: Linear interpolation 7 Motion Control Instruction Form Description G01 X_ Y_ Z_ F_ Standard format G01 X_ G01 X_ F_ G01 Y_ Single-axis G01 Y_ F_ G01 Z_ G01 Z_ F_ G01 X_ Y_ G01 X_ Y_ F_ G01 Y_ Z_ 2-axis G01 Y_ Z_ F_ G01 X_ Z_...
  • Page 538 7 Motion Control G01: Linear interpolation X100 indicates 100 mm. After conversion, the number of pulses is 100 x 2000 x 1000/1000 = 200,000. F60 indicates 60 mm/min. After conversion, the output frequency is 2000 Hz. 5) Only trapezoid acceleration/deceleration is supported. 6) The acceleration/deceleration time can be set separately, within the range 10 to 500 ms.
  • Page 539: G02 Clockwise Arc Interpolation

    G02: Clockwise arc interpolation; G03: Counterclockwise arc interpolation 7 Motion Control G02: Clockwise arc interpolation; G03: Counterclockwise arc interpolation ◆ Overview These instructions are used to perform clockwise or counterclockwise arc interpolation at combined output frequency at two axes. 3-axis helix interpolation on three planes is supported. G02 X_ Y_ Z_ I_ J_ K_ F_ Clockwise arc or H3U-PM...
  • Page 540 7 Motion Control G02: Clockwise arc interpolation; G03: Counterclockwise arc interpolation ◆ Operands Parameter Bit Element Word Element Immediate Operand Note: The elements in gray background are supported. The immediate operand type is not displayed. For example, X100 indicates the X floating point 100.00. ◆...
  • Page 541 G02: Clockwise arc interpolation; G03: Counterclockwise arc interpolation 7 Motion Control The following is a diagram of counterclockwise arc interpolation. It indicates an counterclockwise arc interpolation, wherein (150, 100) indicates the target absolute position of the x- and y-axes. When the target position is the same, an example is provided on generation of an arc less than 180 degrees and more than 180 degrees in IJ (center coordinate) mode and in R (radius) mode respectively.
  • Page 542 7 Motion Control G02: Clockwise arc interpolation; G03: Counterclockwise arc interpolation 8) During arc interpolation (CW, CCW, G02, or G03), interpolation parameters, such as the acceleration/deceleration time, of the master axis prevail. For example, parameters of the x-axis prevail on the XY plane; parameters of the y-axis prevail on the YZ plane; and parameters of the z-axis prevail on the ZX plane.
  • Page 543 G02: Clockwise arc interpolation; G03: Counterclockwise arc interpolation 7 Motion Control ◆ Note 1) Interpolation parameters, such as the acceleration/deceleration time, of the master axis prevail. For example, parameters of the x-axis prevail on the XY plane; parameters of the y-axis prevail on the YZ plane;...
  • Page 544 7 Motion Control G02: Clockwise arc interpolation; G03: Counterclockwise arc interpolation Instruction Form Description G02/G03 X_ R_ G02/G03 X_ R_ F_ G02/G03 Y_ R_ 2-axis arc interpolation on the XY plane in R mode G02/G03 Y_ R_ F_ G02/G03 X_ Y_ R_ G02/G03 X_ Y_ R_ F_ G02/G03 X_ Z_ R_ G02/G03 X_ Z_ R_ F_...
  • Page 545 G02: Clockwise arc interpolation; G03: Counterclockwise arc interpolation 7 Motion Control Instruction Form Description G02/G03 Y_ R_ G02/G03 Y_ R_ F_ G02/G03 Z_ R_ 2-axis arc interpolation on the YZ plane in R mode G02/G03 Z_ R_ F_ G02/G03 Y_ Z_ R_ G02/G03 Y_ Z_ R_ F_ G02/G03 X_ Y_ R_ G02/G03 X_ Y_ R_ F_...
  • Page 546 7 Motion Control G02: Clockwise arc interpolation; G03: Counterclockwise arc interpolation Instruction Form Description G02/G03 X_ R_ G02/G03 X_ R_ F_ G02/G03 Z_ R_ 2-axis arc interpolation on the ZX plane in R mode G02/G03 Z_ R_ F_ G02/G03 X_ Z_ R_ G02/G03 X_ Z_ R_ F_ G02/G03 X_ Y_ R_ G02/G03 X_ Y_ R_ F_...
  • Page 547 G02: Clockwise arc interpolation; G03: Counterclockwise arc interpolation 7 Motion Control X100 indicates 100 mm. After conversion, the number of pulses is 100 x 2000 x 1000/1000 = 200,000. F60 indicates 60 mm/min. After conversion, the output frequency is 2000 Hz. 5) Only trapezoid acceleration/deceleration is supported.
  • Page 548: G04 Delay Waiting

    7 Motion Control G04: Delay waiting G04: Delay waiting ◆ Overview The TIM instruction is used to set the delay before the next motion control instruction is executed. G04 P_ H3U-PM Delay waiting Applicable model: Delay Delay, in ms ◆ Operands Parameter Bit Element Word Element...
  • Page 549: G90 Absolute Position Modal

    G90: Absolute position modal; G91: Relative position modal 7 Motion Control G90: Absolute position modal; G91: Relative position modal ◆ Overview The ABST and INCT modal instructions are used to configure the current motion control coordinate system in absolute or relative position mode. Absolute position H3U-PM Applicable model:...
  • Page 550: Selection Of The Xy-Plane Modal Instruction

    7 Motion Control G17, G18, and G19 G17, G18, and G19 ◆ Overview The G17, G18, and G19 modal instructions are used to configure the main plane of the current motion control coordinate system as the XY plane, YZ plane, or ZX plane. They are mainly used for arc and helix interpolation.
  • Page 551 M: Auxiliary parameter number 7 Motion Control M: Auxiliary parameter number ◆ Overview The M instruction is used to enable specific auxiliary functions. Auxiliary parameter M00 – M99 H3U-PM Applicable model: number Note: M auxiliary parameter numbers range from 0 to 99. M02, M30, M98, and M99 have been defined; whereas others are reserved.
  • Page 552: Mxxxx Element

    7 Motion Control M99: Auxiliary parameter number ◆ Operands Parameter Bit Element Word Element Immediate Operand Note: The elements in gray background are supported. The immediate operand type is not displayed. For example, P10 indicates that P is the integer 10. L can be omitted, indicating that the subprogram is called once by default.
  • Page 553 S and T: Auxiliary parameter number 7 Motion Control ◆ Example: It indicates M300 is set after quick positioning and then arc interpolation is performed. S and T: Auxiliary parameter number ◆ Overview The S and T instructions are used for setting the rotational speed of the master axis. Major axis rotational S0.01 –...
  • Page 554: General Positioning Instructions Supported By The H3U-Pm Model

    7 Motion Control S and T: Auxiliary parameter number 7.10 General Positioning Instructions Supported by the H3U-PM Model The H3U-PM model supports some positioning instructions whose usage is the same as that in the H3U model. These instructions can be called only in the main program and subprograms, but cannot be called in the motion control subprograms (MC subprograms and G-code subprograms), as shown in the following table.
  • Page 555: Special Registers For Motion Control In The H3U-Pm Model

    S and T: Auxiliary parameter number 7 Motion Control 7.11 Special Registers for Motion Control in the H3U-PM Model Special element registers range from SM0 to SM299, as shown in the following table. X-axis Y-axis Z-axis Attribute SM0 to 11 SM100 to 111 SM200 to 211 Reserved...
  • Page 556 7 Motion Control S and T: Auxiliary parameter number X-axis Y-axis Z-axis Attribute Stop mode selection SM81 SM181 SM281 OFF: Stop after the current cycle ON: Immediate stop SM82 SM182 (reserved) SM282 (reserved) Electronic cam modification complete flag Key point modification mode selection for an electronic cam SM83 SM183...
  • Page 557 S and T: Auxiliary parameter number 7 Motion Control X-axis Y-axis Z-axis Attribute SD45 SD145 SD245 Electronic gear ratio denominator SD46 and SD47 SD146 and SD147 SD246 and SD247 Current input frequency SD48 and SD49 SD148 and SD149 SD248 and SD249 Cumulative number of pulses input by hand gear Axis offset compensation value (DRV, LIN, and SD50 and SD51...
  • Page 558 7 Motion Control 7.11 Special Registers for Motion Control in the H3U-PM Model ● (SD12, SD13), (SD112, SD113), (SD212, SD213): Start speed (Vbias) It indicates the start speed of pulse output, ranging from 0 to 2,147,483,647. ● (SD16, SD17), (SD116, SD117), and (SD216, SD217): Zero return speed (VRT) 1.
  • Page 559 7.11 Special Registers for Motion Control in the H3U-PM Model 7 Motion Control ● (SD24, SD25), (SD124, SD125), and (SD224, SD225): Origin position (HP) 1. The value range is 0 to ±999,999. 2. When the zero return is finished, CP is updated to HP. ●...
  • Page 560 7 Motion Control 7.11 Special Registers for Motion Control in the H3U-PM Model ● (SD44), (SD144), and (SD244): Electronic cam numerator ● (SD45), (SD145), and (SD245): Electronic cam denominator 1. The hand gear is used to output A/B phase pulses to Ax+, Ax - (x = 0,1,2), Bx+, Bx - (x = 0,1,2). The relationship between input pulse and output pulse is shown in the following figure.
  • Page 561 7.11 Special Registers for Motion Control in the H3U-PM Model 7 Motion Control Input Mode Fed Back by Actual Position Pulse+Direction Phase A/B CW/CCW Others Reserved Note: To switch the input mode, settings must be completed before the function (for example, high-speed counting instruction and electronic cam) is enabled.
  • Page 562 7 Motion Control 7.11 Special Registers for Motion Control in the H3U-PM Model ● (SD78,SD79),(SD178,SD179),(SD278,SD279): Element for setting the number of pulses (delayed startup) The set value takes effect when SMX75 delayed startup is enabled. The value range is 0x0 to 0xFFFFFF. ●...
  • Page 563 8 Electronic Cam 8.1 Establishing a Cam Table ....8.8 Modifying Key Points for Electronic Cams ..........8.1.1 Creating a Cam Table ....8.8.1 Writing Electronic Cam Data ..8.1.2 Editing a Cam Table ....8.8.2 Writing Electronic Cam 8.1.3 Downloading Cam Tables ..Floating-point Decimal Data ..
  • Page 564 8 Electronic Cam Chapter 8 Electronic Cam Two models of H3U PLCs are available: common H3U PLC and H3U-PM motion control PLC. The H3U-PM motion control PLC model has 3-axes electronic cams and hand gears (also called electronic gears). The following figure shows the structure of the 3-axes electronic cam module of an H3U-PM motion control PLC: H3U-0808PMRTA X axis electronic cam...
  • Page 565 8.1 Establishing a Cam Table 8 Electronic Cam 8.1 Establishing a Cam Table The slave axis is driven by the master axis. The relationship between master and slave axes can be indicated by cam table data or electronic gear ratio. You can use cam table data to establish a maximum of 360 key points. The electronic gear ratio of master to slave axis is fixed.
  • Page 566 8 Electronic Cam 8.1 Establishing a Cam Table 8.1.2 Editing a Cam Table Double-click the icon of a created cam table to open the key point editing page. On the key point editing page, select master axis length and slave axis range based on the selected unit. The master axis length is the travel distance of a master axis per cam cycle.
  • Page 567 8.1 Establishing a Cam Table 8 Electronic Cam 8.1.3 Downloading Cam Tables Save the settings and exit. Select CAM Config to download cam tables 1, 2, and 3 to the PLC.
  • Page 568 8 Electronic Cam 8.2 Selecting a Master Axis 8.2 Selecting a Master Axis Signals of a master axis are needed to enable electronic cams or gears. The signals can be generated through external input or internal virtual connection. The following table lists special elements for master axis selection. SM Element for Master Axis Selection SD Element for Master Axis Selection X axis...
  • Page 569 8.4 Starting Electronic Cams or Electronic Gears 8 Electronic Cam 8.4 Starting Electronic Cams or Electronic Gears 8.4.1 Selecting Cam Tables or Electronic Gears You can set different cam tables and select SD element values to select different cam tables or electronic gears. The following table lists special elements for cam table selection.
  • Page 570 8 Electronic Cam 8.4 Starting Electronic Cams or Electronic Gears Timing for startup by software: Cam enabling Startup mode Execution of electronic cam Timing for trigger by external inputs: Cam enabling Startup mode Event trigger mode External start signal Execution of electronic cam Timing for trigger by comparison interrupts: Cam enabling...
  • Page 571 8.4 Starting Electronic Cams or Electronic Gears 8 Electronic Cam Startup latency in software startup mode: Cam enabling Startup latency enabling Number of pulses for startup latency Master axis position … … Execution of electronic Startup latency in event trigger mode: Cam enabling Startup latency enabling...
  • Page 572 8 Electronic Cam 8.5.1 Setting Stop Mode Application: Network 1 Trigger by comp ri on interrupts Cam enabling Network 2 Trigger by counter comparison interrupts Network 3 8.5 Stopping Electronic Cams or Electronic Gears 8.5.1 Setting Stop Mode You can use special SM elements to set the stop mode for electronic cams: a stop after the current cycle or an immediate stop.
  • Page 573 8.5.3 Stop 8 Electronic Cam Setting an Externally Triggered Stop X axis Y axis Z axis SM74 SM174 SM274 OFF: Externally triggered stop disabled ON: Externally triggered stop enabled If an externally triggered stop is enabled, the electronic cam stops based on stop mode settings upon an OFF-to-ON switch of an external stop signal.
  • Page 574 8 Electronic Cam 8.5.5 Flag of End of Cycle and Flag of End Cam enabling Set to OFF by user Stop mode program Stop execution Set to ON Flag bit of running automatically Slave axis position Execution of electronic 8.5.5 Flag of End of Cycle and Flag of End When a cam cycle is finished, the system will automatically set to ON special SM elements for the flag of end of cycle.
  • Page 575 8.5.5 Flag of End of Cycle and Flag of End 8 Electronic Cam 8.6 Scaling Cam tables can be scaled. Master Electronic Slave axis Slave axis axis input gear ratio zoom ratio output Master and slave axes can be scaled by setting special SD elements for electronic gear ratio and slave axis zoom ratio.
  • Page 576 8 Electronic Cam 8.5.5 Flag of End of Cycle and Flag of End When M77 is set to ON, the slave axis zoom ratio is set to 2 (SD173/100 = 2) and will take effect in the next cam cycle. When M76 is set to ON, the slave axis zoom ratio is set to 0.5 (SD173/100 = 0.5) and will take effect in the next cam cycle.
  • Page 577 8.8.1 Writing Electronic Cam Data 8 Electronic Cam Example: The following figure shows M0 and Y0 timing charts of an electronic cam when the X axis is selected as a slave axis. Master axis position (SD48, SD49) 1000 … … …...
  • Page 578 8 Electronic Cam 8.8.1 Writing Electronic Cam Data ◆ Operands Bit Soft Element Word Soft Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number S SM C SD KnX KnY KnM KnS KnSM Modification S SM C SD KnX KnY KnM KnS KnSM Modification S SM C SD KnX KnY KnM KnS KnSM...
  • Page 579: Data Writing

    8.8 Modifying Key Points for Electronic Cams 8 Electronic Cam Cam tables to be modified as specified by CAMWR instructions must exist in the PLC; that is, the cam tables have been downloaded to the PLC through AutoShop. Only cam table data in the unit of pulses can be modified.
  • Page 580 8 Electronic Cam 8.8 Modifying Key Points for Electronic Cams ◆ Operands Bit Soft Element Word Soft Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM T C SD KnX KnY KnM KnS KnSM Modification X Y M T C S SM T C SD KnX KnY KnM KnS KnSM...
  • Page 581 8.8 Modifying Key Points for Electronic Cams 8 Electronic Cam 8.8.3 Reading Electronic Cam Data CAMRD: Reading electronic cam data ◆ Overview The CAMRD instruction reads electronic cam table data in the unit of pulses. Electronic cam data CAMRD m1 m2 D n Applicable Model: reading Cam table to be read...
  • Page 582 8 Electronic Cam 8.8 Modifying Key Points for Electronic Cams ◆ Example: When M10 is set to ON, the PLC executes DCAMRD instructions to read the cam table. The read data is stored in D elements starting with D200. Master and slave axes of each key point occupy two 32-bit registers; that is, each key point occupies four D elements.
  • Page 583 Winding Machines) ◆ Overview This solution describes the application of Inovance H3u-PM motion control PLCs to strapping band winding machines. Different from traditional wire ranging way, the H3u-PM+IS620P electronic cam solution is undemanding for the mechanical structure of devices, which makes it easy to change strapping band width and winding width.
  • Page 584 8 Electronic Cam 8.9 Application Examples (Application of H3U-PM to Strapping Band Winding Machines) A Strapping band is made from polyethylene and polypropylene, squeezed out, and stretched unidirectionally. It can be used to seal up cartons and strap other packaging materials. After a strapping band is squeezed out and stretched by upstream equipment, the strapping band winding machine coils it.
  • Page 585 8.9 Application Examples (Application of H3U-PM to Strapping Band Winding Machines) 8 Electronic Cam 2) Master/Slave Axis Length The number of pulses generated per circle in which the master axis encoder rotates is 2500 x 4 = 10,000 pp (a 2500-cable A/B phase encoder is used, and a multiplier 4 is used for high-speed counting). The wiring ranging servo motor is directly connected to the screw rod through the coupling.
  • Page 586 8 Electronic Cam 8.9 Application Examples (Application of H3U-PM to Strapping Band Winding Machines) The cam moves from the middle of the spool to B and then to A, and returns to the middle of the spool. This completes a cam cycle. 4) Cam Programming Set externally input master axis Start...
  • Page 587 8.9 Application Examples (Application of H3U-PM to Strapping Band Winding Machines) 8 Electronic Cam ◆ Electrical Wiring AC 220 V STOP STOP STOP S/S0 LSP0 S/S1 LSP1 PG1- S/S2 LSP2 PG2- S/S3 24V START0 DOG0 LSN0 DOG1 LSN1 PG1+ START1 START2 DOG2 LSN2 PG2+ H3U-0808PMRTA...
  • Page 588 8 Electronic Cam 8.9 Application Examples (Application of H3U-PM to Strapping Band Winding Machines) Memo NO. ___________ Date ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ___________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ___________________________________________________________________________________...
  • Page 589 9 Communication 9.1 Overview ........... 9.7 CANopen Communication ....9.7.1 CANopen Protocol Selection ..9.2 Serial Port ......... 9.7.2 CANopen Indicators ....9.2.1 Hardware and Communication 9.7.3 Definitions of CANopen Cable .......... Acronyms ........9.2.2 Setting Communication 9.7.4 CANopen Configuration .... Protocols ........
  • Page 590 9 Communication 9.1 Overview Chapter 9 Communication 9.1 Overview The main module of an H3U PLC has Ethernet communication and CAN communication ports, and supports CANlink and CANopen protocols. The module has two independent serial communication ports: COM0 and COM1. COM0 can be used for programming and monitoring.
  • Page 591: Hardware And Communication Cable

    9.2 Serial Port 9 Communication 9.2 Serial Port 9.2.1 Hardware and Communication Cable COM0 is a standard RS-422 interface, and the interface terminal is an 8-hole mouse female connector. The USB communication port is a MiniUSB interface. Interface definition Diagram of COM0 and MiniUSB program downloading ports Pin No.
  • Page 592 9 Communication 9.2.2 Setting Communication Protocols COM1 is connected to other devices through the wiring terminal. 9.2.2 Setting Communication Protocols 1) COM0 protocol configuration By default, the COM0 protocol is a download or Human Machine Interface (HMI) monitoring protocol.
  • Page 593 9.2.2 Setting Communication Protocols 9 Communication Table of protocol configuration COM0 communication COM0 Protocol D8116 Half-duplex/full-duplex mode format Download/HMI Monitoring Protocol Non-02h Not supported Fixed Determined by COM0 Modbus-RTU Slave Station Half-duplex configuration and displayed through D8110 2) COM1 protocol configuration Conditions for protocol switchover: You can switch from one protocol to another on COM1 when the system is running or the user program is disabled.
  • Page 594 9 Communication 9.2.2 Setting Communication Protocols Table of protocol configuration COM1 Half-duplex/full-duplex COM1 Protocol D8126 communication mode format HMI Monitoring Protocol Half-duplex Fixed Modbus-RTU Slave Half-duplex Station/QLINK Modbus-ASC Slave Half-duplex Determined by Station COM1 configuration RS Instruction Half-duplex and displayed through D8120 Modbus-RTU Instruction Half-duplex...
  • Page 595 9.2.2 Setting Communication Protocols 9 Communication 3) Serial port communication format Comparison table of protocol and communication format Protocol Baud Rate Data Bit Check Bit Stop Bit HMI monitoring 9600 Even parity check (E) protocol Modbus-RTU Slave Serial port 0 is checked Serial port 0 is Station through D8110, and serial...
  • Page 596 9 Communication 9.2.2 Setting Communication Protocols ● COM1 M8120 Reserved D8120 Communication format M8121 RS instruction - sending D8121 Communication station number Downloading and HMI monitoring protocols Modbus - communication - communication format execution state M8122 D8122 RS instruction - volume of residual data RS instruction - flag of sending transmitted Modbus - communication error...
  • Page 597 9.2 Serial Port 9 Communication 5) List of communication error codes 0000 Normal Odd/even check error, overflow 6301 error, and frame error 6302 Incorrect communication character Inconsistent communication data 6303 Check whether PLCs are powered 6304 Incorrect data format on, whether the adapter is correctly connected to the controller, and 6305 Incorrect instruction...
  • Page 598 9 Communication 9.3 HMI Monitoring Protocol 9.3 HMI Monitoring Protocol 1) Hardware connection During communication through COM0, devices are connected through RS-422. Only the downloading port can be used. During communication through COM1, devices are connected through RS-485. The wiring terminal is used.
  • Page 599 9.4 Modbus Protocol 9 Communication 9.4 Modbus Protocol RS-485 signals underlie Modbus communication. Twisted pairs are used for connection. Therefore, the transmission distance is long and up to 1,000 meters. With high interference immunity and low cost, Modbus communication is popular among industrial control devices. Many AC drive and controller manufacturers use Modbus protocols.
  • Page 600: Modbus Instruction)

    9 Communication 9.4 Modbus Protocol 3) Protocol description Modbus instructions are valid on COM1. You can use Modbus instructions to program, and use the PLC as a master station to communicate with the Modbus slave station. Multiple Modbus instructions can be available and driven at a time. The instructions are executed in sequence.
  • Page 601 9.4 Modbus Protocol 9 Communication coils at a time. If the number of registers to be read or written exceeds the limit, a parameter error will be returned. 4) Example 1: The PLC continuously reads registers whose slave address is 100. Data is stored in D10.
  • Page 602 9 Communication 9.4 Modbus Protocol 00 64 indicates the register address. It is the value of D1. 00 01 indicates the number of registers. It is the value of D2. C5 D5 indicates the CRC code. If the slave is an H3U PLC, select the Modbus-RTU slave station protocol. The ladder chart is as follows. M8002 H5100 D100〕...
  • Page 603 9.4 Modbus Protocol 9 Communication 5) Example 2: The PLC executes three Modbus instructions to read registers whose slave addresses are H0064, F001, and F805, respectively. Data is stored in D10, D20, and D30. The ladder chart is as follows. M8002 H103 Station number and command...
  • Page 604 9 Communication 9.4 Modbus Protocol 1) Software configuration for slave station a) COM0 configuration page b) COM1 configuration page...
  • Page 605 9.4 Modbus Protocol 9 Communication 3) Protocol description Modbus slave station protocols include the Modbus-RTU protocol (the RTU protocol) and the Modbus- ASC protocol (the ASC protocol). The data link used through the RTU protocol is different from that used through the ASC protocol.
  • Page 606 9 Communication 9.4.3 Modbus Parameter Numbers and Data Addressing Incorrect response: See "g) Incorrect response frame". • N: The PLC can read a maximum of 255 coils at a time. b) Parameter number 0x03 (03): Reads registers. Request frame format: slave address + 0x03 + head address of registers + number of registers + CRC code Definition of Data Number of...
  • Page 607 9.4.3 Modbus Parameter Numbers and Data Addressing 9 Communication Parameter number 0x05 (05): Writes a single coil. Request frame format: slave address + 0x05 + address of the coil + state of the coil + CRC code Definition of Data Number of Description (Byte)
  • Page 608 9 Communication 9.4.3 Modbus Parameter Numbers and Data Addressing Response frame format: slave address + 0x06 + head address of the register + register value + CRC code Definition of Data Number of Description (Byte) Bytes Slave address The value ranges from 1 to 247, set by D8121. 0x06 (parameter The instruction is to write a single register.
  • Page 609 9.4.3 Modbus Parameter Numbers and Data Addressing 9 Communication Incorrect response: See "g) Incorrect response frame". • N: The H3U PLC can write a maximum of 255 coils at a time. Parameter number 0x10 (16): Writes multiple registers. Request frame format: slave address + 0x10 + head address of registers + number of registers + number of bytes + register value + CRC code Definition of Data Number of...
  • Page 610 9 Communication 9.4.3 Modbus Parameter Numbers and Data Addressing g) Incorrect response frame Incorrect response: slave address + (parameter number + 0 x 80) + error code +CRC code Definition of Data Number of Description (Byte) Bytes Slave address The value ranges from 1 to 247, set by D8121. Parameter number It indicates an incorrect parameter number.
  • Page 611 9.4.4 Programming Method for Communication Among Multiple PLCs Through Modbus Protocols 9 Communication ◆ Note: When the system accesses 32-bit registers of C200 to C255 through Modbus protocols, one register should be regarded as two because the space occupied by a 32-bit register doubles that occupied by a 16-bit register.
  • Page 612 9 Communication 9.4.4 Programming Method for Communication Among Multiple PLCs Through Modbus Protocols M8000 K2M10 MODBUS H206 K100 K7 D50 Write Head Seven Head operation address of consecutive address of for slave 2 the slave variables in data to be register operation sent...
  • Page 613 9.4.4 Programming Method for Communication Among Multiple PLCs Through Modbus Protocols 9 Communication This programming method is applicable to other slave stations. Note: A station number cannot be reused.
  • Page 614: Configuration Table

    9 Communication 9.5.1 Protocol Setting Method for Modbus Configuration Table 9.5 Modbus Configuration and Usage Programming with Modbus instructions is flexible, and user programs are easy to understand. However, if a slave station is disconnected during communication, the program scan duration will be affected, which will affect control and may even cause scan timeout alarms.
  • Page 615: Setting The Modbus Configuration Table

    9.5.2 Setting the Modbus Configuration Table 9 Communication 9.5.2 Setting the Modbus Configuration Table In the Project Manager window, double-click Modbus Configuration. You can click Add to add communication configuration items. The data in the table can be edited. All items are operands required by instructions shown in the Modbus ladder chart, which must be entered based on desired operations and D variables.
  • Page 616 9 Communication 9.5.2 Setting the Modbus Configuration Table As the baud rate of Modbus communication through the RS-485 interface is normally 9600 bps, the number of "cyclic" items is limited to 10, and the number of "triggered" items per second is limited to 10. In this case, data can be exchanged timely.
  • Page 617: Canlink Communication

    For details about register addresses of slave AC drives, see Appendix B of the MD500 Series General- Purpose AC Drive User Manual (visit www.inovance.cn to download the latest version), in which parameter number addresses, state, start/stop control, frequency instructions, and alarms are defined.
  • Page 618: Canlink Network

    9 Communication 9.6.2 CANlink Network On a CANlink3.0 network, one or more slave stations must exist, which can be H2U IO/AI/AO/AM/PT/TC remote extension modules, MD AC drives with CANlink3.0 interface cards, IS servo drivers with CANlink3.0 interface cards, H3U/H2U-XP/H1U-XP PLCs, or devices developed based on the CANlink3.0 protocol. Master and slave stations on a CANlink3.0 network communicate with each other by automatically sending and writing data rather than in query-response mode.
  • Page 619 9.6.2 CANlink Network 9 Communication Diagram of CANlink interface definition Definition of CANlink interface pins Pin No. Signal Description +24 V External power supply +24 V DC CANH Positive CAN bus PGND Shield ground wire, connected to the shield layer of the communication cable CANL Negative CAN bus...
  • Page 620 9 Communication 9.6.2 CANlink Network 2) DIP switch DIP switches of H3U-3232MT/R and H3U-0808PMRTA models differ from that of the H3U-1616MT/R-XP model in design and usage. a) H3U-3232MT/R and H3U-0808PMRTA models H3U-3232MT/R and H3U-0808PMRTA models have 8-digit DIP switches. The following describes the definition of an 8-bit DIP switch.
  • Page 621 9.6.2 CANlink Network 9 Communication H3U -1616MT/R-XP model) CAN DIP switch definition ( Baud Rate: 2 Bits Station Number and IP Address: 6 Bits RS485 Baud rate Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0...
  • Page 622 9 Communication 9.6.2 CANlink Network M Element Definition D Element Definition Element Element Number of the station with CANopen M8287 Reserved D8287 configuration errors M8288 Reserved D8288 CANopen configuration error number CAN bus error count (upper eight bits indicate M8289 Reserved D8289 received errors and lower eight bits indicate...
  • Page 623: Canlink Software Configuration

    9.6.3 CANlink Software Configuration 9 Communication 9.6.3 CANlink Software Configuration Take the following steps to configure a CANlink network. ● Configure the CANlink network through AutoShop and define the data to be exchanged. ● Download configurations to the H3U PLC. ●...
  • Page 624 9 Communication 9.6.3 CANlink Software Configuration b) The CANlink Config icon is displayed. Double-click CANlink Config. The CANlink3.0 Config Wizard page is displayed, as shown in the following figure. ● Baud Rate (required) Eight options are available for different scenarios: 20 Kbps, 50 Kbps, 100 Kbps, 125 Kbps, 250 Kbps, 500 Kbps, 800 Kbps, and 1 Mbps.
  • Page 625 9.6.3 CANlink Software Configuration 9 Communication 2) Click Next. The following window is displayed. ● Add After configuring a slave station, click Add. The station is added to the list. ● Delete Select a station, click Delete, and then click OK (you can select multiple stations at a time). ●...
  • Page 626 9 Communication 9.6.3 CANlink Software Configuration 3) The following window is displayed. a) Net Info Baud Rate: Indicates the baud rate of the master station. Net Heartbeat: The heartbeat function is enabled by selecting this parameter. Net Load: Computes the real-time load of the network (this parameter is displayed only when the network load is monitored during running of devices).
  • Page 627 9.6.3 CANlink Software Configuration 9 Communication b) Net Management ① Start Network (OFF) (enabled when monitoring is enabled): Starts and stops network communication. ② Synchronous Send: Synchronization will be triggered. You can enable the function in the user program by setting M8291. M8291 will be automatically reset after synchronous data frames are sent. ③...
  • Page 628 9 Communication 9.6.3 CANlink Software Configuration • If you select a configuration item and press Insert, an empty configuration line will be added following the item. If you select a configuration item and press Delete, the item will be deleted. In addition, you can press shortcut keys or right-click an item to copy-paste or delete it, and insert or delete a line.
  • Page 629 9.6.3 CANlink Software Configuration 9 Communication ● Synchronous Write configuration for the master station When the trigger condition (M) is set, the Synchronous Send configuration for the master station takes effect. You can select different trigger conditions (M) to display, add, modify, or delete synchronization configurations.
  • Page 630 9 Communication 9.6.3 CANlink Software Configuration If only one address is processed for one trigger element, the servo will return an error so that synchronization cannot continue. The error will be recorded in D8307 of the master station. Error codes are listed in Section 9.11.6.
  • Page 631 Different from error codes for the master station, an error code for a slave PLC does not include the station number. 9.6.4 Examples of Slave Station (Servo and AC Drive) Access Currently, Inovance PLCs (H3U, H2U-XP, and H1U-XP), Inovance AC drives (MD380 and MD500), Inovance servos (IS620P), and remote extension modules support CANlink3.0. 1) Servo driver access...
  • Page 632 9 Communication 9.6.4 Examples of Slave Station (Servo and AC Drive) Access Parameter Effective Name Setting Range Unit Default Type Mode Number Time 0: CANLink protocol CAN communication Upon power- Stop H0C-15 1: Reserved protocol selection on again setting (CANopen protocol) •...
  • Page 633 9.6.4 Examples of Slave Station (Servo and AC Drive) Access 9 Communication Configure the AC drive first. Fd-02 is 3 (station number), the number at the thousands place of Fd-00 is 5 (baud rate), F0-02 is 2 (communication command channel), and F0-03 is 3 (the master frequency source X is AI2).
  • Page 634 9 Communication 9.6.4 Examples of Slave Station (Servo and AC Drive) Access The following figure shows the application program. Initial pulse No 4DAR reset parameter contact 4DAR reset enabling AC drive control instruction 4DAR input setting Write AC drive control enabling...
  • Page 635: Troubleshooting For Canlink Communication

    9.6.5 Troubleshooting for CANlink Communication 9 Communication AC drive control instruction Write AC drive control enabling 9.6.5 Troubleshooting for CANlink Communication Indicator State Indication CANlink bus not connected or disconnected CANlink bus connected (remote frames received on the node) Communication (green) During CANlink communication, one blink per frame of Blinking ( ≤...
  • Page 636: Canopen Communication

    9.7.1 CANopen Protocol Selection Set M8280 to 1. Power off and then on the device or switch it from STOP to RUN. When D8280 = 100, switch to the CANopen protocol. H3U series supports CANopen DS301. Software Function Slave Station...
  • Page 637: Canopen Indicators

    9.7.2 CANopen Indicators 9 Communication Software Function Slave Station Master Station Module 1 Mbps/25 m 1 Mbps/25 m 800 Kbps/50 m 800 Kbps/50 m 500 Kbps/100 m 500 Kbps/100 m 250 Kbps/250 m 250 Kbps/250 m Baud rate and communication 125 Kbps/500 m 125 Kbps/500 m distance...
  • Page 638: Canopen Configuration

    9 Communication 9.7.4 CANopen Configuration Sync frames are used for synchronous transmission through PDOs. COB-ID: Communication Object Identifier Each CANopen frame starts with a COB-ID. A COB-ID is not the slave station number. However, it is associated with the slave station number by default. 9.7.4 CANopen Configuration 1) Configuring the master station Open AutoShop.
  • Page 639 9.7.4 CANopen Configuration 9 Communication Double-click a CANopen slave station in the list of CANopen devices or drag a CANopen slave station to the list. If no slave station is available, right-click the list icon to import the EDS file. The file can be obtained from the manufacturer.
  • Page 640 9 Communication 9.7.4 CANopen Configuration ① Network Management Node ID: Indicates the master station number. If the station number is identical to the PLC number, the PLC will be initialized as the CANopen master station. If the station number is different from the PLC number, the PLC will be initialized as a CANopen slave station.
  • Page 641 9.7.4 CANopen Configuration 9 Communication Value State Initializing Stopped Operational Pre-operational Offline • If no slave station exists, the register will not be updated. For example, if station 3 does not exist, data on D7803 will not be updated. • To enable this function, you need to configure heartbeat or node protection for the slave station because the node state is fed back by heartbeats or node protection frames.
  • Page 642 9 Communication 9.7.4 CANopen Configuration ① Network State Start Monitor: Information monitoring is enabled by clicking this option. Monitoring is disabled by clicking the option again. Network Load: Monitors the network load in real time. Network state table: Displays the station state. The table is applicable only to the master station. The state value is from the node state monitoring register.
  • Page 643 9.7.4 CANopen Configuration 9 Communication a) Convention Node ID: Indicates the ID of a node. Enable Expert setting: When this option is selected, detailed configurations are displayed. By default, the option is not selected. Ignore error and continue configuration SDO ①...
  • Page 644 9 Communication 9.7.4 CANopen Configuration ② Heartbeat attributes Enable Heartbeat: If this option is selected, heartbeats will be generated. By default, the option is selected. When the option is selected, the master station will monitor the heartbeat state by default. Production Time (ms): Indicates the cycle for heartbeat sending.
  • Page 645 9.7.4 CANopen Configuration 9 Communication ● PDO enabling You can check the box in front of the number to enable a PDO. The PDO in the EDS file that takes effect by default should be checked first. ● Editing PDO mapping You can click Add PDO mapping, Edit, or Delete to edit PDO mapping.
  • Page 646 9 Communication 9.7.4 CANopen Configuration The event time can be set after "asynchronization-specified by the configuration file (type 255)" is selected. If the value is 0, the function is disabled. If the value is not 0, the event time is the cycle for data sending. (Data sending is limited by the suppression time.) The following figure shows the example of loop-synchronization (type 2).
  • Page 647 9.7.4 CANopen Configuration 9 Communication ● SDO editing Add: Adds configurations. It is used to assign initial values to ODs of a slave station. Edit: Edits configurations. Delete: Deletes configurations. ④ Online debugging Click the Debug tab. The following page is displayed. If The program is running prohibited SDO, NMT access is selected, the function is disabled.
  • Page 648 9 Communication 9.7.4 CANopen Configuration SDO Error Steps: Indicates the SDO error number. This number corresponds to the Service Data Objects tab. Diagnosis String: Indicates the error message (SDO error). Emergency error message: Indicates an emergency error frame (the system monitors real-time errors and caches five error messages in the background;...
  • Page 649: Troubleshooting For Canopen Communication

    9.7.5 Troubleshooting for CANopen Communication 9 Communication 9.7.5 Troubleshooting for CANopen Communication 1) Checking whether CANopen is supported Device Check Check the D8280 value. If D8280 = 100, CANopen is supported; otherwise, CANopen is not supported. AC drive/servo Check the software version. For details, see the user manual. 2) Checking the build-out resistor Power off all devices.
  • Page 650 9 Communication 9.7.6 List of Fault Codes Abort Code Function 0503 0000 Trigger bits not alternated 0504 0000 SDO protocol timeout 0504 0001 Invalid or unknown client/server command word 0504 0002 Invalid block size (for the block transfer mode only) 0504 0003 Invalid serial number (for the block transfer mode only) 0503 0004...
  • Page 651 9.7.6 List of Fault Codes 9 Communication Emergency Description error code 42xx Device temperature 50xx Hardware 60xx Software 61xx Internal software 62xx User software 63xx Setting 70xx Extra module 80xx Monitoring 81xx Communication 82xx Protocol error 90** External error F0** Extra function FF** Special device...
  • Page 652: Ethernet Communication

    9 Communication 9.8.1 Hardware Interface and IP Settings Emergency Description error code 8150 CAN-ID impulse 8200 Protocol error 8210 Incorrect PDO length 8220 Excessive PDO length 8240 Unidentifiable sync data length 8250 RPDO timeout 9000 External error F000 Extra function error FF00 Special device error 9.8 Ethernet Communication...
  • Page 653: Ethernet Configuration

    9.8.2 Ethernet Configuration 9 Communication Silk Screen Terminal Function RJ45 RJ45 interface Ethernet communication interface DIP switch board Ones place of the last segment of the IP address (0 to F) Tens place of the last segment of the IP address (range of tens DIP switch board place + ones place: 0 to FF) Blinking: Data being transmitted...
  • Page 654 9 Communication 9.8.2 Ethernet Configuration If the device serves as a slave station, you only need to configure the IP address. If the device serves as the master station, you need to configure the master station. ● IP address: It is a device identifier on a network. The IP address of each device must be unique; otherwise, the device cannot be connected to the network.
  • Page 655: Soft Element Access Addresses When The H3U Plc Serves As A Slave Station

    9.8.3 Soft Element Access Addresses When the H3U PLC Serves as a Slave Station 9 Communication ● Data length: It is the length of the data to be accessed. If the master station will access M0 to M10 (11 elements) of a slave station, the value is 11. ●...
  • Page 656: Special Ethernet Soft Elements

    9 Communication 9.8.4 Special Ethernet Soft Elements Register addressing Variable Head address Number of registers D0-D8511 0 (0) 8512 SD0-SD1023 0x2400 (9216) 1024 R0-R32767 0x3000 (12288) 32768 T0-T511 0xF000 (61440) C0-C199 0xF400 (62464) C200-C255 0xF700 (63232) 56 (32-bit) 9.8.4 Special Ethernet Soft Elements Element Function Element...
  • Page 657: Downloading Over The Ethernet And Monitoring

    9.8.6 Downloading over the Ethernet and Monitoring 9 Communication ● If a gateway is used, check if the gateway address is correctly configured. ● Check whether slave register addresses in the configuration table are correct (hexadecimal). ● If two devices with IP addresses of different network segments (the first three segments) need to communicate with each other, a router is needed to connect the devices.
  • Page 658 9 Communication 9.8.6 Downloading over the Ethernet and Monitoring • Firmware upgrade is not supported.
  • Page 659 10 Extension Modules 10.1 Overview ......... 10.2 Local Extension Modules....10.2.1 Configuration ......10.2.2 Digital Input Module (AM600- 1600END) ........ 10.2.3 Digital Output Module (AM600-0016ETN, AM600- 0016ETP, and AM600- 0016ER) ........10.2.4 Analog Input Module (AM600-4AD) ......10.2.5 Analog Output Module (AM600-4DA) ......
  • Page 660: Chapter 10 Extension Modules

    10 Extension Modules 10.1 Overview Chapter 10 Extension Modules 10.1 Overview The H3U enables access to local or remote extension modules through module configuration. (1) Example of H3U configuration for local extension modules AM600 AM600 AM600 AM600 local local local local expansion expansion...
  • Page 661 10.1 Overview 10 Extension Modules The H3U can connect up to 30 CANopen AM600RTU-COP devices, and each AM600RTU-COP can connect up to eight local extension modules. (4) Example of H3U configuration for CANlink bus-based access to extension modules AM600 AM600 AM600 AM600 H3 U...
  • Page 662: Local Extension Modules

    10 Extension Modules 10.2.1 Configuration 10.2 Local Extension Modules 10.2.1 Configuration Local extension modules operate based on hardware configuration. Double-click Module config in AutoShop. Module After a module is created, the configuration interface is displayed. Double-click the module to automatically add it to the extension rack, or use the left mouse button to drag it onto the extension rack.
  • Page 663 10.2.2 Digital Input Module (AM600-1600END) 10 Extension Modules (2) Terminal definition and external wiring Interface Name Function User input terminal 8-channel inputs x 2 Corresponding to various input signals Signal indicators ON: input active OFF: input inactive Local extension module Connect back-end module back-end interface Local extension module...
  • Page 664 10 Extension Modules 10.2.2 Digital Input Module (AM600-1600END) Network Type Function Remarks Name The 2nd Group of Input Interfaces The 2nd group of user Input SINK/SOURCE input input 0 The 2nd group of user Input SINK/SOURCE input input 1 The 2nd group of user Input SINK/SOURCE input input 2...
  • Page 665: Digital Output Module (Am600-0016Etn Am600-0016Etp, And Am600- 0016Er)

    10.2.3 Digital Output Module (AM600-0016ETN, AM600-0016ETP, and AM600- 0016ER) 10 Extension Modules 10.2.3 Digital Output Module (AM600-0016ETN, AM600-0016ETP, and AM600- 0016ER) (1) Specifications ● Digital transistor output modules Item AM600-0016ETP AM600-0016ETN Output channel Output connecting mode 18-point wiring terminal 18-point wiring terminal Output type Transistor, high-side output Transistor, low-side output...
  • Page 666 10.2.3 Digital Output Module (AM600-0016ETN, AM600-0016ETP, and 10 Extension Modules AM600- 0016ER) Item AM600-0016ER Isolation method Mechanical isolation Output action display Output indicator ON when the relay is excited (2) Terminal definition and external wiring ● Terminal definition of the transistor output module (AM600-0016ETP) Network Type Function...
  • Page 667 10.2.3 Digital Output Module (AM600-0016ETN, AM600-0016ETP, and 10 Extension Modules AM600- 0016ER) ● Terminal definition of the transistor output module (AM600-0016ETN) Network Type Function Remarks Name Interface for the 1st group of outputs User output 0 in the Output SINK, active low 1st group User output 1 in the Output...
  • Page 668 10.2.3 Digital Output Module (AM600-0016ETN, AM600-0016ETP, and 10 Extension Modules AM600- 0016ER) ● Terminal definition of the relay output module (AM600-0016ER) Network Type Function Remarks Name Interface for the 1st group of outputs User output 0 in the Output SINK output, active high 1st group User output 1 in the Output...
  • Page 669 10.2.3 Digital Output Module (AM600-0016ETN, AM600-0016ETP, and 10 Extension Modules AM600- 0016ER) ● AM600-0016ETN output wiring AM600-0016ETN output wiring diagram Load Load Load Module circuit Load DC 24V ● AM600-0016ETP output wiring AM600-0016ETP output wiring diagram Load Load Load Internal circuit Load DC24V...
  • Page 670: Analog Input Module (Am600-4Ad)

    10.2.3 Digital Output Module (AM600-0016ETN, AM600-0016ETP, and 10 Extension Modules AM600- 0016ER) ● AM600-0016ER output wiring AM600-0016ER output wiring diagram load Ι load Ι COM0 AC110/220V or DC24V Internal circuit load ΙΙ load ΙΙ COM1 AC110/220 or DC24V DC24V (3) Module usage When a local digital output extension module is connected to the main module, the SN of the Y port on the extension module follows that of the Y port on the main module.
  • Page 671 10.2.4 Analog Input Module (AM600-4AD) 10 Extension Modules Item Specifications Accuracy (ambient temperature: Voltage: ±0.3%, current: ±0.8% (full ranges) 0–55°C) Voltage limits ±15 V Current limits ±30 mA (transient), ±24 mA (average) Maximum common mode voltage 30 VDC between channels I/O terminals isolated from power supply;...
  • Page 672 10 Extension Modules 10.2.4 Analog Input Module (AM600-4AD) ● External wiring Analog input wiring diagram Voltage input Input impedance +15V 450k 450k * 1Shield grounding (b) Current input Input impedance Must be +15V connected 450k 450 k AGND Shield grounding AGND +15V +24V...
  • Page 673 10.2.4 Analog Input Module (AM600-4AD) 10 Extension Modules (4) Example for H3U+AM600-4AD programming ① Select the module AM600-4AD to be added from the module list. Double-click the module to automatically add it to the extension rack, or use the left mouse button to drag it onto the extension rack.
  • Page 674 10 Extension Modules 10.2.4 Analog Input Module (AM600-4AD) The relationship between mapping and actual input analog value is as follows: Rated Input Rated Digital Limiting Digital Input Limit Range Range Value Value –20,000 to –10 V to +10 V –11 V to +11 V –22,000 to +22,000 +20,000 0 V to 10 V...
  • Page 675: Analog Output Module (Am600-4Da)

    10.2.5 Analog Output Module (AM600-4DA) 10 Extension Modules 10.2.5 Analog Output Module (AM600-4DA) (1) Specifications Item Specifications Output channel 24 VDC (20.4 VDC to 28.8 VDC) (–15% to Supply voltage +20%) Voltage output load 1 kΩ to 1 MΩ Current load impedance 0 Ω...
  • Page 676 Network 10 Extension Modules 10.2.5 Analog Output Module (AM600-4DA) Type Function Remarks Name Output V+ of channel 2 Voltage output Voltage/Current Output V-/I- of channel 2 output Output I+ of channel 2 Current output Internally Shielding ground connected to housing ground Output V+ of channel 3 Voltage output...
  • Page 677 10.2.5 Analog Output Module (AM600-4DA) 10 Extension Modules (b) Current output Motor drive module, etc 100Ω Digital conversion 600Ω +15V +24V DC/DC 24Vdc external power Fliter converter AGND -15V AGND ② Connection for current-controlled signal • Use 2-core shielded twisted pair cable as power cable. •...
  • Page 678 10 Extension Modules 10.2.5 Analog Output Module (AM600-4DA) On the General Configuration interface of the AM600-4DA module, enable Channel-0, and configure Conversion Mode as -10V~10V voltage output. State Output After Stop can also be configured. On the configuration interface, enable the corresponding channel. Disable unused channels to reduce the scan duration.
  • Page 679 10.2.5 Analog Output Module (AM600-4DA) 10 Extension Modules ③ On the IO Map tab page, map CH0 of 4DA module to D0 of element D. The relationship between elements and actual analog values is as follows: Rated Output Rated Digital Value Output Limit Range Limiting Digital Range Value...
  • Page 680: Remote Extension Modules

    10 Extension Modules 10.3.1 AM600RTU-COP Remote Extension Module ④ Use ladder graphic programming language to program DA output. As –10 V to +10 V corresponds to the digital of –20,000 to +20,000, assign 20,000 to D0, and the output voltage of the module's channel 0 is +10 V.
  • Page 681 10.3.1 AM600RTU-COP Remote Extension Module 10 Extension Modules ② Right-click CAN Config and choose CANOpen. Click OK. The following interface is displayed.
  • Page 682 (3) Addition of the CANopen device ① Add the AM600RTU-COP CANopen device. Choose CANopen device list > Inovance and double-click AM600RTU-COP or use the left mouse button to drag it to the pane on the right. The AM600RTU-COP communication module is automatically connected to the H3U.
  • Page 683 10.3.1 AM600RTU-COP Remote Extension Module 10 Extension Modules Double-click the extension module. The IO Map tab page shows the register mapping. The main PLC communicates with the communication module over CANopen and reads/writes the map register for remote I/O access. If an analog module is used, you can configure the analog input or output mode on the configuration interface.
  • Page 684 10 Extension Modules 10.3.1 AM600RTU-COP Remote Extension Module 4) CANopen configuration On the CANopen configuration interface, double-click AM600RTU-COP or right-click it and choose Configuration. The AM600RTU-COP configuration interface is displayed, where you can view or set communication parameters. For details, see section Page 635, “9.7 CANopen Communication”...
  • Page 685: Canlink Remote Extension Module

    10.3.2 CANlink Remote Extension Module 10 Extension Modules 10.3.2 CANlink Remote Extension Module The CANlink bus can be used to connect to H2U series remote modules for remote extension. The following figure shows the network diagram of connection between the H3U and H2U series remote modules over the CANlink bus.
  • Page 686 11 Interrupt 11.1 Overview ......... 11.1.1 Overview ......... 11.1.2 Type......... 11.2 External Interrupt ......11.2.1 Overview ......... 11.2.2 Type......... 11.2.3 Application ....... 11.3 Timing Interrupt ....... 11.3.1 Overview ......... 11.3.2 Type......... 11.3.3 Application ....... 11.4 Counting Complete Interrupt ... 11.4.1 Overview ......... 11.4.2 Type of High-speed Counting Interrupt ........
  • Page 687: Chapter 11 Interrupt

    11.1 Overview 11 Interrupt Chapter 11 Interrupt 11.1 Overview 11.1.1 Overview An interrupt is a trigger signal that causes the device to immeately execute interrupt programs (interrupt subprograms) regardless of the calculation cycle of the main program. During sequential programming, the calculation cycle causes a delay and time deviation affects mechanical actions.
  • Page 688: External Interrupt

    11 Interrupt 11.2 External Interrupt 11.2 External Interrupt 11.2.1 Overview The device uses X000-X007 inputs to execute the interrupt subprogram. As external inputs can be processed regardless of the calculation cycle of the PLC, external interrupts can be used for high-speed control and short pulse acquisition. 11.2.2 Type 1) External interrupt event numbers and actions for an H3U standard model Interrupt Number...
  • Page 689: Application

    11.2 External Interrupt 11 Interrupt ● Reuse of pointer numbers • Rising pulse interrupt and falling pulse interrupt (for example, I001 and I000) sharing one input number cannot be written simultaneously. 11.2.3 Application ● Program used for counting rising pulses corresponding to the external input interrupt X02 ①...
  • Page 690: Timing Interrupt

    11 Interrupt 11.3 Timing Interrupt 11.3 Timing Interrupt 11.3.1 Overview Regardless of the calculation cycle of the PLC, the device executes an interrupt program every 1 to 99 ms. The function can be used to process programs at a high speed when the calculation cycle of the main program is long, or to execute programs at particular intervals during sequential calculation.
  • Page 691: Counting Complete Interrupt

    11.4 Counting Complete Interrupt 11 Interrupt ② Content of the interrupt subprogram After M0 is connected, D2 increases by 1 every 10 ms. When D2 is greater than K20000, D2 is reset. ③ Enabling an interrupt (EI) in the main program (MAIN) 11.4 Counting Complete Interrupt 11.4.1 Overview The function is used with the DHSCS comparison setting instruction.
  • Page 692: Pulse Complete Interrupt

    11 Interrupt 11.5 Pulse Complete Interrupt ● Example 2: Main program: Running state I010 interrupt subprogram Running state I0x0 (x = 1 to 8) can be specified based on the D operand range of the DHSCS instruction. When the counter value reaches the preset one, the device executes an interrupt program. If M8059 is set to ON, all high-speed counter interrupts are disabled.
  • Page 693 11.5 Pulse Complete Interrupt 11 Interrupt 11.5.2 Application ① Establishing a Y0 high-speed output port pulse complete interrupt I502 ② Enabling an interrupt in the main program Y0 pulse complete interrupt enabling flag Y0 output complete Running state interrupt enabling ③...
  • Page 694 12 Subprogram 12.1 Overview ......... 12.1.1 H3U Subprogram ....12.1.2 H3U Subprogram Execution Mechanism ...... 12.2 Application of a General Subprogram ........12.3 Application of an Encrypted Subprogram ........12.3.1 Encrypting a General Subprogram ......12.3.2 Calling an Encrypted Subprogram ......12.4 Application of a Subprogram with Parameters ........
  • Page 695: Chapter 12 Subprogram

    12.1 Overview 12 Subprogram Chapter 12 Subprogram 12.1 Overview 12.1.1 H3U Subprogram Overview Up to 512 subprograms are supported. The subprograms can be set to general subprograms, encrypted subprograms, subprograms with parameters, and encrypted subprograms with parameters. For the CALL instruction The capacities of encrypted subprograms, subprograms with parameters, and general subprograms are not restricted.
  • Page 696: H3U Subprogram Execution Mechanism

    12 Subprogram 12.1 Overview 12.1.2 H3U Subprogram Execution Mechanism The following figure shows the execution logic and cyclic scan mode of the main program and subprograms. Interrupt subprogram Main program Call subprogram CALL SBR_ subprogram Internal processing Return ● Layers of nested subprograms A maximum of six subprograms can be nested.
  • Page 697: Application Of A General Subprogram

    12.2 Application of a General Subprogram 12 Subprogram 12.2 Application of a General Subprogram 1) Creating a general subprogram 2) Calling a general subprogram Net 1 Net Comment Running state...
  • Page 698: Application Of An Encrypted Subprogram

    12 Subprogram 12.3 Application of an Encrypted Subprogram 12.3 Application of an Encrypted Subprogram 12.3.1 Encrypting a General Subprogram For example, right-click SBR_001 and select Encrypt/Decrypt to encrypt SBR_001. After encryption: 12.3.2 Calling an Encrypted Subprogram An encrypted subprogram is called the same way as a general subprogram.
  • Page 699: Application Of A Subprogram With Parameters

    12.4 Application of a Subprogram with Parameters 12 Subprogram 12.4 Application of a Subprogram with Parameters Subprograms can be called on an H3U PLC. A subprogram provides local with parameters with parameters variables (VM and VD variables), allows parameter transmission, and defines I/O parameters. 12.4.1 Creating a Subprogram with Parameters 12.4.2 Defining I/O Parameters 3) Variable address...
  • Page 700: Calling A Subprogram With Parameter

    12 Subprogram 12.4 Application of a Subprogram with Parameters 5) Indicating incorrect variable names ● AutoShop marks in red and underlines incorrect variable names. • Red text indicates invalid syntax. • A variable name must not start with a digit. •...
  • Page 701 12.4 Application of a Subprogram with Parameters 12 Subprogram ● Example: During an arithmetical operation, if SEL = ON, Sin(X) is output; otherwise, Cos(X) is output. Sin(X) Cos(X) X and Y are 32-bit floating-point numbers. SEL is a bit variable. As a subprogram with parameters supports transmission of only 16-bit data, two word elements need to be input.
  • Page 702: Precautions

    12 Subprogram 12.5 Application of an Encrypted Subprogram with Parameters 12.4.4 Precautions ● As re-access is not allowed, a subprogram cannot be called recursively or called within an interrupt. ● High-speed input and output instructions such as OUT C (235-255), PLSY, DPLSY, PLSR, DPLSR, DRVI, DDRVI, DRVA, DDRVA, PLSV, DPLSV, and SPD instructions cannot be used.
  • Page 703 12.4 Application of a Subprogram with Parameters 12 Subprogram Memo No. ___________ Date ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ___________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ___________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________...
  • Page 704 Appendix Appendix A Allocation of Soft Elements SM, SD, D8000, and M8000........A.1 SM Flag and SD Register .... A.2 Special Soft Element Register Range ........... A.3 M8000 Flag and D8000 Register ........Appendix B System Error Code ....B.1 System Error Code D8060 ..B.2 System Error Code D8061 ..
  • Page 705: Appendix

    A.1 SM Flag and SD Register Appendix Appendix Appendix A Allocation of Soft Elements SM, SD, D8000, and M8000 A.1 SM Flag and SD Register The following table lists special element registers. SM Range SD Range 0 to 299 For motion control (H3U-PM model) For motion control (H3U-PM model) 300 to 363 Reserved...
  • Page 706 Appendix A.2 Special Soft Element Register Range X-axis Y-axis Z-axis Attribute Right limit enabling SM77 SM177 SM277 OFF: Disabled; ON: Enabled Electronic cam enabling SM78 SM178 SM278 OFF: Disabled; ON: Enabled Cam cycle end flag SM79 SM179 SM279 OFF: Unfinished; ON: Finished Electronic cam/gear stop flag SM80 SM180...
  • Page 707 A.2 Special Soft Element Register Range Appendix X-axis Y-axis Z-axis Attribute SD30 and SD31 SD130 and SD131 SD230 and SD231 Running speed I (V [I]) SD32 and SD33 SD132 and SD133 SD232 and SD233 Target position II (P [II]) SD34 and SD35 SD134 and SD135 SD234 and SD235 Running speed II (V [II])
  • Page 708: M8000 Flag And D8000 Register

    Appendix A.3 M8000 Flag and D8000 Register A.3 M8000 Flag and D8000 Register The following table lists special element registers. Description Description Element Element System State M8000 ON during operation of the user program D8000 Monitor timer for user program operation M8001 Inverted M8000 state D8001...
  • Page 709 A.3 M8000 Flag and D8000 Register Appendix Description Description Element Element M8029 Multi-cycle instruction execution complete flag D8029 V0 register System mode The system disables the low battery alarm when M8030 D8030 Reserved M8030 is ON. The system clears all volatile memories when M8031 D8031 Reserved...
  • Page 710 Appendix A.3 M8000 Flag and D8000 Register Description Description Element Element M8063 communication D8063 PLC communication error code error Parameter M8064 Blinking STOP D8064 Parameter error code error M8065 Syntax error Blinking STOP D8065 Syntax error code M8066 Circuit error Blinking STOP D8066...
  • Page 711 A.3 M8000 Flag and D8000 Register Appendix Description Description Element Element Customized version of customized software Fxxx, in M8102 Reserved D8102 hexadecimal format Customized iterative version of customized software M8103 Reserved D8103 Fxxx, in hexadecimal format M8104 Reserved D8104 Major version of FPGA software M8105 Reserved D8105...
  • Page 712 Appendix A.3 M8000 Flag and D8000 Register Description Description Element Element M8134 Reserved D8134 Use of HSZ and PLSY speed model comparison pulses M8135 Reserved D8135 D8136 M8136 to Reserved Reserved M8159 D8159 Application instruction expansion function 2 M8160 SWAP function of (XCH) D8160 Set proface screen flag (1) ASC/ASCII/HEX/RS/CCD/LRC/CRC processing...
  • Page 713 A.3 M8000 Flag and D8000 Register Appendix Description Description Element Element M8190 N:N data transmission slave station 7 error D8190 Z5 register M8191 N:N data - transmitting D8191 V5 register N:N protocol compatible with Mitsubishi M8192 D8192 Z6 register communication format M8193 Reserved D8193...
  • Page 714 Appendix A.3 M8000 Flag and D8000 Register Description Description Element Element M8219 C219 control D8219 Reserved M8220 C220 control D8220 Reserved M8221 C221 control D8221 Reserved M8222 C222 control D8222 Reserved M8223 C223 control D8223 Reserved M8224 C224 control D8224 Reserved M8225 C225 control...
  • Page 715 A.3 M8000 Flag and D8000 Register Appendix Description Description Element Element COM3 communication link D8270 M8270 to Reserved Reserved M8279 D8279 CAN communication Protocol switchover flag Valid protocol display M8280 0: CANlink3.0 protocol D8280 300: CANlink3.0 (300 by default) 1: CANopen protocol 100: CANopen M8281 Reserved...
  • Page 716 Appendix A.3 M8000 Flag and D8000 Register Description Description Element Element M8314 Manipulator customized - D8314 Manipulator customized - display of action numbers M8315 Manipulator customized - D8315 Manipulator customized - error display M8316 Manipulator customized - D8316 Manipulator customized - total number of actions M8317 Manipulator customized - D8317...
  • Page 717 A.3 M8000 Flag and D8000 Register Appendix Description Description Element Element M8354 Y0 flag of abnormal end of high-speed output D8354 Reserved M8355 Y0 PLSV2 instruction accelerating flag D8355 Reserved M8356 Y0 PLSV2 instruction decelerating flag D8356 Reserved M8357 Reserved D8357 Reserved M8358...
  • Page 718 Appendix A.3 M8000 Flag and D8000 Register Description Description Element Element M8394 Y2 flag of abnormal end of high-speed output D8394 Reserved M8395 Y2 PLSV2 instruction accelerating flag D8395 Reserved M8396 Y2 PLSV2 instruction decelerating flag D8396 Reserved M8397 Reserved D8397 Reserved M8398...
  • Page 719 A.3 M8000 Flag and D8000 Register Appendix Description Description Element Element M8434 Y4 flag of abnormal end of high-speed output D8434 Reserved M8435 Y4 PLSV2 instruction accelerating flag D8435 Reserved M8436 Y4 PLSV2 instruction decelerating flag D8436 Reserved M8437 Reserved D8437 Reserved M8438...
  • Page 720 Appendix A.3 M8000 Flag and D8000 Register Description Description Element Element M8474 Y6 flag of abnormal end of high-speed output D8474 Reserved M8475 Y6 PLSV2 instruction accelerating flag D8475 Reserved M8476 Y6 PLSV2 instruction decelerating flag D8476 Reserved M8477 Reserved D8477 Reserved M8478...
  • Page 721: Appendix B System Error Code

    B.1 System Error Code D8060 Appendix Appendix B System Error Code The following table lists error codes. B.1 System Error Code D8060 Error Code Error D8060 I/O range or setting error 1000-1377 X input signal error: incorrect or limit-exceeding serial number 0000-0377 Y input signal error: incorrect or limit-exceeding serial number B.2 System Error Code D8061...
  • Page 722: System Error Code D8063

    Appendix B.4 System Error Code D8063 Error Code Content D8062 Communication error in control panel or program connection port 16203 Ethernet configuration: excessive registers 16204 Ethernet configuration: failure to read or write the register 16205 Ethernet configuration: ACK signal 16206 Ethernet configuration: busy slave station 16207 Ethernet configuration: incorrect station number...
  • Page 723: (Extension)

    B.5 System Error Code D8064 Appendix Error Code Content D8063 Communication error 6310 Reserved 6311 Reserved 6312 Incorrect parallel control (1:1) protocol character 6313 Incorrect parallel control (1:1) protocol sum 6314 Incorrect parallel control (1:1) protocol format 6315 Parallel control (1:1) protocol communication timeout 6316-6329 Reserved 6330+10*X...
  • Page 724: System Error Code D8065

    Appendix B.6 System Error Code D8065 Error Code Content D8064 Incorrect system parameter 6404 Incorrect parameter area setting 6405 Incorrect program area setting 6406-6424 Reserved 6425 User program check error, incorrect downloaded data 6426 Incomplete user program, including motion control subprogram 6427 PLC identifier not matching user program identifier 6428...
  • Page 725: System Error Code D8067

    Appendix B System Error Code Appendix Error Code Content D8066 User program logic circuit error 6623 No MC instruction 6624 No MCR instruction 6625 STL used for more than nine consecutive times 6626 Unusable instructions existing in STL-RET 6627 No RET instruction 6628 Invalid instructions in the main program 6629...
  • Page 726 Appendix Appendix B System Error Code Error Code Content D8067 Incorrect instruction parameter and running parameter 6737 Reserved 6738 Reserved 6739 Reserved 6740 Abnormal sampling time 6741 Reserved 6742 Measured variable overflow 6743 Abnormal offset 6744 Abnormal integral term 6745 Differential value overflow due to differential restrictor overflow 6746 Abnormal differential term...
  • Page 727: Appendix C Customized Function - Dhstp Instruction

    Appendix C Customized Function - DHSTP Instruction Appendix Appendix C Customized Function - DHSTP Instruction DHSTP: High-speed comparison interrupt output instruction ◆ Overview The DHSTP instruction is used to output high-speed comparison interrupts. Comparison Applicable model: DHSTP S1 S2 S3 S4 S5 S6 output instruction Comparison position...
  • Page 728 Appendix Appendix C Customized Function - DHSTP Instruction Uniformly-spaced Mode Non-uniformly-spaced Mode [S1]: Comparison position 1 [S1]: Comparison start position [S1 + 2 x (n – 1)]: Comparison position n S1: Comparison position [S1+2]: Comparison end position 2n elements are occupied. n indicates the number of comparisons set for [S2].
  • Page 729: Appendix D Customized Function - Supplementary Description Of Electronic Cam Functions

    Appendix D Customized Function - Supplementary Description of Electronic Cam Functions Appendix Appendix D Customized Function - Supplementary Description of Electronic Cam Functions Note: This function is supported only by versions later than FPGA 386xxxxx (the version is displayed through D8022 [32-bit]).
  • Page 730 Appendix Appendix D Customized Function - Supplementary Description of Electronic Cam Functions Control of virtual master axis frequency and start/stop 32-bit virtual master axis frequency, ranging from 0 to 200 KHz; 1 KHz by default if the preset SD86 and SD85 value is less than or equal to 0;...
  • Page 731 Appendix D Customized Function - Supplementary Description of Electronic Cam Functions Appendix ◆ Operands Bit Soft Element Word Soft Element Operand Real System·User System·User Bit Designation Indexed Address Constant Number X Y M T C S SM D R T C SD KnSM Modification X Y M T C S SM D R T C SD...
  • Page 732 Appendix Appendix D Customized Function - Supplementary Description of Electronic Cam Functions Pulses increased Pulse frequency Pulses reduced Enable DRVA pulse M100 output Enable motion superposition M101 Motion being SM22 superposed When M100 is ON and the DRVA positioning instruction is executed to output pulses, set M101 to enable motion superposition.
  • Page 733 Appendix D Customized Function - Supplementary Description of Electronic Cam Functions Appendix As shown in the figure, O is the origin of coordinates, and C(x,y) is the end of the manipulator. Arm 2 Arm 1 B(x2,y2) A(x1,y1) C(x,y) As shown in the preceding figure, the manipulator is in the homing position. Arm 1 and arm 2 rotate around D and E, respectively.
  • Page 734 Appendix Appendix D Customized Function - Supplementary Description of Electronic Cam Functions SM Element Function SM600 Acceleration/deceleration type, OFF: Trapezoid; ON: S-curve SM601 ON: Teaching operation, X+ SM602 ON: Teaching operation, X- SM603 ON: Teaching operation, Y+ SM604 ON: Teaching operation, Y- SM620 Manipulator operation end flag, valid for one week SM630...
  • Page 735 Appendix D Customized Function - Supplementary Description of Electronic Cam Functions Appendix DT2JUMP: Gantry path-based positioning of a 2-axis Delta DT2JUMP S1 S2 S3 S4 S5 Gantry positioning Applicable model: H3U Target x-coordinate position of the Target x-coordinate manipulator end, floating-point position number Target y-coordinate position of the...
  • Page 736 Appendix Appendix D Customized Function - Supplementary Description of Electronic Cam Functions ● Gantry positioning path End point (target position) Start point (current position)

This manual is also suitable for:

H3u standardH3u-pm motion control

Table of Contents