Xinje XD Series User Manual
Hide thumbs Also See for XD Series:
Table of Contents

Advertisement

Quick Links

XD/XL series PLC
User manual [Instruction]
WUXI XINJE ELECTRIC CO., LTD.
Data No. PD05 20201022 3.5

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Summary of Contents for Xinje XD Series

  • Page 1 XD/XL series PLC User manual [Instruction] WUXI XINJE ELECTRIC CO., LTD. Data No. PD05 20201022 3.5...
  • Page 2 1 Preface ————————————————— 2 Programming summary ————————————————— 3 Soft component functions ————————————————— 4 Basic program instructions ————————————————— 5 Applied instructions ————————————————— 6 High speed counter ————————————————— 7 Pulse output XD/XL series PLC ————————————————— User manual[Instruction] 8 Communication functions ————————————————— 9 PID functions —————————————————...
  • Page 3 Excuse us that we will not inform you if manual is changed.  Contact information If you have any problem about products, please contact the agent or Xinje company. Tel: 0086 510-85134136 85123803 Fax: 0086 510-85111290 Address: Building 7 fourth floor, No.100, Dicui Rd, Wuxi, China.
  • Page 4 Catalog 1 PROGRAMMING SUMMARY ....................9 1-1.PLC F ..........................9 EATURES 1-2.P ....................... 10 ROGRAMMING ANGUAGE 1-2-1 . Type ........................... 10 . 1-2-2 Alternation ......................... 10 . Programming mode....................... 11 2 SOFT COMPONENT FUNCTION ..................12 2-1.S ..................12 UMMARY OF THE OMPONENTS 2-2.S ...................
  • Page 5 3-16. [GROUP] , [GROUPE] ......................75 3-17. P ....................... 76 ROGRAMMING NOTES 4 APPLIED INSTRUCTIONS ..................... 78 4-1.A ..................... 78 PPLIED NSTRUCTIONS 4-2.R ................. 82 EADING ETHOD OF PPLIED NSTRUCTIONS 4-3.P ....................84 ROGRAM NSTRUCTIONS . 4-3-1 Condition Jump [CJ] ......................84 4-3-2 ....
  • Page 6 4-7-6 . Word shift left [WSFL] ..................... 136 . 4-7-7 Word shift right [WSFR] ....................137 4-8.D ........................138 ONVERT 4-8-1 . Single word integer converts to double word integer [WTD] .......... 139 4-8-2 . 16 bits integer converts to float point [FLT] ..............140 4-8-3 ....
  • Page 7 5-7-4 . Read HSC value [DMOV] ....................189 . 5-7-5 Write HSC value [DMOV] ....................190 5-7-6 . The difference between HSC and normal counter ............191 5-8.HSC E ........................192 XAMPLE 5-7.HSC ......................... 194 INTERRUPTION 5-7-1 . Function overview and panel configuration ..............194 ....
  • Page 8 7-3-2 . Parameters Description ....................283 7-4.A ........................284 7-5.A ........................287 DVANCED 7-6.A ......................288 PPLICATION OUTLINES 7-7.A ........................... 289 PPLICATION 8 C LANGUAGE FUNCTION BLOCK ................... 294 8-1.S ..........................294 UMMARY 8-2.I ......................294 NSTRUCTION ORMAT 8-3.O ........................295 PERATION TEPS 8-4.I...
  • Page 9 1.S ..................368 PPENDIX PECIAL UXILIARY ELAY 2.S ................... 374 PPENDIX PECIAL EGISTER 3. S .................... 381 PPENDIX PECIAL LASH EGISTER 4. PLC ................. 384 PPENDIX RESOURCE CONFLICT TABLE 5. PLC ................385 PPENDIX FUNCTION CONFIGURATION LIST...
  • Page 10 1 Programming Summary XD/XL series PLC accept the signal and execute the program in the controller, to fulfill the requirements of the users. This chapter introduces the PLC features, two kinds of programming language and etc. 1-1.PLC Features Programming Language XD/XL series PLC support two kinds of program language, instruction and ladder chart, the two kinds of language can convert to each other.
  • Page 11 Stop PLC when reboot XD/XL series PLC support “Stop PLC when reboot” function. When there is a serious problem during PLC running, this method can stop all output immediately. Besides, if the COM port parameters are changed by mistake, this function can help PLC connect to the PC. Communication Function XD/XL series PLC has many communication modes, such as Modbus-RTU, Modbus-ASCII.
  • Page 12 Instruction Ladder 1-3.Programming mode Direct Input The two kinds of programming language can be input directly in the editing window. The ladder chart window has hint function which improves the programming efficiency greatly. Instruction Configuration Some instruction is complicated to use, like pulse output, PID etc. XDPPro software has the configuration window for these special instructions.
  • Page 13 2 Soft Component Function In chapter 1, we briefly introduce the programming language. However, the most important element in a program is the operands. These elements include the relays and registers. In this chapter, we will describe the functions and using methods of these relays and registers. 2-1.Summary of the Soft Components There are many relays, timers and counters inside PLC.
  • Page 14 XD1/XD2/XL1 does not support extension modules, XD3/XL3 can accept 10 extension modules, XD5/XDM/XDC/XD5E/XDME/XDH/XL5/XL5E/XLME can accept 16 extension modules. Expanding the address number of BD board, starting from X20000 according to octal system, 24-32 points PLC can extend one BD board, 48-60 points PLC can extend two BD boards. (16-point PLC does not support extended BD board, XL/XDH series does not support extended BD board.) The address number of the left extended ED module, starting from Y30000 according to octal...
  • Page 15 There are three timer pulses: 1ms, 10ms, and 100ms. For example, 10ms means accumulate 10ms pulses.  Accumulation/not accumulation The timer has two modes: accumulation timer means even the timer drive coil is OFF, the timer will still keep the current value; while the not accumulation timer means when the accumulation value reaches the set value, the output acts, the accumulation value reset to 0.
  • Page 16 Special secret Register (FS)  The Function of Secret Register A part of the FlashROM register is used to store data in soft components, which are represented by the symbol FS. The values in the FS register can be written but can not be read, so they can be used to protect the intellectual property rights of users.
  • Page 17 Form: Dn[Dm], HDn[Dm], Xn[Dm] , Yn[Dm] , Mn[Dm] , etc. D10[D0] D100 Y0[D0] When D0=0, D100=D10, Y0 is ON. When M2 turns from OFF to ON, D0=5, then D100=D15, Y5 is ON. Therein, D10[D0]=D[10+D0], Y0[D0]=Y[0+D0]. The word offset combined by bit: DXn[Dm] represents DX[n+Dm]. The soft components with offset, the offset can represent by soft component D, HD.
  • Page 18 When M0 changes from OFF to ON, the value in the word which is combined by Y0~Y17 equals to 21, i.e. Y0, Y2, Y4 become ON. Before M1 activates, if D0=0, DX2[D0] represents a word combined by X2~X21. If M1 changes from OFF to ON, D0=3, then DX2[D0] represents a word combined by X5~X24.
  • Page 19 2-3.Soft Components List 2-3-1.Soft Components List XD1 series PLC soft components list: Range Points Name 16 I/O 32 I/O Input points X0~X7 X0~X17 Output points Y0~Y7 Y0~Y17 X10000~X10077(#1 expansion module) ※ …… Input points X11100~X11177(#10 expansion module) Y10000~Y10077(#1 expansion module) ※...
  • Page 20 Special secret FS0~FS47 register Main body ID0~ID99 ID10000~ID10099(#1 expansion module) …… Expansion module 1000 ID10900~ID10999(#10 expansion module) ※ ID20000~ID20099(#1 expansion BD) expansion BD ID20100~ID20199(#2 expansion BD) ID30000~ID30099(#1 expansion expansion ED ED) Main body QD0~QD99 QD10000~QD10099(#1 expansion module) …… Expansion module 1000 QD10900~QD10999(#10 expansion ※...
  • Page 21 Y20000~Y20077(#1 expansion BD) ※ Output points Y20100~Y20177(#2 expansion BD) ※ Input points X30000~X30077(#1 expansion ED) ※ Output points Y30000~Y30077(#1 expansion ED) M0~M7999 8000 ※ HM0~HM959 Internal relay ※ Special purpose SM0~SM2047 2048 S0~S1023 1024 Flow ※ HS0~HS127 T0~T575 ※ Timer HT0~HT95 Precise timer ET0~ET31 C0~C575...
  • Page 22 XD3 series PLC soft components list: Range Points Name 16 I/O 24 I/O 32 I/O 48 I/O 60 I/O Input points X0~X7 X0~X15 X0~X21 X0~X33 X0~X43 8 Output points Y0~Y7 Y0~Y11 Y0~Y15 Y0~Y23 Y0~Y27 8 X10000~X10077(#1 expansion module) ※ …… Input points X11100~X11177(#10 expansion module)...
  • Page 23 expansion ED ID30000~ID30099(#1expansion ED) Main body QD0~QD99 QD10000~QD10099(#1 expansion module) Expansion …… 1000 module QD10900~QD10999(#10 expansion ※ module) QD20000~QD20099(#1 expansion BD) expansion BD QD20100~QD20199(#2 expansion BD) QD30000~QD30099(#1 expansion expansion ED ED) Special coil of Sequence block SEM0~SEM31 instruction WAIT XD5 series PLC soft components list: Range Points Name...
  • Page 24 high speed counter HSC0~HSC39 D0~D69999(firmware V3.5.3 and up) 70000 D0~D59999(firmware V3.5.2 and 60000 down) Data register ※ HD0~HD24999 25000 special purpose SD0~SD4999 5000 ※ special purpose HSD0~HSD1023 1024 FD0~FD8191 8192 FlashROM ※ Register special purpose SFD0~SFD5999 6000 Special secret FS0~FS47 register Main body ID0~ID99...
  • Page 25 XDM series PLC soft components list: Range Points Name 24 I/O 32 I/O 60 I/O Input points X0~X15 X0~X21 X0~X43 Output points Y0~Y11 Y0~Y15 Y0~Y27 X10000~X10077(#1 expansion module) ※ …… 1024 Input points X11700~X11777(#16 expansion module) Y10000~Y10077(#1 expansion module) ※ ……...
  • Page 26 ID20000~ID20099(#1 expansion BD) expansion BD ID20100~ID20199(#2 expansion BD) ID30000~ID30099(#1 expansion expansion ED ED) Main body QD0~QD99 QD10000~QD10099(#1 expansion module) …… Expansion module 1600 QD11500~QD11599(#16 expansion module) ※ QD20000~QD20099(#1 expansion BD) expansion BD QD20100~QD20199(#2 expansion BD) QD30000~QD30099(#1 expansion expansion ED ED) Special coil of Sequence block SEM0~SEM127...
  • Page 27 ※ 1000 HS0~HS999 T0~T4999 5000 ※ Timer HT0~HT1999 2000 precise timer ET0~ET39 C0~C4999 5000 ※ Counter HC0~HC1999 2000 high speed counter HSC0~HSC39 D0~D69999 70000 ※ HD0~HD24999 25000 Data register special purpose SD0~SD4999 5000 ※ special purpose HSD0~HSD1023 1024 FD0~FD8191 8192 FlashROM ※...
  • Page 28 XD5E series PLC soft components list: Range Points Name 30 I/O 60 I/O Input points X0~X17 X0~X43 Output points Y0~Y15 Y0~Y27 X10000~X10077(#1 expansion module) ※ …… 1024 Input points X11700~X11777(#16 expansion module) Y10000~Y10077(#1 expansion module) ※ …… Output points 1024 Y11700~Y11777(#16 expansion module)...
  • Page 29 ID20000~ID20099(#1 expansion BD) expansion BD ID20100~ID20199(#2 expansion BD) ID30000~ID30099(#1 expansion expansion ED ED) Main body QD0~QD99 QD10000~QD10099(#1 expansion module) …… Expansion module 1600 QD11500~QD11599(#16 expansion module) ※ QD20000~QD20099(#1 expansion BD) expansion BD QD20100~QD20199(#2 expansion BD) QD30000~QD30099(#1 expansion expansion ED ED) Special coil of Sequence block SEM0~SEM127...
  • Page 30 S0~S7999 8000 Flow ※ 1000 HS0~HS999 T0~T4999 5000 ※ Timer 2000 HT0~HT1999 precise timer ET0~ET39 C0~C4999 5000 ※ Counter HC0~HC1999 2000 high speed counter HSC0~HSC39 D0~D69999 70000 ※ HD0~HD24999 25000 Data register special purpose SD0~SD4999 5000 ※ special purpose HSD0~HSD1023 1024 FD0~FD8191 8192...
  • Page 31 XDH series PLC soft components list: Range Points Name 60 I/O Input points X0~X43 Output points Y0~Y27 X10000~X10077(#1 expansion module) ※ …… 1024 Input points X11700~X11777(#16 expansion module) Y10000~Y10077(#1 expansion module) ※ …… Output points 1024 Y11700~Y11777(#16 expansion module) X20000~X20077(#1 expansion BD) ※...
  • Page 32 ID20000~ID20099(#1 expansion BD) expansion BD ID20100~ID20199(#2 expansion BD) ID30000~ID30099(#1 expansion expansion ED ED) Main body QD0~QD99 QD10000~QD10099(#1 expansion module) …… Expansion module 1600 QD11500~QD11599(#16 expansion module) ※ QD20000~QD20099(#1 expansion BD) expansion BD QD20100~QD20199(#2 expansion BD) QD30000~QD30099(#1 expansion expansion ED ED) Special coil of Sequence block SEM0~SEM31...
  • Page 33 ※ 2048 special purpose SM0~SM2047 S0~S1023 1024 Flow ※ HS0~HS127 T0~T575 ※ Timer HT0~HT95 precise timer ET0~ET31 C0~C575 ※ Counter HC0~HC95 high speed counter HSC0~HSC31 D0~D7999 8000 ※ HD0~HD999 1000 Data register special purpose SD0~SD2047 2048 ※ special purpose HSD0~HSD499 FD0~FD5119 5120 FlashROM...
  • Page 34 Range Points Name 32 I/O Input points X0~X17 Output points Y0~Y17 X10000~X10077(#1 expansion module) ※ …… Input points 1024 X11700~X11777(#16 expansion module) Y10000~Y10077(#1 expansion module) ※ …… Output points 1024 Y11700~Y11777(#16 expansion module) X20000~X20077(#1 expansion BD) ※ Input points X20100~X20177(#2 expansion BD) Y20000~Y20077(#1 expansion BD)...
  • Page 35 ID20000~ID20099(#1 expansion BD) expansion BD ID20100~ID20199(#2 expansion BD) ID30000~ID30099(#1 expansion expansion ED ED) Main body QD0~QD99 QD10000~QD10099(#1 expansion module) …… Expansion module 1600 QD11500~QD11599(#16 expansion module) ※ QD20000~QD20099(#1 expansion BD) expansion BD QD20100~QD20199(#2 expansion BD) QD30000~QD30099(#1 expansion expansion ED ED) Special coil of Sequence block SEM0~SEM127...
  • Page 36 ※ 8: The range of soft components mentioned above is the valid range of PLC in X-NET communication mode. In MODBUS communication mode, some relays can not read and write. The specific usable range is shown in chapter 6-2-3. 2-4.Input/output relays (X, Y) Number List XD/XL series PLC input/output are all in octal form, each series numbers are listed below: Range...
  • Page 37 Range Points Series Name 16 I/O X0~X7 Y0~Y7 Range Points Series Name 32 I/O X0~X17 XL5E Y0~Y17 XLME Function XD/XL series CPU unit Input Relay X PLC input terminals are used to recive the external signal. the input relays are optocoupler to connect PLC and input terminals The input relays which are not connected with external devices can be seemed to fast internal relays...
  • Page 38 Execution Order XD3 series CPU unit Program process Area Input processing Before PLC executing the program, read every input terminal’s ON/OFF status to the image area. When the program is running, even the input changed, the content in the input image area will not change until the next scanning period coming.
  • Page 39 XLME M0~M69999 HM0-HM11999 SM0~SM4999 In PLC, auxiliary relays are used frequently. This type of relay’s coil is same to the output relay. They are driven by soft components in PLC; Auxiliary relays M and HM have countless normally ON/OFF contactors. They can be used freely, but this type of contactors can’t drive the external loads.
  • Page 40 S0~S7999 HS0~HS999 S0~S7999 HS0~HS999 XD5E S0~S7999 HS0~HS999 XDME S0~S7999 HS0~HS999 S0~S19999 HS0~HS1999 S0~S1023 HS0~HS127 S0~S1023 HS0~HS127 S0~S7999 HS0~HS999 XL5E S0~S7999 HS0~HS999 XLME S0~S7999 HS0~HS999 Function Status relays S and HS are very import in ladder program; they are used together with instruction “STL”...
  • Page 41 XL5E T0~T4999 HT0~HT1999 ET0~ET39 XLME T0~T4999 HT0~HT1999 ET0~ET39 Function The timers accumulate the 1ms, 10ms, 100ms pulse, the output contactor activates when the accumulation reaches the set value; TMR instruction is for common timers. The set value can be constant (K) or data register (D).
  • Page 42 1. Instruction format K200 (Not accumulation) (Accumulation) TMR_A K2000 Reset the timer and output: S1: timer (T0, HT10) S2: set time (such as K100) S3: time unit (K1—1ms, K10—10ms, K100—100ms) Power-off not retentive, not accumulation (1) Time unit is 1ms, set time is K100, the real time is 1ms *100=0.1s Set value is constant K set value is register D (2) Time unit is 10ms, set time is K10, the real time is 10ms*10=0.1s...
  • Page 43 TMR_A HT0 K10 TMR_A HT0 D0 K10 Set value is constant K set value is register D (3) Time unit is 100ms, set time is K1, the real time is 100ms*1=0.1s TMR_A HT0 K1 K100 Set value is constant K set value is register D Notes (1) The timer has cumulative, non-cumulative, 1ms, 10ms and 100ms, so it can be...
  • Page 44 Application Output delay X0 is ON, output Y0. X0 changes from ON to OFF, delay 2s then cut off Y0. Twinkle X0 is ON, Y0 begin to twinkle. T1 is Y0-OFF time; T2 is Y0-ON time. Note: The range of soft components mentioned above is the valid range of PLC in the X-NET communication mode.
  • Page 45 C0~C575 HC0~HC95 HSC0~HSC31 C0~C575 HC0~HC95 HSC0~HSC31 C0~C4999 HC0~HC1999 HSC0~HSC39 XL5E C0~C4999 HC0~HC1999 HSC0~HSC39 XLME C0~C4999 HC0~HC1999 HSC0~HSC39 The counter range: Counter type Explanation 16/32 bits up/down C0~C575 HC0~HC95 (32-bits counter occupies two registers, the counter counter address must be even number) HSC0~HSC30 (HSC0,HSC2...HSC30) (each counter occupies two High speed registers, the counter address must be even number)
  • Page 46 The counter C0 increases one when the X11 drives once. When C0 value reaches 10, the output acts. Then X11 drives again, C0 will continue increase one. If X10 is ON, the C0 and output will be reset. The counter set value can be constant K or register. For example, if D10 is 123, the set value is equal to K123.
  • Page 47 Reset instruction: 16-bit counter: 32-bit counter: S1: counter (such as C0, HC10) S2: counter set value (such as K100) The counter is different from XC series. They don’t have 16-bit and 32-bit type. The type is set through instruction. 16-bit counter (common, count up) 《set value is constant K》...
  • Page 48 《set value is constant K》 《set value is register 》 DMOV K43100 DCNT 32-bit counter (power-off retentive, count up) 《set value is constant K》 《set value is register 》 32-bit counter (common, count down) 《set value is constant K》 《set value is register 》 32-bit counter (power-off retentive, count down) 《set value is constant K》...
  • Page 49 K2,147,483,647, the ON/OFF state of the counter will also change with the change of the count value. The above two instructions are equivalent. In the left instruction, C0 is processed as a register, while in the right instruction, CD0 is a data register corresponding to the timer C0. CD and C are one-to-one correspondences.
  • Page 50 XD5E D0~D69999 HD0~HD24999 SD0~SD4999 HSD0~HSD1023 XDME D0~D69999 HD0~HD24999 SD0~SD4999 HSD0~HSD1023 D0~D499999 HD0~HD49999 SD0~SD49999 HSD0~HSD49999 D0~D7999 HD0~HD999 SD0~SD2047 HSD0~HSD499 D0~D7999 HD0~HD999 SD0~SD2047 HSD0~HSD499 D0~D69999 HD0~HD24999 SD0~SD4999 HSD0~HSD1023 XL5E D0~D69999 HD0~HD24999 SD0~SD4999 HSD0~HSD1023 XLME D0~D69999 HD0~HD24999 SD0~SD4999 HSD0~HSD1023 Note: For XD5 firmware version V3.5.3 and above, data register D ranges from D0 to D69999;...
  • Page 51 D0 16 D1 16 bits bits High 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 b 31 Sign bit 0: positive 1: negative Function ...
  • Page 52 Example Data register D can deal with many kinds of data. Data storage When M0 is ON, write 100 into D0.(16 bits value) When M1 is ON, write 41100 into D11,D10 (32bits value) Data transfer When M0 is ON, transfer the value of D10 to D0 Read the timer and counter When M0 is ON, move the value of C10 to D0.
  • Page 53 Programming method two: (application of word consists of bits) 2-9-2.Offset application Application 1: When M0 is ON, the output from Y1 to Y7 will be ON one by one. D0 is offset address. If there are many output points, M can replace Y. D4000 Y0[D0] SM13...
  • Page 54 Application 2: When M0 is ON, read the ID10000 value every second and store in the register starting from D4000 (amounts is 50 registers). D0 is offset address. SM13 ID10000 D4000[D0] 2-10.Flash register (FD, SFD, FS) The FLASH registers of XD/XL series PLC are all addressed in decimal system. The serial numbers are shown in the corresponding table.
  • Page 55  Password Read Protection FLASH Register (FS) A part of the FlashROM register is used to store data soft components, which are represented by the symbol FS. The values in the FS register can be written but can not be read, so they can be used to protect the intellectual property rights of users.
  • Page 56  HEX: HEXADECIMAL NUMBER Set as the operand value and action of applied instruction (constant H)  BIN: BINARY NUMBER Inside the PLC, all the numbers will be processed in binary. But when monitoring on the device, all the binary will be transformed into HEX or DEC. ...
  • Page 57 Series Sign Address XD, XL P0~P9999 Range External interruption Model Name Timer interruption Input Rising Falling interruption terminal interruption I0000 I0001 XD1-16 There are 20 timer I0100 I0101 XD2-16 interruptions. From I40** to I59**. “**” XD3-16 I0200 I0201 XD5-16 means the time of timer I0300 I0301 XL1-16...
  • Page 58 Call the subprogram (CALL) CALL If X0 is ON, jump to the subprogram If the coil is not ON, run the FEND original program; After executing the subprogram, return to the main program; SRET The subprogram will start from Pn and finish with SRET. CALL Pn is used to call the subprogram.
  • Page 59  Not accept narrow input pulse signal PLC’s input ON/OFF time should be longer than its loop time. If consider input filter’s response delay 10ms, loop time is 10ms,then ON/OFF time needs 20 ms separately. So, up to 1, 000/(20+20)=25Hz input pulse can’t be processed. But, this condition could be improved when use PLC’s special function and applied instructions (such as high speed count, input interruption, input filter adjustment).
  • Page 60 3 Basic Program Instructions This chapter introduces the basic instructions and their functions. 3-1.Basic Instructions List XD, XL series support all the basic instructions: Chapt Mnemonic Function Format and Device Initial logical operation contact type NO (normally open) Read the status from the contact directly Initial logical operation contact type NC...
  • Page 61 Parallel connection of NC (normally closed) contacts ORDI Read the normally closed contact directly Parallel connection of rising edge pulse Parallel connection of falling/trailing edge pulse Serial connection of multiply parallel circuits Parallel connection of multiply parallel circuits Final logic operation type coil drive OUTD Output to the contact...
  • Page 62 The status of the 3-10 assigned device is inverted on every operation of the instruction Non-power-off holding 3-14 timer TMR_A Power-off holding timer 3-14 Force the current 3-15 program scan to end GROUP Group 3-15 GROUPE Group End 3-16 3-2. [LD] , [LDI] , [OUT] Mnemonic and Function Mnemonic Function...
  • Page 63 But this instruction can’t be used for the input relays Program Y100 Y100 M 1203 M1203 TMR T0 K10 K100 TMR T0 K10 K100 3-3. [AND] , [ANI] Mnemonic and Function Mnemonic Function Format and Operands Normal open (and) contactor in series Operand: X,Y,M,HM,SM,S,HS,T,HT,C,HC,Dn.m Normal close (and...
  • Page 64 Program 3-4. [OR] , [ORI] Mnemonic and Function Mnemonic Function Format and Operands Parallel connection (OR) of NO (Normally Open) contactors Operand: X,Y,M,HM,SM,S,HS,T,HT,C,HC,Dn.m Parallel connection of NC (Normally reverse) Closed) contactors Operand: X,Y,M,HM,SM,S,HS,T,HT,C,HC,Dn.m Statements  Use the OR and ORI instructions for parallel connection of contactors. To connect a block that contains more than one contactor connected in series to another circuit block in parallel, use ORB instruction, which will be described later;...
  • Page 65 Y6 M4 X7 M100 M100 Relationship with ANB The parallel connection with OR, ORI instructions should connect with LD, LDI instructions in principle. But behind the ANB instruction, it’s still ok to add a LD or LDI instruction. 3-5. [LDP] , [LDF] , [ANDP] , [ANDF] , [ORP] , [ORF] Mnemonic and Function Mnemonic Function...
  • Page 66 (AND Falling X,Y,M,HM,SM,S,HS,T,HT,C,HC,Dn.m pulse) Parallel connection of Rising (OR Pulse) edge pulse X,Y,M,HM,SM,S,HS,T,HT,C,HC,Dn.m Parallel connection of (OR Falling Falling/trailing edge pulse pulse) X,Y,M,HM,SM,S,HS,T,HT,C,HC,Dn.m Statements LDP, ANDP, ORP will be ON for one scanning period when the signal rising pulse is coming (OFFON) LDF, ANDF, ORF will be ON for one scanning period when the signal falling pulse is coming (ONOFF)
  • Page 67 ANDD Read the status from the contact directly Devices: X ANDDI Read the normally closed contact directly Devices: X Read the status from the contact directly Devices: X ORDI Read the normally closed contact directly Devices: X OUTD Output to the contact directly Devices: Y Statement...
  • Page 68 Devices: none Statements Two or more contactors is called "serial block". If parallel connect the serial block, use LD, LDI at the branch start point, use ORB at the branch end point; As the ANB instruction, an ORB instruction is an independent instruction which is not associated with any soft component.
  • Page 69 Serial (And connection of Block) parallel Devices: none circuits Statements Use ANB to serial connects two parallel circuits. Use LD, LDI at the brach start point; use ANB at the branch end point. There are no limits for ANB instruction using times. Program 3-9.
  • Page 70  After the execution of an MCS instruction, the bus line (LD, LDI) moves to a point after the MCS instruction. An MCR instruction resets this to the original bus line.  MCS, MCR instructions should use in pair.  The bus line can be nesting.
  • Page 71 Statements The status of the coil is reversed after using ALT (ON changes to OFF, OFF changes to ON). Program M100 3-11. [PLS] , [PLF] Mnemonic and Function Mnemonic Function Format and Devices Turn on a scan (Rising cycle when Pulse) Rising edge Operand:...
  • Page 72 ---------------------- 3-12. [SET], [RST] Mnemonic and Function Mnemonic Function Format and Devices Set a bit (Set) device permanently Operand: X,Y,M,HM,SM,S,HS,T,HT,C,HC,Dn.m Reset a bit (Reset) device permanently Operand: X,Y,M,HM,SM,S,HS,T,HT,C,HC,Dn.m Statements In the following program, Y0 will keep ON even X10 turns OFF after turning ON. Y0 will not ON even X11 turns OFF after turning ON.
  • Page 73 Program T250 TMR T250 K10 K10 T250 T250 3-13.【CNT】【CNT_D】【DCNT】【DCNT_D】【RST】for the counters Mnemonic and Function Mnemonic Function Format and devices 16 bits non power-off retentive Output increase count, the drive of count coil Operand: K, D CNT_D 16 bits power-off retentive CNT_D HC0 Output decrease count, the drive of...
  • Page 74 DCNT 32 bits non power-off retentive Output increase count, the drive of count coil Operand: K, D DCNT_D 32 bits power-off retentive Output decrease count, the drive of Operand: K, D count coil Reset the output coil, clear the Reset current count value Operand: C, HC, HSC Internal counter...
  • Page 75 3-14. [TMR], [TMR-A] for timers Mnemonic and Function Mnemonic Function Format and devices Non power-off retentive 100ms output timer, the drive of coil operand: K, D Non power-off retentive 10ms output timer, the drive of coil operand: K, D Non power-off retentive 1ms output timer, the drive of coil operand: K, D...
  • Page 76 Mnemonic Function Format and Devices:None Force the (END) current program scan Devices: None to end Statements PLC repeatedly carries on input disposal, program executing and output disposal. If write END instruction at the end of the program, then the instructions behind END instruction won’t be executed.
  • Page 77 Mnemonic Function Format and Device GROUP GROUP GROUP Devices: None GROUPE GROUP END Devices: None Statements GROUP and GROUPE should used in pairs. GROUP and GROUPE don't have practical meaning; they are used to optimize the program structure. So, add or delete these instructions doesn't affect the program's running; The using method of GROUP and GROUPE is similar with flow instructions;...
  • Page 78 Dual output (dual coil) doesn’t go against the input rule. But as the preceding action is very complicate, please modify the program as in the following example. There are other methods. E.g. jump instructions or flow instructions.
  • Page 79 4 Applied Instructions In this chapter, we describe applied instruction’s function of XD, XL series PLC. 4-1.Applied Instructions List Mnemonic Function Ladder chart Chapter Program Flow Condition jump 4-3-1 CALL Call subroutine 4-3-2 SRET Subroutine return 4-3-2 Flow start 4-3-3 STLE Flow end 4-3-3...
  • Page 80 AND> AND activates if (S1)> 4-4-2 (S2) AND< AND activates if (S1)< 4-4-2 (S2) AND activates if (S1) ≠ AND<> 4-4-2 (S2) AND activates if (S1) ≤ AND<= 4-4-2 (S2) AND activates if (S1) ≥ AND>= 4-4-2 (S2) OR= OR activates if (S1)= 4-4-3 (S2) OR>...
  • Page 81 Division 4-6-4 Increment 4-6-5 Decrement 4-6-5 MEAN Mean 4-6-6 WAND Word And 4-6-7 Word OR 4-6-7 WXOR Word eXD3lusive OR 4-6-7 Compliment 4-6-8 Negative 4-6-9 Data Shift Arithmetic Shift Left 4-7-1 Arithmetic Shift Right 4-7-1 Logic shift left 4-7-2 Logic shift right 4-7-2 Rotation shift left 4-7-3...
  • Page 82 ASCI Hex. converts to ASCII 4-8-6 ASCII converts to Hex. 4-8-7 Coding DECO 4-8-8 High bit coding ENCO 4-8-9 Low bit coding ENCOL 4-8-10 Binary to Gray code 4-8-11 Gray code to binary GBIN 4-8-12 GBIN Float Point Operation ECMP Float compare 4-9-1 EZCP...
  • Page 83 4-2.Reading Method of Applied Instructions In this manual, the applied instructions are described in the following manner. Summary ADDITION [ADD] 16 bits 32 bits DADD Execution Normally ON/OFF, Suitable XD, XL condition Rising/Falling edge Models Hardware Software requirement requirement Operands Operands Function Data Type...
  • Page 84 If the result of a calculations is “0”, the “0’ flag acts. If the result exceeds 323,767(16 bits operation) or 2,147,483,648 (32 bits operation), the carry flag acts. (refer to the next page). If the result exceeds -323,768 (16 bits operation) or -2,147,483,648 (32 bits operation), the borrow flag acts (Refer to the next page).
  • Page 85 ※1: It shows the flag bit following the instruction action. Source operand which won’t change with instruction working ※2: ※3: Destinate operand which will change with instruction working D· ※4: It introduces the instruction’s basic action, using way, applied example, extend function, note items and so on.
  • Page 86 Suitable Soft Components Pointer Other ● Description In the below graph, if X0 is ON, jump from the first step to the next step behind P6 tag. If X0 is OFF, do not execute the jump instruction;  In the left graph, Y0 becomes to be dual coil output, but when X0=OFF, X1 activates;...
  • Page 87 Operands Operands Function Data Type Jump to the target (with pointer No.) P Pointer's No. (P0~P9999) Suitable Soft Components Others Pointer ● Description CALL FEND SRET If X0= ON, execute the call instruction and jump to P10. After executing the subroutine, return the original step via SRET instruction.
  • Page 88 CALL Main program FEND Subprogram SRET If X0=ON, the program executes as the arrow. If X0=OFF, the CALL instruction will not work; only the main program works. The notes to write the subprogram: Please programming the tag after FEND. Pn is the start of subprogram; SRET is the end of subprogram.
  • Page 89 16 bits 32 bits Execution Suitable XD, XL condition Models Hardware Software requirement requirement Flow ends [STLE] 16 bits STLE 32 bits Execution Suitable XD, XL condition Models Hardware Software requirement requirement operands Operands Function Data Type Jump to the target flow S Flow No.
  • Page 90 After executing SET S1, close S0, open S1. After executing ST S2, open S2, not close S0. Example Example 1: the flows run in branch then merge in one flow. Program diagram: S0 start S10 start S20 start S11 start S21 start S12 start S22 start...
  • Page 91 The program explanation: When SM2 is ON, set ON flow S0. When M0 is ON, set ON flow S10 and S20. In S10 branch, it runs S10, S11 and S12. Set on M1 means the S10 branch is finished. In S20 branch, it runs S20, S21 and S22. Set on M2 means the S20 branch is finished.
  • Page 92 Example 2: flow nesting. When S0 is running for a while, S1 and S2 start to run; the running status of S1 is kept. When S0 is running for certain time, closes S0 and force close S1 and S2. ZRST STL S0 SM000 TMR T0 K50 K100...
  • Page 93 4-3-4. [FOR] and [NEXT] Summary Loop execute the program between FOR and NEXT with the specified times; Loop starts [FOR] 16 bits 32 bits Execution Rising/Falling edge Suitable Models XD, XL condition Hardware Software requirement requirement Loop ends [NEXT] 16 bits NEXT 32 bits Execution...
  • Page 94 Example 1: when M0 is ON, the FOR NEXT starts to sort the numbers in the range of D1 to D20 from small to large. D21 is offset value. If there are many sortings in the program, please use C language to save the programming time and scanning time. SM 2 SM 0 D1[D21]...
  • Page 95 //increase one for D21 NEXT //match the second FOR NEXT //match the first FOR 4-3-5. [FEND] and [END] Summary FEND means the main program ends, while END means program ends; main program ends [FEND] Execution Suitable Models XD, XL condition Hardware Software requirement...
  • Page 96 Main program Main program CALL Main program Main program FEND FEND Main program Main program I100 FEND Interruption program If program the tag of CALL instruction behind FEND instruction, there must be SRET instruction. If the interrupt pointer program behind FEND instruction, there must be IRET instruction.
  • Page 97 OR activates when (S1)≤ (S2) 4-4-3 OR<= OR activates when (S1)≥ (S2) 4-4-3 OR>= 4-4-1.LD Compare [LD] 1. Summary LD is the point compare instruction connected with the generatrix. LD Compare [LD] 16 bits As below 32 bits As below Execution Suitable Models XD, XL...
  • Page 98 S1· S2· K100 LD> D200 K-30 K68899 C300 DLD> Note Items When the source data’s highest bit (16 bits: b15, 32 bits: b31) is 1, the data is seemed to a negative number. The comparison of 32 bits counter should use 32 bits instruction. If using 16 bits instruction, the program or operation will be error.
  • Page 99 16 bits instruction 32 bits Activate Condition Not Activate Condition instruction (S1) ≠ (S2) AND= DAND= (S1)= (S2) (S1) ≤ (S2) (S1) > (S2) AND> DAND> (S1) ≥ (S2) (S1) < (S2) AND< DAND< (S1) ≠ (S2) AND<> DAND<> (S1)= (S2) (S1) ≤...
  • Page 100 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM;...
  • Page 101 //SM0 is always ON coil //read the RTC (real time clock) value and store in D0~D6 //RTC date ≥30 LD>= D2 //RTC month ≥6 AND>= //RTC year ≥12 AND>= //or RTC month ≥ 7 LD>= D1 //RTC year ≥ 12 AND>= //or //RTC year ≥...
  • Page 102 4-5.Data Move Instructions Mnemonic Function Chapter Data compare 4-5-1 Data zone compare 4-5-2 Move 4-5-3 BMOV Data block move 4-5-4 PMOV Data block move (with faster speed) 4-5-5 FMOV Fill move 4-5-6 EMOV Float number move 4-5-7 FWRT FlashROM written 4-5-8 MSET Zone set...
  • Page 103 *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM; DS includes DS, DHS. M includes M, HM, SM; S includes S, HS; T includes T, HT; C includes C, HC. Description S·...
  • Page 104 3. Suitable soft components Operand System Constant Module K /H ● ● ● ● ● ● ● ● ● Word ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Operand System Dn.m ●...
  • Page 105 2. Operands Operands Function Data Type Specify the source data or register’s address 16 bit/32 bit, BIN code Specify the target soft component’s address 16 bit/32 bit, BIN code 3. Suitable soft component Operand System Constant Module Word K /H ●...
  • Page 106 4-5-4. Data block Move [BMOV] 1. Summary Move the data block to other soft component Data block move [BMOV] 16 bits BMOV 32 bits Execution Normally ON/OFF coil, Suitable Models XD, XL condition rising/falling edge Hardware Software requirement requirement 2. Operands Operands Function Data Type...
  • Page 107 As the following picture, when the data address overlapped, the instruction will do from 1 to ① ② ③ ③ ② ① 4-5-5.Data block Move [PMOV] 1. Summary Move the specified data block to the other soft components Data block mov[PMOV] 16 bits PMOV 32 bits...
  • Page 108 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Operand System Dn.m ● ● ● ● ● ●...
  • Page 109 2. Operands Operands Function Data Type Specify the source data or soft component 16/32 bits, BIN; address Specify the target soft components address 16/32 bits, BIN; Specify the move data’s number 16/32 bits, BIN; 3. Suitable soft component Operand System Constant Module Word...
  • Page 110 <32 bits Fill move> D0、D1 4-5-7.Floating move [EMOV] Summary Move the float number to target address Floating move [EMOV] 16 bits 32 bits EMOV Execution Normally on/off, edge trigger Suitable XD, XL condition models Hardware Software Operands Operand Function Type Source soft element address 32 bits, BIN Destination soft element address...
  • Page 111 Suitable soft element Operand System Constant Module Word K /H ● ● ● ● ● ● ● ● ● ● ● *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM; DS includes DS, DHS. Description <32 bits instruction>...
  • Page 112 Write in data quantity 16 bits/32 bits, BIN 3. Suitable soft components Word Operand System Constant Module K /H ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM;...
  • Page 113 2. Operands Operands Function Data Type Start soft element address End soft element address 3. Suitable soft components Operand System Dn.m ● ● ● ● ● ● ● ● ● ● ● ● *Notes: M includes M, HM, SM; S includes S and HS; T includes T and HT; C includes C and HC.
  • Page 114 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● ● ● Operand System Dn.m ● ● ● ● ● ● ● ● ● ● ● ● *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM;...
  • Page 115 2. Operands Operands Function Data Type The address of the soft element 16 bits; BIN 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM;...
  • Page 116 3. Suitable soft component Word Operand System Constant Module K /H ● ● ● ● ● ● ● ● ● ● ● ● *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM; DS includes DS, DHS. Description <16 bits instruction>...
  • Page 117 4-6.Data Operation Instructions Mnemonic Function Chapter Addition 4-6-1 Subtraction 4-6-2 Multiplication 4-6-3 Division 4-6-4 Increment 4-6-5 Decrement 4-6-5 MEAN Mean 4-6-6 WAND Logic Word And 4-6-7 Logic Word Or 4-6-7 WXOR Logic Exclusive Or 4-6-7 Compliment 4-6-8 Negation 4-6-9 4-6-1 Addition [ADD] 1.
  • Page 118 3. Suitable soft components Operand System constant Module Word K /H Three operands ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Two operands ● ●...
  • Page 119 exceeds –323768(16 bits limit)or –2147483648 (32 bits limit), the borrow flag acts (refer to the next page). When doing 32 bits operation, word device’s low 16 bits are assigned; the device close to the preceding device’s is the high bits. To avoid ID repetition, we recommend you assign device’s ID to be even number.
  • Page 120 Two operands Be subtracted data and result address 16 bits /32 bits,BIN Subtract data address 16 bits /32 bits,BIN Suitable soft component Operand System Constant Module Word TD * CD * DM * DS * K /H Three operands ● ●...
  • Page 121 The relationship of the flag’s action and vale’s positive/negative is shown below: 4-6-3.Multiplication [MUL] 1. Summary Multiply two numbers, store the result Multiplication [MUL] 16 bits 32 bits DMUL Execution Normally ON/OFF / pulse Suitable XD, XL condition edge Models Hardware Software requirement...
  • Page 122 <16 bits Operation> (D0) × (D2) → (D5, D4) 16 bits 16 bits → 32 bits The contents of the two source devices are multiplied together and the result is stored at the destination device in the format of 32 bits. As the above chart: when (D0)=8, (D2)=9, (D5, D4) =72.
  • Page 123 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM;...
  • Page 124 4-6-5.Increment [INC] & Decrement [DEC] 1. Summary Increase or decrease the number Increase one [INC] 16 bits 32 bits DINC Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement Decrease one [DEC] 16 bits 32 bits DDEC Execution Normally ON/OFF,...
  • Page 125 -32767 or -2147483647 decrease one, the result will be +32767 or +2147483647. The flag bit will act. 4-6-6.Mean [MEAN] 1. Summary Get the mean value of data Mean [MEAN] 16 bits MEAN 32 bits DMEAN Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models...
  • Page 126 4-6-7.Logic AND [WAND], Logic OR[WOR], Logic Exclusive OR [WXOR] 1. Summary Do logic AND, OR, XOR for data Logic AND [WAND] 16 bits WAND 32 bits DWAND Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement Logic OR[WOR] 16 bits...
  • Page 127 < Logic OR > 0 or 0=0 0 or 1=1 1 or 0=1 1 or 1=1 < Logic WXOR > 0 xor 0=0 0 xor 1=1 1 xor 0=1 1 xor 1=0 If use this instruction along with CML instruction, XOR NOT operation could also be executed.
  • Page 128 4-6-8.Logic converse [CML] 1. Summary Logic converse the data Converse [CML] 16 bits 32 bits DCML Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2. Operands Operands Function Data Type Source data address 16 bits/32 bits, BIN Result address 16 bits/32 bits, BIN 3.
  • Page 129 The sequential control instruction in the left could be M8000 denoted by the following CML instruction. 4-6-9.Negative [NEG] 1. Summary Get the negative data Negative [NEG] 16 bits 32 bits DNEG Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software...
  • Page 130 4-7.Shift Instructions Mnemonic Function Chapter Arithmetic shift left 4-7-1 Arithmetic shift right 4-7-1 Logic shift left 4-7-2 Logic shift right 4-7-2 Rotation left 4-7-3 Rotation right 4-7-3 SFTL Bit shift left 4-7-4 SFTR Bit shift right 4-7-5 WSFL Word shift left 4-7-6 WSFR Word shift right...
  • Page 131 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM; DS includes DS, DHS. Description After executing SHL once, the lowest bit is filled with 0, the last bit is stored in carry flag.
  • Page 132 Move Highest Lowest right 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 ※ Bit n SM22 Execute once Highest Lowest 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 SM22 ※...
  • Page 133 Description After executing LSL once, the lowest bit is filled with 0; the last bit is stored in carry flag. LSL meaning and operation are the same to SHL. After executing LSR once, the highest bit is filled with 0; the last bit is stored in carry flag. LSR and SHR are different, LSR add 0 in the highest bit when moving, SHR all bits are moved.
  • Page 134 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM; DS includes DS, DHS. Description When X0 changes from OFF to ON, the value will be cycle moved left or right, the last bit is stored in carry flag.
  • Page 135 Highest Lowest Cycle move right 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 ※ N bits SM22 After Highest Lowest executing once 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 ※...
  • Page 136 M includes M, HM, SM; S includes S, HS; T includes T, HT; C includes C, HC. Description Move n2 bits left for the object which contains n1 bits. When X0 changes from OFF to ON, the instruction will move n2 bits for the object. For example, if n2 is 1, the object will move 1 bit left when the instruction executes once.
  • Page 137 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Operand System Dn.m ● ● ● ● ● ● ● ● ● ● ●...
  • Page 138 2. Operands Operands Function Data Type Source soft element head address 16 bits, BIN Target soft element head address 16 bits, BIN Source data quantity 16 bits, BIN Word shift left times 16 bits, BIN 3. Suitable soft components Operand System Constant Module...
  • Page 139 Operands Function Data Type Source soft element head address 16 bits, BIN Target soft element head address 16 bits, BIN Source data quantity 16 bits, BIN Shift right times 16 bits, BIN 3. Suitable soft components Word Operand System Constant Module K /H ●...
  • Page 140 BCD convert to binary 4-8-4 Binary converts to BCD 4-8-5 ASCI Hex. converts to ASCII 4-8-6 ASCII converts to Hex. 4-8-7 DECO Coding 4-8-8 ENCO High bit coding 4-8-9 ENCOL Low bit coding 4-8-10 Binary converts to gray code 4-8-11 GBIN Gray code converts to binary 4-8-12...
  • Page 141 When single word D0 is positive integer, after executing this instruction, the high bit of double word D10 is 0. When single word D0 is negative integer, after executing this instruction, the high bit of double word D10 is 1. the high bit 0 and 1 is binary value.
  • Page 142 <64 bits> (D13,D12,D11,D10) → (D15,D14) BIN integer Binary float point Convert BIN integer to binary floating point. As the constant K, H will auto convert by the floating operation instruction, so this FLT instruction can’t be used. The inverse transformation instruction is INT. FLTD can change the 64 bits integer to 32 bits floating value.
  • Page 143 Description <16 bits> (D11,D10) → (D20) Binary Float BIN integer Give up the data after the decimal dot <32 bits> (D11,D10) → (D20,D21) Binary Float BIN integer Give up the data after the decimal dot The binary source number is converted into a BIN integer and stored at the destination device. Abandon the value behind the decimal point.
  • Page 144 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● ● ● ● ● ● ● ● *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM;...
  • Page 145 SD13 Nor mally on coil SD13: second 0~59 SD14 SD14: minute 0~59 SD15 SD15: hour 0~23 SD16 SD16: day 1~31 SD17 SD17: month 1~12 SD18 SD18: year 00~99 SD19 SD19: week Sunday~6 4-8-5.Binary convert to BCD [BCD] 1. Summary Convert binary data to BCD code Binary convert to BCD [BCD] 16 bits 32 bits...
  • Page 146 Description source (BIN)→destination (BCD) This instruction can change the binary value to BCD code. 4-8-6. Hex converts to ASCII [ASCI] 1. Summary Hex. convert to ASCII [ASCI] 16 bits ASCI 32 bits Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software...
  • Page 147 The convert process is this Assign start device: [0]=30H [1]=31H (D100)=0ABCH [5]=35H [A]=41H (D101)=1234H [2]=32H [6]=36H (D102)=5678H [B]=42H [3]=33H [7]=37H [C]=43H [4]=34H [8]=38H D200 down [B] [A] D200 up [C] [B] D201 down D201 up D202 down [A] [0] D202 up D203 down D203 up D204 down...
  • Page 148 *Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM; DS includes DS, DHS. Description Convert the high 8 bits and low 8 bits in source to HEX data. Move 4 bits every time to destination .
  • Page 149 2. Operands Operands Function Data Type The source data address 16 bits, BIN The decode result head address 16 bits, BIN The decoding soft element bit quantity 16 bits, BIN 3. Suitable soft components Operand System Constant Module Word K /H ●...
  • Page 150 is word device > n≤4 < When The low n-bit (n ≤ 4) of the source address is decoded to the target address. When n ≤ 3, the high 8-bit of the target turns to 0. If n = 0, the instruction will not be executed. If n is out of 0 ~ 4, the instruction will not be executed.
  • Page 151 4-8-9.High bit coding [ENCO] 1. Summary Find the highest bit which is 1. High bit coding [ENCO] 16 bits ENCO 32 bits Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2. Operands Operands Function Data Type Coding data address 16 bits, BIN...
  • Page 152 If the number of bits in the source address is 1, the low side is ignored, and if the source address is 0, the instruction will not be executed. When the driving condition is OFF, the instruction is not executed and the coding output is unchanged.
  • Page 153 Ignore the 1 in bit2, bit5, bit8, bit10, bit12 If the number of bits in the source address is 1, the low side is ignored, and if the source address is 0, the instruction will not be executed. When the driver input is OFF, the instruction is not executed and the coding output is unchanged.
  • Page 154 M includes M, HM, SM; S includes S, HS; T includes T and HT; C includes C and HC. Description is bit device > n≤16 <if Ignore the 1 of M16 bit0 bit15 All to be 0 If the number of bits in the source address is 1, the high bit side is ignored, and if the source address is 0, the instruction will not be executed.
  • Page 155 If multiple bits in the source address is 1, the high bit side is ignored, and if the source address is 0, the instruction will not be executed. When the driver input is OFF, the instruction is not executed and the coding output is unchanged.
  • Page 156 2. Operands Operands Function Data Type Soft element address need coding 16bits/32bits, BIN Soft element address to save coding result 16bits/32bits, BIN 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● ●...
  • Page 157 Operands Function Data Type Soft element address need coding 16bits/32bits, BIN Soft element address to save coding result 16bits/32bits, BIN 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● ● ● ●...
  • Page 158 Sine 4-9-8 Cosine 4-9-9 Tangent 4-9-10 ASIN ASIN 4-9-11 ACOS ACOS 4-9-12 ATAN ATAN 4-9-13 4-9-1.Floating Compare [ECMP] 1. Summary Floating Compare [ECMP] 16 bits 32 bits ECMP Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2.
  • Page 159 S1· S2· D· ECMP (D11,D10) > (D21<D20) Binary Floating Binary Floating (D11,D10) (D21<D20) Binary Floating Binary Floating (D11,D10) < (D21<D20) Binary Floating Binary Floating When X0 is OFF, even ECMP doesn’t run, M0~M2 will keep the status before X0 is OFF. The instruction will compare the two source data S1 and S2.
  • Page 160 The compare result soft element address 3. Suitable soft components Operand System Constant Module Word K /H ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Operand System Dn.m ●...
  • Page 161 Please set S1≤ S2, when S2< S1, make S2 as the same value to S1. Note: the compare value must be floating numbers, otherwise the result will be error. 4-9-3.Floating Addition [EADD] 1. Summary Floating Add [EADD] 16 bits 32 bits EADD Execution Normally ON/OFF,...
  • Page 162 The source data and result address can be the same. Please note that when X0 is ON, the instruction will be executed in every scanning period. Note: the add value must be floating numbers, otherwise the result will be error. 4-9-4.Floating Subtraction [ESUB] 1.
  • Page 163 If a constant K or H used as source data, the value is converted to floating point before the subtraction operation. - (D101, D100) → (D111, D110) (K1234) Binary converts to Floating Binary Floating Binary Floating The source data and result address can be the same. Please note that when X0 is ON, the instruction will be executed in every scanning period.
  • Page 164 The floating value of S1 is multiplied with the floating value point value of S2. The result of the multiplication is stored at D as a floating value. If a constant K or H used as source data, the value is converted to floating point before the multiplication operation.
  • Page 165 4-9-6.Floating Division [EDIV] 1. Summary Floating Divide [EDIV] 16 bits 32 bits EDIV Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2. Operands Operands Function Data Type Division operation data address 32 bits, BIN Division operation data address 32 bits, BIN Result address...
  • Page 166 4-9-7.Float Square Root [ESQR] 1. Summary Floating Square Root [ESQR] 16 bits 32 bits ESQR Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2. Operands Operands Function Data Type The soft element address need to do square root 32 bits, BIN The result address 32 bits, BIN...
  • Page 167 4-9-8.Sine [SIN] 1. Summary Floating Sine[SIN] 16 bits 32 bits Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2. Operands Operands Function Data Type The soft element address need to do sine 32 bits, BIN The result address 32 bits, BIN 3.
  • Page 168 4-9-9.Cosine [COS] 1. Summary Floating Cosine [COS] 16 bits 32 bits Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2. Operands Operands Function Data Type Soft element address need to do cos 32 bits, BIN Result address 32 bits, BIN 3.
  • Page 169 4-9-10.TAN [TAN] 1. Summary TAN [TAN] 16 bits 32 bits Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2. Operands Operands Function Data Type Soft element address need to do tan 32bit,BIN Result address 32bit,BIN 3.
  • Page 170 4-9-11.ASIN [ASIN] 1. Summary ASIN [ASIN] 16 bits 32 bits ASIN Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2. Operands Operands Function Data Type Soft element address need to do arcsin 32 bits, BIN Result address 32 bits, BIN 3.
  • Page 171 4-9-12.ACOS [ACOS] 1. Summary ACOS [ACOS] 16 bits 32 bits ACOS Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2. Operands Operands Function Data Type Soft element address need to do arccos 32 bits, BIN Result address 32 bits, BIN 3.
  • Page 172 4-9-13.ATAN [ATAN] 1. Summary ATAN [ATAN] 16 bits 32 bits ACOS Execution Normally ON/OFF, Suitable XD, XL condition rising/falling edge Models Hardware Software requirement requirement 2. Operands Operands Function Data Type Soft element address need to do arctan 32 bit, BIN Result address 32 bit, BIN 3.
  • Page 173 4-10.RTC Instructions Mnemonic Function Chapter Clock data read 4-10-1 Clock data write 4-10-2 TCMP Clock compare 4-10-3 ※1: To use the instructions, The Model should be equipped with RTC function; ※2: There are some errors in the clock of XD/XL series PLC, which is about ±...
  • Page 174 Unit Item Clock data Unit Item SD018 Year 0-99 Year SD017 Month 1-12 Month SD016 Date 1-31 Date SD015 Hour 0-23 Hour SD014 Minute 0-59 Minute SD013 Second 0-59 Second SD019 Week 0 (Sun.)-6 (Sat.) Week The RTC (real time clock) value is in BCD code format (SD013 to SD019). Please choose hex format to monitor the RTC value in XDPpro software.
  • Page 175 Write the RTC value to the PLC. Write the set clock data into PLC’s real time clock. In order to write real time clock, please set the 7 registers value from D0 to D6. Unit Item Clock data Unit Item Year 0-99 SD018...
  • Page 176 2. operand Operand Function Model The first clock soft component address 16 bits, BIN The second clock soft component address 16 bits, BIN The third clock soft component address 16 bits, BIN PLC real time clock information first address 16 bits, BIN The compare result first address 3.
  • Page 177 For example, the present clock is 15:32:49 7,30,2014 Wednesday. D30=14, D31=7, D32=30, D33=15, D34=32, D35=49, D36=3. If the setting time is 1,6,2015, D20=15, D21=1, D22=6, Then M0=ON. If the setting time is 7,31,2014, D20=14, D21=7, D22=31, then M1=ON. If the setting time is 6,31,2014, D20=14, D21=6, D22=31, then M2=ON. Note: if S4 is D33, it means hour, minute, second, then S1, S2, S3 mean hour, minute, second.
  • Page 178 5 HIGH SPEED COUNTER (HSC) This chapter will introduce high speed counter’s functions, including high speed count model, wiring method, read/write HSC value, reset etc. Instructions List for HSC Instruction Function Instruction Chapter name HSC read/write DMOV HSC read 5-6-1 DMOV HSC write 5-6-2...
  • Page 179 Count input Rotary encoder Sensor 5-2.HSC Mode XD, XL series high speed counter has two working mode: increasing mode and AB phase mode. Increasing Mode Under this mode, the count value increase at each pulse’s rising edge; AB Phase Mode Under this mode, the HSC value increase or decrease according to two differential signal (A phase and B phase).
  • Page 180 A phase input B phase input Counter current value 4-time Frequency A phase input B phase input Counter current value 5-3.HSC Range HSC’s count range is: -2,147,483,648 ~ +2,147,483,647. If the count value overflows this range, then overflow or underflow appears; Overflow means the count value jumps from +2,147,483,647 to -2,147,483,648, then continue counting;...
  • Page 181 (take XD3-60 HSC0 as the example): Increasing mode (counter HSC0) Pulse input AB phase mode (counter HSC0) A phase input B phase input 5-5.HSC ports assignment XD series PLC HSC channels list: HSC channel PLC model Incremental AB phase mode mode 16/32 XD2/XD3...
  • Page 182 HSC channel PLC model Incremental AB phase mode mode XDME 30T4/60T4 60T10 60T4 16/32 16/32 32T4 XL5E 16/32 32T4 XL5E 64T6 XLME 32T4 Each letter’s Meaning: Pulse input A phase input B phase input Z phase pulse catching X can use as normal input terminals when there are no high speed pulses input. In the following table, Frequency doubling 2 means 2 frequency doubling;...
  • Page 183 X004 X005 X006 X007 X010 X011 XD2-48/60, XD3-48/60, XD5-16/24/32/48/60, XD5E-24/30/48/60, XL5-16/32, XL5E-16/32 Increasing mode AB phase mode HSC0 HSC2 HSC4 HSC6 HSC8 HSC10 HSC12 HSC0 HSC2 HSC4 HSC6 HSC8 frequency Frequency doubling Counter √ √ √ √ √ √ interruption X000 X001 X002...
  • Page 184 XD5-48D4T4 Increasing mode AB phase mode HSC1 HSC1 HSC1 HSC1 HSC1 HSC1 1M 1M 1M 1M 80K 80K 1M 1M 1M 1M 50K 50K frequency Frequency doubling Counter √ √ √ √ √ √ √ √ √ √ √ √ √...
  • Page 185 X010 X011 X012 X013 XD5-48T6/60T6, XD5E-60T6, XL5E-64T6 Increasing mode AB phase mode HSC0 HSC2 HSC4 HSC6 HSC8 HSC10 HSC0 HSC2 HSC4 HSC6 HSC8 HSC10 frequency Frequency doubling Counter √ √ √ √ √ √ √ √ √ √ √ √ interruption X000 X001...
  • Page 186 X021 X022 X023 X024 X025 X026 X027 X030 X031 X032 X033 X034 XD5-60T10, XDM-60T10, XD5E-60T10, XDME-60T10 AB phase mode HSC0 HSC2 HSC4 HSC6 HSC8 HSC10 HSC12 HSC14 HSC16 HSC18 HSC20 HSC22 frequency Frequency doubling Counter √ √ √ √ √ √...
  • Page 187 5-6.AB phase counting frequency doubling setting For AB phase counting, the frequency doubling can be set in special FLASH data registers SFD321, SFD322, SFD323... SFD330, when the value is 2, it is 2 frequency doubling, 4 is 4 frequency doubling. Register Function Setting value...
  • Page 188 5-7.HSC instruction This section introduces the usage of single-phase high-speed counting instruction (CNT), AB- phase high-speed counting instruction (CNT_AB), reset of high-speed counting, reading and writing of high-speed counting. 5-7-1.Single phase HSC [CNT] Instruction Summary Single phase HSC instruction. Single phase HSC [CNT] 16 bits Instruction 32 bits Instruction Execution...
  • Page 189  In the counting process, if the setting value in D20 changes and the current counting value is less than the new setting value, then the new setting value is compared. 5-7-2.AB phase HSC [CNT_AB] Instruction Summary AB phase HSC instruction. AB phase HSC [CNT_AB] 16 bits Instruction 32 bits Instruction...
  • Page 190 5-7-3. HSC reset [RST] The reset mode of high-speed counter is software reset mode. HSC0 K12000 HSC0 As shown above, when M0 is ON, HSC0 begins to count the pulse input of X0 port; when M1 changes from OFF to ON, HSC0 is reset, and the count value in HSCD0 (double words) is cleared.
  • Page 191 High-speed counter can not directly participate in any application instructions or data comparison instructions (such as DMUL, LD > etc.) except DMOV, but can only be carried out after reading and writing into other registers. As high speed counter is double words counter, so it must use 32-bit instruction DMOV. DMOV often uses together with high speed counter.
  • Page 192 FUNCTIONS AND ACTIONS When the trigger condition is established, The value in the double-word data register D20 is written into the accumulative register HSCD0 (double-word) corresponding to the HSC0 of the high-speed counter, and the original data is replaced. High-speed counter can not directly participate in any application instructions or data comparison instructions (such as DMUL, LD >...
  • Page 193 5-8.HSC Example The following takes XD3-60 as an example to show the programming method of HSC. Single-phase incremental mode When the M0 is ON, HSC0 counts the rising edge of the OFF to ON of the input X0 port at high speed.
  • Page 194 AB phase input mode CNT_AB HSC0 K999999 DMOV HSC0 K3000 D≥ HSC0  When M8 is ON, HSC0 starts to count. The signal inputs from X0 (A phase) and X1 (B phase).  When SM0 is ON, the value in HSCD0 (double words) related to HSC0 is written to D0 (double words) in real-time.
  • Page 195 5-7.HSC interruption 5-7-1.Function overview and panel configuration For XD/XL series PLC, some high-speed counters (referring to the high-speed counting input port allocation table of chapter 5-5 of each type of PLC) have a set value of 32 bits in 1-100 sections.
  • Page 196 High-speed counter number HSC0~HSC18(32- corresponding to high-speed input bit) port HSC0 is ON when the count value is Free to specify equal to the value in the register. When it counts to the compare value, HSC0 is ON, the compare value can Free to specify be set here or put in compare reigster D500...
  • Page 197 5-9-2.Single phase 100-segment HSC [CNT] Summarization Single phase 100-segment HSC instruction. Single phase 100-segment HSC [CNT] 16-bit instruction 32-bit instruction Execution condition Normal ON/OFF Suitable model XD, XL (exclude XL1, XD1) Hardware Software requirements requirements Operand Operand Function Type Set the HSC (for example: HSC0) 32 bits, BIN Set the compare value (eg.
  • Page 198 on state. 5-9-3.AB phase 100-segment HSC [CNT_AB] Summarization AB phase 100-segment HSC instruction. AB phase 100-segment HSC [CNT_AB] 16 bits instruction 32 bits instruction CNT_AB Execution condition Normal ON/OFF Suitable model XD, XL (exclude XL1, XD1) Hardware Software requirements requirements Operand Operand Function...
  • Page 199  When the interrupt is finished in a single execution, if it needs to start the interruption again, the high-speed counter must be reset first, and then the driving condition must be ON again.  In interrupt loop mode, interrupts can be generated in sequence as long as M0 remains on state.
  • Page 200 In relative mode, the set value of high-speed counting 100 segments is relative cumulative value. When the set value of counting equals the sum of the interruption count value of N-1 segment and the set value of N segment, the segment N interrupt is generated. N interrupt markers correspond to N interrupt settings.
  • Page 201 HSC2 K10000 K10000 K5000 K20000 I2100 HSC2=K10000+K10000=K20000 I2101 HSC2=K20000+K5000=K25000 I2102 HSC2=K25000+K20000=K45000  Absolute Mode In absolute mode, interruption occurs when the count value equals the set value of each section of the counter. N interrupt markers correspond to N interrupt settings. The N+1 interrupt settings register is reserved for other purposes.
  • Page 202 counter is 5000, segment 2 interrupt I2101 is generated; when the current value of the counter equals 20000, segment 3 interrupt I2102 is generated. HSC0 K10000 K5000 K20000 I2000 HSC0= K10000 I2001 HSC0= K5000 I2002 HSC0= K20000 Note: When absolute counting is performed in non-cam mode, counting interrupts are generated sequentially, i.e.,segment 1 interruption, segment 2 interruption, segment 3 interruption...
  • Page 203 When continuous loop interruption is performed (without cam function enabled), interrupts occur in the following order: Via setting SFD331, users can switch between single loop mode or continuous loop mode. The detailed assignment is show below: (Note: the settings will be effective after setting OFF and ON the driving condition again) Address Setting Bit0...
  • Page 204 Note: CAM function is only fit for absolute counting mode. Cam function can be set by configuration panel in XINJE PLC software, or by special Flash register SFD332: (Note: Drive condition must be set OFF and ON again to make...
  • Page 205 HSC0 I2000 I2001 I2002 I2001 I2002 I2003 I2002 5-9-8. Interruption using notes and parameter address LD M0 //HSC trigger condition M0 (also interruption counting condition) CNT_AB HSC0 K2000 HD0 //HSC and 100-segment head address setting //HSC reset trigger condition HSC0 //HSC and 100-segment reset (also reset the interruption) As shown in the above example (note: the interrupt subprogram is omitted, see the application example in chapter 5-9-9).
  • Page 206 Some parameters can be modified in special Flash registers, as shown in the following table: Parameter Register Setting value address Counting mode SFD330 0: relative 1: absolute Execution mode SFD331 0: execution once 1: interruption cycle CAM function SFD332 0: not enable 1: enable cam function The above parameters can also be configured by the configuration panel in the following way: Move the mouse over the high-speed counting instruction and right-click it.
  • Page 207 Configure item Function High speed counter Choose HSC, the range is from HSC0 to HSC18 Frequency Choose the HSC frequency doubling (2 or 4) Compare value The value can be register or constant, in this example, when the counting value reaches compare value, HSC0 is ON. here the compare value is 200000 which is saved in D10.
  • Page 208 DMOV K10000 DMOV K-10000 DMOV K200000 CNT_AB HSC0 HSC0 FEND I2000 IRET I2001 IRET Instruction: //SM0 is normally ON coil DMOV K10000 HD0 //segment one preset value HD0 is 10000 DMOV K-10000 HD2 //segment 2 preset value HD2 is -10000 DMOV K200000 D10 //set HSC compare value //HSC activate condition M0...
  • Page 209 Application 2: knit-weaving machine (continuous loop mode) The machine principle: Control the inverter via PLC, thereby control the motor. Meantime, via the feedback signal from encoder, control the knit-weaving machine and the precise position. I2003 HSC0=K15000+(K-15000) I2002 HSC0=K90000+(K-75000) I2001 HSC0=K75000+K15000 I2000 Pulse frequency f HSC0=K0+K75000...
  • Page 211 HSC2 K1000000 CNT_AB HSC0 D100 DMOV HSC0 D200 FEND I2000 IRET I2001 IRET I2002 IRET I2003 IRET...
  • Page 212 Instruction List: //SM2 is initial ON coil //set ON Y2 (forward run) // Back-forth times activate condition Y2 CNT HSC2 K1000000 //HSC2 starts counting //SM000 is normal ON coil CNT_AB HSC0 D0 D100 //HSC 100 segments first address DMOV HSC0 D200 //read HSC0 counting value to D200 FEND //main program end...
  • Page 213 6 Communication Function This chapter mainly includes: basic concept of communication, Modbus communication and free communication. Relative Instruction Mnemonic Function Circuit and soft components Chapter MODBUS Communication COLR Coil Read 6-2-3 INPR Input coil read INPR 6-2-3 COLW Single coil write COLW 6-2-3 MCLW...
  • Page 214 ※1: XL1-16T-U has USB port. ※2: In the series of "√" PLCs, there may be some models that do not support COM2-COM5. See Appendix 5 for details. The distribution of XD series communication ports is as follows: COM4 COM5 COM1/RJ45 ●...
  • Page 215 Appearance Definition protocol Function Download program, set the X-NET port parameters through COM0 RS232 port Modbus software or xinje config tool Modbus RTU Download program and Modbus ASCII connect external devices, COM1 RS232 port Free set the port parameters communication...
  • Page 216 Left extension ED Modbus RTU port (for connect external devices, Modbus ASCII extending set the port parameters COM3 Free RS232/RS485 through software or xinje communication port) config tool X-NET Above extension Modbus RTU COM4 BD port/ connect external devices, Modbus ASCII...
  • Page 217 XINJEConfig software, the USB driver will be installed automatically after the XINJEConfig software is installed. After installing the xinje config tool and usb driver, please switch to Xnet mode in the PLC software: (1) Open XDPPro software, click option/software serial port config...
  • Page 218 Note: (1) If it shows the error “find device: error2 cannot find device”, you can click "Restart Service" to try to reconnect, or restart the programming software and PLC to reconnect. If you still can't connect, you need to check whether the PLC is power on, whether the USB download cable is connected properly, whether the USB driver and XINJEConfig software are installed properly.
  • Page 219 RJ45 port can be configured in "PLC Config-Ethernet" of XINJE PLC programming software, or through XINJEConfig tool. Refer to the relevant manual for details. The LAN2 port of XDH series PLC supports EtherCAT bus control function. The number of axes is up to 32, and the control cycle is less than 1ms. Please refer to EtherCAT motion control user manual for the specific use of the function.
  • Page 220 The above extension port can connect BD card which contains RS232 mode (XD-NS-BD), RS485 mode (XD-NE-BD) and optical fiber mode (XD-NO-BD). XD series 24/32 I/O PLC can extend one BD card, XD series 48/60 I/O PLC can extend 2 BD cards, XD series 16 I/O PLC cannot extend BD card.
  • Page 221 Free format communication parameters can be set by programming software, refer to chapter 6-3-2 for details. X-NET communication parameters can be set by Xinje Config tool. Refer to X-NET fieldbus manual for details. Note: For the A, B terminal on the PLC body, 1Mbps and higher baud rate is only fit for X- NET communication mode.
  • Page 222 or write one slave station; slave station has no program but only response the master station. (Wiring:connect all 485+, connect all 485-) Slave 1 Slave 3 Slave 2 In RS232 network (see below diagram), there can only be one master and one slave at one time.
  • Page 223 XD3 series(√) Note: XD/XL series PLC sequence block has cancelled Modbus communication instructions, which is replaced by the current Modbus instruction handling mode. 6-2-3.Modbus communication address The soft component’s code in PLC corresponds with Modbus ID number, please see the following table: XD1, XD2, XD3, XL1, XL3 series PLC Modbus address and internal soft component table: Modbus...
  • Page 224 (#3 module) Y10300~Y10377 61C0~61FF 25024~25087 (#4 module) Y10400~Y10477 6200~623F 25088~25151 (#5 module) Y10500~Y10577 6240~627F 25152~25215 (#6 module) Y10600~Y10677 6280~62BF 25216~25279 (#7 module) Y10700~Y10777 62C0~62FF 25280~25343 (#8 module) Y11000~Y11077 6300~633F 25344~25407 (#9 module) Y11100~Y11177 6340~637F 25408~25471 (#10 module) Y20000~Y20077(#1 68D0~690F 26832~26895 S0~S1023 1024 7000~73FF...
  • Page 225 (#1 BD) QD0~QD99(main 6000~6063 24576~24675 unit) QD10000~QD10099 6100~6163 24832~24931 (#1 module) QD10100~QD10199 24932~25031 6164~61C7 (#2 module) QD10200~QD10299 25032~25131 61C8~622B (#3 module) QD10300~QD10399 25132~25231 622C~628F (#4 module) QD10400~QD10499 25232~25331 6290~62F3 (#5 module) QD10500~QD10599 25332~25431 62F4~6357 (#6 module) QD10600~QD10699 25432~25531 6358~63BB (#7 module) QD10700~QD10799 25532~25631 63BC~641F...
  • Page 226 (#3 module) X10300~X10377 51C0~51FF 20928~20991 (#4 module) X10400~X10477 5200~523F 20992~21055 (#5 module) X10500~X10577 5240~527F 21056~21119 (#6 module) X10600~X10677 5280~52BF 21120~21183 (#7 module) X10700~X10777 52C0~52FF 21184~21247 (#8 module) X11000~X11077 5300~533F 21248~21311 (#9 module) X11100~X11177 5340~537F 21312~21375 (#10 module) X11200~X11277 5380~53BF 21376~21439 (#11 module) X11300~X11377 53C0~53FF...
  • Page 227 (#12 module) Y11400~Y11477 6400~643F 25600~25663 (#13 module) Y11500~Y11577 6440~647F 25664~25727 (#14 module) Y11600~Y11677 6480~64BF 25728~25791 (#15 module) Y11700~Y11777 64C0~64FF 25792~25855 (#16 module) Y20000~Y20077(#1 68D0~690F 26832~26895 S0~S7999 8000 7000~8F3F 28672~36671 SM0~SM4095 4096 9000~9FFF 36864~40959 T0~T4095 4096 A000~AFFF 40960~45055 C0~C4095 4096 B000~BFFF 45056~45151 ET0~ET39 C000~C027...
  • Page 228 (#14 module) ID11400~ID11499 5678~56DB 22136~22235 (#15 module) ID11500~ID11599 56DC~573F 22236~22335 (#16 module) ID20000~ID20099(#1 58D0~5933 22736~22835 QD0~QD99(main unit) 6000~6063 24576~24675 QD10000~QD10099 6100~6163 24832~24931 (#1 module) QD10100~QD10199 24932~25031 6164~61C7 (#2 module) QD10200~QD10299 25032~25131 61C8~622B (#3 module) QD10300~QD10399 25132~25231 622C~628F (#4 module) QD10400~QD10499 25232~25331 6290~62F3 (#5 module)
  • Page 229 ※ FD0~FD8191 8192 C4C0~E4BF 50368~58559 ※ SFD0~SFD5999 6000 E4C0~FC2F 58560~64559 ※ FS0~FS47 F4C0~F4EF 62656~62703 XDH series PLC Modbus address and internal soft component table: Modbus Modbus Type component Address numbers address address (hex) (decimal) M0~M20479 20480 0~4FFFF 0~20479 X0~X77(main unit) 5000~503F 20480~20543 X10000~X10077...
  • Page 230 (#3 module) Y10300~Y10377 61C0~61FF 25024~25087 (#4 module) Y10400~Y10477 6200~623F 25088~25151 (#5 module) Y10500~Y10577 6240~627F 25152~25215 (#6 module) Y10600~Y10677 6280~62BF 25216~25279 (#7 module) Y10700~Y10777 62C0~62FF 25280~25343 (#8 module) Y11000~Y11077 6300~633F 25344~25407 (#9 module) Y11100~Y11177 6340~637F 25408~25471 (#10 module) Y11200~Y11277 6380~63BF 25472~25535 (#11 module) Y11300~Y11377 63C0~63FF...
  • Page 231 (#5 module) ID10500~ID10599 52F4~5357 21236~21335 (#6 module) ID10600~ID10699 5358~53BB 21336~21435 (#7 module) ID10700~ID10799 53BC~541F 21436~21535 (#8 module) ID10800~ID10899 5420~5483 21536~21635 (#9 module) ID10900~ID10999 5484~54E7 21636~21735 (#10 module) ID11000~ID11099 54E8~554B 21736~21835 (#11 module) ID11100~ID11199 554C~55AF 21836~21935 (#12 module) ID11200~ID11299 55B0~5613 21936~22035 (#13 module) ID11300~ID11399 5614~5677...
  • Page 232 The program can be written directly by using PLC internal soft components (Y0 / M0); for the second type, Modbus RTU or Modbus ASCII is selected if there is no Xinje driver, and then use the addresses in the table above to define the data variables.
  • Page 233 No input signal ≧ 10ms 2. Modbus address: 00H:All the Xinje XC series PLC broadcast—— slave stations don’t response. 01H:Communicate with address 01H PLC. 0FH:Communicate with address 15H PLC. 10H:Communicate with address 16H PLC and so on. Up to 254(FEH).
  • Page 234 5. CRC CHECK High / CRC CHECK Low is high and low bit of CRC check value. If 2 pieces of Xinje XD3 series PLC communicate with the other one, write K5000 to D2. M0 is trigger condition (Rising edge). If communication fails, the instruction will try twice. If the third time communication fails, then communication ends.
  • Page 235 RTU mode: Asking format Response format Address Address Function code 01H/02H Function code 01H/02H Coil address Byte number Coil number Data contents CRC CHECK CRC CHECK Low CRC CHECK CRC CHECK High High As the status of Y0 and Y1 is ON, the data contents are 03H (0000 0011). (3) Function code 03H: read register Eg.
  • Page 236 (5) Function code 0FH: write multiple coils Eg. Write 16 coils start from address 6000H (Y0). RTU mode: Asking format Response format Address Address Function code Function code Coil address Coil address Coil number Coil number Byte number Data contents (low byte is before high byte) CRC CHECK...
  • Page 237 END Hi=CR(0DH),END Lo=CR END low bit (0AH) 2. Communication address: 00H:All Xinje XC series PLC broadcast—— slave stations do not response. 01H:Communicate with address 01H PLC. 0FH:Communicate with address 15H PLC. 10H:Communicate with address 16H PLC. And so on, up to 254(FEH).
  • Page 238 4. Data content is the value in D2. 5. LRC CHECK Low / CRC CHECK High is low and high bit of CRC check value. If two pieces of Xinje XD3 PLC communicate with each other, write K5000 to D2. REGW K1 H0002 K5000 K2 M0 is trigger condition (rising edge).
  • Page 239 Assign remote coil/register number: the start coil/register ID of PLC read and write, it is normally used with ‘assigned coil/register number’. E.g.:PLC read Xinje inverter’s output frequency (H2103), output current(H2104), bus voltage(H2105), then remote register/coil start ID is H2103, assigned coil number is K3.
  • Page 240 Coil Read [COLR] Instruction Summary Read the specified station’s coil status to the local device; Coil read [COLR] 16 bits COLR 32 bits instruction instruction Execution Normally ON/OFF coil Suitable XD, XL condition models Hardware Software requirement Requirement Operands Operands Function Type Specify the remote communication station no.
  • Page 241  Serial port: K0~K5. K0: Port0 (RS232), K1: Port1(RS232), K2: Port2(RS485), K3: Port3(left extension port), K4: Port4(above extension port 1), K5: Port5(above extension port 2).  Operands S3: K1~K2000, the max coil quantity is 2000.  When X0 is ON, COLR instruction is executed. When the instruction starts to execute, the Modbus read and write flag SM160 (serial port 2) is set on;...
  • Page 242 Users can check the relevant registers to determine the cause of the error. The execution result of Modbus read and write instructions of serial port 2 is in SD160.  This instruction cannot read XINJE PLC input coil. Single Coil Write [COLW] Summary Write local device specified coil to remote station no’s coil.
  • Page 243 Operand System Dn.m ● ● ● ● ● ● Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM; DS includes DS, DHS. M includes M, HM, SM; S includes S and HS;...
  • Page 244 Specify remote coil start address 16 bits,BIN Specify coil number 16 bits,BIN Specify start address of local coils Specify serial port number 16 bits,BIN Suitable soft components Operands System Constant Module Word K /H ● ● ● ● ● ● ●...
  • Page 245 Execution Normally ON/OFF, edge Suitable XD, XL Condition triggering models Hardware Software Requirement Requirement Operands Operands Function Type Specify remote communication station number 16 bits,BIN Specify remote register start address 16 bits,BIN Specify register number 16 bits,BIN Specify start address of local register 16 bits,BIN Specify serial port number 16 bits,BIN...
  • Page 246 Input register read [INRR] 16 bits INRR 32 bits instruction instruction Execution Normally ON/OFF, edge Suitable XD, XL Condition triggering models Hardware Software Requirement Requirement Operands Operands Function Type Specify remote communication station number 16 bits,BIN Specify remote register start address 16 bits,BIN Specify register number 16 bits,BIN...
  • Page 247 summary Write local device register to specified remote station no’s register. Register write[REGW] 16 bits REGW 32 bits instruction instruction Execution Normally ON/OFF, edge Suitable XD, XL Condition triggering models Hardware Software Requirement Requirement Operands Operands Function Type Specify remote communication station number 16 bits,BIN Specify remote register start address 16 bits,BIN...
  • Page 248 Multiple registers write [MRGW] Summary Write local device multiple registers to remote station no’s registers. Multi-register write [MRGW] 16 bits MRGW 32 bits instruction instruction Execution Normally ON/OFF, edge Suitable XD, XL Condition triggering models Hardware Software Requirement Requirement Operands Operands Function Type...
  • Page 249 6-2-6.Modbus serial port configuration There are two ways to set Modbus communication parameters: 1. setting parameters by programming software; 2. setting parameters by XINJEConfig tool; 1. Set parameters by programming software When using programming software to configure the parameters of PLC serial port, the version below V3.4 must use XNET communication mode, and the version above V3.4 can also use Modbus communication mode (RS232 port).
  • Page 250 PLC sends data to the slave PLC again, which easily leads to the error of the slave PLC; In XD series PLC, it has send delay to solve the problem. That is, after receiving data from the slave station, it must delay a certain time to receive the next communication data, so as not to cause the above problems.
  • Page 251 2. Set the parameters by using XINJEConfig tool When using configuration tool XINJEConfig to configure parameters of PLC serial port, the XINJEConfig tools of V1.6.308 and below must use USB port. The XINJEConfig tool for V1.6.309 and above can also be configured using RS232 port. (1) Use the USB download cable to connect the PLC with the computer.
  • Page 252 (5) It will show below window. Serial port: K0 ~ K5. Port0 (RS232), Port1 (RS232), Port2 (RS485) or Port2-RS232 (RS232) or Port2-RS485 (RS485), Port3 (left extension port), Port4 (upper extension port 1), Port5 (upper extension port 2). Here, we can set the communication mode and parameters of each communication port. (6) When the com port parameters setting is completed, click writeconfig.
  • Page 253 Connect all A terminals, connect all B terminals. A is RS485+, B is RS485-. Application:One xinje XD3 series PLC controls 3 XC series PLCs, slave PLCs follow the master’s action. (Master PLC Y0 ON, then slave PLC Y0 ON; Master PLC Y0 OFF, then slave PLC Y0 OFF) Precondition: on-off of Y0 makes communication have enough time to react.
  • Page 254 (4) Read slave PLC 2 D10~D19 to master PLC D20~D29 (5) So as slave PLC 3 and 4 The following is a comparison of XC and XD series Modbus-RTU communication programs for reference. The communication programs in XC series are as follows:...
  • Page 255 //send station no.2 to D100, M8002 D100 execute the process S0 D100 K5 ( S ) STL S0 //set ON Y0~Y11 of master ( S ) station, write the master status to Y0~Y11 of slave PLC 2, 3, 4. MCLW D100 K24576 K10 Y0 K2 Enter process S1 when the M8138 communication succeeded.
  • Page 256 Instructions are queued according to the protocol station by Modbus-RTU, which will not cause communication errors when multiple communication instructions are executed at the same time as the original XC series PLC. XD series program: M200 H3FF //at the rising edge of M200, set...
  • Page 257 The so-called free communication, i.e. custom protocol communication, now many intelligent devices on the market support RS232 or RS485 communication, but the protocols used by various products are different, such as: Xinje PLC uses standard Modbus-RTU protocol, some temperature controller manufacturers use custom protocols; if using Xinje PLC to...
  • Page 258 low byte of a register (HFF), so we only need to use the default 8-bit buffer in the software to communicate. 6. Timeout: frame timeout (ms), reply timeout (ms) Frame: A data string. Frame timeout: refers to the time interval between two frames of data received by the PLC, which ensures that the PLC can distinguish the end time of receiving a frame.
  • Page 259 Note: Versions V3.4 and above can be configured in Modbus communication mode (RS232 port); Versions V3.4 and below XD series PLC must use X-NET communication mode when downloading and uloading serial configuration data, that is, downloading and uploading configuration data through USB port.
  • Page 260 Read temperature Enter, data end PLC needs to send the ASCII code of the above characters to the instrument in order to read the current temperature value measured by the instrument. The ASCII code values (hexadecimal) of each character can be obtained by querying the ASCII code table. Character ASCII code value :...
  • Page 261 S1· S2· SEND D100  Data sending instructions, M0's rising edge sends data once.  Communication port. Scope: K0 ~ K5. Port0, Port1, Port2 or Port2-RS232 or Port2- RS485, Port3, Port4, Port5.  In the process of data transmission, the "sending" flag SM162 (communication port 2) is set on.
  • Page 262 Function and action S1· S2· D200  Data receiving instructions, M1's rising edge receives data once.  Communication port. Scope: K0 ~ K5. Port0, Port1, Port2 or Port2-RS232 or Port2- RS485, Port3, Port4, Port5.  After receiving the data, the "received" flag SM163 (communication port 2) is set on. Set OFF manually SM163...
  • Page 263 Start Data 6-3-5.Free communication example Example 1: In chapter 6-3-3, we give an example of communication between Xinje PLC and temperature control instrument when explaining why to use free communication. Here is an example. Operation steps: 1. Connect the hardware first. Here we use the serial port 2 of the PLC to communicate, that is, 485 + on the instrument is connected to A of the output port of the PLC, and 485- on the instrument is connected to B of the output port of the PLC.
  • Page 264 3. make the program according to the descriptions in chapter 6-3-3. Read temperature: “ : ” “R” “T” “CR” “ : ” -------------- data start “R” --------------- read “T” --------------- temperature “CR” ------------- enter, data end Program: Read D0: : ascii code switch D1:...
  • Page 265 program is written according to the data format obtained, which is often twice the result with half the effort. In fact, Modbus-RTU protocol can be regarded as a special kind of free protocol. The relationship between them is similar to ellipse and circle. We can try to use free format to realize the function of Modbus instruction.
  • Page 266 XDM program: Sometimes the data of user communication is stored in multiple registers in the form of ASCII code. Users need to take this value out, store it in a register and display it on the HMI. Customers often consider using HEX (ASCII to hexadecimal) instructions to achieve it. But HEX instructions are difficult to use and understand.
  • Page 267 Example 3: A pressure controller communicates with PLC in free communication mode to realize data acquisition. The value displayed on the pressure controller is -0.7814 MPa. The value collected by PLC is stored from D0, and seven registers are stored in turn. However, the value of the seven registers combination needs to be taken out and stored in D46 in the form of decimal.
  • Page 268 SUB D1 SUB D3 SUB D4 SUB D5 SUB D6 EMUL D12 K0.1 EMUL D14 K0.01 0.08 EMUL D16 K0.001 0.001 EMUL D18 K0.0001 0.0004 EADD D10 EADD D40 0.08 0.78 EADD D42 0.78 0.001 0.781 EADD D44 0.781 0.0004 0.7814 EMUL D46 D100 0.7814 -0.7814...
  • Page 269 6-4.Communication flag and register Communication flag Serial Register address Function Explanation port SM140 Modbus read-write When the instruction starts to instruction execution flag execute, set ON When execution is completed, Port 0 set OFF SM141 SM142 Free communication sending When the instruction starts to flag execute, set ON When execution is completed,...
  • Page 270 SM169 Port 3 SM170~SM179 Port 4 SM180~SM189 Port 5 SM190~SM199 Communication registers Function Explanation SD140 Modbus read and write 0: correct instruction execution result 100: receive error 101: receive timeout 180: CRC error 181: LRC error 182: station number error 183: send buffer overflow 400: function code error Port 0...
  • Page 271 SD151 X-Net communication 0: correct result 1: communication timeout 2: memory error 3: receive CRC error SD152 Free communication 0: correct sending result 410: free communication buffer overflow SD153 Free communication 0: correct receiving result 410: send data length overflow 411: receive data short 412: receive data long 413: receive error...
  • Page 272 6-5.Read write serial port parameters In addition to modifying communication parameters through serial configuration panel, it can also be realized by reading instruction [CFGCR] of serial parameters and writing instruction [CFGCW] of serial parameters. 6-5-1.Read serial port parameters [CFGCR] 1. Instruction overview Read the serial port parameters to local specified registers.
  • Page 273 definitions of specific parameters. 6-5-2. Write serial port parameters [CFGCW] 1. Instruction overview Write the local specified register value to specific serial port. Write serial port parameters [CFGCW] 16-bit CFGCW 32-bit instruction instruction Execution Normally ON/OFF, rising Suitable XD, XL condition edge triggering model...
  • Page 274 6-5-3. Serial port parameter name and setting Assuming that HD0-HD14 corresponds to serial port parameters, the parameter names and settings represented by registers are shown in the table below. Para Parameter name and settings mete MODBUS Free X-NET communication Ethernet communication communication communication...
  • Page 275 master station is valid, i.e. the station number is 1). Gateway address low 2- byte Note: The table does not contain "buffer digits" in free communication mode, so "buffer digits" can not be read and written through CFGCR and CFGCW instructions, but can be read and written using MOV instructions.
  • Page 276 7 PID Control Function In this chapter, we mainly introduce the applications of PID instructions for XD, XL series, including: call the instructions, set the parameters, items to notice, sample programs etc. 7-1.PID Introduction PID instruction and auto tune function are added into XD/XL series PLC basic units. Via auto tune method, users can get the best sampling time and PID parameters and improve the control precision.
  • Page 277 Suitable soft components Operands System Constant Module K /H ● ● ● Word ● ● ● ● ● ● Operands System Dn.m ● ● ● ● ● *Note: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM;...
  • Page 278 e(t) = r (t ) –c ( t ) (1-1) u(t) = Kp [ e(t) + 1/Ti ∫ e(t)dt + TD de(t)/dt] (1-2) Here, e(t) is offset value, r ( t ) is the setting value, c ( t ) is actual output value and the u(t) is the control value;...
  • Page 279 Auto tune mode: V3.2 and higher version software can choose auto tune mode: step response or critical oscillation. 7-3-1.Register and their functions PID control instruction’s relative parameters ID, please refer to the below table: Function Description Memo Sampling time Whatever it is manual or auto 32 bits without sign, mode, all needs to set Unit ms...
  • Page 280 bit11~bit12:not useful bit13~bit14 auto tune PID mode (valid in critical oscillation mode) 00:PID control 01:PI control 10:P control bit15: 0:regular mode; 1:advanced mode; S3+3 Proportion Gain (Kp) Range:1~32767[%] S3+4 Integration time (TI) 0 is taken as no 0~32767[unit: 100ms] integral. S3+5 Differential time ( TD) 0 is taken as no...
  • Page 281 10: Critical oscillation mode monitoring purposes only Bit8: 0: manual control status 1: auto tune end, enter manual control status S3+17 PID max output Internal use 0~32767 parameters of the system for monitoring purposes only S3+18 PID min output Internal use 0~32767 parameters of the system for...
  • Page 282 S3+32 Sampling variation of Sampling difference between two Internal usage inflection point inflection points parameters of the -2147483648~2147483647 system S3+34 Sampling interval time Internal usage 0~4294967296 (unit: ms) of inflection point EK parameters of the system S3+36 Time from auto-tuning Internal usage 0~4294967296 (unit: ms) PID to inflection point...
  • Page 283 S3+34 auto-tuning time Internal usage 0~4294967296 (unit: ms) cumulative parameters of the system Manual control part (read only parameters, only for monitoring) S3+24 current target -32767~32767 Internal usage temperature parameters of the system S3+25 Need to update target 0: no need 16-bit no sign, temperature 1: need...
  • Page 284 7-3-2.Parameters Description Movement direction: Positive movement: the output value MV will increase with the increasing of the measured value PV, usually used for cooling control. Negative movement: the output value MV will decrease with the increasing of the measured value PV, usually used for heating control. Mode setting Common Mode: Parameters register range: S3~S3+69, and S3~S3+7 need to be set by users;...
  • Page 285 Death Region [S3+7] If the measured value changed slightly for a long time, and PID control is still in working mode, then it belongs to meaningless control. Via setting the control death region, we can overcome this situation. See graph below: Suppose: we see the death region value to be 10.
  • Page 286 For step response method: Before doing auto tune, the system should be under the non-control steady state. Take the temperature for example: the measured temperature should be the same to the environment temperature. For critical oscillation method: user needs to set the sampling time at the beginning of the auto tune process.
  • Page 287 User doesn’t need to change this value. However, if the system is interfered greatly by outside, this value should be increased modestly to avoid wrong judgment of positive and negative movement. If this value is too large, the PID control period (sampling time) got from the auto tune process will be too long.
  • Page 288 ℃ Target value Current target Current target 2 Current target 1 Current system value Over target value times in auto-tuning end transition stage when limiting the overshoot [S3+15] This parameter is valid only when [S3+13] is 1; If entering into PID control directly after auto tune, small range of overshoot may occur. It is good to prevent the overshoot if increasing this parameter properly.
  • Page 289 7-6.Application outlines Under the circumstances of continuous output, the system whose effect ability will die down with the change of the feedback value can do auto tune, such as temperature or pressure. It is not suitable for flux or liquid level. Under the condition of overshooting permission, the system will get the optimal PID parameters from auto tuning.
  • Page 290 7-7.Application Example 1: PID control program is shown below: ID100 // Move ID100 content into D10 HD2.7 ( S ) // auto tune mode, or set to autotune mode after auto tune end // start PID, D0 is target value, D10 is the PID D0 D10 HD0 Y0 measured value, from HD0 is PID parameters area;...
  • Page 291 Example 2: To control the target temperature 60℃ in step response mode. Overshoot is permitted: 1. The target temperature 60℃ (600) 2. Parameters setting 3. The result curve...
  • Page 292 Explanation: The target temperature is 60 degree, PID calculation range is 10 degree, PID control dead area is 0.2 degree, auto tune period changing value is 10. When the PID control works in normal atmospheric temperature, the PID output terminal will heat the temperature from 28 to 100 degree, then the output stops, the temperature keeps increasing to 110 degree (max temperature) as the remaining warmth.
  • Page 293 7. The final heating temperature will up to 110 degree when the overshoot is permitted. It is over the target temperature by 50 degree, the overshoot amount is too large. 8. When the PID starts to work, the output will heat the object from 28 degree to 60 degree, then the output is forced to stop heating to avoid overshoot, but this will interrupt the PID auto tune process.
  • Page 294 Explanation: The target temperature is 60 degree, PID calculation range is 10 degree, PID control dead area is 0.2 degree, auto tune period changing value is 10. When the PID control works in normal atmospheric temperature, the PID output terminal will heat the temperature from 28 to 48 degree, then the output stops, the temperature keeps increasing to 70 degree (max temperature) as the remaining warmth.
  • Page 295 7. The final heating temperature will up to 70 degree when the overshoot is permitted. It is over the target temperature by 10 degree, the overshoot amount is small. 8. To enlarge the PID calculation range can suppress the heating overshoot. 8 C Language Function Block In this chapter, we focus on C language function block’s specifications, edition, instruction calling, application points etc.
  • Page 296 3. Suitable Soft Components Operands System Constant Module Word TD * CD * DM * DS * K /H ● Operands System Dn.m ● *Note: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM; DS includes DS, DHS. M includes M, HM, SM; S includes S and HS;...
  • Page 297 2. See graph below, fill in the information of your function; Function Block Name Editor Name Function Block name is the name we use to call the BLOCK. For example: the diagram of FUNC1 should be written as below: 3. After creating the new Function Block, you can see the edit interface as shown below: Main function’s name ( it’s function block’s name, this name can’t be changed freely, and users should modify in the edit window.)
  • Page 298 is the start ID of W and B. Take the above graph as the example, start with D0 and M0, then W[0] is D0, W[10] is D10, B[0]is M0, B[10]is M10; if the used parameters in the ladder are D100, M100, then W[0] is D100, B[0]is M100; if the parameters in the ladder are HD0, HM0, then W[0]=HD0,B[0]=HM0;...
  • Page 299 INT8U; //8 bits unsigned integer INT8S; //8 bits signed integer INT16U //16 bits unsigned integer INT16S //16 bits signed integer INT32U //32 bits unsigned integer INT32S //32 bits signed integer FP32; // single precision floating FP64; //double precision floating Predefined Marco: #define true #define...
  • Page 300 b) Not editable: Don’t export the source code, if import the file, it’s not editable; 2. Import Function: Import the existing Func Block file, to use in the PLC program. Choose the Func Block, right click ‘Import Func Block from Disk’, choose the correct file, and then click OK.
  • Page 301 Compile the program again after modifying the program. In the information list, we can confirm that there is no grammar error in the program. (3) Write PLC program, assign value 10 and 20 into registers D0, D1 separately, then call Func Block ADD_2, see graph below: (4) Download program into PLC, run PLC and set M0.
  • Page 302 8-6.Program Example If PLC needs to do complicated calculation (including plus and minus calculation), the calculation will be used for many times, C language function is easy to use. Example 1: Calculation a= b/c + b*c+(c-3)*d Method 1: use ladder chart: Get the result of c-3 Get the result of three multiplication equations Get the sum...
  • Page 303 Method 2: use C language: RESULT Function name In the function, W [0] =D0, W [1] =D1… If D0=D32, then W [0] =D32, W [1] =D33… If S2=HD32, then W [0] =HD32, W [1] =HD33… In the function, B [0] = M0, B [1] =M1… If S2=M32, then B [0] = M32, B [1] =M33…...
  • Page 304 Edit PLC ladder program, D0: Check byte number of data, D1~D5: Check data content. See graph below: Download to PLC, then RUN PLC, set M0, via Free Monitor, we can find that values in D6 and D7 are the highest and lowest bit of CRC parity value; 8-7.Application notes In one Func Block file, you can write many functions, and they can be called by each other.
  • Page 305 Func Block files can call C language library function in form of floating, arithmetic like sin, cos, tan. XC series PLC only support local variable, while XD/XL series PLC support both local and global variable. This makes C language Block more flexible and convenient. XDPPro software v3.3 and later version keep C function library: In this function block, user can call the C function directly: For example: click TEL10, the function name will show on the project bar:...
  • Page 306 User can call it in the ladder chart editing window at any time. 8-8.Function Table The default function library Constant Data Description _LOG2 (double)0.693147180559945309417232121458 Logarithm of 2 _LOG10 (double)2.3025850929940459010936137929093 Logarithm of 10 _SQRT2 (double)1.41421356237309504880168872421 Radical of 2 (double)3.1415926535897932384626433832795 _PIP2 (double)1.57079632679489661923132169163975 PI/2 _PIP2x3 (double)4.71238898038468985769396507491925...
  • Page 307 double cos(double x); float cosf(float x); Cosine function Hyperbolic cosine function, double cosh(double x); float coshf(float x); cosh(x)=(e^x+e^(-x))/2 double exp(double x); float expf(float x); Exponent (e^x) of a nature data double fabs(double x); float fabsf(float x); Absolute value of parameter x Return the largest double double floor(double x);...
  • Page 308 9 Sequence BLOCK This chapter mainly introduces sequence block instruction and the application. Sequence Block instruction: Mnemonic Function Ladder chart Chapter Sequence Block SBSTOP Pause BLOCK 9-6-1 Go to execute SBGOON 9-6-1 BLOCK 9-1.Concept of the BLOCK Sequence block whose brief name is BLOCK is a program block to realize some functions. As a special flow, all instructions in the block are executed in order, which is the biggest difference with general processes.
  • Page 309 ※1: Firmware version below V3.4.5: the XD series PLC allows up to eight BLOCKs. Firmware version V3.4.5 and above: XD/XL series PLC can write up to 100 BLOCKs, but at the same time can only run 8. ※2: When the trigger condition of the BLOCK is triggered by the closure of the normally open coil, it will be executed from the top of the BLOCK to the bottom in turn.
  • Page 310 You can edit the BLOCK in the window, Upwards/Downwards are used to change the position of instructions in the block. Click ‘insert’ button, some instructions list under the menu: Take ‘Pulse Item’ for example:...
  • Page 311 After click ‘OK’, you will find information in the configuration: Click ‘OK’, the following instructions are added in the ladder: Meantime, a new sequence block is added in the right of the project bar:...
  • Page 312 9-2-2.Move the BLOCK If you want to move the BLOCK to other place, you have to select the original BLOCK and delete it (select all, then delete): Move the cursor to the new place, and then right click the BLOCK and select ‘add to lad’: Now the BLOCK is moved to the new place:...
  • Page 313 9-2-3.Delete the BLOCK You can select the called BLOCK and delete it. If you want to completely delete the BLOCK, right click the function block and select ‘delete sequence block’. After this operation, you can’t call this BLOCK any more: 9-2-4.Modify the BLOCK There are two methods to modify the BLOCK.
  • Page 314 (B) Double click the middle part to modify :...
  • Page 315 9-3.Edit the instruction of the BLOCK 9-3-1.Command item Use ‘command item’ to edit the program: An ‘instruction list’ will jump out after click the ‘command item’: Users can add instructions in the frame. Skip: to control the stop and run of the instructions. If you select skip and input control coil in the frame, then when the control coil is ON, the command will not be executed.
  • Page 316 Click ‘OK’, the ladder program will change as the following: Note: We can add multiply instructions in one BLOCK and use ‘Skip’ as every instruction’s execution condition. 9-3-2.Pulse Item Open the ‘pulse item’ in the same way:...
  • Page 317 In the following BLOCK, we add two impulse instructions: 9-3-3.Wait Item ‘Wait Item’: to wait coil flag or timer bit. Open ‘Wait Item’ in the same way. There are two waiting modes: flag bit and timer wait. (A) Flag bit SEM corresponding ladder diagram is as below: POST SEM0...
  • Page 318 Note: Do not add normal coil after WAIT instruction in XD/XL series PLC sequence BLOCK, and add XD, XL series PLC special signal SEM bit(SEM0~SEM31); SEM cannot be controlled by set or reset. It can only be set by POST instruction and reset by WAIT SEM instruction.
  • Page 319 9-4.Running form of the BLOCK 1. If there are many blocks, they run as the normal program. The block is running when the condition is ON. (A) The condition is normal ON, normal OFF coil SBLOCK Sequence block 1 Sequence block 2 SBLOCK Sequence block 3 SBLOCK...
  • Page 320 ↑ Sequence block 1 SBLOCK ↑ Sequence block SBLOCK ↑ Sequence block SBLOCK When M1, M2, M3 is from OFF to ON, all these blocks will run once. 2. The instructions in the block run in sequence according to the scanning time. They run one after another when the condition is ON.
  • Page 321 Explanation: A) When M2 is ON, block 1 is running. B) All the instructions run in sequence in the block. C) M3, M4, M5 are the sign of SKIP, when they are ON, this instruction will not run. D) When M3 is OFF, if no other instructions use this Y0 pulse, PLSR HD0 HD100 K1 Y0 will run;...
  • Page 322 Do not use the same pulse output terminal in BLOCK and main program. NO(× ) YES(√) There only can be one SKIP condition for one BLOCK instruction. NO(× ) YES(√) The SKIP condition only can use M, X, can not use other coil or register. NO(×...
  • Page 323 BLOCK is not recommended to put in the STL, because if one STL ends, while the BLOCK doesn’t end, then big problem will happen. NO(× ) YES(√) STL S0 SBLOCK FROM D100 WAIT PLSR HD0 HD100 K1 Y0 SBLOCKE M100 STLE Label Kind type cannot be used in the block Sign P, I cannot be used in block.
  • Page 324 Function S2 is the mode for BLOCK stop, operand: K0, K1, K2 K0: stop the BLOCK slowly, if the pulse is outputting, the BLOCK will stop after the pulse outputting is finished. K1: stop the BLOCK immediately; stop all the instructions running in the BLOCK. Execute SBSTOP frequency...
  • Page 325 *Note: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD; DM includes DM, DHM; DS includes DS, DHS. S1· S2· Function ↑ SBGOON S2 is the mode to continue running the BLOCK. Operand: K0, K1. K0: continue running the instructions in the BLOCK.
  • Page 326 When M0 is from OFF→ON, run “PLSR HD0 HD100 K1 Y0” in the BLOCK to output the pulse; When M2 is from OFF→ON, the BLOCK stops running at once; When M4 is from OFF→ON, abandon the rest pulse. SBSTOP(K1 K1)+SBGOON(K1 K0)...
  • Page 327 Scanning period 1 Scanning period 2 Scanning period 3 Scanning period 4 Scanning period 5 Condition M0 Condition M2 Condition M3 PLS Y0 PLS Y0 When M0 is OFF→ON, run ‘PLSR HD0 HD100 K1 Y0’ in the BLOCK to output the pulse; When M2 is OFF→ON, the BLOCK stops running, the pulse output stops at once;...
  • Page 328 When M0 is from OFF→ON, run ‘PLSR HD0 HD100 K1 Y0’ in the BLOCK to output the pulse; When M1 is from OFF→ON, stop running the BLOCK, the pulse will stop slowly with slope; When M4 is from OFF→ON, abandon the rest pulses. 4.
  • Page 329 When M0 is from OFF→ON, run ‘PLSR HD0 HD100 K1 Y0’ in the BLOCK to output the pulse; When M1 is from OFF→ON, suspend running the BLOCK, the pulse will stop slowly with slope; When M3 is from OFF→ON, output the rest pulses. Please note that by the SBSTOP stops the pulse with slope, there may be still some pulses;...
  • Page 330 10 Special Function Instructions This chapter mainly introduces PWM (pulse width modulation), precise timing, interruption etc. Special Function Instructions List: Chapt Mnemonic Function Circuit and soft components Pulse Width Modulation, Frequency Detection Output pulse with the specified duty cycle and 10-1 frequency Fixed pulses frequency...
  • Page 331 T HT ; C includes C HC Function and Action Duty cycle n: 1~65535 Output pulse f: 1~100KHz XD series PLC PWM output need transistor type terminal: PLC model PWM terminal XD2-16T/RT -24T/RT -32T/RT -48T/RT -60T/RT Y0、Y1 XD3-16T/RT -24T/RT -32T/RT -48T/RT -60T/RT Y0、Y1...
  • Page 332 Note: it needs to connect 1K ohm amplification resistor between output terminal and common terminal when using PWM instruction. Example There is a LED drived by DC24V. It needs to control the brightness of the LED. In order to decrease the power loss of wave collector, turn ON the switch at the moment it is OFF, then turn it OFF.
  • Page 333 MOV K100 HD2 MSET ZRST M3 M4 M5 MOV K8192 M3 M4 M5 MOV K16384 M3 M4 M5 MOV K24576 M3 M4 M5 MOV K32767 Program explanation: 1. HD0 will control the LED voltage. The voltage = 24*HD0/32767, pulse output frequency is 100Hz.
  • Page 334 3. Suitable component Operand System Constant Module Word K /H ● ● ● ● ● ● ● ● ● ● Operand System Dn.m ● *Note: D includes D HD; TD includes TD HTD; CD includes CD HCD HSCD HSD; DM includes DM DHM;...
  • Page 335 24T4/32T4/48T4/60T4 48/60 I/O 48T6/60T6/60T10 I/O 24T4/32T4/60T4 I/O 60T10 I/O 24/32/48/60 I/O XD5E 30T4/60T10 I/O 16 I/O 32T4 I/O XL5E 32T4 I/O XLME 32T4 I/O Example Asynchronous motor drives the conveyor to transfer the work piece. It needs to real-time display the work piece moving speed. The diameter of the transmission shaft is 100mm, the gear numbers on the transmission shaft are 100, the speed unit is m/min.
  • Page 336 Component explanation: Control explanation Mark component Proximity switch, to count the gear numbers Start signal Speed register (float number) Program: FRQM K20 D0 X0 K1 DFLT EDIV K100 EMUL K0.1 K3.14 D6 EMUL EMUL Program explanation: 1. Set ON the start signal M0, to run the frequency meansurement program 2.
  • Page 337 3. Calculate the diameter of the transmission shaft and save in register D6 (float number), then calculate the transfer distance per second and save in D10 (float number). 4. the transfer distance per second multiply by 60 is the speed (m/min). 10-3.
  • Page 338 D1· D2· K100 Timer’s number. Range: ET0~ET30 (ET0, ET2, ET4……all number should be even) Timing value Precise timer works in unit of 1ms. Precise timer 32 bits, the counting range is 0~+2,147,483,647. When executing STR, the timer will be reset before start timing. When X0 turns from OFF to ON, ET0 starts timing.
  • Page 339 Precise Timing Interruption  When the precise timing reaches the count value, it will generate an interruption tag, interruption subprogram will be executed.  Can start the precise timing in precise timing interruption;  Every precise timer has its own interruption tag, as shown below: Interruption Tag corresponding to the Timer: Timer’s No Interruption Tag Timer’s No Interruption Tag I3000...
  • Page 340 Filling machine Component explanation: Control explanation Mark component Start button, X0 is ON when the button is pressed Precise timer Control the liquid valve, Y0 ON when the valve opened, Y0 OFF when the valve closed Program: Program explanation: 1. When X0 is ON, the liquid valve Y0 and precise timer ET0 open at once. 2.
  • Page 341 Component explanation: Control explanation Mark component Start button, X0 is ON when button is pressed Pulse output terminal Internal auxiliary coil Precise timer Program: K500 FEND I3000 ( S ) ( R ) K500 IRET Program explanation: 1. When X0 is ON, the precise timer interruption will work, Y2 will output the pusle wave. 2.
  • Page 342 Component explanation: Control explanation Mark component Start button, X0 is ON when pressed Precise timer Precise timer setting value (unit: ms) HSC0 High speed counter The measured frequency (unit: s) Program: RST ET0 CNT HSC0 K999999999 DMOV HSC0 D0 FEND I3000 DFLT DFLT HD0...
  • Page 343 10-4. Interruption [EI], [DI], [IRET] XD/XL series PLC have interruption function, including external interruption and timing interruption. By interruption function we can deal with some special programs. This function is not affected by the scan cycle. 10-4-1.External Interruption The input terminals X can be used to input external interruption. Each input terminal corresponds with one external interruption.
  • Page 344 I0300 I0301 SM053 I0400 I0401 SM054 I0500 I0501 SM055 I0600 I0601 SM056 I0700 I0701 SM057 I0800 I0801 SM058 I0900 I0901 SM059 Note: when the interruption ban coil is ON, the external interruption will not execute. Interruption Instruction Enable Interruption [EI], Disable Interruption [DI], Interruption Return [IRET] ...
  • Page 345 Interruption’s Range Limitation  By programming DI instruction, can set interruption disabled area;  Allow interruption input between EI~DI  If interruption forbidden required, please program only with EI, and program with DI is not required. Disable the Interruption  Every input interruption equipped with special relays...
  • Page 346 is Y2. To improve the speed changing precision, the acceleration and deceleartion time are 0. The speed will switch by external interruption. Segment Frequency setting Pulse numbers value (Hz) Origin ---- A 10000 999999999 A---- B 30000 999999999 B ----- C 20000 999999999 Acceleration...
  • Page 347 DMOV K10000 PLSF HD0 K1 Y0 FEND I0000 DMOV K30000 IRET I0100 DMOV K20000 IRET I0200 ( R ) STOP IRET Program explanation 1. SM2 is ON, set HD0 to 10000, set on M0, PLSF instruction will send 10000Hz pulse, the object will move from origin to A.
  • Page 348 Component explanation: Control explanation Mark component Product counting photoelectric sensor, X2 is ON when the product is detected Robot action complete sensor, X1 is ON when the action is completed 16-bit counter Robot Program: ( ) ( R ) ( R ) RST C0 FEND I0000...
  • Page 349 10-4-2. Timing Interruption Function and Action Under the circumstance that the main program execution cycle is very long, when you have to handle with special program or execute specific program every once in a while when program is scanning in sequence control, the timing interruption is very useful. It is not affected by PLC scan cycle and executes timing interruption subroutine every N ms.
  • Page 350 I48** SM078 I58** SM088 I49** SM079 I59** SM089 Interruption range’s limitation  Timing interruption is usually on ‘allow’ status.  Can set interruption allow and forbidden area with EI、DI instructions. As shown in below pictures, all timing interruptions are forbidden between DI and EI, and allowed beyond DI~EI.
  • Page 351 11 Common Questions and Answers This chapter mainly introduces XD/XL series PLC common questions and answers. Q1:How to connect PLC with PC? A1: If your PC is desktop computer, you can use our company special DVP or XVP cables to connect PC and PLC (Usually PORT1) as general commercial desktop computer has 9 needle serial port.
  • Page 352 At first, use Xinje XVP cable to connect PC and PLC; After confirming the connection cable is the Xinje special XVP cable and USB convertor has been used, you can use it to try to connect desktop PC with 9-needle serial port to PLC. If the desktop PC can be connected correctly, please change the USB converter cable with higher performance or install the USB converter serial driver software again.
  • Page 353 By this time, cut off PLC power for 2-3s and power on again, then a ‘PLC has been stopped successfully’ window will normally jump out; if the window do not jump out after power on, try again a few times until the information window of successful stop jump out. Then click ‘configure’...
  • Page 354 ‘XD series PLC download program tool’ and ‘system file’ (*.sys file) Close all the programs which may occupy the serial port Cut off the power of PLC, open the XD series update tool (if user use this tool at the first time, please open the enrollment first)
  • Page 355 Click "Open File", choose the PLC model for updating. (Note: XD3_16.sys fit for PLC model XD3-16, XD3_60.sys fit for PLC model XD3-32 and XD3-60): Set the parameters:...
  • Page 356 Click “set parameter”, it will show the parameter window: Note: set the com port, the baud rate is default setting, no need to change. Click “download”, the window will show below words:...
  • Page 357 Power on the PLC, the update tool will show below words: Cut off the power of PLC, connect the short jumper, then power on the PLC again. PLC start to update, the updating will take few minutes.
  • Page 358 After finishing the update, cut off the PLC power, take off the short jumper, then power on the PLC again. PLC hardware version The PLC hardware version can be seen in “CPU detail” on the left window in XDPpro software (PLC online status)
  • Page 359 Short jumper XD, XL series PLC no need to short the jumper when updating. Note: Do not cut the power of PLC when it is updating. If it show the error “send data failed, ID not match…) please contact us for help. The PLC program will be deleted after updating.
  • Page 360 Q5: What’s the use of execution instruction LDD/OUTD etc? When PLC executes program, state of input point state will map to image register. From then on, PLC will refresh input state at the beginning of every scan cycle; if we use LDD instruction, then the state of input point will not need map to image register;...
  • Page 361 M0 is ON, Y will keep outputting M1 is ON, Y0 is OFF Q8: Check and change the button battery in the PCB of PLC The rated voltage of button battery is 3V. The voltage can be measured by multimeter. If the value of power-loss retentive register is very large, it means the battery is low.
  • Page 362 1. PLC input voltage is not Check the power supply stable voltage, check if there is dead PWR and ERR light 2. there is dead loop in the loop in the program. Update the program hardware of PLC. Contact us for 3.
  • Page 363 Q14: Why data errors after using DMUL instructions? A14: DMUL operation instruction is 32 bit*32 bit=64 bit operation, the result occupies 4 words, such as: EMUL D0 D2 D10, two multiplier both are 32bit (D1,D0) and (D3, D2), the result is 64 bit (D13, D12, D11, D10), so D10~D13 will be occupied.
  • Page 364 Q22: What kinds of confidentiality methods do XD/XL series PLCs have? A22: Xinje PLC has three methods of confidentiality: (1) importing and exporting downloaded files; (2) secret downloading; (3) password downloading. Import and export download files: After saving the PLC program in this way, users can download and use the program, but they can not view and edit the program.
  • Page 365 PLC. Under this mode, you can not modify the clock information of the PLC, and the confidentiality is stronger. Q23: what’s the advantage that XD series PLC replaces DVP download cable with Bluetooth? A23: XD series PLC Bluetooth function can perform PLC program download and upload, monitor and Twin configuration software online simulation.
  • Page 366 Q26: How does XD/XL series PLC connect to the network? A26: XD/XL series PLC can connect to network by Xinje T-BOX, G-BOX, W-BOX, S-BOX, A- BOX expansion modules or expansion BD boards which have their own communication...
  • Page 367 characteristics. Details please refer to the user manual of communication module or BD board. Q27: how to add soft element and line note in XDppro software? A27: Soft element note Open XDPpro software, and move the mouse to the corresponding soft element and right click the mouse, then menu will pop out: Click “Modify reg comment”...
  • Page 368 Q28: do not have clock function? Why is the clock inaccurate? A28: XD/XL series PLC clock function is optional, and if you want to buy the PLC with clock function, please confirm when purchasing. Otherwise, the default PLC when it leaves factory does not have clock function.
  • Page 369 Appendix Special soft components Appendix mainly introduces the functions of XD/XL series PLC special soft element, data register, FlashROM and the address distribution of expansions for users to search. Appendix 1.Special Auxiliary Relay Initial Status(SM0-SM7) Function Description Coil ON when SM000 keeps ON SM000 running...
  • Page 370 SM013 1s frequency cycle SM014 1min frequency cycle Mark(SM20-SM22) Function Description SM020 Zero bit SM020 is ON when plus/minus operation result is 0 SM021 Borrow bit SM021 is ON when minus operation overflows SM022 Carry bit SM022 is ON when plus operation overflows PC Mode(SM32-SM34)...
  • Page 371 Interruption ban(SM50-SM90) (M) Address Function Description SM050 I0000/I0001 Forbid input interruption 0 After executing EI instruction, SM051 I0100/I0101 Forbid input interruption 1 the input interruption couldn’t SM052 I0200/I0201 Forbid input interruption 2 act independently when M SM053 acts, even if the interruption is I0300/I0301 Forbid input interruption 3 allowed.
  • Page 372 High speed counter direction(SM110-SM119) Address Function Note SM110 HSC0 direction flag SM111 HSC2 direction flag SM112 HSC4 direction flag SM113 HSC6 direction flag SM114 HSC8 direction flag SM115 HSC10 direction flag SM116 HSC12 direction flag SM117 HSC14 direction flag SM118 HSC16 direction flag SM119 HSC18 direction flag...
  • Page 373 SM151 X-NET instruction execution Same to SM141 flag SM152 Free format communication Same to SM142 sending flag SM153 Free format communication Same to SM143 receive complete flag SM160 Modbus instruction execution Same to SM140 Serial flag port 2 SM161 X-NET instruction execution Same to SM141 flag SM162...
  • Page 374 SM396 BLOCK97 running flag SM396 will be ON when block97is running SM397 will be ON when block98 is SM397 BLOCK98 running flag running SM398 will be ON when block99 is SM398 BLOCK99 running flag running SM399 will be ON when block100 is SM399 BLOCK100 running flag running...
  • Page 375 Expansion Modules, BD Status(SM500) Function Description Module status read is SM500 finished Appendix 2.Special Data Register Battery (SD5~SD7) Function Description It will display 100 when the battery voltage is 3V, if the battery voltaeg is lower than 2.5V, it will SD005 Battery register display 0, it means please change new battery at...
  • Page 376 SD026 Model info SD027 Model info SD028 Suitable software version SD029 Suitable software version SD030 Suitable software version Suitable software version SD031 Step ladder(SD040) Function Description SD40 Flag of the executing process S High Speed Counting(SD100-SD109) Function Description SD100 Current segment (No. n segment) HSC00 SD101 Current segment (No.
  • Page 377 communication(SD140~SD199) Function Note SD140 Modbus read write 0: correct instruction execution result 100: receive error 101: receive overtime 180: CRC error 181: LRC error 182: station error 183: send buffer overflow 400: function code error Serial 401: address error port 0 402: length error 403: data error 404: slave station busy...
  • Page 378 2: memory error 3: receive CRC error SD152 Free format 0: correct communication send result 410: free format send buffer overflow SD153 Free format 0: correct communication receive 410: send data length overflow result 411: receive data short 412: receive data long 413: receive error 414: receive overtime 415: no start character...
  • Page 379 Serial SD180~SD18 port 4 Serial SD190~SD19 port 5 Sequence Function Block(SD300-SD399) Function Description SD300 Executing instruction of BLOCK1 The value will be used when BLOCK monitors SD301 Executing instruction of BLOCK2 The value will be used when BLOCK monitors SD302 Executing instruction of BLOCK3 The value will be used when BLOCK monitors SD303...
  • Page 380 Invalid data fill value (low 16 SD412 bits) Invalid data fill value (high SD413 16 bits) Error Check(SD450-SD452) Function Description 1:Watchdog act (Default 200ms) 2:Control block application fail 3:Visit illegal address SD450 Hardware error type: 1:Register error 2:Bus error 3:Usage error SD451 SD452 Hardware error...
  • Page 381 Expansion Module Error Information Function Description SD860 Error times of module read Module address error. Module accepted data length error. Module CRC parity error when PLC is Expansio SD861 Error types of module read accepting data. n module Module ID error. Module overtime error.
  • Page 382 Version info(SD990~SD993) Function Explanation Note SD990 Firmware version date Low 16-bit Firmware version SD991 High 16-bit compilation date FPGA version SD992 Low 16-bit compilation date FPGA version SD993 High 16-bit compilation date Appendix 3. Special Flash Register Special FLASH data register SFD * means it works only after repower on the PLC I filtering Function...
  • Page 383 Default value is 77 O77 corresponds to SFD134* (Octonary) I Attribute Function Description 0:positive logic SFD138* I00 attribute Attribute of input terminal 0 others:negative logic SFD139* I01 attribute …… …… SFD201* I77 attribute High Speed Counting Function Description 2:2 times frequency;4: 4 times SFD320 HSC0 frequency times frequency(effective at AB phase counting mode)
  • Page 384 BD module configuration status Configuration Status of BD Modules 1 SFD348 (#1#2) and 2 ED module configuration status SFD349 Configuration Status of ED Module 1 (#1) Extension module configuration SFD350 Configuration of Extension Module 1 : SFD359 SFD360 Extension module configuration :...
  • Page 385 Appendix 4. PLC resource conflict table When PLC is used in practice, conflicts may arise because some resources are used at the same time. This section will list the resources that may cause conflicts in each PLC model. This part mainly refers to high-speed counting, accurate timing and pulse output. Accurate High speed counting Pulse...
  • Page 386 HSC6 HSC4 HSC2 HSC0 ET10 ET12 ET14 ET16 ET18 ET20 ET22 ET24 ※1:This form should be read horizontally. Any two resources in each row cannot be used at the same time. Otherwise, it will cause conflict. Appendix 5. PLC function configuration list This part is used to check each model’s configurations.
  • Page 387 XD5 series √ XD5-16 × × √ XD5-24 × √ XD5-32 × √ XD5-48 × √ XD5-60 × √ XD5-24T4 × √ XD5-32T4 × √ XD5-48T4 × √ XD5-48D4T4 × √ XD5-48T6 × √ XD5-60T4 × √ XD5-60T6 × √ XD5-60T10 ×...
  • Page 388 √ ※ XL1-16 × × × × × × × × XL3 series √ XL3-16 × × √ XL3-32 × × XL5 series √ XL5-16 × × √ XL5-32 × × √ XL5-32T4 × × XL5E series √ XL5E-16 × ×...
  • Page 389 WUXI XINJE ELECTRIC CO., LTD. 4th Floor Building 7,No. 100 Dicui Road,Wuxi, China 214072 Tel: (510) 85134139 Fax: (510) 85111290 Email: fiona.xinje@vip.163.com Web: www.xinje.com...

This manual is also suitable for:

Xl seriesXd3Xd5

Table of Contents

Save PDF