manuals.online logo
Brands
  1. Home
  2. •
  3. Brands
  4. •
  5. Xinje
  6. •
  7. Network Hardware
  8. •
  9. Xinje XD Series User manual

Xinje XD Series User manual

XD/XL series PLC
User manual [Instruction]
WUXI XINJE ELECTRIC CO., LTD.
Data No. PD05 20220627EN 1.0
tudonghoatoancau.com
1
XD/XL series PLC
User manual[Instruction]
Preface
—————————————————
Programming summary
—————————————————
Soft component functions
—————————————————
Basic program instructions
—————————————————
Applied instructions
—————————————————
High speed counter
—————————————————
Pulse output
—————————————————
Communication functions
—————————————————
PID functions
—————————————————
C Language function block
—————————————————
Sequence BLOCK
—————————————————
Special function instructions
—————————————————
Applications
—————————————————
Q&A
—————————————————
Appendixes
—————————————————
tudonghoatoancau.com
2
Basic explanation
Thank you for purchasing Xinje XD/XL series PLC.
This manual mainly introduces XD/XL series PLC instructions.
Please read this manual carefully before using and wire after understanding the content.
About software and programming instructions, please refer to related manuals.
Please hand this manual over to operation users.
Notices for users
Only experienced operator can wire the plc. If any problem, please contact our technical
department.
The listed examples are used to help users to understand, so it may not act.
Please conform that PLC specifications and principles are suitable when connect PLC to
other products. Please conform safety of PLC and machines by yourself when use the PLC.
Machines may be damaged by PLC errors.
Responsibility declaration
The manual content has been checked carefully, however, mistakes may happen.
We often check the manual and will correct the problems in subsequent version. Welcome to
offer advices to us.
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.
Code : 214072
WUXI XINJE ELECTRIC CO., LTD. copyrights
Do not copy or use manual without written permission. Offenders should be responsible
for losses. Please keep all copyrights of our company including practical modules,
designed patents and copyrights mentioned in register.
2015, 5, 12
tudonghoatoancau.com
3
Catalog
1 PROGRAMMING SUMMARY.................................................................................................10
1-1 PLC FEATURES .............................................................................................................................. 10
1-2 PROGRAMMING LANGUAGE ...........................................................................................................11
1-2-1 Type....................................................................................................................................... 11
1-2-2 Alternation............................................................................................................................. 11
1-3 PROGRAMMING MODE ................................................................................................................... 12
2 SOFT COMPONENT FUNCTION...........................................................................................13
2-1 SUMMARY OF THE SOFT COMPONENTS ......................................................................................... 13
2-2 STRUCTURE OF SOFT COMPONENTS ..............................................................................................16
2-2-1 Structure of Memory ............................................................................................................. 16
2-2-2 Structure of Bit Soft Components......................................................................................... 18
2-3 SOFT COMPONENTS LIST ...............................................................................................................19
2-3-1 Soft Components List............................................................................................................19
2-4 INPUT/OUTPUT RELAYS (X, Y) .......................................................................................................36
2-5 AUXILIARY RELAY (M, HM, SM) ..................................................................................................38
2-6 STATUS RELAY (S, HS).................................................................................................................. 39
2-7 TIMER (T, HT)............................................................................................................................... 40
2-8 COUNTER ( C, HC, HSC).............................................................................................................. 43
2-9 DATA REGISTER (D, HD, SD, HSD) .............................................................................................. 48
2-9-1 Word consist of bits............................................................................................................... 51
2-9-2 Offset application.................................................................................................................. 52
2-10 FLASH REGISTER (FD, SFD, FS) ................................................................................................. 53
2-11 CONSTANT ................................................................................................................................... 54
2-12 PROGRAMMING PRINCIPLE ...........................................................................................................55
3 BASIC PROGRAM INSTRUCTIONS ..................................................................................... 59
3-1 BASIC INSTRUCTIONS LIST ............................................................................................................59
3-2 [LD] , [LDI] , [OUT].................................................................................................................... 61
3-3 [AND] , [ANI]...............................................................................................................................62
3-4 [OR] , [ORI]..................................................................................................................................63
3-5 [LDP] , [LDF] , [ANDP] , [ANDF] , [ORP] , [ORF]................................................................... 64
3-6 [LDD] , [LDDI] , [ANDD] , [ANDDI] , [ORD] , [ORDI] , [OUTD].......................................... 66
3-7 [ORB]............................................................................................................................................67
3-8 [ANB] ........................................................................................................................................... 68
3-9 [MCS] , [MCR].............................................................................................................................68
3-10 [ALT]...........................................................................................................................................69
3-11 [PLS] , [PLF]...............................................................................................................................70
3-12 [SET], [RST]...............................................................................................................................71
3-13 [CNT],[CNT_D],[DCNT],[DCNT_D],[RST]FOR THE COUNTERS .............................................72
3-14 [TMR], [TMR_A] FOR TIMERS ...................................................................................................74
3-15 [END]..........................................................................................................................................75
tudonghoatoancau.com
4
3-16 [GROUP] , [GROUPE]...............................................................................................................76
3-17 PROGRAMMING NOTES ................................................................................................................ 76
4 APPLIED INSTRUCTIONS...................................................................................................... 78
4-1 APPLIED INSTRUCTIONS LIST ........................................................................................................ 78
4-2 READING METHOD OF APPLIED INSTRUCTIONS ............................................................................ 82
4-3 PROGRAM FLOW INSTRUCTIONS ....................................................................................................85
4-3-1 Condition Jump [CJ]..............................................................................................................85
4-3-2 Call subroutine [CALL] and Subroutine return [SRET]....................................................... 86
4-3-3 Flow [SET], [ST], [STL], [STLE] .........................................................................................88
4-3-4 [FOR] and [NEXT]................................................................................................................93
4-3-5 [FEND] and [END]............................................................................................................... 95
4-4 DATA COMPARE FUNCTION .............................................................................................................97
4-4-1 LD Compare [LD]................................................................................................................. 97
4-4-2 Serial Compare [AND] ..........................................................................................................98
4-4-3 Parallel Compare [OR]........................................................................................................100
4-5 DATA MOVE INSTRUCTIONS .........................................................................................................102
4-5-1 Data Compare [CMP, DCMP, QCMP] ................................................................................102
4-5-2 Data zone compare [ZCP, DZCP]....................................................................................... 103
4-5-3 MOV [MOV, DMOV, QMOV] ........................................................................................... 104
4-5-4 Data block Move [BMOV] ..................................................................................................106
4-5-5 Data block Move [PMOV] .................................................................................................. 108
4-5-6 Fill Move [FMOV, DFMOV] .............................................................................................. 109
4-5-7 Floating move [EMOV, EDMOV] ...................................................................................... 110
4-5-8 FlashROM Write [FWRT, DFWRT, QFWRT].................................................................... 112
4-5-9 Zone set [MSET]................................................................................................................. 113
4-5-10 Zone reset [ZRST].............................................................................................................114
4-5-11 Swap the high and low byte [SWAP]................................................................................ 115
4-5-12 Exchange [XCH, DXCH] ..................................................................................................116
4-6 DATA OPERATION INSTRUCTIONS .................................................................................................118
4-6-1 Addition [ADD, DADD, QADD]........................................................................................118
4-6-2 Subtraction [SUB]............................................................................................................... 121
4-6-3 Multiplication [MUL, DMUL, QMUL] .............................................................................. 122
4-6-4 Division [DIV, DDIV, QDIV] ..............................................................................................124
4-6-5 Increment [INC, DINC, QINC] & Decrement [DEC, DDEC, QDEC]...............................126
4-6-6 Mean [MEAN, DMEAN]....................................................................................................128
4-6-7 Logic AND [WAND, DWAND], Logic OR[WOR, DWOR], Logic Exclusive OR [WXOR,
DWXOR] ...................................................................................................................................... 129
4-6-8 Logic converse [CML, DCML] ...........................................................................................131
4-6-9 Negative [NEG, DNEG]......................................................................................................132
4-7 SHIFT INSTRUCTIONS ...................................................................................................................133
4-7-1 Arithmetic shift left [SHL,DSHL], Arithmetic shift right [SHR,DSHR] ............................133
4-7-2 Logic shift left [LSL], Logic shift right [LSR] ....................................................................135
4-7-3 Rotation shift left [ROL,DROL], Rotation shift right [ROR,DROR] .................................136
4-7-4 Bit shift left [SFTL] .............................................................................................................138
tudonghoatoancau.com
5
4-7-5 Bit shift right [SFTR].......................................................................................................... 139
4-7-6 Word shift left [WSFL]........................................................................................................140
4-7-7 Word shift right [WSFR]..................................................................................................... 141
4-8 DATA CONVERT ............................................................................................................................142
4-8-1 Single word integer converts to double word integer [WTD.DWTD]................................143
4-8-2 32 bits integer to 64 bits integer batch conversion [BDWTD]...........................................144
4-8-3 Integer converts to float point [FLT, DFLT,FLTD]............................................................. 146
4-8-4 Integer to double precision floating point[DFLTD,QFLTD]...............................................147
4-8-5 Float point converts to integer [INT, DINT]....................................................................... 148
4-8-6 Double - precision floating point to integer[DINTD,QINTD]...........................................149
4-8-7 Single precision floating point to double precision floating point[ECON] .........................150
4-8-8 Single precision floating point to double precision floating point batch conversion [BECON]
.......................................................................................................................................................151
4-8-9 BCD convert to binary [BIN]..............................................................................................152
4-8-10 Binary convert to BCD [BCD] ..........................................................................................154
4-8-11 Hex converts to ASCII [ASCI]..........................................................................................155
4-8-12 ASCII convert to Hex [HEX]............................................................................................ 157
4-8-13 Coding [DECO].................................................................................................................158
4-8-14 High bit coding [ENCO] ................................................................................................... 160
4-8-15 Low bit coding [ENCOL]..................................................................................................162
4-8-16 Binary to Gray code [GRY]...............................................................................................165
4-8-17 Gray code to binary [GBIN,DGBIN] ................................................................................ 166
4-9.FLOATING NUMBER OPERATION ................................................................................................167
4-9-1 Floating Compare [ECMP,EDCMP]................................................................................... 167
4-9-2 Floating Zone Compare [EZCP] ......................................................................................... 169
4-9-3 Floating Addition[EADD,EDADD].................................................................................... 170
4-9-4 Floating Subtraction[ESUB,EDSUB] ................................................................................. 172
4-9-5 Floating Multiplication[EMUL,EDMUL] ...........................................................................174
4-9-6 Floating Division[EDIV,EDDIV] ........................................................................................175
4-9-7 Float Square Root [ESQR] .................................................................................................. 177
4-9-8 Sine[SIN].............................................................................................................................178
4-9-9 Cosine[COS] ........................................................................................................................179
4-9-10 TAN [TAN]........................................................................................................................180
4-9-11 ASIN [ASIN] ..................................................................................................................... 181
4-9-12 ACOS [ACOS] .................................................................................................................. 182
4-9-13 ATAN [ATAN]...................................................................................................................183
4-10 RTC INSTRUCTIONS ...................................................................................................................184
4-10-1 Read the clock data [TRD]................................................................................................185
4-10-2 Write Clock Data [TWR] ...................................................................................................186
4-10-3 Accurate clock BD board data read [MOV]......................................................................188
4-10-4 Accurate clock BD board data write [TO].........................................................................189
4-10-5 Clock data add [TADD] .....................................................................................................191
4-10-6 Clock data sub [TSUB]..................................................................................................... 192
4-10-7 Convert hour, minute, and second data to seconds [HTOS]..............................................194
tudonghoatoancau.com
6
4-10-8 Convert second data to hours, minutes, and seconds[STOH]........................................... 195
4-10-9 Clock compare [TCMP].................................................................................................... 196
4-10-10 Date (year, month, day) compare [DACMP].................................................................. 197
5 HIGH SPEED COUNTER (HSC) ........................................................................................... 200
5-1 FUNCTIONS SUMMARY................................................................................................................ 200
5-2 HSC MODE ..................................................................................................................................201
5-3 HSC RANGE ................................................................................................................................ 203
5-4 HSC INPUT WIRING .....................................................................................................................203
5-5 HSC PORTS ASSIGNMENT ............................................................................................................ 204
5-6 AB PHASE COUNTING FREQUENCY DOUBLING SETTING .............................................................. 209
5-7 HSC INSTRUCTION ...................................................................................................................... 210
5-7-1 Single phase HSC [CNT].................................................................................................... 210
5-7-2 AB phase HSC [CNT_AB]..................................................................................................211
5-7-3 HSC reset [RST] ..................................................................................................................212
5-7-4 Read HSC value [DMOV] ...................................................................................................213
5-7-5 Write HSC value [DMOV] ..................................................................................................214
5-7-6 The difference between HSC and normal counter ...............................................................215
5-8 HSC EXAMPLE ............................................................................................................................ 215
5-9 HSC INTERRUPTION .....................................................................................................................217
5-9-1 Function overview and panel configuration........................................................................ 217
5-9-2 Single phase 100-segment HSC [CNT]...............................................................................219
5-9-3 AB phase 100-segment HSC[CNT_AB].............................................................................220
5-9-4 Interruption flag of HSC......................................................................................................222
5-9-5 Setting value meaning in absolute or relative mode............................................................222
5-9-6 HSC interruption cycle mode .............................................................................................. 225
5-9-7 CAM function of high speed counter interruption .............................................................. 226
5-9-8 Interruption using notes and parameter address .................................................................. 227
5-9-9 Application of HSC interruption......................................................................................... 228
6 COMMUNICATION FUNCTION.......................................................................................... 233
6-1 SUMMARY ....................................................................................................................................233
6-1-1 COM port.............................................................................................................................233
6-1-2 Communication parameters .................................................................................................242
6-2 MODBUS COMMUNICATION .......................................................................................................243
6-2-1 Function overview ............................................................................................................... 243
6-2-2 Changing of Modbus instruction.........................................................................................244
6-2-3 Modbus communication address ......................................................................................... 244
6-2-4 Modbus data format ............................................................................................................255
6-2-5 Communication Instructions............................................................................................... 261
6-2-6 Modbus serial port configuration ........................................................................................ 270
6-2-7 Modbus Communication application.................................................................................. 274
6-2-8 Application.......................................................................................................................... 276
6-3 FREE COMMUNICATION ................................................................................................................279
6-3-1 Free communication mode .................................................................................................. 279
tudonghoatoancau.com
7
6-3-2 Serial port configuration ......................................................................................................280
6-3-3 Suitable occasion................................................................................................................. 282
6-3-4 Free communication instruction ..........................................................................................282
6-3-5 Free communication example ..............................................................................................286
6-4 COMMUNICATION FLAG AND REGISTER....................................................................................... 292
6-5 READ WRITE SERIAL PORT PARAMETERS ......................................................................................296
6-5-1 Read serial port parameters [CFGCR]................................................................................ 296
6-5-2 Write serial port parameters [CFGCW]...............................................................................297
6-5-3 Serial port parameter name and setting............................................................................... 298
7 PID CONTROL FUNCTION ...................................................................................................300
7-1 PID INTRODUCTION .....................................................................................................................300
7-2 INSTRUCTION FORM .................................................................................................................... 300
7-3 PARAMETERS SETTING .................................................................................................................302
7-3-1 Register and their functions.................................................................................................303
7-3-2 Parameters Description........................................................................................................307
7-4 AUTO TUNE MODE ...................................................................................................................... 309
7-5 ADVANCED MODE ........................................................................................................................312
7-6 APPLICATION OUTLINES ...............................................................................................................313
7-7 APPLICATION ................................................................................................................................313
8 C LANGUAGE FUNCTION BLOCK .................................................................................... 319
8-1 SUMMARY ....................................................................................................................................319
8-2 INSTRUCTION FORMAT .................................................................................................................319
8-3 OPERATION STEPS ........................................................................................................................320
8-4 IMPORT AND EXPORT THE FUNCTIONS ........................................................................................ 323
8-5 EDIT THE FUNC BLOCKS ..............................................................................................................324
8-6 PROGRAM EXAMPLE ....................................................................................................................326
8-7 NEW FUNCTIONS ..........................................................................................................................329
8-8 FUNCTION LIBRARY ..................................................................................................................... 331
8-8-1 New function ....................................................................................................................... 332
8-8-2 Basic functions .................................................................................................................... 332
8-8-3 Newly build ......................................................................................................................... 332
8-8-4 Edit...................................................................................................................................... 336
8-8-5 Export.................................................................................................................................. 339
8-8-6 Import.................................................................................................................................. 340
8-8-7 Other functions.................................................................................................................... 341
8-9 APPLICATION NOTES .................................................................................................................... 347
8-10 Q&A OF CLANGUAGE .............................................................................................................. 350
8-11 FUNCTION TABLE .......................................................................................................................352
9 SEQUENCE BLOCK ................................................................................................................356
9-1 CONCEPT OF THE BLOCK...........................................................................................................356
9-2 CALL THE BLOCK ...................................................................................................................... 357
9-2-1 Add the BLOCK.................................................................................................................. 357
tudonghoatoancau.com
8
9-2-2 Move the BLOCK............................................................................................................... 360
9-2-3 Delete the BLOCK.............................................................................................................. 361
9-2-4 Modify the BLOCK.............................................................................................................361
9-3 EDIT THE INSTRUCTION OF THE BLOCK.................................................................................... 362
9-3-1 Command item .................................................................................................................... 362
9-3-2 Pulse Item............................................................................................................................ 364
9-3-3 Wait Item ............................................................................................................................. 365
9-3-4 Module Read and Write(FROM/TO)instruction................................................................. 366
9-4 RUNNING FORM OF THE BLOCK................................................................................................ 367
9-5 BLOCK INSTRUCTION EDITING RULES ........................................................................................369
9-6 BLOCK RELATED INSTRUCTIONS ................................................................................................371
9-6-1 Instruction explanation ........................................................................................................ 371
9-6-2 The timing sequence of the instructions ..............................................................................373
9-7 BLOCK FLAG BIT AND REGISTER ............................................................................................... 377
10 SPECIAL FUNCTION INSTRUCTIONS ............................................................................ 378
10-1 PULSE WIDTH MODULATION [PWM]........................................................................................378
10-2 FREQUENCY MEASUREMENT [FRQM] .......................................................................................382
10-3 PRECISE TIMING [STR]............................................................................................................. 385
10-4 INTERRUPTION [EI], [DI], [IRET]............................................................................................. 390
10-4-1 External Interruption......................................................................................................... 390
10-4-2 Timing Interruption........................................................................................................... 396
10-5 SD CARD READING AND WRITING ............................................................................................. 398
10-5-1 Document content and format........................................................................................... 398
10-5-2 File name and storage location ..........................................................................................399
10-5-3 Read/write SD card............................................................................................................399
10-5-4 Notes..................................................................................................................................400
10-5-5 Instructions for format conversion tool ............................................................................. 402
10-6 MULTI STATION CONTROL[MSC]...............................................................................................404
11 COMMON QUESTIONS AND ANSWERS ......................................................................... 411
Q1:HOW TO CONNECT PLC WITH PC?........................................................................................... 411
Q2:PC CANNOT CONNECT PLC VIA RS232 PORT,IT SHOWS OFFLINE STATUS?.............................. 414
Q3:XD/XL SERIES PLC SYSTEM UPGRADE .................................................................................... 416
Q4: THE BIT SOFT COMPONENT FUNCTION. ....................................................................................... 421
Q5: WHAT’S THE USE OF EXECUTION INSTRUCTION LDD/OUTD ETC?............................................422
Q6: WHY THE OUTPUT LED KEEPS FLASHING WHEN USING ALT INSTRUCTION?............................. 422
Q7: WHY THE MAND YCANNOT OUTPUT SOMETIME?..................................................................... 422
Q8: CHECK AND CHANGE THE BUTTON BATTERY IN THE PCB OF PLC.............................................423
Q9: COMMUNICATE WITH SCADA SOFTWARE.................................................................................. 423
Q10: MODBUS COMMUNICATION ....................................................................................................423
Q11: THE LED LIGHT OF XD/XL SERIES PLC (PWR/RUN/ERR) ................................................... 423
Q12: THE RESULT IS NOT CORRECT WHEN DOING FLOATING OPERATION .......................................... 424
Q13: WHY THE FLOATING NUMBERS BECOME MESSY CODE IN ONLINE LADDER MONITOR WINDOW?424
Q14: WHY DATA ERRORS AFTER USING DMUL INSTRUCTIONS?.......................................................425
tudonghoatoancau.com
9
Q15: WHY THE OUTPUT POINT ACTION ERRORS AFTER PLC RUNNING FOR A WHILE?................... 425
Q16: WHY EXPANSION MODULE DOES NOT WORK WHILE POWER INDICATOR IS ON?.......................425
Q17: WHY THE SIGNAL INPUT BUT CANNOT SEE THE HIGH SPEED COUNTER WORKING?................425
Q18: C LANGUAGE ADVANTAGES COMPARED TO LADDER CHART?....................................................426
Q19: WHAT’SPLC OUTPUT TERMINAL A, B?..................................................................................426
Q20: WHAT’S THE DIFFERENCE OF SEQUENCE FUNCTION BLOCK TRIGGER CONDITION:RISING EDGE
TRIGGERED AND NORMALLY CLOSED CONDUCTION? .........................................................................426
Q21: WHAT ARE THE DOWNLOAD MODES OF XD/XL SERIES PLC AND WHAT ARE THEIR
CHARACTERISTICS?............................................................................................................................426
Q22: WHAT KINDS OF CONFIDENTIALITY METHODS DO XD/XL SERIES PLCS HAVE?.......................427
Q23: WHAT’S THE ADVANTAGE THAT XD SERIES PLC REPLACES DVP DOWNLOAD CABLE WITH
BLUETOOTH?......................................................................................................................................427
Q24: PLC I/O TERMINALEXCHANGING ............................................................................................. 428
Q25: WHAT’S THE FUNCTION OF XD/XL SERIES PLC INDIRECT ADDRESSING?................................429
Q26: HOW DOES XD/XL SERIES PLC CONNECT TO THE NETWORK?................................................ 429
Q27: HOW TO ADD SOFT ELEMENT ANDLINE NOTE IN XDPPRO SOFTWARE?.....................................429
Q28: DO NOT HAVE CLOCK FUNCTION?WHY IS THE CLOCK INACCURATE?.......................................431
APPENDIX SPECIAL SOFT COMPONENTS ........................................................................ 432
APPENDIX 1 SPECIAL AUXILIARY RELAY ...........................................................................................432
APPENDIX 2 SPECIAL DATA REGISTER ...............................................................................................438
APPENDIX 3 SPECIAL FLASH REGISTER .............................................................................................447
APPENDIX 4 PLC RESOURCE CONFLICT TABLE ..................................................................................451
APPENDIX 5 PLC FUNCTION CONFIGURATION LIST ........................................................................... 452
tudonghoatoancau.com
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
XD/XL series PLC support two kinds of program language, instruction and ladder chart, the
two kinds of language can convert to each other.
To avoid the stolen or wrong modifying of user program, we encrypt the program. When
uploading the encrypted program, it will check in the form of password. This can protect the
user copyright; meanwhile, it limits the downloading, to avoid change program by mistake.
XD/XL series added new register FS. (For different XD/XL models, please check the Data
monitor in XDPpro software for FS register range, common range is FS0~FS47). FS value
can be modified but cannot be read through Modbus instruction. FS cannot be compared to
register but only constant in XDPpro software. The value cannot be read. FS is used to protect
the user’s copyright. The register D, HD… can replace by FS.
When the user program is too long, the comments of program and soft components are
necessary in order to change the program easily later.
Add offset appendix (like X3[D100], M10[D100], D0[D100]) after coils, data registers can
make indirect addressing. For example, when D100=9, X3[D100]=X[3+9]=X14;
M10[D100]=M19, D0[D100]=D9
XD/XL series PLC has enough basic instructions including basic sequential control, data
moving and comparing, arithmetic operation, logic control, data loop and shift etc.
XD/XL series PLC also support interruption, high speed pulse, frequency testing, precise time,
PID control and so on.
XD/XL series PLC support C language; users can call the C program in ladder chart. This
function improves the programming efficiency.
Programming Language
Security of the Program
Program comments
Rich Basic Functions
C Language Function Block
Offset Function
tudonghoatoancau.com
11
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.
XD/XL series PLC has many communication modes, such as Modbus-RTU, Modbus-ASCII.
When the COM port parameters are changed, the new parameters will be valid immediately
without restarting the PLC.
Wait time can be added before Modbus instructions.
1-2 Programming Language
1-2-1 Type
XD/XL series PLC support two types of programming language:
Make the program with instructions directly, such as “LD”, “AND”, “OUT” etc. This is the
basic input form of the programs, but it’s hard to read and understand;
E.g.: step instruction operand
Make sequential control graph with sequential control signal and soft components. This
method is called “Ladder chart”. This method uses coils and contactors to represent sequential
circuit. The ladder chart is easy to understand and can be used to monitor the PLCstatus
online.
E.g.:
X0 X2
Y5
Y5
1-2-2 Alternation
The two kinds of programming language can be transformed to each other.
0
LD
X000
1
OR
Y005
2
ANI
X002
3
OUT
Y005
Instruction
Ladder chart
Instruction
Ladder
Stop PLC whenreboot
Communication Function
tudonghoatoancau.com
12
1-3 Programming mode
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.
Some instruction is complicated to use, like pulse output, PID etc. XDPPro software has the
configuration window for these special instructions. User just needs to input parameters in the
configuration window without remembering complicated instructions. The following window
is multi section pulse output.
For the details of instruction configuration, please refer to XD/XL series PLC user manual
【software part】.
Direct Input
Instruction Configuration
tudonghoatoancau.com
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. They all have countless NO
(Normally ON) and NC (Normally Closed) contactors. Connect these contactors with the
coils will make a sequential control circuit. Next we will introduce these soft components.
The functions of input relays
The input relays are used to receive the external ON/OFF signal, the sign is X.
Address AssignmentPrinciple
In each basic unit, X address is in the form of octal, such as X0~X7, X10~X17 …
The extension module address:module 1 starts from X10000, module 2 starts from
X10100…XD1/XD2/XL1 cannot support extension module. Up to 10extension modules
can be connected to the XD3/XL3main unit.
XD5/XDM/XDC/XD5E/XDME/XDH/XL5/XL5E/XLME can connect 16 extension
modules.
Extension BD board: BD 1 starts from X20000;The 24-32 points PLC can connect one
extended BD board and the 48-60 points PLC can connect two extended 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 X30000 according to
octal system, XD/XL series PLC supports a left extended I/O ED module. (XDH cannot
support ED module)
Using notes
The digital filter is used in the input filter of the input relay. Users can change the filter
parameters by setting the special register SFD0, default value is 10ms, modification range: 0
~ 1000ms.
There are enough input relays in the PLC. The input relay whose address is more than input
points can be seemed to auxiliary relay.
Function of the output relays
Output relays are the interface to drive the external loads, the sign is Y;
Address Assignment Principle
In each basic unit, Y address is in the form of octal, such as Y0~Y7, Y10~Y17 …
The extension module address: module 1 starts from Y10000, module 2 starts from Y10100…
Output Relay (Y)
Input Relay (X)
tudonghoatoancau.com
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
system, XD/XL series PLC supports a left extended input and output ED module. (XDH
cannot support ED module)
Using notes
There are enough output relays in the PLC. The output relay whose address is more than
output points can be seemed to auxiliary relay.
Function of Auxiliary Relays
Auxiliary relays is internal relays of PLC, the sign is M and HM;
Address assignment principle
In basic units, assign the auxiliary address in decimal form
Using notes
This type of relays are different from the input/output relays, they can’t drive external load
and receive external signal, but only be used in the program;
Retentive relays can keep its ON/OFF status when PLC power OFF;
Function of status relays
Used as relays in Ladder, the sign is S, HS.
Address assignment principle
In basic units, assign the address in decimalform.
Using notes
If it is not used as operation number, they can be used as auxiliary relays, programming as
normal contactors/coils. Besides, they can be used as signal alarms, for external diagnose.
Function of the timers
Timers are used to accumulate the time pulse like 1ms, 10ms, 100ms etc. when reach the set
value, the output contactors acts, represent sign is T and HT.
Address assignment principle
In basic units, assign the timer address in decimal form. Please refer to chapter 2-2 for details.
Time pulse
Auxiliary Relays (M, HM)
Status Relays (S, HS)
Timer (T, HT)
tudonghoatoancau.com
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.
According to different application purposes, the counters contain different types:
For internal counting (for general using/power off retentive usage)
16 bits counter: for increment count, the count range is 1~32,767
32 bits counter: for increment count, the count range is 1~2,147,483,647
These counters are for PLC internal signal. The response speed is one scan cycle or longer.
For High Speed Counting (Power-off retentive)
32 bits counter: the count range is -2,147,483,648~ +2,147,483,647
(Single phase increment count, AB phase count). For special input terminals.
The high speed counterwill not be affected by PLC scanning period. For increment mode, it
can count max 80KHz pulses; for AB phase mode, it can count max 50KHz pulses.
Address assignment principle
In basic units, assign the timer address in decimal form.
Function of Data Registers
Data Registers are used to store data, the sign is D and HD.
Address assignment principle
The data registers in XD/XL series PLC are16 bits (the highest bit is sign bit), combine two
data registers together is for32 bits (the highest bit is sign bit) data processing.
Using notes
Same to other soft components, data registers also have common type and power-off retentive
type.
Function of FlashROM registers
FlashROM registers are used to store data, the sign is FD.
Address assignment principle
In basic units, FlashROM registers address is in form of decimal;
Using notes
Even the battery powered off, this area can remember the data. So this area can store
important parameters. FlashROM can be writen for about 1,000,000 times, and it takes
timewhen writing. Frequently writing can cause permanent damage for FD.
Counter (C, HC)
Data Register (D, HD)
FlashROM Register (FD)
tudonghoatoancau.com
16
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.
Address Allocation Principle
In the basic unit, FS registers are addressed in decimal numbers.
Since the number of FS registers of different types of PLC may be different, please refer
to the "PLC Initial Settings" shown in the online PLC software, generally FS0-FS47.
Attention Points in Use
The storage area can remember data even if the battery is powered down, so it can be used to
store important process parameters. FS can be written about 1,000,000 times, and it takes
more time to write each time. Frequent writing will cause permanent damage to FS, so it is
not recommended that users write frequently. When using MOV instruction to transmit data
to FS, the rising edge is valid.
The value of the soft element can be set arbitrarily in the FS register, but the value of the
register can not be read (always returned to 0); and it can not be compared with the
register in the PLC software, only with the constant, so the actual value of the register can
not be read.
B means Binary, K represents Decimal, H represents Hexadecimal. They are used to set
timers and counters value, or operands of application instructions. For example hex FF will
be HFF.
2-2 Structure of Soft Components
2-2-1 Structure of Memory
In XD/XL series PLC, there are many registers. Besides D, HD, FlashROM registers, we can
also combine bit to register.
For common use,16 bits
For common use,32 bits (combine two continuous 16-bits registers)
For common use,64 bits (combine two 32-bit registers, but addresses must be consecutive).
For power off retentive use, cannot modify the retentive range
For special use, occupied by the system, can’t be used to common instruction parameters
For offset use (indirect assignment)
Form: Dn[Dm], HDn[Dm], Xn[Dm] , Yn[Dm] , Mn[Dm], etc.
Constant (B) (K) (H)
Data Register D, HD,FD
Special secret Register (FS)
tudonghoatoancau.com
17
MOV D10[D0] D100
SM0
M2
Y0[D0]
MOV K5 D0
SM2 MOV K0 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.
For common usage,16 bits, represent the current value of timer/counter;
For common usage,32 bits, (combine two continuous16 bits registers)
To represent them, just use the letter+address method, such as T10, C11, HT10, HC11.
E.g.
MOV D0T11
M0
T11 Y1
X0
TMR T11 K99 K100
In the above example, MOV T11 D0, T11 represents word register;
LD T11, T11 represents bit register.
For power off retentive usage,16 bits
For power off retentive usage,32 bits, (combine two continuous16 bits registers)
For special usage, occupied by the system, can’t be used as common instruction parameters
For common usage,16 bits, (combine16 bits)
The soft components which can be combined to words are: X, Y, M, S, T, C, HM, HS, HT,
HC.
Format: add “D” in front of soft components, like DM10, represents a 16-bits register from
M10~M25 .
Get16 bits beginning from DXn, cannot beyond the soft components range;
The word combined by bits cannot do bit addressing;
E.g.:
Timer T, HT/Counter C, HC
FlashROM Register FD
Register combined by bits
tudonghoatoancau.com
18
MOV K21 DY0
M0
MOV K3 D0
M1
MOV DX2[D0] D10
SM0
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.
2-2-2 Structure of Bit Soft Components
Bit soft components include X, Y, M, S, T, C, HM, HS, HT, HC. Besides, the bit of the
register also can be used as bit sofst component.
Input Relay X, octal form
Output Relay Y, octal form
Auxiliary Relay M, HM, S, HS; decimal form
Auxiliary Relay T, HT, C, HC, decimal form. The represent method is same to registers, so
we need to judge if it’s word register or bit register according to the instruction.
Composed by bit of register, support register D
Represent method: Dn.m (0≤m≤15): for example D10.2 means the second bit of D10
The represent method of bit with offset: Dn[Dm].x
Bit of register can’t compose to word soft component again;
E.g.:
D0.4 Y0
D5[D1].4 Y1
D0.4 means when the fourth bit of D0 is 1, set Y0 ON.
D5[D1].4 means bit addressing with offset, if D1=5, then D5[D1] means the fourth bit of D10
The bit of register
Relay
tudonghoatoancau.com
19
2-3 Soft Components List
2-3-1 Soft Components List
XD1 series PLC soft components list:
Name
Range
Points
10 I/O
16 I/O
24 I/O
32 I/O
10
16
24
32
X
Input points
X0~X4
X0~X7
X0~X13
X0~X17
5
8
12
16
Y
Output
points
Y0~Y4
Y0~Y7
Y0~Y13
Y0~Y17
5
8
12
16
M
Internal
relay
M0~M7999
8000
HM
HM0~HM959※1
960
SM
Special purpose SM0~SM2047※2
2048
S
Flow
S0~S1023
1024
HS
HS0~HS127※1
128
T
Timer
T0~T575
576
HT
HT0~HT95※1
96
ET
Precise timer ET0~ET31
32
C
Counter
C0~C575
576
HC
HC0~HC95※1
96
HSC
High speed counter HSC0~HSC31
32
D
Data
register
D0~D7999
8000
HD
HD0~HD999※1
1000
SD
Special purpose SD0~SD2047
2048
HSD
Special purpose HSD0~HSD499※2
500
FD
FlashROM
register
FD0~FD5119
5120
SFD
Special purpose SFD0~SFD1999※2
2000
FS
Special
secret
register
FS0~FS47
48
ID※6
Main body
ID0~ID99
100
QD※7
Main body
QD0~QD99
100
SEM
Special coil
of Sequence
block
instruction
WAIT
SEM0~SEM31
32
XD2 series PLC soft components list:
Name
Range
Points
16I/O
24 I/O
32 I/O
42I/O
48 I/O
60 I/O
16
24
32
42
48
60
X
Input points
X0~X7
X0~X15
X0~X21
X0~X27
X0~X33
X0~X43
8
14
18
24
28
36
Y
Output points
Y0~Y7
Y0~Y11
Y0~Y15
Y0~Y21
Y0~Y23
Y0~Y27
8
10
14
18
20
24
X
Input points※4
X20000~X20077(#1 expansionBD)
X20100~X20177(#2 expansionBD)
128
Y
Output
points※4
Y20000~Y20077(#1 expansionBD)
Y20100~Y20177(#2 expansionBD)
128
X
Input points※5
X30000~X30077(#1 expansionED)
64
tudonghoatoancau.com

Other manuals for XD Series

4

This manual suits for next models

16

Other Xinje Network Hardware manuals

Xinje VH5 Series User manual

Xinje

Xinje VH5 Series User manual

Xinje XD-2AD2PT-V-ED User manual

Xinje

Xinje XD-2AD2PT-V-ED User manual

Popular Network Hardware manuals by other brands

ELSA MicroLink Office installation guide

ELSA

ELSA MicroLink Office installation guide

Avocent MergePoint 5224 Specification sheet

Avocent

Avocent MergePoint 5224 Specification sheet

Phihong POE125U user manual

Phihong

Phihong POE125U user manual

Eldes LAN MESSENGER user manual

Eldes

Eldes LAN MESSENGER user manual

Advantech WISE-2410 user manual

Advantech

Advantech WISE-2410 user manual

VITRONIC SNVR-8016ST manual

VITRONIC

VITRONIC SNVR-8016ST manual

Edgewater Networks EAP3030/1-I user manual

Edgewater Networks

Edgewater Networks EAP3030/1-I user manual

Wisstar WP-N6516-E2 user manual

Wisstar

Wisstar WP-N6516-E2 user manual

Motorola CPEi 825 Series Regulatory guide

Motorola

Motorola CPEi 825 Series Regulatory guide

GeoVision GV-NVR quick start guide

GeoVision

GeoVision GV-NVR quick start guide

SMC Networks ELITECONNECT SMC2502W datasheet

SMC Networks

SMC Networks ELITECONNECT SMC2502W datasheet

Qualstar 501440 Rev. G Installation and operation manual

Qualstar

Qualstar 501440 Rev. G Installation and operation manual

Ruckus Wireless Fiber Node Quick setup guide

Ruckus Wireless

Ruckus Wireless Fiber Node Quick setup guide

LaCie CloudBox Quick install guide

LaCie

LaCie CloudBox Quick install guide

Apposite Netropy 10G1 quick start guide

Apposite

Apposite Netropy 10G1 quick start guide

Linksys NMH305 - Media Hub Home Entertainment Storage NAS... user guide

Linksys

Linksys NMH305 - Media Hub Home Entertainment Storage NAS... user guide

Pioneer DRM-6NX operating instructions

Pioneer

Pioneer DRM-6NX operating instructions

Idis Direct IP DR-8364 quick guide

Idis

Idis Direct IP DR-8364 quick guide

manuals.online logo
manuals.online logoBrands
  • About & Mission
  • Contact us
  • Privacy Policy
  • Terms and Conditions

Copyright 2025 Manuals.Online. All Rights Reserved.