Home

XC Series Programmable ProgrammableController Controller

image

Contents

1. Constitution Input Output switch quantity is Octal Rules Input Output analog quantity is Decimal PLC main units can connect with 7 expansions and a BD module The input output type is not limited both switch or analog quantity are available 11 12 ID Assignment XC Awl PLC HMI Max points Unit Type ID As register Channels Input switch quantity X X100 X137 32 points Output switch quantity Y Y100 Y 137 32 points Expansion ia Input analog quantity ID ID100 1D131 16 channels Output analog quantity QD QD100 QD131 16 channels Mod
2. j 199 4 p 74 3 i ami Ol alaala 01234587 1010 12 13 14 15 16 17 nnis22z Thinget 202122232425 26 27 HH ls oa N 303132333435 3637 TT Oy 4041243 I 8 e H puro i 228 Cc RUNG L XC3 60R E a 2 NOQ T PORTI PORT2 ERRO T pees mss 2 zm llseeoi 01234597 m 101112 13 14 15 16 17 AHHIE 20 21 22 23 24 25 26 27 us J T DD 1 JJUUUJUU 16 XC AYI PLC HMI 1 6 Terminal arrangement Main Units D Input terminals 2 BD expansion Input label 4 COM port 9 COM port COM port s cover board Output label BOutputterminals Screws Inputindicate LED l Extension port Programming status indicate LED I Output indicate LED XC3 60 main units XC5 60 main units 36 pea Output Cot i2 AP DNO my Ala Add 1 At LONE D Alo MS CUN 1 XC3 48 main units XC5 48 main units 28 Input 20 Output N COM xi x3 X5 X7 Xii X13 X15 X17 X21 X23 X25 X27 X31 X33 L FG COM XO x2 X4 X6 X10 X12 X14 X16 X20 X22 X24 X26 X30 X32 ov
3. 01234567 10 11 12 13 14 15 16 17 Thinget 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 40 41 42 43 a m Ex PWR xe5 60R E RUNO IH ERR O Y y 01234567 10 11 12 13 14 15 16 17 20 21 22 23 24 25 26 27 Z s Yo YI vo coms Ya ve Y YH T vis vis come v20 Y22 Y23 Y CONG J cw Low D ys 35 Pow to yz Loos Ya yn pov Dyer con Ys T Y DGIC D eS E EDIEDI ED GD apap ED EDEDED ED EDE ED E EDE 231 RII BE 1 RS232 COM port The pin graph of COM 1 Portl PRG RxD TxD VCC GND on wn A N 2 Mini Din 8 core socket Hole About RS485 COM port A is signal B is signal On XC series PLC COM2 Port2 can be both RS485 and RS232 so you can t only use two at the same time The pin graph of COM 1 Port1 3 4 RxD C N oj ca canl be used to realize CANbu co x unication For e detailed CAN communication fu amp ctiGiN Dlease refer to 6 8 CAN bus function XOS sefid s J Mini Di e socket Hole Communication Parameter Station Modbus Station number 1 254 255 FF is free format communication Baud Rate 300bps 115 2Kbps Data Bit 8 bits data
4. ON A phase input OFF a ON B phase input OFF E 2 Count Value High speed counter s count bound K 2 147 483 648 K 2 147 483 647 If the count value exceeds the bound overflow or underflow will occur if occur overflow K 2 147 483 647 will change to be K 2 147 483 648 then go on counting if occur underflow K 2 147 483 648 will change to be K 2 147 483 647 then go on counting 3 Reset High speed counter s count format is software reset format Mo CID K2000 See the right graph when MO is ON C600 starts to count with the pulse input from XO port when M1 iu RST C600 turns from OFF to ON the status value and count value of C600 reset 216 Connection of input terminal RERI RE The following we take C600 as the example to introduce the connection format AB phase mode B phase input A phase input Pulse Direction mode Pulse input Direction input COM XI X3 X5 COM X0 X2 X4 Pulse input Increment Mode COM XI X3 X5 COM X0 X2 X4 e Program Example The following we take XC3 60 PLC model as the example to tell how to program with the high speed count K2000 C600 E S 4 B 0 3 a DO D1 C
5. X0 C P6 1 Xl d X2 RST T246 X3 T246 K1000 X4 MOV K3 DO X0 C P7 X5 DIC X6 RST T246 See the upward graph Y000 turns to be dual coil and output But when X000 OFF X001 activates When X000 ON X005 activates CJcan not jump from one STL to another STL If program timer TO T640 and high speed counter C600 C640 jump after driving go on working output point also activate 76 ADI He Call subroutine CALL and Subroutine return SRET Suitable Models 16 bits instruction CALL SRET 32 bits instruction XCI XC3 XC5 Pointer P Soft Unit s Bound PO0 P9999 ood a qeymg X0 CALL PI 0 EE Function ure1go4d uey FEND o s amp Ed e SRET END If X000 ON carry on Jump instruction and jump to step of flag P10 Here after executing the subroutine return to the original step via executing SRET instruction After the following FEND instruction program with the flag In the subroutine 9 levels Call instruction is allowed so to the all 10 levels nesting is available 77 ADI He Flow SET ST STL STLE Suitable Models 16 bits instruction SET ST STL STLE 32 bits instruction XCI XC3 XC5 Pointer S Soft Unit s Bound S0 S ood
6. brogcum D Kioo Co X0 D gt Doo Ki i SET y DLD gt K68899 C300 Mi 82 RADI HE When the source data s highest bit 16 bits b15 32 bits b31 is 1 use Note Heats the data as a negative The comparison of 32 bits counter C300 must use 32 bits instruction If assigned as 16 bits instruction it will lead the program error or operation error Serial Refer Below AND O Suitable Models 16 bits instruction Refer Below 32 bits instruction Refer Below XCI XC3 XC5 k Word Gr jee DERDETETRISTUIGIPTH evice E Device Instruction amp Function The value of S1 and S2 are tested according to the comparison of the instruction If the comparison is true then the LD contact is active If the comparison is false then the LD contact is not active 16 32 gt Active gt Inactive bits bi condit conditi ts ion on AND DAND S1 S2 SI z S2 AND DAND gt SI gt S2 SI S2 gt AND DAND lt SI lt S2 SI S2 lt AND DAND lt gt SI S2 SI S2 Program AND lt SD lt S2 SD gt 2 AND DAND gt SI S2 SI S2 SS 83 84 Note Items T m 9 AND K100 CO Xl AND gt K 30 DO SET Yl x2 DAND gt K68899 DII M50 M4
7. X10 ON instruction After executing CALL instruction and before executing SRET instruction if execute FEND instruction or execute FEND instruction after executing FOR instruction and before executing NEXT then an error will occur In the condition of using many FEND instruction please compile routine or subroutine between the last FEND instruction and END instruction 80 5 4 Contactor s Compare Instructions RADI RE Mnemonic amp Function Mnemonic gt Function LD Initial comparison contact Active when the comparison S1 S2 is true LD gt Initial comparison contact Active when the comparison S1 gt S2 is true LD lt Initial comparison contact Active when the comparison S1 lt S2 is true LD lt gt Initial comparison contact Active when the comparison S1 77 S2 is true LD lt Initial comparison contact Active when the comparison S1 lt S2 is true LD gt Initial comparison contact Active when the comparison S1 S2 is true AND Serial comparison contact Active when the comparison S1 S2 is true AND gt Serial comparison contact Active when the comparison S1 gt S2 is true AND lt Serial comparison contact Active when the comparison S1 lt S2 is true AND lt gt Serial comparison contact Active when the comparison S1 S2 is true AND lt Serial comparison contact Active w
8. Mnemonic gt Function LD Initial comparison contact Active when the comparison S1 S2 is true LD gt Initial comparison contact Active when the comparison S1 gt S2 is true LD lt Initial comparison contact Active when the comparison S1 lt S2 is true LD lt gt Initial comparison contact Active when the comparison S1 77 S2 is true LD lt Initial comparison contact Active when the comparison S1 lt S2 is true LD gt Initial comparison contact Active when the comparison S1 S2 is true AND Serial comparison contact Active when the comparison S1 S2 is true AND gt Serial comparison contact Active when the comparison S1 gt S2 is true AND lt Serial comparison contact Active when the comparison S1 lt S2 is true AND lt gt Serial comparison contact Active when the comparison S1 S2 is true AND lt Serial comparison contact Active when the comparison S1 lt S2 is true AND gt Serial comparison contact Active when the comparison S1 S2 is true OR Parallel comparison contact Active when the comparison S1 S2 is true OR gt Parallel comparison contact Active when the comparison S1 gt S2 is true OR lt Parallel comparison contact Active when the comparison S1 lt S2 is true OR lt gt Parallel comparison contact Active when the comparison S1 S2 is true OR lt Parallel comparison contact Active when the comparison S1 lt S2 is true OR g
9. The Assignment of Count Input Ports 1 In the following table we list how many high speed counters are there in XC series PLC High speed counters PLC Model Increment Mode mem DISCE Mode AB Phase Mode XC3 14 4 2 2 XC3 24 XC3 32 XC3 48 XC3 60 XC5 XC5 32 Series XC5 48 XC5 60 XC3 Series 5 4 2 5 213 SG 2 About the definition of high speed counter s input terminals please refer to the following table When X input terminals are not used as high speed input port they could be used as common input terminals U count pulse input Dir count direction judgment OFF means ON means A A phase input B B phase input XC3 48 XC3 60 PLC models Increment Mode Hus RUM Lire AB Phase Mode C600 C602 C604 C606 C608 C610 C612C6141C616 C618 C620 C622 C6241 C626 C628 C630 C632 C634 X000 U U B X001 Dir A X002 U U B X003 Dir A X004 U X005 U XC3 24 XC3 32 AND XC5 48 XC5 60 PLC MODELS Pulse Direction Input AB Phase Mode Mode C606 C608 C610 C612 C620 C622 C624 C626 C628 C630 C632 C634 U B Dir A Increment Mode 214 ATI HE XC3 14 PLC MODELS Pulse Direction Input AB Phase Mode Mode IC602 C604 C606 C608 C6 10 C612 C614 C616 C618 C620 C622 C624
10. 137 PATI HE TWR Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 Word amp s 3 peu RED es ee DB T evice a Device Function amp Action X0 A The 7 data devices specified with the TWR D10 Wirite the set clock data into PLC s real time clock In order to write real time clock the 7 data devices specified with the head address CS Oshould be pre set Unit Item Clock data Unit Item DO Year 0 99 gt D8018 Year ZL J Di Month 1 12 D8017 Month amp 4 D2 Date 1 31 D8016 Date 8 E E D3 Hour 0 23 D8015 How gg 4 D4 Minute 0 59 D8014 Minute A E amp D5 Second 0 59 D8013 Second 3 D6 Week O Sun 6 Sat D8019 Week B After executing TWR instruction the time in real time clock will immediately change to be the new set time So when setting the time it is a good idea to set the source data to a time a number of minutes ahead and then drive the instruction when the real time reaches this value 138 PADI HE 5 Applied Instructions In this chapter we describe applied instruction s function of XC series PLC 5 1 Table of Applied Instructions 5 2 Reading Method of Applied Instructions 5 3 Flow Instructions 5 4 Contactors Compare Instructions 5 5 Move and Comp
11. Convert and move instruction of Source BCD destination BIN When source data is not BCD code M8067 Operation error M8068 Operation error lock will not work Asconstant K automatically converts to binary so it s not suitable for this instruction BCD Suitable Models XC3 XC5 16 bits instruction BCD 32 bits instruction Tid RADI RE s ____ Word bere DERISCDETECIPS TS TG Tp T5 evice 5 _ gt Device Function amp Action Convert and move instruction of source BIN destination BCD Hes mace BCD DI 0 DO This instruction can be used to output data directly to a seven segment display ASCI Suitable Models 16 bits instruction ASCI 32 bits instruction XC3 XC5 115 ADI He PK ox oY Jo os 1 oo DIF 8 5 Device Device Function amp Action 16 bits convert mode N G GJ s I ASCI D100 D200 K4 Convert each bit of source s S Hex format data to be ASCII code move separately to the high 8 bits and low 8 bits of destination D The convert alphanumeric number is assigned with n D is low 8 bits high 8 bits store ASCII data The convert result is the following Assign start device D100 0ABCH AJ 41H 2 32H 6 36H D101 1234H B 42H 3 33H 7 37H D102 5678H CI 433H
12. Generate a certain quantity pulse with the assigned frequency support 32 bits instruction DPLSR SL Highest frequency Operands K TD CD D FD S2 Total output pulse number Operands K TD CD D FD S3 Speedup speed down time Operands K TD CD D FD CD DAssign Y number of output pulse could only be output at YOOO or Y001 222 When MO is ON PLSR starts pulse output send assigned pulse number according to the assigned speedup speed down slope highest frequency To output with the constant speed set the speedup speed down time as 0 If set the pulse number as H 7FFFFFFF infinity pulse number will be sold out at this time coil M8170 set ON When the output pulse number reaches the set value stop pulse outputting at this time coil M8170 set OFF reset M000 See the following chart HO stop l i I l l M8170 Normal Condition stop in the middle way ADI RE gt Pulse output of segments and single phase B G O DO PLSR D100 Y3 RST MO The instruction which generates a certain quantity pulse with the assigned frequency S1 An area with Dn or FDn as the start address In the above example DO set the highest frequency of segment 1 pulse D1 set the highest frequency of segment 1 pulse D2 set the highest frequency of segment 2 pulse D3 set the highest frequency of segment 2 pulse if the set value of Dn Dn 1 are
13. X1 E ENCOL DO DI K3 bl 5 DO bO ol ol ol ol lolo lo lolo E 71 6 5 4Q_2 1 bls D 4 9 0 0 0lolololololololololololo 1 lt bO All be 0 If many bits in the source ID are 1 ignore the high bits If source ID are all 0 don t execute the instructions Whendrive input is OFF the instruction is not executed encode output don t change When n 8 if encode instruction s S is bit unit it s point number is 2 8 256 120 HUI 5 9 Floating Operation Mnemonic Function ECMP Float Compare EZCP Float Zone Compare EADD Float Add ESUB Float Subtract EMUL Float Multiplication EDIV Float Division ESQR Float Square Root SIN Sine COS Cosine TAN Tangent 121 RADI HE ECMP Suitable Models 16 bits instruction 32 bits instruction ECMP XC3 XC5 wed amp 39G92 2 Csr Gk pei CELE DT IS so To gt Tr evice Bu Device k Function amp Action D11 D10 D21 D20 MO0 MI M2 Binary Floating Binary Floating SI S2 D Gb ECMP DI 0 D20 MO MO D11 D10 gt D21 lt D20 Binary Floating Binary Floating M1 D11 D10 D21 lt D20 Binary Floating Binary Floating D11 D10 lt D21 lt D20 Binary Floating Binary Floating The status of the destination device will be kept even if the ECMP instruction is deactivated The binary flo
14. l or0 1 lorl l Execute logic Exclusive OR operation with each bit GO WXOR DI 0 DI D 4 0 xor 0 0 0xor1 1 1 xor 0 1 1 xor 1 0 If use this instruction along with CML instruction XOR NOT operation could also be executed SI S2 D P Ik WXOR DI 0 DI D 4 CML DI 4 Di 4 173 RADI He CML Suitable Models 16 bits instruction CML 32 bits instruction DCML XCl XC3 XC5 K Hj DX pv ow jps TD CD D Jr s Word Cs Device K N Device Function amp Action x L2 CML DO DYO A copy of each data bit within the source device is inverted and then moved to the designated destination Each data bit in the source device is inverted 0 gt 1 1 gt 0 and sent to the destination device If use constant K in the source device it can be auto convert to be binary It s available when you want to inverted output the PLC s output Do o 1 0 1 0 1 0 1 0 o 1o TAE Symbol Bit 0 positive 1 Negative RTPRISREBRISBISBISBISBIS Y17 Y7 Y Y5 Y4 Reading of inverted input X0 The sequential control instruction in the left could be denoted by the following CML instruction cm X2 EA e CML DXO DMO ND em 174 ADI He NEG Suitable Models
15. 9 ee Device c S Function amp Action The instruction copies n2 source devices to a bit stack of length nl For every new addition of n2 bits the existing data within the bit stack is shifted n2 bits to the left right Any bit data moving to the position exceeding the n1 limit is diverted to an overflow area The bit shifting operation will occur every time the instruction is processed unless it is modified with either the pulse suffix or a controlled interlock Bit shift left M15 M12 Overflow MI1 M 8 M15 M 12 8 o _OQa 2 M7 M4 MI1 M8 feats im ee eg M 3 M 0 gt M7 M4 X 3 X 0 M3 M0 QD D D Bit shift right M3 M 0 Overflow T 5 P nm m M7 M 4 M3 MO0 MI5 MI2 MI1 M8 X3 X 0 MI5 MI2 In every scan cycle loop shift left right action will be executed 180 RADI He WSFL amp WSFR Suitable Models 16 bits instruction WSFL WSFR 32 bits instruction DWSFL DWSFR 3 XC5 pln s S DERDPXDS ow os 7 Td TF Device N Word E Device Function amp Action The instruction copies n2 source devices to a word stack of length n1 For each addition of n2 words the existing data within the word stack is shifted n2 words to the left right Any word data moving to a position exceeding the n1 limit is diverted to an overflow area The word shifting operation will occur every time the instruction is processed unle
16. Output terminal Basic unit s transistor output has 1 4 public end output Exterior power Please use DC5 30V steady voltage power for load drive Circuit insulation Use photoelectricity coupling device to insulate PLC s interior circuit and output transistor Besides each public block is separate Action denote When drive optical coupling LED lights output transistor is ON Response time From photoelectricity coupling device drive or cut to transistor ON or OFF the time PLC uses is below 0 2ms Output current The current is 0 5A per point But as restrict by temperature goes up the current is 0 8A every four points Open circuit s current Below 0 1mA To avoid burning the output units and PLC s basic panel s layout caused by load short current please choose the right fuse to fit the load 2 i DC5 30V Cd m ET at JPN Optical coupling drive circuit 25 E g 26 URRIA d AN dr E Ahi R BYA H The following is the connection graph of RT type PLC with step motor driver PLC side Step motor driver ST PU x J SE J K M N Ar kG k CONO amp 31 E HN Sh TI PU IE A J LY y A K
17. INT DI D20 D11 D10 D20 Binary Floating BIN integer Give up the data after the decimal dot 32 fiz v 1 DINT DI D20 D11 D10 D20 D21 Binary Floating BIN integer Give up the data after the decimal dot The binary source number is converted into an BIN integer and stored at the destination device Abandon the value behind the decimal point This instruction is contrary to FLT instruction When the result is 0 the flag bit is ON When converting less than 1 and abandon it zero flag is ON 16 bits operation 32 768 32 767 32 bits operation 2 147 483 648 2 147 483 647 BIN Suitable Models XC3 XC5 16 bits instruction BIN 32 bits instruction 185 RADI RE PK OX oY ow os 1 oo DIF s ____ Device a Device Function amp Action X0 o BIN DI DO EE Convert and move instruction of Source BCD destination BIN When source data is not BCD code M8067 Operation error M8068 Operation error lock will not work Asconstant K automatically converts to binary so it s not suitable for this instruction BCD Suitable Models XC3 XC5 16 bits instruction BCD 32 bits instruction 186 RADI RE s ____ Word bere DERISCDETECIPS TS TG Tp T5 evice 5 _ gt Device Function amp Act
18. MO count coil Programming y of high speed counter EUM M1 reset circuit C600 In the preceding example when MO is ON carry on positive count with OFF gt ON of X0 Counters current value increase when reach the set value K or D the output contact is reset When M1 is ON counter s C600 output contact is reset counter s current value turns to be 0 62 JEJE RA LH 4 14 NOP END Mnemonic Function Format and Devices None NOP No operation No or null step Operation Devices None END END Force the current program scan Devices None to end When clear the whole program all the instructions become NOP If add Description NOP instructions between the common instructions they have no effect and PLC will keep on working If add NOP instructions in the program then when modify or add programs the step vary will be decreased But the program should have rest quantity If replace the program s instructions with NOP instructions then the d C Y OUT NOP f 3 mE Na AND NOP ANI NOP Contacts short circuit no E ORI NOP Open circuit PLC repeatedly carry on input disposal program Input disposal executing and output disposal If write END instruction at the end of the program then the instructions behind END instruction won t be executed If there s no END instruction in the program the PLC executes the end step and then
19. There are other methods E g jump instructions or step ladder However when use step ladder if the main program s output coil is programmed then the disposal method is the same with dual coil please note this 64 Memo JEJE RA LH 65 AE AK ion A vH S Applied Instructions In this chapter we describe applied instruction s function of XC series PLC 5 1 Table of Applied Instructions 5 2 Reading Method of Applied Instructions 5 3 Flow Instructions 5 4 Contactors Compare Instructions 5 5 Move and Compare Instructions 5 6 Arithmetic and Logic Operation Instructions 5 7 Loop and Shift Instructions 5 8 Data Convert 5 9 Floating Operation 5 10 Clock Operation 66 ADI HE 67 FERD RE 5 1 Applied Instruction List The applied instructions sort and their correspond instructions are listed in the following table Common statements of XC1 XC3 XC5 Sort Mnemonic Function CJ Condition jump CALL Call subroutine SRET Subroutine return STL Flow start STLE Flow end B gerant SET Open the assigned flow close the current flow Flow ST Open the assigned flow not close the current flow FOR Start of a FOR NEXT loop NEXT End of a FOR NEXT loop FEND First end LD LD activates if S1 S2 LD gt LD activates if S1 gt S2 LD lt LD activates if S1 lt S
20. ADI RE When the source data s highest bit 16 bits b15 32 bits b31 is 1 use the data as a negative The comparison of 32 bits counter C300 must use 32 bits instruction If assigned as 16 bits instruction it will lead the program error or operation error RADI RE Parallel Comparision OR C Suitable Models 16 bits instruction Refer Below 32 bits instruction Refer Below XCI XC3 XC5 k 7 gt Tod Gr ous HD DY Dos Te oT evice Device Instruction amp Function The value of S1 and S2 are tested according to the instruction If the comparison is true then the AND contact is active If the comparison is false then the AND contact is not active 16 bits 32 bits Active condition Inactive condition AND DAND S1 S2 SI z S2 AND DAND gt S1 gt S2 SI S2 AND lt DAND lt S1 lt S2 SI S2 AND lt gt DAND lt gt S1 z S2 SI S2 AND lt DAND lt SI S2 S1 gt S2 AND DAND gt SD S2 S1 lt S2 Program X0 i GO GS R K100 Co X2 M4 Mii DOR gt DI K68899 When the source data s highest bit 16 bits b15 32 bits b31 is 1 use the data as a negative The comparison of 32 bits counter C300 must be 32 bits instruction If assigned as a 16 bits instruction it will lead the program error or
21. Instruction s name gt Mnemonic CJ Condition Jump CALL Call subroutine SRET Subroutine return STL Flow start STLE Flow end SET Open the assigned flow close the current flow flow jump ST Open the assigned flow not close the current flow Open the new flow FOR Start of a FOR NEXT loop NEXT End of a FOR NEXT loop FEND First End 147 RADI He Condition Jump CJ Suitable Models 16 bits instruction CJ 32 bits instruction XCl XC3 XC5 Pointer P Soft Unit s Bound PO0 P9999 93149 q 9 qeymg As the instructions of executing list with CJ instructions the operate cycle and Function dual coil can be greatly shorten and Action In the following chart if X000 ON then jump from step 1 to the end step of flag P6 When X000 OFF do not execute jump instructions X0 C P6 1 Xl d X2 RST T246 X3 T246 K1000 X4 MOV K3 DO X0 C P7 X5 DIC X6 RST T246 See the upward graph Y000 turns to be dual coil and output But when X000 OFF X001 activates When X000 ON X005 activates CJcan not jump from one STL to another STL If program timer TO T640 and high speed counter C600 C640 jump after driving go on working output point also activate 148 ADI He Call subroutine CALL and
22. 16 bits instruction NEG 32 bits instruction DNEG XCl XC3 XC5 O Word ums KH DX DY DM ps TD CD D jr evice Device Function amp Action x5 t NEG DI 0 DID 1 DI0 Thebit format of the selected device is inverted I e any occurrence of a 1 becomes a 0 and any occurrence of 0 becomes 1 when this is complete a further binary 1 is added to the bit format The result is the total logic sigh change of the selected devices contents 175 HUI 5 7 Shift Instructions Mnemonic Function SHL Arithmetic shift left SHR Arithmetic shift right LSL Logic shift left LSR Logic shift right ROL Rotation left ROR Rotation right SFTL Bit shift left SFTR Bit shift right WSFL Word shift left WSFR Word shift right 176 READ RE SHL amp SHR Suitable Models 16 bits instruction SHL SHR 32 bits instruction DSHL DSHR 3 XCS n E23 9 ___4 Word pex SHE Lt Toc Tos T5 oo T 5 T8 Device Arithmetic shift left Function amp D mH SHL DO K4 x After once execution the Action High Left Shift L P ae low bit is filled in 0 the final bit is stored in carry pe X 4 n Bits flag M8022 i After once High execution low E BRI To o o o o o o o o o oo RRR aes EEE 4 i a 1
23. s D e s e MOV KI DI Move data from one storage area to a new one Move contents from source to destination If X000 is OFF data will not change Constant K10 will automatically convert to be BIN code Read out the current value of timer counter It s the same with the counter zi MOV TO Dii TO current value D20 Indirect assign the set value of timer counter X2 MOV KI D K10 D10 MO D20 K10 m D Di Move of 32 bits data k DMOV DO DI 0 DI DO gt D11 D10 DMOV C235 D C235 current value D21 D20 159 RADI He BMOV Suitable Models 16 bits instruction BMOV 32bits instruction XCl XC3 XCS Km jox oy ow fDS TD CD D Jr 8 Word e Device g ny c S oe Device IIAJ AQEMMS A quantity of consecutively occurring data elements can be copied to a new destination The source data is identified as a device head address S and a quantity of consecutive data elements n This is moved to the destination device D for the same number of elements n If the quantity of source device n exceeds the actual number of available source devices then only those devices which fall in the available range will be used If the number of source devices exceeds the available space at the destination location then only the availa
24. COM X11 X13 X15 X17 e COM X10 X12 X14 X16 e XC E16YR YO Yi Y2 COM3 Y5 Y7 COMO coM1 COM2 Y3 Y4 Y6 Y10 Y11 Y12 COM7 Y15 Y17 COMA COM5 COM6 Y13 Y14 Y16 18 XC Ail PLC HIME 19 XC AYI PLC HMI 1 7 COM Port Definition Pin of COM 1 PRG TxD VCC GND oH tA d N Mini Din 88 core socket hole COM 2 Pin of COM 2 5 TxD 8 GND Mini Din 88 core socket hole Program Cable Connection of programmable cable is the following TA Ahs TET 3 05 0403 i Be e eG e e e eo J Mini Din 8 core socket pin DB9 pin hole 20 MEMO 2 Power circuit s specification input output specification and exterior layout In this chapter we ll tell the power constitution interior signal circuit s composing output circuit s composing and exterior layout of XC series PLC When using the extend modules or special modules at the same time please connect the power according to the user manual 2 1 Power Specification 2 2 AC Power DC Input Type 2 3 Input Specification 2 4 DC input signal disposal AC power type 2 5 Output Specification 2 6 Disposal of relay output circuit 2 7 Disposal of transistor output circuit 15 rji n ELE d AN Ar ERU 5 e RC R HAUS LER RUBUS d AN A EH US 5 Sb RC 2X 2 1 Power Specification For t
25. FD8226 Free format setting 8 16 bits cushion with without start bit with without stop bit 233 E FLIER I UA o AN Ly SU 5 P EO Setting method of communication parameters FD8211 COMI FD8221 COM2 300bps 600bps 1200 bps 2400 bps 4800 bps 9600 bps 19 2K bps 38 4K bps 57 6K bps 115 2K bps 0 Nocheck 1 Odd check 2 Even check 0 2 stop bits 2 lstop bit 0 8bits data 1 7bits data NO 00 10 tn 3 UNa O FD8216 COM1 FD8226 COM2 0 8 bits communication Reserve 1 16 bits communication 0 without start symbol 1 with start symbol 0 without end symbol 1 with end symbol 234 FEL UE FELT IU A i OS 5s Oh i 235 HUS FL SES aan HAUS Sb ERO 2X 6 3 1 MODBUS Communication function Communication XC series PLC support both Modbus master and Modbus slave Master format When PLC is set to be master PLC sends request to other Function slave devices via Modbus instructions other devices response the master Slave format when PLC is set to be slave it can only response with other master devices The defaulted status of XC PLC is Modbus slave Communication For the soft unit s number in PLC which corresponds with Modbus address number ID please see the following table Coil space Modbus address start with 0x 236 Bit address Modbus address Dec K Modbus address Hex H gt M0 M
26. M8170 the broken line means the original pulse output curve 5 PulseStop STOP MO PLSR DO D100 YO MI 1 STOP YO M8170 RST MO If M000 turns from OFF to ON PLSY activates and Y000 output pulse DO assign the frequency D001 assign the pulse number D100 assign the speedup speed down time when the output pulse number reaches the set value stop pulse outputting At the rising edge of M001 STOP instruction stop pulse outputting at Y000 immediately 225 RADI RE Connection of output terminals YO Y1 Y2 COMO COMI COM2 O O O Output port YO pulse output port 0 Single Phase Output port Y 1 pulse output port 1 Single Phase The following graph is connection of output terminals and step motor driver PLC Side Step Motor Driver Side 3 PU xw J SD LAI A K K A C C a CONO amp 311E N Bh 5 PU amp A S lo A K A m 4 C3 b cout St 424 Sh 226 RERI RE Note Items 1 Concept of Step Frequency output YO or Y JA 81 vels each 5 level 5ms p
27. The valid range of Hour is 0 23 The valid range of Minute is 0 59 The valid range of Second is 0 59 207 READ He TSUB Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 Word Ku KHj px by bow ps TD CD D Jr Device 7 N Device Function amp Action Q GO E I TSUB DI 0 D20 D30 D10 D11 D12 D20 D21 D22 D30 D31 D32 S1 S2 D10 Hour D10 Hour D10 Hour D11 Minute D11 Minute D11 Minute D12 Second D12 Second 10 hour 20 min 30 sec 3 hour 20 min 10 sec 7 hour 0 min 20 sec Each of S1 S2 and D specify the head address of 3 data devices to be used a time value The time value in S1 is subtracted from the time value in S2 the result is stored to D as a new time If the subtraction of the two times results in a value less than 00 00 00 hours the value of the result is the time remaining below 00 00 00 hours When this happens the borrow flag M8021 is set ON Sl S2 D 10 Hour 18 Hour 4 Hour 20 Minute 10 Minute 30 Minute 5 Second 30 Second 35 Second 10 hour 20 min 5 sec 18 hour 10 min 30sec 4 hour 30 min 35 sec When the result is 0 0 hour 0 min 0 sec zero flag set ON The valid range of Hour is 0 23 The valid range of Minute is 0 59 The valid range of Second is 0
28. g FELIS 0A Air UA Sb HIS A 8 2 List of special FLASH data register SFD 1 I filter Number Function Description FD8000 X port input filter time value Unit ms FD8002 FD8003 FD8004 FD8005 FD8006 FD8007 FD8008 FD8009 2 Imapping Number Function Description FD8010 X00 corresponds with I X0 corresponds with the number of input image I FD8011 X01 corresponds with I FD8012 X02 corresponds with I FD8073 X77 corresponds with I 3 O mapped Number Function Description FD8074 Y00 corresponds with I YO corresponds with the number of input image O FD8075 YO01 corresponds with I FD8076 Y02 corresponds with I FD8137 Y77 corresponds with I 4 I property Number Function Description FD8138 X00 property 0 positive logic others negative logic FD8139 X01 property FD8140 X02 property FD8201 X77 property 5 Device s power failure retentive area Number Function Description FD8202 Start tag of D power failure store area FD8203 Start tag of M power failure store area FD8204 Start tag of T power failure store area FD8205 Start tag of C power failure store area FD8206 Start tag of S power failure store area 286 6 Communication Number Function BLEU UR AN dr HH SL Sb BEC Description FD8210 Communicate mo
29. s n m i FMOV KO DO K10 IIIA 3 quumg Move KO to D0 DO Copy a single data device to a range of destination devices The data stored in the source device S is copied to every device within the destination range The range is specified by a device head address D and a quantity of consecutive elements n If the specified number of destination devices n exceeds the available space at the destination location then only the available destination devices will be written to KO KO 4 D s KO 4 D1 KO D2 KO 4 D3 gt n KO D5 ko D6 ko D7 ko D8 ko D9 89 ADI He Suitable Models XCl XC3 XC5 FWRT 16 bits instruction FWRT 32 bits instruction DFWRT Km jox pv ow Jos t CD D Jr i 6 ________ m Device KJ Bi Device IIIA 3 quumg 1 Written of a word Function s E X0 1 FWRT DO FDO Function write value in DO into FDO 2 Written of double word ome R IR 1 DFWRT FDO Function write value in DO D1 into FDO FD1 3 Written of multi word DO K3 t FWRT FDO Function write value in DO D2 D3 into FDO FD1 FD2 Note 1 FWRT instruction only allow to write data into FlashROM register In this sto
30. 3 3 5 KCN xm DX Dy bw DS TD o D FD ea xX Y Ed x I M SIN D5 0 D6 0 D51 D50 D61 D60 SIN Binary Floating Binary Floating This instruction performs the mathematical SIN operation on the floating point value in S angle RAD The result is stored in D s RAD value angle X 1 180 Assign the binary floating value SIN value Binary Floating 201 PAD He COS Suitable Models 16 bits instruction 32 bits instruction COS XC3 XC5 wed KEG K Cs 23 xm DX Dy bw DS m o D FD Device zum Device Function amp Action H COS D50 D6 0 D51 D50 RAD gt D61 D60 COS Binary Floating Binary Floating This instruction performs the mathematical COS operation on the floating point value in S angle RAD The result is stored in D RAD value angle X 7 180 pi D0 s Assign the binary floating value x my COS value Binary Floating 202 PADI He TAN Suitable Models XC3 XC5 16 bits instruction 32 bits instruction TAN K 3 3 5 Kyo xm DX Dy bw DS TD o D FD ea xX Y Ed Function amp Action TAN D50 D 0 D51 D50 RAD gt D61 D60 TAN Binary Floating Binary Floating This instruction performs the mathematical TAN operation on the floating point value in S The result is stored in
31. 4 34H 8 38H EEE C IB AT 0 4 3 21 r LC TB tl tol 4 I3 21 tc DA 0 4 3 ea erei rar ror 68 G9 re en rr ro d tci 6 A HEX Suitable Models 16 bits instruction HEX 32 bits instruction XC3 XC5 116 MORE xu oY OU os 1 oo DIA k e O Word s Device Device Function amp Action 16 bits switch mode s n X0 L HEX D200 D100 K4 Convert the high and low 8 bits in source to HEX data Move 4 bits every time to destination The convert alphanumeric number is assigned by n The convert of the upward program is the following o Jal SS ew ow ow D200 down 30H 0 1 D201 down 42H B Not change to be 0 D201up 43H C D202down 31H 1 D202up 32H 2 D203 down 33H 13 ome D203up 3H 4 D204 down 35H 5 9 0H aech 2945H n k4 poo orrrojojojo o rjo oj1j1 0jO O 0 11 H A 30H 0 por orrrojojojojr rjo rjojyrjojO 1 O 43H gt C 11 H B po ororojoyryjo yrjojrt oyryryr rjO J0 9 a B 117 PAD He DECO Suitable Models 16 bits instruction DECO 32 bits instruction XC3 XC5 KL EO 9 Word s px Ea Ds To To 1 Bit Device K 3l Function amp Action When is software unit n lt 16 a G Cp m DECO
32. A m a A comi e N aa al ehk MEMO ELE di AN dr ERU 5 V ERO R uL 27 3 Each Soft Unit s Usage and Function This chapter we ll give some description of the PLC s data and the function of interior input output relay auxiliary relay status counter data register etc This item 1s the base to use PLC 3 1 Every Soft Unit of PLC 3 2 Soft Unit s ID List 3 3 Disposal of Data 3 4 Some Encode Principle of Soft Units 3 5 Timer s ID and Function T 3 6 Counter s ID and Function C 3 7 Note Items 29 TR TOPE ITE A Be 3 1 Every Soft Unit of Programmable Controller In the programmable controller there are many relays timers and counters they all have countless a contacts Normally open contacts and b contacts Normally closed contacts Connect these contacts and coils to constitute sequencial control circuit The following we ll briefly introduce each soft unit Input X and output Y relay In each basic unit assign the ID of input relay output relay in the format of X000 X007 X010 X017 Y000 Y007 Y010 Y017 this octal format The ID of extension is connected behind basic unit The ID of expansion obeys the principle of channel 1 starts from X100 Y 100 channel 2 starts from X200 Y 200 7 expansions could be connected totally Use digital filter in the special input filter of input relay so you can use the program to ch
33. D8018 Year ZL J Di Month 1 12 D8017 Month amp 4 D2 Date 1 31 D8016 Date 8 E E D3 Hour 0 23 D8015 How gg 4 D4 Minute 0 59 D8014 Minute A E amp D5 Second 0 59 D8013 Second 3 D6 Week O Sun 6 Sat D8019 Week B After executing TWR instruction the time in real time clock will immediately change to be the new set time So when setting the time it is a good idea to set the source data to a time a number of minutes ahead and then drive the instruction when the real time reaches this value 210 RADI He 6 Special Function Instructions XC3 XC5 In this chapter we introduce the functions of high speed count input high speed pulse output and MODBUS communication instructions of XC series PLC 6 1 High speed Count 6 2 Pulse Uutput 6 3 Modbus Instructions 6 4 Free Format Communication 6 5 PWM Pulse Modulate 6 6 Frequency Testing 6 7 Precise Time 6 8 Interrupt Function 6 9 CANBUS Communication XC5 Series 211 212 ADI HE RADI He 6 1 High speed Count High speed Count Function XC series PLC all have high speed count function By choosing different counter you can realize count function of increment mode pulse direction input mode AB phase mode count the frequency can reach 200KHz count input S ensor Rotary Encoder JE
34. Note Items operation error 85 ADI He 5 5 Data Move Mnemonic Function MOV Move BMOV Block Move FMOV Fill Move FWRT Written of FlashROM MSET Zone Set ZRST Zone Reset SWAP Float To Scientific XCH Exchange 86 RADI He Suitable Models XCl XC3 XC5 MOV 16 bits instruction MOV 32 bits instruction DMOV K Hj DX oy ow Jos TD CD D Jr 8 ares m Device d qens bi Device Function amp Action s D e s e MOV KI DI Move data from one storage area to a new one Move contents from source to destination If X000 is OFF data will not change Constant K10 will automatically convert to be BIN code Read out the current value of timer counter It s the same with the counter zi MOV TO Dii TO current value D20 Indirect assign the set value of timer counter X2 MOV KI D K10 D10 MO D20 K10 m D Di Move of 32 bits data k DMOV DO DI 0 DI DO gt D11 D10 DMOV C235 D C235 current value D21 D20 87 RADI He BMOV Suitable Models 16 bits instruction BMOV 32bits instruction XCl XC3 XCS Km jox oy ow fDS TD CD D Jr 8 Word e Device g ny c S oe Device IIAJ AQEMMS A qua
35. T200 T223 10ms not accumulation T300 T307 10ms accumulation T400 T403 lms not accumulation T500 T503 lms accumulation 80 Counter C0 C23 16 bits forth counter C300 C315 32 bits forth back counter C600 C634 high speed counter 635 Data Register D0 D149 150 For special usage D8000 D8029 For special usage D8060 D8079 For special usage D8120 D8179 For special usage D8240 D8249 For special usage D8306 D83 13 For special usage D8460 D8479 512 FD FlashROM Register FDO0 FD411 412 For special usage FD8000 FD8009 For special usage FD8210 FD8229 For special usage FD8306 FD8009 For special usage FD8000 FD83 13 For special usage FD83500 FD8409 98 290 ELBA DE JUS Sar US 5 SP AX 8 4 XC5 series PLC 8 4 1 Performance BUR 1 Brief introduction of XC5 series XC5 series PLC covers all functions of XC1 series XC3 series also the interior source space is larger than XC1 and XC3 series XC5 series PLC also have CANbus function which can realize complex communication network function For the detailed CANbus function please refer to 6 8 CAN Bus XC5 series 2 Performance Index EM Item 620 points Timer T 100mS timer Set time 0 1 3276 7 seconds Spec 10mS timer Set time 0 01 327 67 seconds 1mS timer Set time 0 001 32 767 seco
36. When 0 jis word device n lt 4 m om a DO DECO DI K3 b15 D b0 CECECECECA 4 OQ All t to b urns e zero C rd YF 6 5 4 95 T 9 T9 T 9 9 6 9 9 T9 T1 T T9 b15 Di b0 Source ID s low n bits nx 4 are encoded to the destination ID When n S 3 destination s high bits all converts to be 0 When n 0 no disposal beyond n 0 4 don t execute the instruction 190 PATI HE Suitable Models XC3 XC5 ENCO 16 bits instruction ENCO 32 bits instruction W m Kur od Ceo or TW os 3 TG T 5 T7 kea evice Kn y ko y X TY M Ss TY C dom E s _ Function Function amp Action Action When C5 isbitdevice n lt 16 Ee m d X0 ENCO MI 0 DI 0 K3 MI Mi M5 M M3 M2 Ml MI 0 0 0 0 1 0 0 7 6 5 4 2 0 bi Di Mum olololololoj oj ojo o o o o o 1 1 b0 Allbe 0 When 5 is word device n lt 4 te y m Xl ENCO DO D1 K3 bl 5 DO b0 ol ol lof ol lojlololo ijlol i Y 76 5 4 ae Be ignored ice n bls D 4 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 I b0 All be 0 If many bits in the source ID are 1 ignore the low bits If source ID are all 0 don t
37. 16 channels Module s set value D D8270 D8279 Expansion 4 Input switch quantity X X400 X437 32 points Output switch quantity Y Y400 Y437 32 points Input analog ID 1D400 ID431 16 channels Output analog QD QD400 QD431 16 channels Module s set value D D8280 D8289 Expansion 5 Input switch quantity X X500 X537 32 points Output switch quantity Y Y500 Y537 32 points Input analog ID ID500 1D531 16 channels Output analog QD QD500 QD531 16 channels Module s set value D D8290 D8299 Expansion 6 Input switch quantity X X600 X637 32 points Output switch quantity Y Y600 Y637 32 points Input analog ID ID600 1D631 16 channels Output analog QD QD600 QD631 16 channels Module s set value D D8300 D8309 Expansion TH Input switch quantity X X700 X737 32 points Output switch quantity Y Y700 Y 737 32 points Input analog ID ID700 1D731 16 channels Output analog QD QD700 QD731 16 channels Module s set value D D8310 D8319 BD Expansion Input switch quantity X X1000 X1037 32 points Output switch quantity Y Y1000 Y 1037 32 points Input analog ID ID1000 ID1031 16 channels Output analog QD QD1000 QD1031 16 channels Module s set value D D8320 D8329 285
38. Between FOR NEXT LDP LDF instructions are effective for one time Every time when MO turns from OFF to ON and M1 turns from OFF to ON A loop is executed 6 times Every time if MO turns from OFF to ON and M3 is ON B loop is executed 5 X 7 235 times If there are many loop times the scan cycle will be prolonged Monitor timer error may occur please note this If NEXT is before FOR or no NEXT or NEXT is behind FENG END or FOR and NEXT number is not equal an error will occur Between FOR NEXT CJ nesting is not allowed also in one STL FOR NEXT must be programmed as a pair FEND AND END Suitable Models 16 bits instruction FEND END 32 bits instruction XCI XC3 E FERD fe un E ee S z 6 i 4 An FEND instruction indicates the first end of a main program and the start of the Function program area to be used for subroutines Under normal operating circumstances the FEND instruction performs a similar action to the END instruction i e output processing input processing and watchdog timer refresh are all carried out on execution p E 7 E pu c Fao Ii er X10 a ON D a o om mi M m E p FEND Pei 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 SRET P20 ee
39. MCR 4 10 ALT 4 11 PLS PLF 4 12 SET RST 4 13 OUT1 RST Compare with counter s soft unit 4 14 NOP END 4 15 Note Items When Programming 45 46 JEJE RA LH 4 1 List of Basic Instructions XC1l XC3 XCS series basic SFC instructions JEJE RA LH Mnemonic Function Format and Device LD Initial logical operation contact X Y M S T C Dn m FDn m LoaD type NO normally open LDI Initial logical operation contact X Y M S T C Dn m FDn m LoaD Inverse type NC normally closed LDP Initial logical operation Rising X Y M S T C Dn m FDn m LoaD Pulse edge pulse LDF Initial logical operation Falling X Y M S T C Dn m FDn m LoaD Falling Pulse trailing edge pulse AND Serial connection of NO X Y M S T C Dn m FDn m AND normally open contacts ANI Serial connection of NC X Y M S T C Dn m FDn m AND Inverse normally closed contacts ANDP Serial connection of rising edge X Y M S T C Dn m FDn m AND Pulse pulse ANDF Serial connection of X Y M S T C Dn m FDn m AND Falling pulse falling trailing edge pulse OR Parallel connection of NO X Y M S T C Dn m FDn m OR normally open contacts ORI Parallel connection of NC X Y M S T C Dn m FDn m OR Inverse normally closed contacts ORP Parallel connection of rising edge X Y M S T C Dn m FDn m OR Pulse
40. OR gt OR activates if SI S2 MOV Move BMOV Block move FMOV Fill move Data f Move FWRT FlashROM written MSET Zone set ZRST Zone reset SWAP The high and low byte of the destinated devices 141 142 RADI HE are exchanged XCH Exchange ADD Addition SUB Subtraction MUL Multiplication DIV Division INC Increment Data DEC Decrement Operation MEAN Mean WAND Word And WOR Word OR WXOR Word exclusive OR CML Compliment NEG Negative Common statements of XC3 XC5 RADI RE SHL Arithmetic Shift Left SHR Arithmetic Shift Right LSL Logic shift left LSR Logic shift right ROL Rotation shift left Data Shift xm ROR Rotation shift right SFTL Bit shift left SFTR Bit shift right WSFL Word shift left WSFR Word shift right WTD Single word integer converts to double word integer FLT 32 bits integer converts to float point FLTD 64 bits integer converts to float point INT Float point converts to binary BIN BCD converts to binary ia BCD Binary converts to BCD Convert ASC Hex converts to ASCII HEX ASCII converts to Hex DECO Coding ENCO High bit coding ENCOL Low bit coding ECMP Float compare EZCP Float Zone compare EADD Float Add ESUB Float Subtract Float Point EMUL Float la Obsraton EDIV Float division ESQR Float Square Root SIN Sine COS Cosi
41. PLS PLF Mnemonic and Function Description Program 60 Mnemonic Function Format and Devices PLS Rising edge pulse PuLSe Devices Y M S T C Dn m PLF Falling trailing edge pulse PuLse Falling Devices Y M S T C Dnm e When a PLS instruction is executed object devices Y and M operate for one operation cycle after the drive input signal has turned ON When a PLF instruction is executed object devices Y and M operate for one operation cycle after the drive input signal has turned OFF e X0 PLS MO MO SET YO ee PLF MI MI RST YO LD X0 PLS MO LD MO SET YO LD X1 PLF M LD MI RST Y0 JEJE RA LH 4 12 SET RST Mnemonic Mnemonic Function Format and Devices and SET Set a bit device permanently Function SET ON Devices Y M S T C Dnm RST Reset a bit device ReSeT permanently OFF Devices Y M S T C Dnm Turning ON X010 causes Y000 to turn ON Y000 remains ON even Description after X010 turns OFF Turning ON X011 causes Y000 to turn OFF Y000 remains OFF even after X011 turns OFF It s the same with M S SET and RST instructions can be used for the same device as many times as necessary However the last instruction activated determines the current status After assign the start definitio
42. XX 4 X6 Xi X2 Xi eT 12345 6 7 1011 12 13 Thinget 14 15 16 17 20 21 10139913 fury 992ZE0L900 NS 01709002 31vQ 3 Wc E0X 3dAL EX PIR XC3 32R E RNO ERRO 110 102 94 Y 5 6 71011 12 13 1415 sono cwm co Ys YS Ye vio oom vis Yi T yo Yr v2 X4 ons YT vH viz via Nam Tasa as amas ram 2 B gt B 58 amp G8 GP p G2 ae L 2 2 D ad ad AD AD AB AB GB GB GB CL pue ow XC AYI PLC HMI XC3 series 60 points main units Including 48 points main units XC5 series 60 points main units Including 48 points main units 207 4
43. all output reset are forbidden STL status act When M8047 acts act when any unit of S0 S999 turns to be ON ID Function Description M8050 m 1000 Forbid input interruption 0 M8051 f f 1010 Forbid input interruption 1 After executing EI even interruption allowed but M8052 M when M acts at this time the correspond input 1020 Forbid input interruption 2 interruption couldn t act separately M8053 i i i ae Forbid input interruption 3 M when M8050 is ON interrupt 1000 is M8054 forbidden 1040 Forbid input interruption 4 M8055 NE 1050 Forbid input interruption 5 M8056 MP 140 Forbid time interruption 0 After executing EI even interruption allowed but 2 B Forbid time interruption 1 when M acts at this time the correspond input M8058 interruption couldn t act separately 142 Forbid time interruption 2 M8059 Interrupt forbidden Forbid all interruption 277 ELD FEL IA HA n US s FRE 2X Function Description Operation error Power on and STOP gt RUN check Scan overtime No user program Interior codes checking error User program error Function Execute code or collocate table check error Description Execute error code s ID Error of divide Lock occur error code s ID Scan time of ove
44. changes from OFF to ON then execute interrupt subroutine 2 return to the initial program after that The pointer 1 used as interruption tag should be behind FEND command Via DI instruction you could set interruption disabled area In EI DI area interrupt input is allowed When don t need interrupt disabled please program only with EI instruction needn t program with DI instruction FE JE FELIS ELAS Hey AN HS E P E Disable Interruption T 2 To each input interruption special relay a of disable interruption is given EI M8050 M8052 B MO iei MeO E In the left program if use MO to make g M8050 ON then disable the interrupt 22 input of route 0 FEND 10000 I lg IRET v S 5 3 END 5 5 Cc 249 E ERIRE p AN Sg P EO 2E 6 7 2 Time Interrupt In the condition of the main program s executing cycle too long if certain special Function and Action 250 program should be executed or in sequential control scan a special program should be executed every certain time time interruption function is suitable It could be not affected by PLC s scan cycle execute the time interrupt program every Nms FEND 14010 M8000 IRET C Yo The defaulted time interruption status is open Time interrupt subroutine i
45. ee li pus Nx5ms x Nx5ms Inthe process of speedup speed down each step s time is 5ms this time is fixed The max step is 15K the increase decrease frequency of each step If the value exceeds 15K count as 15K the minimum step frequency is 10Hz if lower than 10Hz calculate as 10Hz Whencarrying on pulse output please note each segment s pulse number shouldn t lower than 10 if the set value is less than 10 sent as 10 2 Frequency jump in segment pulse output MO d frequency jump segment 1 segment 2 segment M8170 In the process of segment pulse output if the current pulse number has sent out but still haven t reached the current segment s max frequency then in the process from the current segment to the next pulse output there will be pulse frequency jump See the following chart Toavoid frequency jump please note the speedup speed down time set value not to small 3 Pulse Output can t realize dual output Inone main program you can t write two or up to two pulse output instruction with the same output port Y The following program is wrong MO PLSR DO D100 YO PLSR D200 D1000 YO 227 READY RE Application E g 1 Fixed Stop With subsection pulse output statement PLSR and pulse segment switch statement PLSNEXT realize fixed length function MO Take the preced
46. execute the instructions Whendrive input is OFF the instruction is not executed encode output don t change When n 8 if encode instruction s S is bit unit it s point number is 2 8 256 191 PAD He ENCOL Suitable Models 16 bits instruction ENCOL 32 bits instruction XC3 XC5 W m ee O R i d a TW 93 33 TG T P T3 ka evice Kn y ko sl X TY M S TY C dom E s _ Function Function amp Action Action If s isbitdevice n lt 16 Ee m d X0 ENCOL MI 0 DI 0 K3 MI Mi M5 M M3 M2 Ml MI 0 0 1 0 1 0 0 0 7 6 5 4 2 0 bi Di Mum olololololoj o ojo o o o o o 1 1 b0 Allbe 0 CS EERIE n lt 16 ts y mg X1 E ENCOL DO DI K3 bl 5 DO bO ol ol ol ol lolo lo lolo E 71 6 5 4Q_2 1 bls D 4 9 0 0 0lolololololololololololo 1 lt bO All be 0 If many bits in the source ID are 1 ignore the high bits If source ID are all 0 don t execute the instructions Whendrive input is OFF the instruction is not executed encode output don t change When n 8 if encode instruction s S is bit unit it s point number is 2 8 256 192 HUI 5 9 Floating Operation Mnemonic
47. max frequency is 100KHz the total pulse number is 24000 3 rounds Low frequency pulse Max frequency 10KHz total pulse number is 8000 1 round Ladder program m8002 SET MO o l DMOY K100000 D200 DMOY K24000 D210 I MOV K100 D220 i i Dwov Ki0000 D200 i DMOY KS000 D210 Mi TO K20 i RST Mi i SET MO MB1T0 l i RST MO i i SET Mi i ALT M10 Mo Statement Program LD M8002 Initially forth pulse coil SET MO Set MO ON LDF M10 M10 falling edge trigger condition DMOV K100000 D200 Transfer decimal data 100000 into double word register D200 DMOV K24000 D210 Transfer decimal data 24000 into double word register D210 MOV K100 D220 Transfer decimal data 100 into word register D220 LDP M10 M10 rising edge trigger condition DMOV K10000 D200 Transfer decimal data 10000 into double word register D200 DMOV K8000 D210 Transfer decimal data 8000 into double word register D210 LD MI M1 status trigger condition 262 FE JE FELIS AUR gp AN HS E P ERU OUT TO K20 100ms counter TO time 2 seconds LD TO TO status trigger condition SET MI set M1 SET MO set M1 LDF M8170 M8170 falling edge trigger condition RST MO reset MO RST MI reset M1 ALT M10 M10 status reverse LD MO MO status trigger condition DPLSR D200 D210 D220 YO Take value is D200 as frequency value in D210 as pulse number value in D220 as speedup speed down time send pulse via YO Program description When PLC
48. no special function statements XC1 series PLC has the following applied instructions Sort Mnemonic Function CJ Condition jump CALL Call subroutine SRET Subroutine return STL Flow start STLE Flow end Program SET Open the assigned flow close the current flow Flow ST Open the assigned flow not close the current flow FOR Start ofa FOR NEXT loop NEXT End of a FOR NEXT loop FEND First end MOV Move BMOV Block move FMOV Fill move Data FWRT FlashROM written Move MSET Zone set ZRST Zone reset SWAP The high and low byte of the destinated devices are exchanged XCH Exchange ADD Addition SUB Subtraction MUL Multiplication DIV Division INC Increment Data DEC Decrement Operation MEAN Mean WAND Word And WOR Word OR WXOR Word exclusive OR CML Compliment NEG Negative 289 Soft unit s bound BUR 8 3 3 Softunit s bound FELIS Ait Nn LE UA Sy Pe SC Mnemonic Name Bound Points 14 points 24 32 points 14 points 24 32 points Input relay X000 X013 X000 X007 X000 X017 8 points 12 16 points Output relay Y000 Y013 Y000 Y007 Y000 Y017 8 points 12 16 points Interior relay M0 M319 320 M8000 M8370 for special using 256 Flow 850 831 32 Timer TO T23 100ms not accumulation T100 T115 100ms accumulation
49. s Far away coil s start number Operands K M s3 Coil s number This master s receiving coil s start ID Operand M 1 Coil write CCOLW X0 1 4 CCOLW K20 M20 MOS O K2 K4 Coil write statement Function Write the local assigned multi coil s status into the assigned bureau s assigned coil GGG 254 Far away communication bureau ID Far away coil s start number Coil s number The master s sending coil s start ID Operand M FE JE FELIS AUR gp AN ERU E P ER 2 Register read CREGR E GO G9 G9 G K2 11 4 CREGR K220 K4 D20 Read register statement Function Read the assigned bureau s assigned register to the local assigned register sr Far away communication bureau ID Far away register s start number Operands K D ss Register number Local receiving register s start ID Operand D 3 Register write CREGW E p p m s X0 1 4 CREGW K2 K220 K4 20 Write register statement Function Write the local assigned input register into the assigned bureau s assigned register Far away communication bureau ID Far away register s start number Register number Cs Local receiving register s start ID Operand D 255 HUS FL UES ar EH SUS E Fe ERO 2 Interior protocol communication format Function description gt Op
50. waiting FD8236 Free format setting 8 16 bits cushion with without start bit with without end bit 287 ELE DE JUR Aare BS 5 SP BUR 8 3 Brief Introduction of XC1 Series PLC 8 3 1 Performance 1 Brief Introduction of XC1 PLC XC1 series PLC are suitable for small control system which needs little I O The main units can not connect with the expansions Special BD boards can be inserted into XC1 PLC main units This can realize analog sampling and temperature sampling realize PID control There is no clock function in XC1 PLC the common register D has no power off retentive area If you want to hold data after power off you can save data in FD register in FlashROM area XCI PLC can realize logic control data operation and other common functions but no high speed counter pulse output free communication and other special functions 2 Performance Index Specification Item Points 80 points Timer T 100mS timer Set time 0 1 3276 7 seconds Spec 10mS timer Set time 0 01 327 67 seconds urs 1m timer Set time 0 001 32 767 seconds Points 48 points Counter 16 bits counter set value KO 32767 32 bits counter set value K0 2147483647 Power on self diagnose Monitor timer grammar check 288 ELE DE JU Sar US 55 SP HDi 8 3 2 Statements XC1 series PLC includes all SFC statements of XC3 series PLC part of applied statements
51. 2 slave machine s D10 D14 after finish communication set M8138 at the same time write slave machine s D15 D19 into master machine s D15 D19 set communication finish flag Realize write and read to a slave station Atthis time flow S3 will judge with the slave station If the station number is less than 5 station number add 1 offset add 10 or else station number starts from number 2 station again 264 FE JE FELIS AUR gp AN HS E P EU 2 7 3 Example of free format communication This example is the free format program with DH107 DH108 series instruments I Interface specification DH107 DH108 series instruments use asynchronism serial communication ports the interface level fits the standard of RS232C or RS485 the data format is 1 start bit 8 bits data no check bit one or two stop bits Baud rate of communication transfer data could modified to be 1200 19200bit s II Format of communication instructions DH107 108 instruments use Hex data format to indicate each instruction code and data Read write instruction Read The address code 52H 82 parameter s to read code 0 0 CRC check code Write The address code 43H 67 parameter s to write code the write data s low byte the write data s high byte CRC check code Read instruction s CRC check code is parameter s To read code 256 82 ADDR ADDR is instrument s ID value the bound is 0 100 please do not add 80H CRC is the redunda
52. 214 748 364 7 Hex 00000000 FFFFFFFF Double word object instruction D NUM 1 D NUM Instruction D NUM Object data Object data The denote way of 32 bits instruction If an instruction can not only be 16 bits but also be 32 bits then the denote method for 32 bits instruction is to add a D before 16 bits instruction Eg ADD DO D2 D4 denotes two 16 bits data adds DADD DIO DI2 D14 denotes two 32 bits data adds 145 Instructions list of 16 bits and correspond 32 bits 146 RADI RE 16 bits 32 bits WTD FLT DFLT INT DINT BIN DBIN Data convert ASC HEX DECO ENCO ENCOL ECMP EZCP EADD ESUB Float EMUL operation EDIV ESQR SIN COS TAN TCMP TZCP Clock TADD operation TSUB TRD TWR 16 bits 32 bits CJ CALL SRET STL Program STLE Flow SET ST FOR NEXT FEND MOV DMOV BMOV FMOV Data Move FWRT DFWRT ZRST SWAP XCH DXCH ADD DADD SUB DSUB MUL DMUL DIV DDIV INC DINC Data DEC DDEC operation MEAN DMEAN WAND DWAND WOR DWOR WXOR DWXOR CML DCML NEG DNEG SHL DSHL SHR DSHR LSL DLSL LSR DLSR ROL DROL Data Shift ROR DROR SFTL DSFTL SFTR DSFTR WSFL DWSFL WSFR DWSFR RADI He 5 3 Program Flow Instructions
53. 4 bits every time to destination The convert alphanumeric number is assigned by n The convert of the upward program is the following o Jal SS ew ow ow D200 down 30H 0 1 D201 down 42H B Not change to be 0 D201up 43H C D202down 31H 1 D202up 32H 2 D203 down 33H 13 ome D203up 3H 4 D204 down 35H 5 9 0H ech 2945H n k4 poo orrrojojojo o rjo oj1j1 0jO O 0 11 H A 30H 0 por orrrojojojojr rjo rjojyrjojO 1 O 43H gt C 11 H B po ororojoyryjo yrjojrt oyryryr rjO J0 9 a B 189 PAD He DECO Suitable Models 16 bits instruction DECO 32 bits instruction XC3 XC5 KL EO 9 Word s px Ea Ds To To 1 Bit Device K 3l Function amp Action When is software unit n lt 16 a G Cp m DECO DXO M 0 K3 X002 X001 X000 0 1 4 Q Nw 7 6 5 4 G 2 1 0 0 0 0 0 0 0 0 MIT MI6 MI MI4 MI3 Mi MII MI The source address is 1 2 3 so starts from M10 the number 3 bit M13 is 1 If the source are all 0 M10 is 1 When n 0 no operation beyond n 0 16 don t execute the instruction When n 16 if coding command D is soft unit it s point is 28 256 When drive input is OFF instructions are not executed the activate coding output keep on activate
54. AC250V DC30V Circuit insulation Mechanism insulation Action denote LED indicate lamp Resistant 3A Max load load Induce load 80VA Lamp load 100W Open circuit s leak current Mini load DCSV 2mA Response OFF ON 10ms time ON OFF 10ms Transistor Output Interior power Below DC5 30V Circuit insulation Optical coupling insulation Action denote Indicate lamp LED Max Restance 0 8A load load Induce load 12W DC24V Lamp load 1 5W DC24V Open circuits leak current Mini load DCS5V 2mA Response OFF ON Below 0 2ms time ON OFF Below 0 2ms 22 HAUS LER UES d AN d ERU Sb RC 2X 2 6 Disposal of Relay Output Circuit Output terminals Relay output type includes 2 4 public terminals So each public end unit can drive different power voltage system s E g AC200V AC100V DC24V etc load Circuit s insulation Between the relay output coils and contacts PLC s interior circuits and exterior circuits load circuits are electric insulation Besides each public end blocks are separate Action display LED lamp lights when output relay s coils galvanize output contacts are ON Response time From the output relay galvanize or cut to the output contacts be ON or OFF the response time is about 10ms Output current The current voltage below AC250V can drive the load of pure resistace 2A 1 point in
55. CAN CAN YO Yi Y2 Y3 Y4 COMS Y7 Y10 Yi2 COM7 Y15 Y17 Y20 Y22 e e 24V B COMO COMI COM2 CoM3 COMI Y5 6 COM6 Yit Y13 Yi4 Yi6 COM8 Y 1 Y23 e e XC1 32 main units XC3 32 main units XC5 32 main units 18 Input 14 Output XC Ail PLC IUDAS N e COM X1 X3 X5 X7 X11 X13 X15 X17 X21 L FG COM XO X2 X4 X6 X10 X12 X14 X16 X20 3 OV A COMO COM1 COM2 Y3 Y5 Y6 Y10 L60MA Y13 Y15 24V e B Y Yi Y2 Y4 COM3 Y7 Yii Y12 Y14 XCI 24 main units XC3 24 main units 14 Input 10 Output I N COM X1 X3 X5 X7 X11 X13 X15 L FG COM XO X2 X4 X6 X10 X12 X14 e e OV A COMO COMI COM2 Y3 Y5 Y6 Y10 e 24V e B Y Yi Y2 Y4 COM3 Y7 Yii XC3 14 main units 8 Input 6 Output N d X1 X3 X5 X7 L F X0 4 X6 X2 X 24V A YO LCOMi Y3 Y5 OV 0 Y Y2 Y4 XC1 16 main units 8 Input 8 Output N COM X1 X3 X5 X7 FG XO X2 X4 X6 du ed Y2 cow Y5 Y7 ov como Yi Y3 Y4 Y6 XC E8X8YR 24V COM X1 X3 X5 X7 OV COM X0 X2 X4 X6 COMO COMI COM2 Y3 Y4 Y6 XC E16X 24V COM X1 X3 X5 X1 OV COM XO X2 X4 X6
56. D 2 Bitunits compose word Input X output Y middle coil M could compose 16 bits word E g DX0 means X0 X17compose to be a 16 bits data DX20 means X20 X37 combines a 16 bits data Format Adda D before bit device Bit devices combine to be word devices DX DY DM DS DT DC MO i MOV Kl DYO MI i MOV K3 DO M8000 MOV D X 2 D0 DI 0 In the preceding example when MO turns from OFF to be ON the value of the word DYO composed by YO Y17 equals 21 ie YO Y2 Y4 turns to be ON status Before M1 be activate when DO 0 DX2 D0 means a word composed by X2 X21 When Ml1turns from OFF to be ON D0 3 then DX2 D0 means a word composed by X5 X24 DXn the bound of n is the exact bound of X choose 16 points from the head to the end add 0 if not enough Pleasenote the word composed by bit device couldn t carry on bit searching address 35 TR TOPE ITE A Be 3 Bit of word device Format Dn m Register could carry on bit searching address e g Dn m means number m bit of Dn data register OSm lt 15 D0 4 Y gt Yl gt DS D1 4 In the preceding example D0 4 means when the No 4 bit of DO is 1 YO set ON D5 D1 4 means bit searching address with offset if D1 5 it says D5 D1 means the number 4 bit of D10 Thebit of word device with offset is denoted as Dn Dm x Please note to the bit of word device they c
57. D11 D10 D2LD20 D51 D50 Binary Floating Binary Floating Binary Floating The floating point value of S2 is subtracted from the floating point value of S1 and the result stored in destination device D Ifaconstant K or H used as source data the value is converted to floating point before the addition operation XI I ESUB K1234 D100 D110 K1234 D101 D100 D111 D110 Binary converts to Floating Binary Floating Binary Floating The same device may be used as a source and as the destination If this is the case then on continuous operation of the EADD instruction the result of the previous operation will be used as a new source value and a new result calculated This will happen every program scan unless the pulse modifier or an interlock program is used 125 PATI HE EMUL Suitable Models 16 bits instruction 32 bits instruction EMUL XC3 XC5 xu px oY px 23 79 JO DIA K 3 209 Ge K 3 Device CJK Device Function amp Action X0 EMUL DI 0 D20 D50 D11 DIO X D21 D20 D51 D50 Binary Floating Binary Floating Binary Floating The floating value of SI is multiplied with the floating value point value of S2 The result of the multiplication is stored at D as a floating value Ifaconstant K or H used as source data the value is converted to floating point before the addition operation XI
58. D12 D11 D10 gt D17 D16 D15 D14 BIN integer Binary float point RRD RE Suitable Models XC3 XC5 Convert BIN integer to binary float point As the constant K H will auto convert by the float operation instruction so this FLT instruction can t be used The instruction is contrary to INT instruction INT 16 bits instruction 32 bits instruction INT 12 Suitable Models XC3 XC5 RADI RE aon Word xm DX DY DM PDs TD o D FD Device 7 3 Device Function amp Action 16 f Ro omc INT DI D20 D11 D10 D20 Binary Floating BIN integer Give up the data after the decimal dot 32 fiz v 1 DINT DI D20 D11 D10 D20 D21 Binary Floating BIN integer Give up the data after the decimal dot The binary source number is converted into an BIN integer and stored at the destination device Abandon the value behind the decimal point This instruction is contrary to FLT instruction When the result is 0 the flag bit is ON When converting less than 1 and abandon it zero flag is ON 16 bits operation 32 768 32 767 32 bits operation 2 147 483 648 2 147 483 647 BIN Suitable Models XC3 XC5 16 bits instruction BIN 32 bits instruction 113 RADI RE PK OX oY ow os 1 oo DIF s ____ Device a Device Function amp Action X0 o BIN DI DO EE
59. DXO M 0 K3 X002 X001 X000 0 1 4 Q Nw 7 6 5 4 G 2 1 0 0 0 0 0 0 0 0 MIT MI6 MI MI4 MI3 Mi MII MI The source address is 1 2 3 so starts from M10 the number 3 bit M13 is 1 If the source are all 0 M10 is 1 When n 0 no operation beyond n 0 16 don t execute the instruction When n 16 if coding command D is soft unit it s point is 28 256 When drive input is OFF instructions are not executed the activate coding output keep on activate When 0 jis word device n lt 4 m om a DO DECO DI K3 b15 D b0 CECECECECA 4 OQ All t to b urns e zero C rd YF 6 5 4 95 T 9 T9 T 9 9 6 9 9 T9 T1 T T9 b15 Di b0 Source ID s low n bits nx 4 are encoded to the destination ID When n S 3 destination s high bits all converts to be 0 When n 0 no disposal beyond n 0 4 don t execute the instruction 118 PATI HE Suitable Models XC3 XC5 ENCO 16 bits instruction ENCO 32 bits instruction W m Kur od Ceo or TW os 3 TG T 5 T7 kea evice Kn y ko y X TY M Ss TY C dom E s _ Function Function amp Action Action When C5 isbitdevice n lt 16 Ee m d X0
60. ENCO MI 0 DI 0 K3 MI Mi M5 M M3 M2 Ml MI 0 0 0 0 1 0 0 7 6 5 4 2 0 bi Di Mum olololololoj oj ojo o o o o o 1 1 b0 Allbe 0 When 5 is word device n lt 4 te y m Xl ENCO DO D1 K3 bl 5 DO b0 ol ol lof ol lojlololo ijlol i Y 76 5 4 ae Be ignored ice n bls D 4 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 I b0 All be 0 If many bits in the source ID are 1 ignore the low bits If source ID are all 0 don t execute the instructions Whendrive input is OFF the instruction is not executed encode output don t change When n 8 if encode instruction s S is bit unit it s point number is 2 8 256 119 PAD He ENCOL Suitable Models 16 bits instruction ENCOL 32 bits instruction XC3 XC5 W m ee O R i d a TW 93 33 TG T P T3 ka evice Kn y ko sl X TY M S TY C dom E s _ Function Function amp Action Action If s isbitdevice n lt 16 Ee m d X0 ENCOL MI 0 DI 0 K3 MI Mi M5 M M3 M2 Ml MI 0 0 1 0 1 0 0 0 7 6 5 4 2 0 bi Di Mum olololololoj o ojo o o o o o 1 1 b0 Allbe 0 CS EERIE n lt 16 ts y mg
61. Function ECMP Float Compare EZCP Float Zone Compare EADD Float Add ESUB Float Subtract EMUL Float Multiplication EDIV Float Division ESQR Float Square Root SIN Sine COS Cosine TAN Tangent 193 RADI HE ECMP Suitable Models 16 bits instruction 32 bits instruction ECMP XC3 XC5 wed amp 39G92 2 Csr Gk pei CELE DT IS so To gt Tr evice Bu Device k Function amp Action D11 D10 D21 D20 MO0 MI M2 Binary Floating Binary Floating SI S2 D Gb ECMP DI 0 D20 MO MO D11 D10 gt D21 lt D20 Binary Floating Binary Floating M1 D11 D10 D21 lt D20 Binary Floating Binary Floating D11 D10 lt D21 lt D20 Binary Floating Binary Floating The status of the destination device will be kept even if the ECMP instruction is deactivated The binary float data of S1 is compared to S2 The result is indicated by 3 bit devices specified with the head address entered as D Ifa constant K or H used as source data the value is converted to floating point before the addition operation X0 t ECMP K500 D100 MI K500 D101 D100 M10 M11 M12 Binary converts Binary floating to floating 194 PADI He EZCP Suitable Models 16 bits instruction 32 bits instruction ECMP XC3 XC5 C909 C K 39 xg yx oY ow os 15 69 DIA Function
62. Hour 1rL 10 20 30 lt Ninute Be ON co The status of the destination devices is kept even if the TCMP instruction is deactivated e SI 2 S9 represent hours minutes and seconds respectively This time is compared to the time value in the 3 data devices specified by the head address S The result is indicated in the 3 bit devices specified by the head address S12 Assign the compare standard Hour S2 Assign the compare standard Minute S32 Assign the compare standard Second Cee Assign the Hour of clock data CS 1 Assign the Minute of clock data CS 2 2 Assign the Second of clock data 0 D 1 D42 According to the compare result the 3 devices output ON OFF The valid range of Hour is 0 23 The valid range of Minute is 0 59 The valid range of Second is 0 59 133 ADI HE TZCP Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 Word CD xeu x px px os t 6 T P 6 Device Bit Device K Function amp Action Compare the two assigned time with time data 2 S D La 62 oe TCZP D20 D30 DO MO Ge MO D20 Hour Hour Minute gt Hinute Second Second n DO Hour our Dl mimt S linute D2 Second Second M2 DO Hour D3Q Hour Minute gt D31 Tinute T Second
63. Inevery scan cycle loop shift left right action will be executed PARTI HE ROL amp ROR Suitable Models 16 bits instruction ROL ROR 32 bits instruction DROL DROR XC3 XC n Word K A K 3 peid LXE ED De ps 3 TO T P 77 Device Function amp Action The bit format of the destination device is rotated n bit places to the left on every operation of the instruction Rotation shift left xo H ROL DO K4 Left Rotation High Left Sih lelolelololololo Every time when X000 turns from OFF 4 to ON executes n bits left rotation n Bits PM8022 I I j p fter once H execution High Left Eri e o o o o o o o t iy eae i t 1 M8022 Rotation shift right D n X0 ii Ror DO K4 Right HIgh Rotation Low ih Did Bh d fe Do e o o o o o X n Bits Every time when X000 turns from M80224 OFF to ON executes n bits right i 7 Afer ae 5 1 rotation execution H High Low i UE ajo rip r r o o o o i foie eel M8022 0 179 HERI fe SFTL amp SFTR Suitable Models 16 bits instruction SFTL SFTR 32 bits instruction DSFTL DSFTR X XCS nl n2 Word K Device REDE DY TC os TO T P T3 8
64. KO 4 D s KO 4 D1 KO D2 KO 4 D3 KO D5 KO D6 KO D7 K0 4 D8 ko D9 161 ADI He Suitable Models XCl XC3 XC5 FWRT 16 bits instruction FWRT 32 bits instruction DFWRT Km jox pv ow Jos t CD D Jr i 6 ________ m Device KJ Bi Device IIIA 3 quumg 1 Written of a word Function s E X0 1 FWRT DO FDO Function write value in DO into FDO 2 Written of double word ome R IR 1 DFWRT FDO Function write value in DO D1 into FDO FD1 3 Written of multi word DO K3 t FWRT FDO Function write value in DO D2 D3 into FDO FD1 FD2 Note 1 FWRT instruction only allow to write data into FlashROM register In this storage area even battery drop data could be stored So it could be used to store important technical parameters 2 Written of FWRT needs a long time about 150ms so frequently operate this operation is not recommended 3 The written time of FlashROM is about 1 000 000 times So we suggest using edge signals LDP LDF etc to trigger X Frequently written of FlashROM will ruin FlashROM forever 162 ADI RE MSET Suitable Models 16 bits instruction MSET 32 bits instruction XCl XC3 XCS PR
65. M8022 X Arithmetic shift right D n Xl i sm vo xa After once execution the High Right Shift ue high bit is same with the bit hEei peo HERRERO m before shifting the final bit is stored in carry flag n Bits M IENEN After Once High Execution Low 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 M8022 0 w Note In the left example when X1 is ON left right shift is executed at every scan cycle 177 ATI RE LSL amp LSR Suitable Models 16 bits instruction 32 bits instruction DLSL DLSR XC3 XC5 Word gt K gt l gg x Y D3 os 3 TG T P T77 evice EJEA Device Function amp Action Logic shift left D n DBE DO ET After once execution the High Shift Left Low low bit is filled in 0 the Ful dum iTi JoJo o o oT ofo o final bit is stored in carry t flag H a eee J ET After once High execution Low GBRBIIeToIo e o o To o e o o e t f 1 8022 X Logic shift right D n X1 e i Hi ISR Do KA pence ererutor me high bit is same with the bit High ERAT Left before shifting the final bit 1 TERTER E Dele eTe oe 8 A x is stored in carry flag n Bits i M8022 i Lesa cecc eee 4 After once High Execution Left eJe o o hh RR B TDi e De o 4 p Re aee ee TO nso22 o Je NOTE
66. Mean WAND Logic Word And WOR Logic Word Or WXOR Logic Exclusive Or CML Compliment NEG Negation READ RE Addition Operation ADD Suitable Models XCl XC3 XC5 16 bits instruction ADD 32 bits instruction DADD Worl k s Cs x Zero M8020 t map a 0s 1 a D1 B Borrow M8021 Device c N Ca M8022 pit Device Function 9 Gr 2 e ADD DI 0 DI DI 4 D10 D12 gt DIA un E e D e Y e The data contained within the two source devices are combined and the total is stored in the specified destination device Each data s highest bit is the sign bit 0 stands for positive 1 stands for negative All calculations are algebraic processed 5 8 3 Ifthe result ofa calculation is 0 the 0 flag acts If the result exceeds 323 767 16 bits limit or 2 147 483 647 32 bits limit the carry flag acts refer to the next page If the result exceeds 323 768 16 bits limit or 2 147 483 648 32 bits limit the borrow flag acts Refer to the next page When carry on 32 bits operation word device s low 16 bits are assigned the device following closely the preceding device s ID will be the high bits To avoid ID repetition we recommend you assign device s ID to be even ID The same device may be used as a source and a destination If this is the case then the result changes after every scan cycle Plea
67. Subroutine return SRET Suitable Models 16 bits instruction CALL SRET 32 bits instruction XCI XC3 XC5 Pointer P Soft Unit s Bound PO0 P9999 ood a qeymg X0 CALL PI 0 EE Function ure1go4d uey FEND o s amp Ed e SRET END If X000 ON carry on Jump instruction and jump to step of flag P10 Here after executing the subroutine return to the original step via executing SRET instruction After the following FEND instruction program with the flag In the subroutine 9 levels Call instruction is allowed so to the all 10 levels nesting is available 149 ADI He Flow SET ST STL STLE Suitable Models 16 bits instruction SET ST STL STLE 32 bits instruction XCI XC3 XC5 Pointer S Soft Unit s Bound S0 S ood 3 qeymg SET SO Function STL and STLE should be used in pairs STL means start of a flow STLE means end of a flow After executing of SET Sxxx instruction the flow assigned by these instructions is ON After executing RST Sxxx instruction the assigned flow is OFF In flow SO SET S1 close the current flow SO open flow S1 In flow SO ST S2 open the flow S2 but don t close flow SO When flow turns from ON to be OFF OF
68. also available to monitor the PLC s action via the status displayed in the circuit E g The programs compiled with the preceding two methods are both stored in Alternation pr o program memory in the format of instruction table So the denotion and edition of this two program format can convert to the other XC Ail PLC HMI 1 2 XC series PLC s Model and Type XC Series 1 2 3 A 5 LEU UU 1 Series Name XCI series XC3 series XC5 series 2 I O points 3 Input Format NPN R Relay output T Transistor output RT Mix output of Transistor Relay YO Y1 are transistor Output Format PNP PR Relay output PT Transistor output PRT Mix output of Transistor Relay YO Y1 are transistor 4 Supply Power E ACPower 220V C DC Power 24V 5 Clock S With clock and RS485 COM port inside Vacant Without clock and RS485 COM port inside XC1 series models Transistor Transistor DC24V R T Relay Output Relay Output Output Output N XC3 16R E 16R E XC3 16T E XC3 16R C XC3 16T C XC Ail PLC IUDAS XC3 series models R T DC24V Relay Output Transistor Mix output Relay Output Transistor Mix output Output R amp T Output R amp T XC3 14R E XC3 14TE XC3 14RT E XC3 4R C XC3 4T C XC3 I4RT C XC3 24R E XC3 24T E XC324RTE XC3 MR C XC324T C XC3 24RT C XC3 32R E XC3 32T E XC3 32RT E XC3 2R C XC3 32LC XC3 32RT C N P N XC3 48R
69. angle X 7 180 pi D0 s Assign the binary floating value x my COS value Binary Floating 130 PADI He TAN Suitable Models XC3 XC5 16 bits instruction 32 bits instruction TAN K 3 3 5 Kyo xm DX Dy bw DS TD o D FD ea xX Y Ed Function amp Action TAN D50 D 0 D51 D50 RAD gt D61 D60 TAN Binary Floating Binary Floating This instruction performs the mathematical TAN operation on the floating point value in S The result is stored in D s RAD value angle X 1 180 Assign the binary floating value TAN value Binary Floating 131 HUI 5 10 Clock Operation Mnemonic Function TCMP Time Compare TZCP Time Zone Compare TADD Time Add TSUB Time Subtract TRD Read RTC data TWR Set RTC data Note The models without clock can not use these instructions 132 RADI He Time Compare TCMP Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 KH DX py Jon os rp CD D Jr k sr G2 Gs Device s y Bit Device K 3 l Function amp Action Compare the assigned time with time data TCMP K10 K20 K30 DO MO 2 Q GO GO G2 EE 10 Hour 20 minute 30 second Gr MO Q m 10 20 30 gt Be ON econd M1 Q Hour Rp 10 20 30 Hinute Be ON Second M2
70. bits instruction DSHL DSHR 3 XCS n E23 9 ___4 Word pex SHE Lt Toc Tos T5 oo T 5 T8 Device Arithmetic shift left Function amp D mH SHL DO K4 x After once execution the Action High Left Shift L P ae low bit is filled in 0 the final bit is stored in carry pe X 4 n Bits flag M8022 i After once High execution low E BRI To o o o o o o o o o oo RRR aes EEE 4 i a 1 M8022 X Arithmetic shift right D n Xl i sm vo xa After once execution the High Right Shift ue high bit is same with the bit hEei peo HERRERO m before shifting the final bit is stored in carry flag n Bits M IENEN After Once High Execution Low 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 M8022 0 w Note In the left example when X1 is ON left right shift is executed at every scan cycle 105 ATI RE LSL amp LSR Suitable Models 16 bits instruction 32 bits instruction DLSL DLSR XC3 XC5 Word gt K gt l gg x Y D3 os 3 TG T P T77 evice EJEA Device Function amp Action Logic shift left D n DBE DO ET After once execution the High Shift Left Low low bit is filled in 0 the Ful dum iTi JoJo o o oT ofo o final b
71. both 0 it means segment finish You can set at most 24 segments Operands D FD S2 Speedup speed down time Here the time means the speed time from start to the first segment s speedup time meantime all segments frequency and time slope are defined So the following speedup speed down speed follows them Operands K TD CD D FD Assign the Y number of output pulse can only output at Y000 or Y001 e Support double words output DPLSR here DO D1 set the highest frequency of segment 1 D2 D3 set the pulse number of segment 1 D4 D5 set the highest frequency of segment 2 D6 D7 set the pulse number of segment 2 segment 1 DO D1 ment 4 D5 segment 2 e D2 D3 2 p EE Se Ce MM Pf M8170 223 RADA RE 3 Dual Pulse Output with speedup speed down e Frequency 0 400K Hz e Speedup speed down time Below 5000ms e Output Terminals YO or Y1 e Direction output terminal Any Y e Output Mode Limited number of pulse e Pulse Number 16 bits instruction 0 K32767 32 bits instruction 0 K2147483647 Instruction PLSR PLSR Generate certain pulse with the assigned frequency and speedup speed down time G GO GO GO DO PLSR D100 YO Y3 RST MO Generate certain pulse with the assigned frequency speedup speed down time pulse direction ST An area which takes Dn or FDn with the start address In the preceding example DO
72. changes from STOP to RUN M8002 coil gets through a scan cycle set high frequency pulse parameters into D200 D210 set speedup speed down time into D220 set MO the motor start to speedup with high frequency and work 3 rounds set coil M8170 at the same time the motor runs 3 rounds the speed down till stop coil M8170 reset Here reset MO set M1 reverse M10 status set low frequency parameters into D200 D210 the counter starts to delay with 2 seconds when reach this 2 seconds M1 is reset MO is set again the motor starts to run 1 round with low frequency After finish this 1 round the motor starts to run with high frequency again In this format the motor runs with high frequency and low frequency 263 FLUR FELT DIU A a CH UR 5s FRE X 7 2 Example of MODBUS Instructions E g The following is the communication program of one master station and 4 slave stations Each parameters The master station number is 1 slave stations numbers are 2 3 4 5 This example we use COM 2 Ladder program ms002 MOV K2 DO MOV KO Di so S J so m8138 T200 K2 1 c T200 m0002 S1 REGR DO Ki5 K5 D15 D1 K2 33 C S STLE STL 33 M3138 na KS ADD Kio Di Di KS gt I MOY K2 DO MOV KO Di so s Program description When PLC changes from STOP to RUN M8002 coil gets through a scan cycle SO flow open write master machine s D10 D14 into No
73. finished flag is 1 C632 Count finished sign 24 segments count finished flag is 1 C634 Count finished sign 24 segments count finished flag is 1 C636 Count finished sign 24 segments count finished flag is 1 C638 Count finished sign 24 segments count finished flag is 1 281 ELV FEL IU HA n OS AAR High frequency pulse ID Function Description PULSE 1 Sending pulse flag Be 1 at pulse sending 32 bits overflow flag pulse sending Be 1 when overflow Direction flag l is positive direction the correspond direction port is ON PULSE 2 Sending pulse flag Be 1 at pulse sending 32 bits overflow flag pulse sending Be 1 when overflow Direction flag l is positive direction the correspond direction port is ON PULSE 3 Sending pulse flag Be 1 at pulse sending 32 bits overflow flag pulse sending Be 1 when overflow Direction flag l is positive direction the correspond direction port is ON PULSE 4 Sending pulse flag Be 1 at pulse sending 32 bits overflow flag pulse sending Be 1 when overflow Positive negative count Counter s ID Direction flag Function l is positive direction the correspond direction port is ON Description C300 C498 Control of positive negative count 0 is plus count 1 is minus c
74. floating point value of S2 The result of the division is stored in D as a floating point value No remainder is calculated Ifaconstant K or H used as source data the value is converted to floating point before the addition operation X1 L EDIV DI 00 K100 D110 D101 D100 K100 D111 D110 Binary Floating Binary converts to Floating Binary Floating IfS2 is zero then a divide by zero error occurs and the operation fails 199 PARTI HE ESQR Suitable Models 16 bits instruction 32 bits instruction ESQR XC3 XCS wed EAS ux xm DX Dy py DS jTD o D FD Device x X Y Device Function amp Action X s D11 D10 D21 D20 ES QR DI D20 Binary Floating Binary Floating k A square root is performed on the floating point value in S the result is stored in D Ifa constant K or H used as source data the value is converted to floating point before the addition operation XI t ESQR K1024 D110 K1024 gt D111 D110 Binary converts to Floating Binary Floating When the result is zero zero flag activates Only when the source data is positive will the operation be effective If S is negative then an error occurs and error flag M8067 is set ON the instruction can t be executed PAD He SIN Suitable Models XC3 XC5 16 bits instruction 32 bits instruction SIN 2 K
75. its current value decremented decreased by a value of 1 When 32 768 or 2 147 483 648 is reached the next decrement will write 32 767 a 2 147 483 647 to the destination device 171 MEAN 16 bits instruction MEAN 32 bits instruction Km jox oy ow bs TD CD D fro 8 eee eee eT Device n Device Function amp Action G s I MEAN DO DI 0 K3 D0 DD 2 3 gt DII RADI RE Suitable Models XCl XC3 XC5 The value of all the devices within the source range is summed and then divided by the number of devices summed i e n This generates an integer mean value which is stored in the destination device D The remainder of the calculated mean is ignored Ifthe value of n is specified outside the stated range 1 to 64 an error is generated 172 READ He WAND WOR amp WXOR Suitable Models 16 bits instruction WAND WOR 32 bits instruction DWAND DWOR X XC3 XC5 xg yx Tov ou Tos Tr Tor TP Fa kc sr G2 Device Device Function amp Action Execute logic AND operation with each bit M 0 amp 0 0 0 amp 1 0 WAND DI 0 DI 2 Di4 1 amp 0 0 1 amp 1 1 Execute logic OR operation with each bit Sr S2 D X0 2 Co 0 or 0 0 Oor 1 1 WOR DI 0 DI D 4
76. message to the network at the same time the low level priority node initiatively stop data sending while high level priority node can continue transferring data without any influence So there is function of node to node node to multi node bureau broadcasting sending receiving data Each frame s valid byte number is 8 so the transfer time is short the probability ratio is low External Connection CAN Bus Communication Port CAN CAN The connection among each node of CAN bus is shown in the following at the two ends add 120 ohm middle terminal resistors Ex T za 253 FE JE FELIS ELAS Hey AN HS E P E Network Format of CAN Bus There are two forms of CAN bus network one is statements communication format the other is interior protocol communication format These two forms can carry on at the same time Statements communication format This format means in the local PLC program via CAN bus instructions carry on bit or word reading writing with the assigned far away PLC Interior protocol communication format This format means via setting of special register with collocate table format realize allude with each other among PLC s certain device s space In this way realize PLC source sharing in CAN bus network CAN bus Statements Coilread statement Function Read the assigned bureau s assigned coil status into the local assigned coil s Far away communication bureau ID
77. operation TSUB TRD TWR 16 bits 32 bits CJ CALL SRET STL Program STLE Flow SET ST FOR NEXT FEND MOV DMOV BMOV FMOV Data Move FWRT DFWRT ZRST SWAP XCH DXCH ADD DADD SUB DSUB MUL DMUL DIV DDIV INC DINC Data DEC DDEC operation MEAN DMEAN WAND DWAND WOR DWOR WXOR DWXOR CML DCML NEG DNEG SHL DSHL SHR DSHR LSL DLSL LSR DLSR ROL DROL Data Shift ROR DROR SFTL DSFTL SFTR DSFTR WSFL DWSFL WSFR DWSFR 5 3 Program Flow Instructions RADI He Instruction s name gt Mnemonic CJ Condition Jump CALL Call subroutine SRET Subroutine return STL Flow start STLE Flow end SET Open the assigned flow close the current flow flow jump ST Open the assigned flow not close the current flow Open the new flow FOR Start of a FOR NEXT loop NEXT End of a FOR NEXT loop FEND First End 75 RADI He Condition Jump CJ Suitable Models 16 bits instruction CJ 32 bits instruction XCl XC3 XC5 Pointer P Soft Unit s Bound PO0 P9999 93149 q 9 qeymg As the instructions of executing list with CJ instructions the operate cycle and Function dual coil can be greatly shorten and Action In the following chart if X000 ON then jump from step 1 to the end step of flag P6 When X000 OFF do not execute jump instructions
78. pulse ORF Parallel connection of X Y M S T C Dn m FDn m OR Falling pulse falling trailing edge pulse ANB Serial connection of multiply None ANd Block parallel circuits ORB Parallel connection of multiply None OR Block parallel circuits OUT Final logic operation type coil Y M S T C Dnm OUT drive SET Set a bit device permanently ON Y M S T C Dnm SET RST Reset a bit device permanently Y M S T C Dnm ReSeT OFF PLS Rising edge pulse X Y M S T C Dnm PuLSe PLF Falling trailing edge pulse X Y M S T C Dnm PuLse Falling MCS Connect the public serial contacts None 47 AE AK MM PETES vH New bus line start MCR Clear the public serial contacts None Bus line return ALT The status of the assigned device X Y M S T C Dnm Alternate state is inverted on every operation of the instruction NOP No operation or null step None No Operation END Force the current program scan to None END end 4 2 LD LDI OUT 48 JEJE d LH Mnemonic Mnemonic Function Format and Devices LD Initial logic operation LoaD contact type NO Normally Open Devices X Y M S T C Dn m FDn m LDI Initial logic operation LoaD Inverse contact type NC Normally Closed Devices X Y M S T C Dnm FDn m OUT Final logic operation type OUT drive coil Devices X Y M S T C Dn m FDn m Statement Connect the LD and LDI instruc
79. s CAN bureau ID CAN protocol using the defaulted value is 1 The set value s unit is ms sending one time every Configured sending several ms FD8354 frequency Set to be 0 means sending every cycle the defaulted value is 5ms FD8360 Read bit s item FD8361 Read word s item FD8362 Write bit s item FD8363 Write word s item FD8370 Far away node ID FD8371 Far away node s object ID Item 1 configure FD8372 The local object s ID FD8373 number FD9390 Far away node ID FD9391 Far away node s object ID Item 256 configure FD9392 Local object s ID FD9393 Number CAN baud rate setting table FD8351 setting value Baudrate BPS 257 E FLIER I UA o AN Ly SU 5 P EO 0 IK 1 2K 2 5K 3 10K 4 20K 5 40K 6 50K 7 80K 8 100K 9 150K 10 200K 11 250K 12 300K 13 400K 14 500K 15 600K 16 800K 17 1000K CAN node status M8350 Configure item 1 M8351 Configure item 2 M8352 Configure item 3 M8353 Configure item 4 M8354 Configure item 5 M8355 Configure item 6 Reset after receiving confirmation M8356 Configure item 7 M8357 Configure item 8 M8358 Configure item 9 M8605 Configure item 256 CAN status flag M8240 CAN self check error flag E p NO EE RREO 258 Wiles FUE FEL SUS d NAT A If error set 1 if correct set 0 M8241 CAN conf
80. s current value will not change Ifreset input X000 is ON execute RST instruction counter s current value is 0 output contacts activates For the counter s set value it could not only set by constant K but also be assigned by data register s ID E g assign D10 if the content of D10 is 123 it s the same with setting K123 When write the set value to the current value register via MOV instruction etc When input next time output coil gets current value register turns to the set value M8238 D e C300 YI 5 o N z a e e E 5 n B 5 E lt A e e n 3 n e e B e g TR TOPE ITE A f For 32 bits binary increment counter its valid bound is K1 K2 147 483 647 Decimal constant With special auxiliary relay M8238 assign the direction of bits positive negative counter s C300 C498 direction If X2 drives M8238 then it is negative count If no drive then it is positive count According to constant K or to the content of data register D set the value to be positive Treat contents in consecutive data register as a pair and dispose it as 32 bits data So when assign DO dispose DO and D1 as a 32 bits set data If use count input X004 to drive coil C300 execute increase count When reset input X3 is ON execute RST instruction counter s current value turns to be 0 output contact resets When use cou
81. set the max frequency of segment 1 D1 set pulse number of segment 1 D2 set the max frequency of segment 2 D3 set pulse number of segment 2 if Dn Dn 1 are both 0 it means segment finish You can set 24 segments at most Operands D FD S22 Speedup speed down time here the time means the speedup time from the start to the highest frequency At the same time all segments frequency and time slope is defined so the following speedup speed down format all do according to them Operands K TD CD D FD Assign Y number of output pulse can only output at Y000 or Y001 Assign Y number of output pulse direction can be assigned at your will E g In 1 if the pulse number is a positive value in segment 1 Y output ON if be negative Y is OFF Please note in once segment pulse output pulse s direction is only determined by the pulse number set value positive or negative of the first segment MO 1 Segment 1 x Segment 2 Segment 3 1 DO D1 i D2 D3 D4 D5 M8170 224 RADI HE 4 Pulse Segment Switch PLSNEXT MO PLSY DO D100 YO 1 PLSNEXT YO In the condition of pulse output reaches the highest frequency of current segment and stably output if M1 turns from OFF to ON then enter next pulse output with the speedup speed down time In pulse output speedup speed down process execute this instruction is invalid segment 1
82. set value is 10 times of the actual frequency i e 10f E g to set the frequency as 748z then set value in S1 as 720000 When X000 is ON output PWM wave when X000 is OFF stop outputting PMW output doesn t have pulse accumulation TO In the upward graph T0 1 f T T0 n 256 243 E FEL AS UA at Ly a 5 P EO ZR 6 5 Frequency Testing Suitable Model XC3 XC5 32 bits instruction kM GD K 2 39 Device 16 bits instruction FRQM KH px DY jow DS TD CD J D Fd Ke Bit KG Device a91A9p o qeimg Function and Action E GO G GO G9 L FROM K20 D100 K1 X003 S1 Pulse cycle number The sampled pulse cycle number in one scan cycle Operands D CD TD D Testing result Operands D CD TD S2 Frequency division choice Bound K1 or K2 When the frequency division is K1 the bound is no less than 9Hz precision bound 9 18KHz When the frequency division is K2 the bound no less than 300Hz precision bound 300 400K Hz 3 pulse input X number In frequency testing if choose frequency division as K2 the frequency testing precision is higher than frequency division K1 When X000 is ON FROM will test 20 pulse cycles from X003 every scan cycle Calculate the frequency s value and save into D100 Test repeatedly If the tested frequency s value is smaller than the test bound the
83. sets ON When the output pulse reach the set value stop pulse output coil M8170 sets OFF reset MO Limited pulse output K Set pulse number After finish outputting the set pulse number output will auto stop Ome DO YO MO PLSF Generate sequential pulse with changeable frequency form Support 32 bits instruction DPLSF e CS Assign the frequency Operands K TD CD D FD Bound 200 400KHz If the set frequency is lower than 200Hz output 200Hz e D Assign Y port which generates pulse can only output at Y000 or Y001 With the changing of the set frequency in DO the output pulse frequency from YO changes Accumulate pulse number in register D8170 Sequential pulse output Continuously output pulse with the set frequency till pass the statement then stop outputting 221 RADI He 2 One direction pulse output with speedup speed down Frequency 0 400KHz Speedup speed down time Below 5000ms Output terminals YO or Y1 Output Mode Limited pulse Pulse number 16 bits instruction 0 K32767 32 bits instruction 0 K2147483647 e Instruction PLSR time PLSR generate certain pulse with the assigned frequency and speedup speed down gt Pulse output of single segment and single direction SI S2 S3 D Go GO PLSR K3000 D300 K300 YO M8170 l RST MO
84. status of TO ST DO Reset the current value and status of CO 2 T FMOV KO DO K100 Write K0 into DO D99 91 RADI RE Suitable Models XCl XC3 XC5 SWAP 16bits instruction SWAP 32 bits instruction Wd 2 Kap oY ow 53 15 T9 T 5 755 Device d 9TqezINng Pi Device S e Function xp s pes T on DI ee Low 8 bits and high 8 bits change when it is 16 bits instruction Ifthe instruction is a consecutive executing instruction each operation cycle should change 92 RADI He XCH Suitable Models XCl XC3 XC5 16 bits instruction XCH 32 bits instruction DXCH Word kK O Bas DERIRCISCTECTSSTT TUO T 77 evice d qens ee Device 16 bits instruction Function E XCH Di Di I Before D10 100 After D10 101 DII 101 D11 100 e s e The contents ofthe two destination devices D1 and D2 are swapped e Whan driva innat Vio ONT aach anan avela chenld narmr an data avchanaa 32 bits instruction DXCH DI D20 32 bits instruction DXCH swaps value composed by D10 D11 and the value namnnacad hx NIN 11 93 94 RADI RE 5 6 Data Operation Instructions Mnemonic Function ADD Addition SUB Subtraction MUL Multiplication DIV Division INC Increment DEC Decrement MEAN
85. your requirement of communication and network They not only support simple network Modbus protocol free communication protocol but also support those complicate network XC3 PLC XC5 PLC offer communication access with which you can communicate with the devices such as printer instruments etc that have their own communication protocol XC3 PLC XC5 PLC all support Modbus protocol free protocol these communication function XC5 PLC also have CANbus function There are 2 COM ports Portl Port2 on XC3 series PLC main units while there are 3 COM ports on XC5 series PLC main units Besides the same COM ports Portl Port2 they have also CAN COM port COM 1 Port1 is the program port it can be used to download the program and connect with the other devices The parameters baud rate data bit etc of this COM port are fixed can t be re set COM Port COM 2 Port2 is communication port it can be used to download program and connect with the other devices The parameters baud rate data bit etc of this COM port can be re set via software Via BD board XC series PLC can expend another COM port This COM port could be RS232 and RS485 A INIP SI J e Sp Ne IPIS INI Se Je G3 89 e G9 Gp 4p GD Ge ap G9 G9 G9 p ap aa G9 Kb p DA IN e DUCIT Xr LX I I I qr 1E E 4 e s xl Ex a D Db D he xia 1x Tog Dx Dr Ln
86. 0 On every execution of the instruction the device specified as the destination has its current value incremented increased by a value of 1 In 16 bits operation when 32 767 is reached the next increment will write 32 767 to the destination device In this case there s no additional flag to identify this change in the counted value 2 Decrement DEC m l DEC DO DO 1 D0 On every execution of the instruction the device specified as the destination has its current value decremented decreased by a value of 1 When 32 768 or 2 147 483 648 is reached the next decrement will write 32 767 a 2 147 483 647 to the destination device 99 MEAN 16 bits instruction MEAN 32 bits instruction Km jox oy ow bs TD CD D fro 8 eee eee eT Device n Device Function amp Action G s I MEAN DO DI 0 K3 D0 DD 2 3 gt DII RADI RE Suitable Models XCl XC3 XC5 The value of all the devices within the source range is summed and then divided by the number of devices summed i e n This generates an integer mean value which is stored in the destination device D The remainder of the calculated mean is ignored Ifthe value of n is specified outside the stated range 1 to 64 an error is generated 100 READ He WAND WOR am
87. 10ms clock S B T200 pulse with the current value timer If S this current value equals the set value 3 2s K200 timer s output contact activates A X0 That is output contact activates after 2 E m Tia Set seconds of coil driving Dave input valug X000 cut or power cut timer reset 0 output contact reset 1 If the drive input X001 of timer s coil X cC n gt K2000 T300 is ON T300 accumulates 10ms T300 a LC Ye clock pulse with the current value X2 E T aT zd counter When the value reaches the set a value K2000 counter s output contact e S d T activates In the count process even the S X1 1 input X001 cut or drop power when start Th t R E M 4 value again go on counting its accumulation ee value i t F r Yo time is 20 seconds When reset input x2 X002 is ON timer reset output contact reset 37 38 Assign method of the set value The Time Value Action Constant assignment K EC ous Indirect assignment D X0 TR TOPE ITE HMD Be T10 is a timer with the unit of 100ms Assign 100 as a constant then 0 1s X 100 10s timer work Write content in indirect data register to program or input via data switch MOV K200 D5 TI o D5 When assigned as power cut retentive register please note that voltage low will cause the set value instable The c
88. 16 bits instruction WSFL WSFR 32 bits instruction DWSFL DWSFR 3 XC5 pln s S DERDPXDS ow os 7 Td TF Device N Word E Device Function amp Action The instruction copies n2 source devices to a word stack of length n1 For each addition of n2 words the existing data within the word stack is shifted n2 words to the left right Any word data moving to a position exceeding the n1 limit is diverted to an overflow area The word shifting operation will occur every time the instruction is processed unless it is modified with either the pulse suffix or a controller interlock D25 D22 overflow D21 D18 D25 D22 D17 D14 D21 D18 D13 D10 D17 D14 D 3 D 0 D13 D10 Word shift left S p nl n2 xo Pe war DO D10 K16 K4 amp 6G amp Go n2 words D3 p2 Di Do left shift Je LIN S S S D25 D24 p23 p22 b21 bp20 D19 b18 b17 D16 D15 b14 D13 p12 b11 D10 Bus Ro RL IS ou Word shift right D13 D10 overflow D17 D14 D13 D10 D21 D18 D17 D14 D25 D22 D21 D18 D 3 D 0 D25 D22 H s 2 nl n2 wan po v1 sas x Inevery scan cycle loop shift left right action will be executed D3 D2 D1 D0 n2 words right shift D25 p24 D23 p22 D21 D20 D19 D13 D17 p16 p15 D14 D13 D12 D1 10 Q00O0O 109 KI
89. 2 LD lt gt LD activates if S1 S2 LD lt LD activates if S1 lt S2 LD gt LD activates if S1 S2 AND AND activates if SI S2 AND gt AND activates if SI gt S2 Data AND AND activates if SI S2 Compare AND lt gt AND activates if SI S2 AND lt AND activates if SI lt S2 AND AND activates if SI S2 OR OR activates if SI S2 OR gt OR activates if SI gt S2 OR OR activates if SI lt S2 OR lt gt OR activates if SI z amp S2 OR lt OR activates if SI lt S2 OR gt OR activates if SI S2 MOV Move ium BMOV po move Mave FMOV Fill pane FWRT FlashROM written MSET Zone set 68 RADI RE ZRST Zone reset The high and low byte of the destinated devices SWAP are exchanged XCH Exchange ADD Addition SUB Subtraction MUL Multiplication DIV Division INC Increment Data DEC Decrement Operation MEAN Mean WAND Word And WOR Word OR WXOR Word exclusive OR CML Compliment NEG Negative 69 Common statements of XC3 XC5 RADI RE SHL Arithmetic Shift Left SHR Arithmetic Shift Right LSL Logic shift left LSR Logic shift right ROL Rotation shift left Data Shift TN ROR Rotation shift right SFTL Bit shift left SFTR Bit shift right WSFL Word shift left WSFR Word shift r
90. 3 qeymg SET SO Function STL and STLE should be used in pairs STL means start of a flow STLE means end of a flow After executing of SET Sxxx instruction the flow assigned by these instructions is ON After executing RST Sxxx instruction the assigned flow is OFF In flow SO SET S1 close the current flow SO open flow S1 In flow SO ST S2 open the flow S2 but don t close flow SO When flow turns from ON to be OFF OFF or reset OUT PLS PLF not accumulate timer etc which belongs to the flow ST instruction is usually used when a program needs to run more flows at the same time n a main program usually use ST instruction to open a flow 78 RADI He FOR AND NEXT Suitable Models 16 bits instruction FOR NEXT 32 bits instruction XCI XC3 XC5 Word KA Ok Device SDE I Dos Tm To ToT evice Ba Device IIAJ AQEMMS First execute the instructions between FOR NEXT instructions for several times Function the loop time is assigned by the source data then execute the steps after NEXT MO It FOR K5 MI mall FOR K6 INC DO A NEXT M3 C HI FOR K7 INC D1 B NEXT NEXT FOR NEXT instructions must be programmed as a pair Nesting is allowed and the nesting level is 8
91. 32 bits operation GO DO D2 D4 DMUL BIN BIN BIN DI DO X D3 D2 gt D7 D6 D5 D4 32 bits 32 bits 64 bits In 32 bits operation when use bit device as the destination address only low 32 bits result can be obtained The high 32 bits result can not be obtained so please operate again after transfer one time to the word device Even use word device 64 bits results can t be monitored at once In this situation float point data operation is recommended 169 FRI BE uitable Models XCl XC3 XC5 16 bits instruction DIV 32 bits instruction DDIV xm yx Tov ou Tos Try Tor TD Fo 2 7 k gt TET Device Device Function amp Action 16 bits operation 7 DO D2 D4 I DIV Dividend Divisor Result Remainder BIN BIN BIN BIN DO D2 D4 D5 16 bits 16 bits 16 bits 16 bits S1 appoints the device s content be the dividend S appoints the device s content be the divisor D appoints the device and the next one to store the result and the remainder Inthe above example if input X0 is ON devision operation is executed every scan cycle 32 bits operation E DO D2 D4 DDIV Dividend Divisor Result Remainder BIN BIN BIN BIN D1 D0 D3 D2 D5 D4 D7 D6 32 bits 32 bits 32 bits 32 bits The divi
92. 40 D8141 Data number received by D8143 RS232 D8 146 7 hardware error 10 no start sign A 8 CRC check error 11 no end sign D8147 Communication error code 9 bureau ID error 12 communication time out D8148 D8149 Counter ID Function Description ELD FEL I SHB Ahi C600 Count finished sign 24 segments count finished flag is 1 C602 Count finished sign 24 segments count finished flag is 1 C604 Count finished sign 24 segments count finished flag is 1 C606 Count finished sign 24 segments count finished flag is 1 C608 Count finished sign 24 segments count finished flag is 1 C610 Count finished sign 24 segments count finished flag is 1 C612 Count finished sign 24 segments count finished flag is 1 C614 Count finished sign 24 segments count finished flag is 1 C616 Count finished sign 24 segments count finished flag is 1 C618 Count finished sign 24 segments count finished flag is 1 C620 Count finished sign 24 segments count finished flag is 1 C622 Count finished sign 24 segments count finished flag is 1 C624 Count finished sign 24 segments count finished flag is 1 C626 Count finished sign 24 segments count finished flag is 1 C628 Count finished sign 24 segments count finished flag is 1 C630 Count finished sign 24 segments count
93. 5 ll M 3 G M8000 X7 ft MI X5 MI X6 l M8000 X7 d MI LDP X5 ORP X6 OUT M13 LD M8000 ANDP X7 OUT MI5 LDF X5 ORF X6 OUT M13 LD M8000 ANDF X7 OUT MI5 53 54 AE ASIE TR LH In the preceding chart when X005 X007 turns from ON to OFF or from OFF to ON M13 or M15 has only one scan cycle activates x0 M20 J I scan cycle k In two conditions when X0 turns from OFF to ON M20 gets a scan cycle NOTE X10 1 MOV X10 Ly MOV When X10 turns from OFF to ON only execute once MOV instruction When X10 turns from OFF to ON each scan cycle execute once MOV instruction JEJE RA LH Mnemonic Mnemonic Function Format and Devices and ORB Parallel connection of Function OR Block multiply parallel circuits Devices none To declare the starting point of the circuit usually serial circuit blocks Description to the preceding circuit in parallel Serial circuit blocks are those in which more than one contacts in series or the ANB instruction is used AnORB instruction is an independent instruction and is not associated with any device number There are no limitations to the number of parallel circuits when using an ORB instruction in the sequential processing configuration Whenusing ORB instructions in a batch use no more than 8 LD and LDI instructions in the definition of the program blocks to be connected parallel Program
94. 59 208 ATI HE TRD Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 T K 9 oe Den DY 3 25 3 TC L5 T53 7 Device Device Function amp Action The current time and date of the real time E clock are read and stored in the 7 data KS TRD D0 devices specified by the head address D Read PLC s real time clock according to the following format The reading source is the special data register D8013 D8019 which save clock data Unit Item Clock data Unit Item ZL D8018 Year 0 99 DO Year amp D8017 Month 1 12 DI Month B B D8016 Date 1 31 gt m Date 2 D8015 Hour 0 23 D3 Hour aa d D8014 Minute 0 59 D4 Minute 3 D8013 Second 0 59 DS Second 2 D8019 Week 0 Sun 6 Sat D Week 209 PATI HE TWR Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 Word amp s 3 peu RED es ee DB T evice a Device Function amp Action X0 A The 7 data devices specified with the TWR D10 Wirite the set clock data into PLC s real time clock In order to write real time clock the 7 data devices specified with the head address CS Oshould be pre set Unit Item Clock data Unit Item DO Year 0 99 gt
95. 604 When MO is ON C600counts with the OFF ON from X000 When MI activates reset when execute RST instruction When M2 is ON C604 starts to count The count input is X004 In this example the set value is the content indirectly assigned in the data register See the graph reset via M3 in the sequential control program READ He M4 When M4 is ON C620 counts with OFF C620 DDOD ON from X000 via OFF or ON status T from X001 decide the count direction If 1 RST C620 X001 is OFF execute increase count if X001 is ON execute decrease count y fe Z g G re Ex o B E c mos 8 o a o M6 e E TT When M6 is ON C622 counts with OFF ON from X000 via OFF or M7 ON status from X002 decide the 1 RST C622 count direction If X003 is OFF execute increase count if X003 is ON execute decrease count AB phase AB phase counter realize increase decrease count by the judgment of A B phase mede The output contactor s correspond with the current value action is the same with the preceding single phase counter M8 C630 K1000 When M8 is ON C630 counts with the input X000 B phase X001 A C630 Yo 0 gt phase via interruption If MO is ON execute RST instruction M9 to reset 1 RST C630 If the current value exceeds the set value then Y002 is ON If t
96. 67 2 147 483 648 2 147 483 647 register Constant K or data Same as the left but data register must be in a couple count Change after positive Change after positive count Loop counter positive count Hold the action after Hold the action after positive count reset if negative count When executing RST command counter s current value is 0 output contacts recover 16 bits 32 bits 39 40 Function a z a e E e S e 5 B g a e e 3 4 g g 6 TR TOPE ITE HMD Be About the assignment of normally used counter and power failure retentive counter they could be changed in the method of changing FD parameters setting via the peripheral device 16 bits binary increment counter its valid setting value is K1 K32 767 Decimal constant The set value KO and K1 have the same meaning i e act when output contacts at the beginning of first time count If cut the PLC s power then the value X0 of the normally use counter will be RST CO reset However counter used by power Xi cut retentive could save the count C c gt K10 value after power cut and the counter db will go on counting from the value C Every time when X001 drives coil CO the counter s current value will increase When execute the coil instruction the tenth time output contact acts Later even X001 activates counter
97. 7999 0 7999 0 1F3F X0 X511 16384 16895 4000 41 FF Y0 Y511 18432 18943 4800 49FF SO S1023 20480 21503 5000 53FF M8000 M8511 24576 25087 6000 61 FF TO T618 25600 26218 6400 666A C0 C634 27648 28282 6C00 6E7A Register space Modbus address start with 4x Word address Modbus address Dec K Modbus address Hex H D0 D7999 0 7999 0 1F3F TD0 TD618 12288 12906 3000 326A CD0 CD634 14336 14970 3800 3A7A D8000 D8511 16384 16895 4000 41 FF FD0 FD5000 18432 23432 4800 5B88 FD8000 FD8511 26624 27135 6800 69FF FE JE FEL ELAS gp AN o HS E P E Communication Instructions 1 Coil Read COLR Ss sr sz ss m 2 COLR K1 K500 K3 MI K2 Coil read instruction Modbus function code is 01H Function Read the assigned bureau s assigned coil status to PLC s assigned coil s Far away communication bureau number Operands K TD CD D FD sz Far away coil s start number Operands K TD CD D FD s Coil number Operands K TD CD D FD Local receive coil s start ID Operands Xx Y M S T C Port number Bound K1 K2 2 Input Coil s Read INPR Cst s2 xr 2 X0 I INPR Kl K500 K3 MI K2 Readthe input coil instruction Modbus function code is 02H Function Read
98. AY DR Du os 73 TO T 5 5 Device E EL COC Device Suitable Models 16 bits instruction ZRST 32 bits instruction XCI XC3 XCS Word E hes LERIECIS Tor To r9 Te T 71 evice kK gt Ed Device Function amp Action oy A x MSET MI 0 MI20 Zone Set Unit M10 M120 9 ZRST M500 M559 Zone Reset Bit Unit M500 M559 Come ZRST DO D100 Zone Reset Word Unit DO D100 e Are specified as the same type of soft units and DI lt When gt only reset the soft unit specified in As soft unit s separate reset instruction RST instruction can be used Other Reset 2 2 to bit unit Y M S and word unit T C D Instruction As fill move for constant KO 0 can be written into DX DY DM DS T C D Xl l ST MO Reset MO ST TO Reset the current value and status of TO ST DO Reset the current value and status of CO 2 T FMOV KO DO K100 Write K0 into DO D99 163 RADI RE Suitable Models XCl XC3 XC5 SWAP 16bits instruction SWAP 32 bits instruction Wd 2 Kap oY ow 53 15 T9 T 5 755 Device d 9TqezINng Pi Device S e Function xp s pes T on DI ee Low 8 bits and high 8 bits change when it is 16 bits instruction Ifthe instruction is a consecutive execut
99. C626 C628 1C630 C632 C634 U B Dir A Increment Mode XC5 32 PLC MODELS Pulse Direction Input AB Phase Mode Mode C602 C604 C606 C608 C610 C612 C614 C616 C618 C620 C622 C624 C626 C628 C630 C632 C634 U B Dir A Increment Mode 3 About the high speed counters which don t support four times frequency in AB phase high speed counters please refer to the following table PLC MODELS High speed counters without four times counter XC3 14 XC3 Senes XC3 24 XC3 32 XC3 48 XC3 60 XC5 32 XC5 48 XC5 60 XC5 Series Input Mode of High Speed Counter s Signal 1 Input Mode Increment Mode Under increment mode input pulse signal the count value increases with each pulse signal ON Pulse Input OFF 215 ADI He Pulse Direction input mode Under pulse direction input mode both the pulse signal and direction signal are input the count value increase decrease according to the direction signal s status 1 1 1 1 ON Pulse input OFF ON Direction Dir OFF AB phase mode Under AB phase mode the count value increase decrease according to the signal difference A phase and B phase
100. D s RAD value angle X 1 180 Assign the binary floating value TAN value Binary Floating 203 HUI 5 10 Clock Operation Mnemonic Function TCMP Time Compare TZCP Time Zone Compare TADD Time Add TSUB Time Subtract TRD Read RTC data TWR Set RTC data Note The models without clock can not use these instructions 204 RADI He Time Compare TCMP Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 KH DX py Jon os rp CD D Jr k sr G2 Gs Device s y Bit Device K 3 l Function amp Action Compare the assigned time with time data TCMP K10 K20 K30 DO MO 2 Q GO GO G2 EE 10 Hour 20 minute 30 second Gr MO Q m 10 20 30 gt Be ON econd M1 Q Hour Rp 10 20 30 Hinute Be ON Second M2 Hour 1rL 10 20 30 lt Ninute Be ON co The status of the destination devices is kept even if the TCMP instruction is deactivated e SI 2 S9 represent hours minutes and seconds respectively This time is compared to the time value in the 3 data devices specified by the head address S The result is indicated in the 3 bit devices specified by the head address S12 Assign the compare standard Hour S2 Assign the compare standard Minute S32 Assign the compare standard Second Cee Assign the H
101. D Second The status of the destination devices is kept even if the TCMP instruction is deactivated Compare the 3 clock data start from s with the two ends on the clock compare bound according to the area bound output the three ON OFF status starts from SU S 1 si 2 Assign the compare low limit in the form of Hour Minute and Second SI s2 i 2 1 2 42 Assign the compare low limit in the form of Hour Minute and Second S 2 ram 1 S 2 Assign the clock data in the form of Hour Minute and Second D 1 pj 2 According to the compare result the 3 devices output ON OFF The valid range of Hour is 0 23 The valid range of Minute is 0 59 The valid range of Second is 0 59 134 RADI He TADD Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 es yx ov Tow Tos 1 Tc D TF ee Device Function amp Action X0 TADD DI 0 D20 D30 K 202 3 Device D10 D11 D12 D20 D21 D22 gt D30 D31 D32 S1 S2 D D10 Hour D11 Minute D12 Second D20 Hour D21 Minute D22 Second D30 Hour D31 Minute D32 Second 10 hour 20 min 30 sec 3 hour 20 min 10 sec 13 hour 40 m in 40 sec Each of S1 S2 and D specify the head address of 3 data devices to be us
102. E XC3 48TE XC3 48RT E XC3 48R C XC3 48T C XC3 48RT C Type XC3 60R E XC3 60T E XC3 60RT E XC3 60R C XC3 60T C XC3 60RT C P N P Type XC3 24PR E XC3 24PT E XC3 24PRT E XC3 24PR C XC3 24PT C XC3 24PRT C XC3 14PR E XC3 14PT E XC3 14PRT E XC3 14PR C XC3 14PT C XC3 14PRT C XC3 32PR E XC3 32PT E XC3 32PRT E XC3 32PR C XC3 32PT C XC3 32PRT C XC3 E E z 7 C3 48PR E XC3 48PT E XC3 48PRT E XC3 48PR C XC3 48PT C XC3 48PRT C XC3 60PR E XC3 60PT E XC3 60PRT E XC3 60PR C XC3 60PT C XC3 60PRT C XC5 series models DC24V Transistor Mix output Transistor Mix output R T Relay Output Relay Output Output R amp T Output R amp T XC5 48R E XC5 48T E XC5 48RT E XC5 48R C XC5 48TC XC5 48RT C Typ XC5 60R E XC5 60T E XCS5 60RT E XC5 60R C XC5 60T C XC5 60RT C N Type N P N e P XC5 48PR E XC5 48PT E XC5 48PRT E XC5 48PR C XC5 48PT C XC5 48PRT C XC5 60PR E XC5 60PT E XC5 60PRT E XC5 60PR C XC5 60PT C XC5 60PRT C XC Ay PLC IUDAS Switch Quantity Expansions 1 Series name 2 E Expansion 3 Input points 4 X Input 5 Output points 6 Outputformat YR Relayoutput YT Transistor output Output Mold HO points Input Input Relay Output DC24V CR T XC E16X 16 points 16 points XC E16YR XC E16YT 16 points 16 points XC E8X8YR XC E8X8YT 16 points 8 points 8 poin
103. F Serial connect the block Recommended sequencial Non preferred batch programming method programming method LD X0 AND XI LD X0 ED 4 AND XI AND X3 ID x2 OnE AND X3 D ae LDI X4 AND X5 AND X5 ORB ORB OUT Y10 ORB OUT Y10 55 4 8 ANB Description 56 JEJE RA LH Mnemonic Function Format and Devices Mnemonic ANB ANd Block Serial multiply parallel circuits connection of Devices none To declare the starting point of the circuit block use a LD or LDI instruction After completing the parallel circuit block connect it to the preceding block in series using the ANB instruction It is possible to use as many ANB instructions as necessary to connect a number of parallel circuit blocks to the preceding block in series When using ANB instructions in a batch use no more than 8 LD and LDI instructions in the definition of the program blocks to be connected in parallel Program circuit DR instruction before ANB R instruction after ANB X6 X7 Y20 Start of a branch Start of a branch End of a parallel circuit block End of a parallel circuit block Serial connect with the preceding circuit JEJE RA LH 57 JEJE RA LH 4 9 MCS MCR Mnemonic Description 58 Mnemonic Function Format and Devices MCS Denotes the start YO Master control of a master control f block Devices N
104. F or reset OUT PLS PLF not accumulate timer etc which belongs to the flow ST instruction is usually used when a program needs to run more flows at the same time n a main program usually use ST instruction to open a flow 150 RADI He FOR AND NEXT Suitable Models 16 bits instruction FOR NEXT 32 bits instruction XCI XC3 XC5 Word KA Ok Device SDE I Dos Tm To ToT evice Ba Device IIAJ AQEMMS First execute the instructions between FOR NEXT instructions for several times Function the loop time is assigned by the source data then execute the steps after NEXT MO It FOR K5 MI mall FOR K6 INC DO A NEXT M3 C HI FOR K7 INC D1 B NEXT NEXT FOR NEXT instructions must be programmed as a pair Nesting is allowed and the nesting level is 8 Between FOR NEXT LDP LDF instructions are effective for one time Every time when MO turns from OFF to ON and M1 turns from OFF to ON A loop is executed 6 times Every time if MO turns from OFF to ON and M3 is ON B loop is executed 5 X 7 235 times If there are many loop times the scan cycle will be prolonged Monitor timer error may occur please note this If NEXT is before FOR or no NEXT or NEXT is behind FENG END or FOR and NEXT number is not equal an error will occur Between FOR NEXT CJ nesting is not
105. If this is the case then on continuous operation of the EADD instruction the result of the previous operation will be used as a new source value and a new result calculated This will happen every program scan unless the pulse modifier or an interlock program is used 197 PATI HE EMUL Suitable Models 16 bits instruction 32 bits instruction EMUL XC3 XC5 xu px oY px 23 79 JO DIA K 3 209 Ge K 3 Device CJK Device Function amp Action X0 EMUL DI 0 D20 D50 D11 DIO X D21 D20 D51 D50 Binary Floating Binary Floating Binary Floating The floating value of SI is multiplied with the floating value point value of S2 The result of the multiplication is stored at D as a floating value Ifaconstant K or H used as source data the value is converted to floating point before the addition operation XI t EMUL K100 D100 D110 K100 x D101 D100 D111 D110 Binary converts to Floating Binary Floating Binary Floating 198 PADI HE EDIV 16 bits instruction 32 bits instruction EDDIV Suitable Models XC3 XC5 wea 300 s 81 K 3 pun REDE Des To D Tr evice 7 R E Device Function amp Action X0 I EDIV DI 0 D20 D50 D11 D10 D21 D20 D51 D50 Binary Floating Binary Floating Binary Floating The floating point value of S1 is divided by the
106. K or H used as source data the value is converted to floating point before the addition operation XI t ESQR K1024 D110 K1024 gt D111 D110 Binary converts to Floating Binary Floating When the result is zero zero flag activates Only when the source data is positive will the operation be effective If S is negative then an error occurs and error flag M8067 is set ON the instruction can t be executed 128 PAD He SIN Suitable Models XC3 XC5 16 bits instruction 32 bits instruction SIN 2 K 3 3 5 KCN xm DX Dy bw DS TD o D FD ea xX Y Ed x I M SIN D5 0 D6 0 D51 D50 D61 D60 SIN Binary Floating Binary Floating This instruction performs the mathematical SIN operation on the floating point value in S angle RAD The result is stored in D s RAD value angle X 1 180 Assign the binary floating value SIN value Binary Floating 129 PAD He COS Suitable Models 16 bits instruction 32 bits instruction COS XC3 XC5 wed KEG K Cs 23 xm DX Dy bw DS m o D FD Device zum Device Function amp Action H COS D50 D6 0 D51 D50 RAD gt D61 D60 COS Binary Floating Binary Floating This instruction performs the mathematical COS operation on the floating point value in S angle RAD The result is stored in D RAD value
107. LSE 4 Sending pulse flag Be 1 at pulse sending 32 bits pulse overflow flag sending Be 1 when overflow Direction flag l is positive direction the correspond direction port is ON 229 Some special registers of pulse output High frequency pulse ID Function RADI RE Description PULSE_1 The low 16 bits of accumulated pulse number The high 16 bits of accumulated pulse number The current segment means No n segment PULSE 2 The low 16 bits of accumulated pulse number The high 16 bits of accumulated pulse number The current segment means No n segment PULSE 3 The low 16 bits of accumulated pulse number The high 16 bits of accumulated pulse number The current segment means No n segment PULSE 4 The low 16 bits of accumulated pulse number The high 16 bits of accumulated pulse number The current segment means No n segment D8190 PULSE The low 16 bits of accumulated pulse number D8191 The high 16 bits of accumulated pulse number D8192 PULSE 2 The low 16 bits of accumulated pulse number D8193 The high 16 bits of accumulated pulse number D8194 PULSE 3 The low 16 bits of accumulated pulse number D8195 The high 16 bits of accumulated pulse number D8196 PULSE 4 The low 16 bits of accumulated pulse number 230 A PRIN AE 6 3 Communication Function XC3 PLC XC5 PLC main units can fulfill
108. MUL DO D2 D4 BIN BIN BIN D x 2 gt 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 in the upward chart when D0 8 D2 9 D5 D4 772 The result s highest bit is the symbol bit positive 0 negative 1 When be bit unit it can carry on the bit appointment of K1 K8 When appoint K4 only the result s low 16 bits can be obtained 32 bits operation GO DO D2 D4 DMUL BIN BIN BIN DI DO X D3 D2 gt D7 D6 D5 D4 32 bits 32 bits 64 bits In 32 bits operation when use bit device as the destination address only low 32 bits result can be obtained The high 32 bits result can not be obtained so please operate again after transfer one time to the word device Even use word device 64 bits results can t be monitored at once In this situation float point data operation is recommended 97 FRI BE uitable Models XCl XC3 XC5 16 bits instruction DIV 32 bits instruction DDIV xm yx Tov ou Tos Try Tor TD Fo 2 7 k gt TET Device Device Function amp Action 16 bits operation SI S2 D m DIV DO D2 D4 Dividend Divisor Result Remainder BIN BIN BIN BIN D0 gt D2 D4 D5 16 bi
109. O s t SEND D 0 D100 K1 Data sending instruction send data every rising edge of MO sr Start address of send data Operands K TD CD D FD 2 The sent character s number Operands K TD CD D FD n COM port Bound K1 K2 In the data sending process sending flag M8122 COM 1 sets ON MO M8122 Sending 2 Receive Data E O a RCV D20 D200 K1 Data receiving instruction receive data every rising edge of MO st Receive address of send data Operands K TD CD D FD s2 The received character s number Operands K TD CD D FD n COM port Bound K1 K2 Inthe data receiving process receiving flag M8124 COM 1 sets ON M1 M8124 Receive 242 E ERRU AN HEC 5 P EO 2E 6 4 PWM Pulse Width Modulation Suitable Model 16 bits instruction PWM 32 bits instruction XC3 XC5 KA 2 K 2 9 9 wora ER jx oY D3 os Tc P 77 Bit Device 231A9p o qeymg PWM K100 DI YO and Action Function E s s SL Assign occupy empty ratio value n The bound is 1 255 S2 Assign output frequency f The bound is 0 72KHz D Assign Y number of output pulse Can only output at Y000 or Y001 please treat as transistor output type The output occupy empty ratio of PMW n 256 X 100 PWM output use the unit of 0 1Hz so when set S1 S amp quency the
110. RDE 5 8 Data Convert Mnemonic Function WTD Single word integer converts to double word integer FLT 32 bits integer converts to float point FLTD 64 bits integer converts to float point INT Float point converts to integer BIN BCD convert to binary BCD Binary converts to BCD ASC Hex converts to ASCII HEX ASCII converts to Hex DECO Coding ENCO High bit coding ENCOL Low bit coding 110 RRD RE WTD 16 bits instruction WTD 32 bits instruction Suitable Models XC3 XC5 xap oY p os a k s ______ Device Device Function amp Action ES OM DO gt DII D10 Single Word Double Word WTD DO DI 0 0orl po DI DI 0 When single word DO is positive integer after executing this instruction the high bit of double word D10 is 0 When single word DO is negative integer after executing this instruction the high bit of double word D10 is 1 111 FLT amp FLTD 16 bits instruction FLT 32 bits instruction DFLT Word GN aoe x oy ow DS jTD CD D FD Device 3 X Y Device Function amp Action 16 Bits HR FLT D10 DI D10 D13 D12 BIN integer Binary float point 32 Bits 2 DFLT DI f DI D11 D10 D13 D12 BIN integer Binary float point 64 Bits I 4 FLTD DI 0 Di4 D13
111. THINGET XC Series Programmable Controller User Manual Xinje Electronic Co Ltd THINGET Xinje Electronic XC series Programmable controller Operating manual Preface Catalog Summary of XC series PLC Spec Input output and layout Function of each device Basic SFC instructions Applied instructions Special function Applied examples Appendix This manual includes some basic precautions which you should follow to keep you safe and protect the products These precautions are underlined with warning triangles in the manual About other manuals that we do not mention please follow basic electric operating rules A Please follow the precautions If not it may lead the controlsystem incorrect or abnormal even cause fortune lose The models could only be used according to the manual and an only be Correct used along with the peripheral equipments recognized or recommended Application by Xinje Electronic They could only work normally in the condition of be transported kept and installed correctly also please operate and maintain them according to the recommendation Xinje Electronic Co Ltd Copyright reserved Without exact paper file allowance copy translate or using the manual is not allowed Disobey this people should take the responsibility of loss We reserve all the right of expansions and their design patent Duty Declare We have
112. The action of each flag the appointment method of 32 bits operation s soft units are both the same with the preceding ADD instruction The importance is in the preceding program if X0 is ON SUB operation will be executed every scan cycle The relationship of the flag s action and vale s positive negative is shown below Zero flag Zero flag Zero flag K c7 yy 2 1 0 32 768 0 1 32 767 0 1 2 e NN A Borrow flag Data s y iN Data s highest highest bit is N f 5 is 0 Tero flag A lx P 147 483 648 EP E px 2 147 483 ED 1 2 Lea 7 Borrow flag Carry flag Zero flag Carry flag 168 KRIE MUL Suitable Models 16 bits instruction MUL 32 bits instruction DMUL XCl XC3 XC5 eg yx Tov ou Tos Tr Tor T 5 Fo l EL m sr e Device Device Function amp action 16 bits operation SI S2 D 3m GD MUL DO D2 D4 BIN BIN BIN D x 2 gt 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 in the upward chart when D0 8 D2 9 D5 D4 772 The result s highest bit is the symbol bit positive 0 negative 1 When be bit unit it can carry on the bit appointment of K1 K8 When appoint K4 only the result s low 16 bits can be obtained
113. X7 OUT Y6 Mi Ly Ae M100 LDI Y6 MES AND M4 OR MI2 ANI X7 OR M13 OUT M100 Relationship DD AND LD The parallel connection with with ANB OR ORI instructions should connect with LD LDI instructions in principle But after the ANB instruction it s available to add a LD or LDI instruction After ANB instruction After ANB instruction 52 4 5 LDP LDF ANDP ANDF ORP ORF Mnemonic and Function Description Program FEA MEET AS LH Mnemonic Function Format and Devices LDP Initial logical LoaD Pulse operation Rising edge pulse Devices X Y M S T C Dn m FDn m LDF Initial logical LoaD Falling operation pulse Falling trailing edge pulse Devices X Y M S T C Dr m FDn m ANDP Serial connection of AND Pulse Rising edge pulse Devices X Y M S T C Dn m FDn m ANDF Serial connection of AND Falling Falling trailing edge pulse pulse Devices X Y M S T C Dn m FDn m ORP Parallel connection of OR Pulse Rising edge pulse Devices X Y M S T C Dn m FDn m ORF Parallel connection of OR Falling Falling trailing edge pulse pulse Devices X Y M S T C Dr m FDn m LDP ANDP ORP are active for one program scan after the associated devices switch from OFF to ON LDF ANDF ORF are active for one program scan after the associated devices switch from ON to OFF X
114. ach precise timer has its correspond interrupt tag See the following graph X0 j STR T600 K100 When X000 turns from OFF to ON timer T600 starts to time when time i reaches 100ms T600 set at the same im time an interruption occurs the 1 RST T600 program jump to interrupt tag 13001 and execute an interruption FEND subroutine JU Interrupt tag correspond with the timer Timer s number Interrupt tag T600 13001 T602 13002 T604 13003 T606 13004 T608 13005 T610 13006 T612 13007 T614 13008 T616 13004 T618 13010 246 FB HR ELE nan ERU E Pe ERO R 6 7 Interruption Function XC series PLC all have interrupt function There are two kinds of interrupt function external interrupt and time interrupt Via interrupt function some special program can be disposed not affected by PLC s scan cycle 6 7 1 External Interrupt Input terminal X can be used as external interrupt s input each input terminal corresponds with an eternal interrupt the rising edge or falling edge of each input can both active the interrupt The interrupt subroutine is written behind the main program Behind FEND command When interrupt activates the main program will immediately stop executing turn to execute the correspond interrupt subroutine After finish executing the interrupt subroutine go on execute the main program Inp
115. all be put in the format of binary data And when carry on monitor on the peripherial device these soft units will auto switch to be DEC data as shown in the graph they can also switch to be Hex Data OCT OCT OCTAL NUMBER gt The input relay output relay s soft units ID of XC series PLC are allocate in the format of OCT data So it can go on carry of 1 7 10 17 70 77 100 107 BCD code BCD BINARY CODE DECIMAL gt BCD is the method which use 4 bits binary to denote decimal 0 9 It s easy to despose bit So BCD is available to denote digital switch or 7 segments display control Other data float gt XC series PLC has the function of high precision floating point operation Use binary floating point data to execute floating point operation use decimal floating value to execute monitor 34 TR TOPE YE A Be 3 4 Some encode principles of device 1 Data register could be used as offset indirect assignment Format Dn Dm Xn Dm Yn Dm Mn Dm etc M8002 1 MOV KO DO M2 i MOV K5 DO M8000 MOV DIO DO D100 Yo D0 gt In the preceding example when D0 0 then D100 D10 YO is ON When M2 turns from OFF to be ON D0 5 then D100 D15 Y5 is ON When D10 D0 D 10 D0 YO D0 Y 0 D0 Word s offset composed by bit soft units DXn Dm means DX n Dm Softunits with offset the offset could only be denoted with soft device
116. allowed also in one STL FOR NEXT must be programmed as a pair FEND AND END Suitable Models 16 bits instruction FEND END 32 bits instruction XCI XC3 Er FERD fe un E ee S z 6 i 4 An FEND instruction indicates the first end of a main program and the start of the Function program area to be used for subroutines Under normal operating circumstances the FEND instruction performs a similar action to the END instruction i e output processing input processing and watchdog timer refresh are all carried out on execution p E 7 E pu c Fao Ii er X10 a ON D a o om mi M m E p FEND Pei 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 SRET P20 ee X10 ON instruction After executing CALL instruction and before executing SRET instruction if execute FEND instruction or execute FEND instruction after executing FOR instruction and before executing NEXT then an error will occur In the condition of using many FEND instruction please compile routine or subroutine between the last FEND instruction and END instruction 152 5 4 Contactor s Compare Instructions RADI RE Mnemonic amp Function
117. amp Action Compare a float range with a float value SI S2 Di GO m EZCP DI D20 DO M3 M3 D20 D21 gt D1 D0 ON Binary Floating Binary Floating M4 D21 D10 lt D1 D0 lt D31 D30 ON Binary Floating Binary Floating Binary Floating D1 D0 gt D31 D30 ON Binary Floating Binary Floating The status of the destination device will be kept even if the EZCP instruction is deactivated The data of S1 is compared to the data of S2 The result is indicated by 3 bit devices specified with the head address entered as D Ifaconstant K or H used as source data the value is converted to floating point before the addition operation X0 I EZCP KI 0 K2800 D5 MO K10 D6 D5 K28000 MO MI M2 Binary converts Binary Floating Binary converts to Floating to Floating Please set S1 S2 when S2 gt S1 see S2 as the same with S1 and compare them 195 PADI He Suitable Models XC3 XC5 EADD 32 bits instruction EADD 16 bits instruction ka s s 2 812 K 9 Word Rampo ow os cD DIF Device 55k s Device 7 GO I EAAD DI 0 D20 D50 D11 D10 D21 D20 gt D51 D50 Binary Floating Binary Floating Binary Floating The floating point values stored in the source devices S1 and S2 are algebraically added and the result stored in
118. ange the sieve value So in the high speed receive application you can assign this type of relay s ID No Auxiliary relay M Auxiliary relay is the relay inside the programmable controller this type of output relay is different from input output relay it can t gain exterior input it also can t drive exterior load it can only be used in the program The relay used for retentive can still save its ON OFF status in the case of PLC power cut Status S Relay used as step ladder chart When not used as working procedure No it s the same with auxiliary relay and can be used as common contact coil to carry on programming Besides it can also be signal alarm to diagnose exterior trouble Timer T Timer could carry on plus operation to lms 10ms 100ms etc time pulse in PLC When reach certain set value output contact act T100 T199 are timers with the unit of 100ms clock pulse their current values are the accumulate values So even though timer coil s drive input is cut they will still hold the current value go on accumulating the action 30 TR TOPE ITE A Be Counter C The counters can be divided into the following sorts according the their usage and purpose Used for interior count Common use power failure retentive use 16 bits counter Used for plus count count bound 1 32 767 32 bits counter Used for add minus count count bound 2 147 483 648 42 147 483 647 These cou
119. ansions and special expansions on the basic units for the input output relay s No please refer to the user manual Bound points Mnemonic Name 14 points 24 32 points 48 60 points I4 2492 K 460 points points points X000 X015 X000 X033 14M8 2836 MEM I ua X000 X021 X000 Xu43 S POMS saints points Y000 Y011 Y000 Y023 10 14 20 24 X QjEMEUEISAY ee Y000 Y015 YO00 yoo7 POWE omis points M0 M2999 M3000 M7999 8000 M Interior relay M8000 M8511 for special using 512 S0 S511 Pn S512 81023 TES TO T99 100ms not accumulation T100 T199 100ms accumulation 200 T299 10ms not accumulation T Timer 1300 T399 10ms accumulation 620 T400 T499 lms not accumulation T500 T599 lms accumulation T600 T618 1ms with interruption precise time CO C299 16 bits forth counter C Counter C300 C598 32 bits forth back counter 635 C600 C634 high speed counter D0 D3999 D4000 D7999 oe D Data Register For special usage D8000 D8511 512 FDO FD1535 1536 FD FlashROM Register For special usage FD8000 FD8511 512 32 9 NOTE X1 The memorizer area in is the defaulted power failure retentive area soft elements D M S T Ccan be set to change the power failure retentive area For the details please see the following table X2 FlashROM register needn t set power failure retentive its data won t lose when power is cut No ba
120. any contacts as required can be connected in series They can Description f be used for many times The output processing to a coil through writing the initial OUT instruction is called a follow on output For an example see the program below OUT M2 and OUT Y003 Follow on outputs are permitted repeatedly as long as the output order is correct There s no limit for the serial connected contacts No and follow on outputs number 50 Program X2 MI ox Y2 X3 M2 TI f C y3 JEJE RA LH LD X2 AND MI OUT Y2 LD Y2 ANI X3 OUT M2 AND TI OUT Y3 4 4 OR ORI Mnemonic and Function Description Mnemonic Function Format and Devices OR Parallel connection of OR NO Normally Open contacts Devices X Y M S T C Dn m FDn m ORI Parallel connection of OR Inverse NC Normally Closed contacts Devices X Y M S T C Dn m FDn m Use the OR and ORI instructions for parallel connection of contacts To connect a block that contains more than one contact connected in series to another circuit block in parallel use an ORB instruction OR and ORI start from the instruction s step parallel connect with the LD and LDI instruction s step said before There is no limit for the parallel connect times 51 AE ASIE TR LH Y6 LD X5 Program X6 OR X6 MII OR MII Y6 M4
121. are Instructions 5 6 Arithmetic and Logic Operation Instructions 5 7 Loop and Shift Instructions 5 8 Data Convert 5 9 Floating Operation 5 10 Clock Operation ADI HE 140 FERD RE 5 1 Applied Instruction List The applied instructions sort and their correspond instructions are listed in the following table Common statements of XC1 XC3 XC5 Sort Mnemonic Function CJ Condition jump CALL Call subroutine SRET Subroutine return STL Flow start STLE Flow end Presta SET Open the assigned flow close the current flow Flow ST Open the assigned flow not close the current flow FOR Start of a FOR NEXT loop NEXT End of a FOR NEXT loop FEND First end LD LD activates if S1 S2 LD gt LD activates if S1 gt S2 LD lt LD activates if S1 lt S2 LD lt gt LD activates if S1 S2 LD lt LD activates if S1 lt S2 LD gt LD activates if SI 2 S2 AND AND activates if SI S2 AND gt AND activates if SI gt S2 Data AND AND activates if SI S2 Compare AND lt gt AND activates if SI z amp S2 AND lt AND activates if SI lt S2 AND AND activates if SI S2 OR OR activates if SI S2 OR gt OR activates if SI gt S2 OR lt OR activates if SI lt S2 OR lt gt OR activates if SI S2 OR lt OR activates if SI lt S2
122. at data of S1 is compared to S2 The result is indicated by 3 bit devices specified with the head address entered as D Ifa constant K or H used as source data the value is converted to floating point before the addition operation X0 t ECMP K500 D100 MI K500 D101 D100 M10 M11 M12 Binary converts Binary floating to floating 122 PADI He EZCP Suitable Models 16 bits instruction 32 bits instruction ECMP XC3 XC5 C909 C K 39 xg yx oY ow os 15 69 DIA Function amp Action Compare a float range with a float value SI S2 Di GO m EZCP DI D20 DO M3 M3 D20 D21 gt D1 D0 ON Binary Floating Binary Floating M4 D21 D10 lt D1 D0 lt D31 D30 ON Binary Floating Binary Floating Binary Floating D1 D0 gt D31 D30 ON Binary Floating Binary Floating The status of the destination device will be kept even if the EZCP instruction is deactivated The data of S1 is compared to the data of S2 The result is indicated by 3 bit devices specified with the head address entered as D Ifaconstant K or H used as source data the value is converted to floating point before the addition operation X0 I EZCP KI 0 K2800 D5 MO K10 D6 D5 K28000 MO MI M2 Binary converts Binary Floating Binary converts to Floating to Floating Pl
123. bit 7 bits data bit Stop Bit 2 stop bits 1 stop bit Check Even Odd No check The defaulted parameters of COM 1 Station number is 1 baud rate is 19200bps 8 data bit 1 stop bit Even check 232 E FEL UA P AN Sa 5 P EO ZR Parameter Setting XC series PLC can set the communication parameters with the COM port How to set the communication parameter Number Function Description FD8210 Communication mode 255 is free format 1 254 bit is modbus station number FD8211 Communication format Baud rate data bit stop bit check FD8212 ASC timeout judgment time Unit ms if set to be 0 it means no timeout waiting FD8213 Reply timeout judgment time Unit ms if set to be 0 it means no timeout waiting FD8214 Start symbol High 8 bits invalid FD8215 End symbol High 8 bits invalid FD8216 FD8220 Free format setting Communication mode 8 16 bits cushion with without start bit with without stop bit 255 is free format 1 254 bit is modbus station number FD8221 Communication format Baud rate data bit stop bit check FD8222 ASC timeout judgment time Unit ms if set to be 0 it means no timeout waiting FD8223 Reply timeout judgment time Unit ms if set to be 0 it means no timeout waiting FD8224 Start symbol High 8 bits invalid FD8225 End symbol High 8 bits invalid
124. ble destination devices will be written to n re omo Ik BMOV D5 DI 0 K3 D5 m DI D6 m Di n 3 D7 m DI The BMOV instruction has a built in automatic feature to prevent overwriting errors from occurring when the source S n and destination D n data ranges coincide This is clearly identified in the following diagram NOTE The numbered arrows indicate the order in which the BMOV is processed X1 X2 F BMOV D10 D9 K3 H BMOV D10 D11 K3 DI D9 DII DI DI DII DI0 e DII DII DI DI DI 160 READ RE FMOV Suitable Models 16 bits instruction FMOV 32 bits instruction XCl XC3 XC5 LK H DX oy ow Jos TD CD D Jr cec oH Word A Device y c S Bi Device s n m i FMOV KO DO K10 IIIA 3 quumg Move KO to D0 DO Copy a single data device to a range of destination devices The data stored in the source device S is copied to every device within the destination range The range is specified by a device head address D and a quantity of consecutive elements n If the specified number of destination devices n exceeds the available space at the destination location then only the available destination devices will be written to KO
125. checked the manual its content fits the hardware and software of the products As mistakes are unavoidable we couldn t promise all correct However we would check the data in the manual frequently and in the next edition we will correct the necessary information Your recommendation would be highly appreciated Preface Specialties of programmable controller The programming of XC series programmable controller has the following characteristic Support two kinds of program languages In XC series PLC besides statement format you can also adopt ladder chart on the screen And these two formats could convert to the other Rich basic functions Based on the theory of Basic functions High speed dispose convenient to use XC series PLC can support not only functions relative to sequence control but also basic application instructions of data transfer and compare arithmetic and logic control loop and shift of data etc besides it can support interrupt high speed counter exclusive compare instructions high speed impulse output and other high speed dispose instructions gt Offset function Indirect addressing Add offset suffix after the coil data register e g X3 D100 DO D100 to realize indirect addressing E g when D100 0 X3 D100 means X3 DO D100 means DO when D100 9 X3 D100 means X14 DO D100 means D9 gt Single phase or AB high speed counter The high speed counters in XC series PLC carry on inter
126. ction pulse output without speedup speed down or you can realize single direction pulse output with speedup speed down or you can realize multiply segment positive negative output and so on The output frequency can reach 400K Hz Step Motor Driver Note 1 To use pulse output you should use PLC with transistor output Such as XC3 14T E or XC3 60RT E etc 2 XC5 32 PLC models have 4 channels YO Y1 Y2 Y3 pulse output function Type and application of pulse output 1 Single direction pulse output without speedup speed down e Frequency 0 400KHz e Outputterminals YO or Y1 e Output mode sequential or limited pulse output e Pulse number 16 bits instructions 0 K32767 32 bits instructions O0 K2147483647 e Instructions PLSY PLSF PLSY generate certain quantity pulse with the assigned frequency PLSF generate sequential pulse with changeable frequency form 220 RADI RE DI YO PLSY K30 MO M8170 RST MO Generate certain quantity pulse with the assigned frequency support 32 bits instruction DPLSY SL Assign the Frequency Operands K TD CD D FD S2 Assign the generated pulse volume Operands K TD CD D FD D Assign Y port which generates pulse can only output at Y000 or Y001 When M0 is ON PLSY instruction output pulse of 30Hz at YO the pulse number is assigned by D1 when sending pulse coil M8170
127. de 255 1s free format 1 254 bits modbus station ID FD8211 Communicate format Baud rate data bit stop bit checkout FD8212 Judgment time of ASC timeout Unit ms FD8213 Judgment time of reply timeout Unit ms if set to be 0 it means no timeout waiting FD8214 Start ASC High 8 bits be of no effect FD8215 End ASC Low 8 bits be of no effect FD8216 FD8220 Free format setting Communicate mode 8 16 bits cushion with without start bit with without end bit 255 is free format 1 254 bits modbus station ID FD8221 Communicate format Baud rate data bit stop bit checkout FD8222 Judgment time of ASC timeout High 8 bits be of no effect FD8223 Judgment time of reply timeout Low 8 bits be of no effect FD8224 Start ASC Unit ms FD8225 End ASC Unit ms if set to be 0 it means no timeout waiting FD8226 FD8230 Free format setting Communicate mode 8 16 bits cushion with without start bit with without end bit 255 is free format 1 254 bits modbus station ID FD8231 Communicate format Baud rate data bit stop bit checkout FD8232 Judgment time of ASC timeout High 8 bits be of no effect FD8233 Judgment time of reply timeout Low 8 bits be of no effect FD8234 Start ASC Unit ms FD8235 End ASC Unit ms if set to be 0 it means no timeout
128. dend is composed by the device appointed by SI and the next one The divisor is composed by the device appointed by S and the next one The result and the remainder are stored in the four sequential devices the first one is appointed by D Ifthe value of the divisor is 0 then an operation error is executed and the operation of the DIV instruction is cancelled The highest bit of the result and remainder is the symbol bit positive 0 negative 1 When any of the dividend or the divisor is negative then the result will be negative When the dividend is negative then the remainder will be negative RADI RE INC amp DEC Suitable Models 16 bits instruction INC DEC 32 bits instruction DINC DDEC XCl XC3 XCS K Word KH DX DY DM DS TD oo D FD Device Device Function amp Action 1 Increment INC B X0 IK INC DO DO 4 1 D0 On every execution of the instruction the device specified as the destination has its current value incremented increased by a value of 1 In 16 bits operation when 32 767 is reached the next increment will write 32 767 to the destination device In this case there s no additional flag to identify this change in the counted value 2 Decrement DEC m l DEC DO DO 1 D0 On every execution of the instruction the device specified as the destination has
129. ds K TD CD D FD 3 Register number Operands K TD CD D FD vr Local receive register s start ID Operands D Port number Bound K1 K2 Instruction description when X0 is ON execute REGW or MRGW instruction After finish executing the instruction set communication finish bit No operation when XO is OFF If communication errors resend automatically If reach 10 times set communication error flag User can check the relative register to judge the reason 240 FE JE FELT AUR Fy AN HS E P ERU 6 3 2 Free Format Communication Communication Mode Start Symbol 1 byte Data Block max 128 bytes End Symbol 1 byte BaudRate 300bps 115 2Kbps Data Format Data Bit 7bits 8bits Check Bit Odd Even No Check Stop bit 1 bit 2 bits Start Symbol 1 bit End Symbol 1 bit User can set a start end symbol after set start end symbol PLC will automatically add this start end symbol when sending data remove this start end symbol when receiving data Communication Format 8 bits 16 bits If choose 8 bits cushion format to communicate in the communication process the high bytes are invalid PLC only use the low bytes to send and receive data Free format communication transfer data in the format of data block each block can transfer 128 bytes at most Meanwhile each block can set a start symbol and end symbol or not set FELD FELT IU SDB OS 5s P REC 2X Instruction Format 1 Send Data E G
130. ductance load below 80VA CACIOO0V or AC200V and lamp load below 100W AC100V or AC200V Open circuit s leak current When the output contact be OFF and there s no leak current can directly drive Ne lamp etc The life of relay output contacts Standard life of induce AC load such as contactor electromagnetism valve 5 million times for 20VA load Cut power device s life according to the company s test for 80VA load the action life is up to 2 million times But if the load parallel connect with surge absorber the life will be greatly improved Output connection example To avoid burning PLC s basic panel s layout caused by load short current etc set a 5A 10A fuse every four points 5 104 AC power XAC250V Output relay Relay output circuit 23 FLUR FEL IIE HA Ba UR 5s P i Consiitmiion For DC induce load please parallel connect with commutate diode of output If not connect with the commutate diode the contact s life will be circuit decreased greatly Please choose the commutate diode which allow inverse voltage endurance up to 5 10 times of the load s voltage ordinal current exceeds load current Parallel connect AC induce load with surge absorber can reduce noise DC load Induce load PLC output contact Freewheel diode AC load Induce load PLC outpu contact Surge Absorber 24 ETERRA d AN BS AR 2 7 Disposal of Transistor Output Circuit
131. e form of Hour Minute and Second D 1 pj 2 According to the compare result the 3 devices output ON OFF The valid range of Hour is 0 23 The valid range of Minute is 0 59 The valid range of Second is 0 59 206 RADI He TADD Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 es yx ov Tow Tos 1 Tc D TF ee Device Function amp Action X0 TADD DI 0 D20 D30 K 202 3 Device D10 D11 D12 D20 D21 D22 gt D30 D31 D32 S1 S2 D D10 Hour D11 Minute D12 Second D20 Hour D21 Minute D22 Second D30 Hour D31 Minute D32 Second 10 hour 20 min 30 sec 3 hour 20 min 10 sec 13 hour 40 m in 40 sec Each of S1 S2 and D specify the head address of 3 data devices to be used a time value The time value in S1 is added to the value in S2 the result is stored to D as a new time value If the addition of the two times results in a value greater than 24 hours the value of the result is the time remaining above 24 hours When this happens the carry flag M8022 is Sl S2 D 18 Hour 10 Minute 10 Hour 20 Minute 4 Hour 30 Minute 30 Second 5 Second 35 Second 18 hour 10 min 30 sec 3 hour20 m in 10 sec 4 hour 30 m in 25 sec When the result is 0 0 Hour 0 Minute 0 Second Set zero flag ON
132. ease set S1 S2 when S2 gt S1 see S2 as the same with S1 and compare them 123 PADI He Suitable Models XC3 XC5 EADD 32 bits instruction EADD 16 bits instruction ka s s 2 812 K 9 Word Rampo ow os cD DIF Device 55k s Device 7 GO I EAAD DI 0 D20 D50 D11 D10 D21 D20 gt D51 D50 Binary Floating Binary Floating Binary Floating The floating point values stored in the source devices S1 and S2 are algebraically added and the result stored in the destination device D If a constant K or H used as source data the value is converted to floating point before the addition operation Xl I EAAD D100 K1234 D110 K1234 D101 D100 D111 D110 Binary converts to Floating Binary Floating Binary Floating The same device may be used as a source and as the destination If this is the case then on continuous operation of the EADD instruction the result of the previous operation will be used as a new source value and a new result calculated This will happen every program scan unless the pulse modifier or an interlock program is used 124 PADI He ESUB Suitable Models XC3 XC5 16 bits instruction 32 bits instruction ESUB E2696 SG K 3 xu xx oY ox Jos 1 TO T DA Device CDK 3 Device Function amp Action X0 I ESUB D 0 D20 D50
133. ed a time value The time value in S1 is added to the value in S2 the result is stored to D as a new time value If the addition of the two times results in a value greater than 24 hours the value of the result is the time remaining above 24 hours When this happens the carry flag M8022 is Sl S2 D 18 Hour 10 Minute 10 Hour 20 Minute 4 Hour 30 Minute 30 Second 5 Second 35 Second 18 hour 10 min 30 sec 3 hour20 m in 10 sec 4 hour 30 m in 25 sec When the result is 0 0 Hour 0 Minute 0 Second Set zero flag ON The valid range of Hour is 0 23 The valid range of Minute is 0 59 The valid range of Second is 0 59 135 READ He TSUB Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 Word Ku KHj px by bow ps TD CD D Jr Device 7 N Device Function amp Action Q GO E I TSUB DI 0 D20 D30 D10 D11 D12 D20 D21 D22 D30 D31 D32 S1 S2 D10 Hour D10 Hour D10 Hour D11 Minute D11 Minute D11 Minute D12 Second D12 Second 10 hour 20 min 30 sec 3 hour 20 min 10 sec 7 hour 0 min 20 sec Each of S1 S2 and D specify the head address of 3 data devices to be used a time value The time value in S1 is subtracted from the time value in S2 the result is stored to D as a new time If the subtraction of the two times result
134. en M8056 M8059 M8056 5 gt a g In the left example program if use MO en to make M8056 ON then disable the FEND time interruption of route 0 a 14020 z E T 2 E o IRET z Cc END 251 252 FEL UE FELT IU A i OS 5s Oh i FE JE FELT AUR Hy AN y HS S P ERU 2 6 8 CAN Bus Function XC5 Series CAN Bus Brief Introduction Sub address 00 120R 120R CAN bus Node CAN bus Node CAN bus Node CAN bus Node Sub address 01 Sub address 02 Sub address 03 Sub address 04 CAN Controller Area Network included in industrial area bus category Compared with common communication bus CAN bus data communication has performance of outstanding dependability real time ability and flexibility CAN controller works under multi master format In the network each node can send data to bus according to the bus visit priority These characters make each node in CAN bus network has stronger data communication real time performance and easy to construct redundant structure improve the system s dependability and flexibility In CANBUS network any node can initiatively send message at any time to any other node no master and no slave Flexibility communication it s easy to compose multi device backup system distributing format monitor control system To fulfill different real time requirement the nodes can be divided to be different priority level With non destroy bus arbitrament technology when two nodes send
135. en and close of interior protocol communication function Using via setting the data of register FD8350 0 means not use CAN interior protocol communication 1 means use CAN interior protocol communication CAN interior protocol communication function is defaulted closed gt Communication parameters setting Setting of baud rate bureau ID and sending frequency these parameters are shown below Definition of configure items Interior protocol communicates via setting configure items There are four configure items read bit s item read word s item write bit s item write word s item Configure format Step 1 Add separately four configure item s number FD8360 1ead bit s item FD8361 read word s item FD8362 write bit s item FD8363 write word s item Step 2 configure each item s communication object each item needs to set four parameters according to the order far away node s bureau ID far away node s object ID local object s ID number The correspond register ID FD8370 FD8373 means item 1 FD8374 FD8377 means item 2 1 FD9390 FD9393 means item 256 totally 256 configure items can be set CAN Communication Setting ID Function Description FD8350 CAN communication mode 0 means not use 1 means interior protocol 256 E FEL UA o AN HUS 5 P EO ZR FD8351 CAN baud rate Refer to CAN baud rate setting table FD8352 Self
136. er Operands K TD CD D FD Far away communication bureau number Operands K TD CD D FD Register number Operands K TD CD D FD Local receive register s start ID Operands D Port number Bound K1 K2 Instruction description when X0 is ON execute REGR or INRR instruction After finish executing the instruction set communication finish bit No operation when XO is OFF If communication errors resend automatically If reach 10 times set communication error flag User can check the relative register to judge the reason 239 FE JE FELIS ELAS HA o HS E P ERU 7 Single Register Write REGW E m s s k REGW Kl K500 DI K2 Write single register instruction Modbus function code is 06H Function write the assigned register status to PLC s assigned bureau s assigned register n1 Far away communication bureau number Operands K TD CD D FD Far away communication bureau number Operands K TD CD D FD Csr Local receive register s start ID Operands D 2 Port number Bound K1 K2 8 Multi register Write MRGW E or m9 Gr s MRGW Kl K500 K3 D1 K2 Write multi register instruction Modbus function code is 10H Function write the assigned input register status to PLC s assigned bureau s assigned register st Far away communication bureau number Operands K TD CD D FD Far away communication bureau number Operan
137. gister Special soft unit s type and its function Function Description Working normally PLC be ON when ON coil running Working normally PLC be OFF when OFF coil running The first scan cycle is ON when PLC starts running Initial positive pulse coil The first scan cycle is Initial ti PUT USE ai OFF when PLC starts pulse coil K scan cycle running Battery voltage too d i Act when battery voltage abnormal too low low Function Description Register s capacity 2 2K steps 414K steps 88K steps Battery voltage 0 1V unit 273 ELD FEL EDU d An A AiR ID Function Description M8010 5ms M8011 Shake with the cycle of 10ms EE 5ms 30ms M8012 Shake with the cycle of 100ms EE 30ms 0 5s M8013 Shake with the cycle of 1 NEN 0 5s 30s M8014 Shake with the cycle of 1 30s M8018 Bits of year Defaulted is OFF OFF 2 ON 4 Function Description When plus minus operation result is 0 When borrow occurs in minus operation When carry occurs in plus operation or overflow occurs in bit shift operation 274 ELV FEL EDU d Ain LEUR AAR Function Description The current scan cycle Unit 0 1ms Mini value of scan time Uni
138. he current value is smaller than the set value then Y002 is OFF MI 0 i C632 DODI When M10 is ON C632 starts to count The count input is X002 B phase C632 X003 A phase Yo gt Reset via M11 MII If the current value exceeds the set et mk value then Y004 activates If the current value is smaller than the set value then Y004 is OFF In the condition of A phase input is OFF ON if B phase input is OFF the counter is increase count if B phase input is ON the counter is decrease count 218 Times Frequency RADI RE High speed counters have one time frequency and four times frequency two modes PLC s defaulted count mode is four times frequency mode The count format of two count modes is shown below One time frequency mode A B phase counter s count format A a Increment count Decrement count Four times frequency mode ABphase count add 4 times frequency count mode The count mode is shown below Increment count T T T T T A T T T T I T b 4 I l bh 4d 00g boo d dog d d gd d L p y i L L L E LET Boh aa tee a Pes 3 ft J l 1
139. he power specification of XC series programmable controller s basic units please see the following table Rated voltage AC100V 240V Voltage allow ACO90V 265V bound Rated frequency 50 60Hz Allow momentary Interrupt time lt 0 5 AC cycle alternation Z1 sec power cut time Max 40A 5mS below AC100V max 60A 5mS below AC200V consumption use To avoid voltage decrease please use the power cable thicker than 2mm Even appear power cut within 10ms PLC can still go on working But if long time power cut or abnormal power decrease PLC will stop working output will also appear OFF status when recover power supply the PLC will auto start to work Connect the grounding terminals of basic units and extend modules together then ground Rated voltage DC24V oltage allow bound DC21 6V 26 4V Input current 120mA DC24V Only basic unit Allow momentary l0mS DC24V power cut time Impact current DC26 4V 10A Max power 12W consumption 24VDC 10 Max 400mA FLUR FEL DIU SD Aa UR 5s Sha i 2 2 AC Power DC Input Type Constitution and Connection DC24V 24V C100V AC240V Sensor provide AC DC convert 50HZ 60HZ power The power is connected between L and N terminals 24 COM terminals can be used as power 400mA DC24V which supply sensor Besides this terminal can t be given power from outside e terminal is vacant terminal please don
140. he value of S1 and S2 are tested according to the instruction If the comparison is true then the AND contact is active If the comparison is false then the AND contact is not active 16 bits 32 bits Active condition Inactive condition AND DAND S1 S2 SI z S2 AND DAND gt S1 gt S2 SI S2 AND lt DAND lt S1 lt S2 SI S2 AND lt gt DAND lt gt S1 z S2 SI S2 AND lt DAND lt SI S2 S1 gt S2 AND DAND gt SD S2 S1 lt S2 Program X0 i GO GS R K100 Co X2 M4 Mii DOR gt DI K68899 When the source data s highest bit 16 bits b15 32 bits b31 is 1 use the data as a negative The comparison of 32 bits counter C300 must be 32 bits instruction If assigned as a 16 bits instruction it will lead the program error or Note Items operation error 157 ADI He 5 5 Data Move Mnemonic Function MOV Move BMOV Block Move FMOV Fill Move FWRT Written of FlashROM MSET Zone Set ZRST Zone Reset SWAP Float To Scientific XCH Exchange 158 RADI He Suitable Models XCl XC3 XC5 MOV 16 bits instruction MOV 32 bits instruction DMOV K Hj DX oy ow Jos TD CD D Jr 8 ares m Device d qens bi Device Function amp Action
141. hen the comparison S1 lt S2 is true AND gt Serial comparison contact Active when the comparison S1 S2 is true OR Parallel comparison contact Active when the comparison S1 S2 is true OR gt Parallel comparison contact Active when the comparison S1 gt S2 is true OR lt Parallel comparison contact Active when the comparison S1 lt S2 is true OR lt gt Parallel comparison contact Active when the comparison S1 S2 is true OR lt Parallel comparison contact Active when the comparison S1 lt S2 is true OR gt Parallel comparison contact Active when the comparison S1 S2 is true 81 RADI RE Initial Comparison LD O Suitable Models 16 bits instruction Refer Below 32 bits instruction Refer Below XCI XC3 XC5 k 7 gt wed Gr bere REDE DY Dos T TG T 2 THE evice Device Instruction amp Function The value of S1 and S2 are tested according to the comparison of the instruction If the comparison is true then the LD contact is active If the comparison is false then the LD contact is not active 16 32 Active gt Inactive bits bi condit conditi ts 10n on LD DLD CSI S2 SI S25 LD DLD gt S1 gt S82 SI lt 82 LD DLD lt SI lt 82 S1 2 82 LD DLD lt gt SI S25 S1 S2 LD DLD lt SI lt 82 SI gt S2 LD DLD gt SI 2 82 SI lt S2
142. ice following closely the preceding device s ID will be the high bits To avoid ID repetition we recommend you assign device s ID to be even ID The sare device may be used as a source and a destination If this is the case then the result changes after every scan cycle Please note this point Denote the instruction name 16 bits instruction and 32 bits instruction Denotes the soft units which can be used as the operation object Ladder Example Flag after executing the instruction Instructions without the direct flag will not display Suitable models for the instruction Destinate operand its content changes with the execution of the instruction Suitable Models XC1 XC3 XC5e Zero MBozoe p Borrowd M8021 p Carye M8022 p 8 Tell the instruction s basic action using way applied example extend function note items etc 144 ATI RE The assignment of the data The related The data register of XC series PLC is a single word 16 bit data register single word data only engross one data register which is assigned by single word object instruction The disposal bound is Dec 327 68 327 67 Hex 0000 FFFF description Single word object instruction D NUM D NUM Object data Double word 32 bit engrosses two data register it s composed by two consecutive data registers the first one is assigned by double word object instruction The dispose bound is Dec 214 748 364 8
143. ight WTD Single word integer converts to double word integer FLT 32 bits integer converts to float point FLTD 64 bits integer converts to float point INT Float point converts to binary BIN BCD converts to binary Dus BCD Binary converts to BCD Convert ASC Hex converts to ASCII HEX ASCII converts to Hex DECO Coding ENCO High bit coding ENCOL Low bit coding ECMP Float compare EZCP Float Zone compare EADD Float Add ESUB Float Subtract Float Seu Point EMUL Float Se Opia EDIV Float division ESQR Float Square Root SIN Sine COS Cosine TAN Tangent TCMP Time Compare TZCP Time Zone Compare Clock TADD Time Add Operation TSUB Time Subtract TRD Read RTC data TWR Set RTC data 70 5 2 Reading Method of Applied Instructions Understanding method of instruction understanding In this manual the applied instructions are described in the following manner Addition Operation ADD 1 16 bits instruction ADDe 32 bits instruction DADDe PIHAA AQEPNS Function Hi 6 v Word K sL 2 _5 nis KA DX DY DM Ds TD CD D FD evice 8 T C Dnm 5 D10 D12 D14 3 The data contained within the two source devices are combined and the total is stored in the Note Q G 6 amp 6 amp GO specified destination device Each data s highest bit is the sign bit O stands for positive 1 stands for negative All calcula
144. igure check error flag If set to be 1 then automatic self recover after error generate If set to be 0 then after error generate M8242 CAN bus self recover control after error CAN stop working The defaulted value is 1 not retentive after power cut CAN status register 0 No error 2 Initializing error D8240 CAN error message 30 Bus error 31 Error alarm 32 Data overflow D8241 Generate error s configure item number Show configure item error s nearest number The sending data package number each D8242 second The receiving data package number D8243 x each second D8244 CAN communication error number 7 Applied Example Programs In this chapter we give you some sample programs for your reference XC series PLC is mini model high speed good performance PLC Besides the independent using of I O points pulse output and other functions could be used So XC series PLC could satisfy diverse control 260 E FLIER ILA AN USUS 5 P ERO ZR 7 1 Example of Pulse Output 7 2 Example of MODBUS Instructions 7 3 Example of Free Format Communication FE JE FELT AUR gp AN o HS E P EU 7 1 Example of Pulse Output E g The following is the program which realize continuous sending high low pulse 261 FEL UE FELT DIU A a OS 5s Sha i The parameters Parameters of step motor step square angle 1 8 degree step fractionlet 40 the pulse number of a round is 8000 High frequency pulse
145. ing instruction each operation cycle should change 164 RADI He XCH Suitable Models XCl XC3 XC5 16 bits instruction XCH 32 bits instruction DXCH Word kK O Bas DERIRCISCTECTSSTT TUO T 77 evice d qens ee Device 16 bits instruction Function E XCH Di Di I Before D10 100 After D10 101 DII 101 D11 100 e s e The contents ofthe two destination devices D1 and D2 are swapped e Whan driva innat Vio ONT aach anan avela chenld narmr an data avchanaa 32 bits instruction DXCH DI D20 32 bits instruction DXCH swaps value composed by D10 D11 and the value namnnacad hx NIN 11 165 166 RADI RE 5 6 Data Operation Instructions Mnemonic Function ADD Addition SUB Subtraction MUL Multiplication DIV Division INC Increment DEC Decrement MEAN Mean WAND Logic Word And WOR Logic Word Or WXOR Logic Exclusive Or CML Compliment NEG Negation READ RE Addition Operation ADD Suitable Models XCl XC3 XC5 16 bits instruction ADD 32 bits instruction DADD Worl k s Cs x Zero M8020 t map a 0s 1 a D1 B Borrow M8021 Device c N Ca M8022 pit Device Function 9 Gr 2 e ADD DI 0 DI DI 4 D10 D12 gt DIA un E e D e Y e The data contained
146. ing program as the example in DO D1 and D2 D3 set two parts pulse output MI with the same frequency value The pulse number in D3 is set to be the number needed When M1 is ON This will realize Segment 2 fixed length stop function Refer to the right graph 1 1 I 1 1 1 i 1 1 1 1 1 1 I 1 1 1 1 l 1 1 1 Segment 1 M8170 E g 2 Follow Relationship The pulse output frequency of YO equals the tested input frequency of X003 If the tested input frequency at X003 changes the output frequency at YO changes relatively FRQM K20 DO Kl X003 PLSF DO YO 228 Pulse output special coil and register Some flag bits of pulse output is shown below High frequency pulse ID Function ADI RE Description PULSE_1 Sending pulse flag Be 1 at pulse sending 32 bits pulse overflow flag sending Be 1 when overflow Direction flag 1 is positive direction the correspond direction port is ON PULSE_2 Sending pulse flag Be 1 at pulse sending 32 bits pulse overflow flag sending Be 1 when overflow Direction flag is positive direction the correspond direction port is ON PULSE 3 Sending pulse flag Be 1 at pulse sending 32 bits pulse overflow flag sending Be 1 when overflow Direction flag l is positive direction the correspond direction port is ON PU
147. ion Convert and move instruction of source BIN destination BCD Hes mace BCD DI 0 DO This instruction can be used to output data directly to a seven segment display ASCI Suitable Models 16 bits instruction ASCI 32 bits instruction XC3 XC5 187 ADI He PK ox oY Jo os 1 oo DIF 8 5 Device Device Function amp Action 16 bits convert mode N G GJ s I ASCI D100 D200 K4 Convert each bit of source s S Hex format data to be ASCII code move separately to the high 8 bits and low 8 bits of destination D The convert alphanumeric number is assigned with n D is low 8 bits high 8 bits store ASCII data The convert result is the following Assign start device D100 0ABCH AJ 41H 2 32H 6 36H D101 1234H B 42H 3 33H 7 37H D102 5678H CI 433H 4 34H 8 38H EEE C IB AT 0 4 3 21 r LC TB tl tol 4 I3 21 tc DA 0 4 3 ea erei rar ror 68 G9 re en rr ro d tci 6 A HEX Suitable Models 16 bits instruction HEX 32 bits instruction XC3 XC5 188 MORE xu oY OU os 1 oo DIA k e O Word s Device Device Function amp Action 16 bits switch mode s n X0 L HEX D200 D100 K4 Convert the high and low 8 bits in source to HEX data Move
148. ion bureau number Operands K TD CD D FD D2 Far away communication bureau number Operands K TD CD D FD Coil number Operands K TD CD D FD sr Local receive coil s start ID Operands Xx Y M S T C 9 Port number Bound K1 K2 Instruction description when X0 is ON execute COLW or MCLW instruction After finish executing the instruction set communication finish bit No operation when X0 is OFF If communication errors resend automatically If reach 10 times set communication error flag User can check the relative register to judge the reason 238 FE JE FEL ELAS Hea Aa HS E P EU 5 Register Read REGR st s2 xr 2 X0 k REGR Kl K500 K3 DI K2 Readregister instruction Modbus function code is 03H Function Read the assigned bureau s assigned register status to PLC s assigned register sr Far away communication bureau number Operands K TD CD D FD Far away communication bureau number Operands K TD CD D FD Register number Operands K TD CD D FD Local receive register s start ID Operands D Port number Bound K1 K2 6 Input Register Read INRR s1 s2 9 vr 2 X0 INRR K1 K500 K3 D1 K2 Read the input register instruction Modbus function code is 04H Function Read the assigned bureau s assigned input register status to PLC s assigned register SU Far away communication bureau numb
149. it is stored in carry t flag H a eee J ET After once High execution Low GBRBIIeToIo e o o To o e o o e t f 1 8022 X Logic shift right D n X1 e i Hi ISR Do KA pence ererutor me high bit is same with the bit High ERAT Left before shifting the final bit 1 TERTER E Dele eTe oe 8 A x is stored in carry flag n Bits i M8022 i Lesa cecc eee 4 After once High Execution Left eJe o o hh RR B TDi e De o 4 p Re aee ee TO nso22 o Je NOTE Inevery scan cycle loop shift left right action will be executed PARTI HE ROL amp ROR Suitable Models 16 bits instruction ROL ROR 32 bits instruction DROL DROR XC3 XC n Word K A K 3 peid LXE ED De ps 3 TO T P 77 Device Function amp Action The bit format of the destination device is rotated n bit places to the left on every operation of the instruction Rotation shift left xo H ROL DO K4 Left Rotation High Left Sih lelolelololololo Every time when X000 turns from OFF 4 to ON executes n bits left rotation n Bits PM8022 I I j p fter once H execution High Left Eri e o o o o o o o t iy eae i t 1 M8022 Rotation shift right D
150. its instruction Refer Below XCI XC3 XC5 k Word Gr jee DERDETETRISTUIGIPTH evice E Device Instruction amp Function The value of S1 and S2 are tested according to the comparison of the instruction If the comparison is true then the LD contact is active If the comparison is false then the LD contact is not active 16 32 gt Active gt Inactive bits bi condit conditi ts ion on AND DAND S1 S2 SI z S2 AND DAND gt SI gt S2 SI S2 gt AND DAND lt SI lt S2 SI S2 lt AND DAND lt gt SI S2 SI S2 Program AND lt SD lt S2 SD gt 2 AND DAND gt SI S2 SI S2 SS 155 Note Items 156 T m 9 AND K100 CO Xl AND gt K 30 DO SET Yl x2 DAND gt K68899 Dio M50 M4 ADI RE When the source data s highest bit 16 bits b15 32 bits b31 is 1 use the data as a negative The comparison of 32 bits counter C300 must use 32 bits instruction If assigned as 16 bits instruction it will lead the program error or operation error RADI RE Parallel Comparision OR C Suitable Models 16 bits instruction Refer Below 32 bits instruction Refer Below XCI XC3 XC5 k 7 gt Tod Gr ous HD DY Dos Te oT evice Device Instruction amp Function T
151. n X0 ii Ror DO K4 Right HIgh Rotation Low ih Did Bh d fe Do e o o o o o X n Bits Every time when X000 turns from M80224 OFF to ON executes n bits right i 7 Afer ae 5 1 rotation execution H High Low i UE ajo rip r r o o o o i foie eel M8022 0 107 HERI fe SFTL amp SFTR Suitable Models 16 bits instruction SFTL SFTR 32 bits instruction DSFTL DSFTR X XCS nl n2 Word K Device REDE DY TC os TO T P T3 8 9 ee Device c S Function amp Action The instruction copies n2 source devices to a bit stack of length nl For every new addition of n2 bits the existing data within the bit stack is shifted n2 bits to the left right Any bit data moving to the position exceeding the n1 limit is diverted to an overflow area The bit shifting operation will occur every time the instruction is processed unless it is modified with either the pulse suffix or a controlled interlock Bit shift left M15 M12 Overflow MI11 M 8 M15 M 12 D o _OQa 2 M 7 M 4 MI11 M8 HpemTw m w e M 3 M 0 gt M7 M4 X 3 X 0 gt M3 M0 D D 4 Bit shift right M3 M 0 Overflow 2 5 n m M7 M4 M3 MO PE ame Mo TRE a neces M15 M12 gt M11 M8 X3 X 0 MI5 M12 In every scan cycle loop shift left right action will be executed 108 RADI He WSFL amp WSFR Suitable Models
152. n ID and end definition ID operate the operands in one bound at the same time is available Besides it s also possible to use RST instruction to reset the current contents of timer counter and contacts When use SET RST instruction please try to avoid using the same LD X10 un SET YO SET YO LD X11 pm ins RST YO RST YO A ID X12 SET Mil SET M50 Sis LD X13 RST Mi RST M50 si LD X14 SET so SET SO ss LD X15 RST SO RST S0 Xi Kil LD X10 T250 OUT T250 X11 SP K10 RST T250 LD X17 RST T250 61 JEJE RA LH 4 13 OUT RST for the counters Mnemonic Mnemonic Function Format and Devices and OUT Final logic operation type Function OUT coil drive KorD RST Reset a bit device ReSeT permanently OFF CO carries on increase count for the Programming OFF ON of X011 When reach the set value K10 output contact CO activates Afterwards even X011 turns from OFF to ON counter s current value will not change output contact keep on activating To clear this let X010 be the activate status and reset the output contact It s Counter used for power cut retentive Even when power is cut hold the current value and output contact s action status necessary to assign constant K or indirect data register s ID behind OUT instruction and reset status
153. n return the test value as 0 The correspond X number with the pulse output of frequency testing Model X 14 points X2 X3 XC3 series 24 32 points Xl X11 X12 48 60 points X4 X5 32 points X3 48 60 points Xl X11 X12 XC5 series 244 E FL RUA a HUS 5 P EO ZR 6 6 Precise Time Suitable Model XC3 XC5 16 bits instruction STR 32 bits instruction E gt Word eem e DT eee Bit 991A9p 9 qeymg KAY Device Tae Mah m STR T 00 K100 T600 Yo gt 1 RST T600 Timer s number The bound T600 T618 T600 T602 T604 T6182 The time value This instruction is the precise time instruction with the cycle of 1ms Precise timer is 32 bits the count value s bound is 0 2 147 483 647 When X000 turns from OFF to ON timer T600 starts to time when time accumulation reaches 100ms T600 set if X000 again turns from OFF to ON timer T600 turns from ON to OFF restart to time when time accumulation reaches 100ms T600 again reset See the following chart SFC graph of the preceding program is X0 T600 100ms 100ms MO 245 E FLIER SUAS o AN CUR Sg P EO ZR Precise Time When precise time reaches the count value a correspond interrupt tag will be generated some interrupt subroutines can be executed Interruption E
154. nds 635 points Counter 16 bits counter set value K0 32767 CC 32 bits counter set value KO 2147483647 Self diagnose function Power on self diagnose Monitor timer grammar check 291 BUR 8 4 2 Softunit s bound FELIS Ait Nn LE UA Sy Pe SC Soft unit s bound Bound Points Mnemonic Name i 32 points 48 60 points 32 points 48 60 points X Input relay X000 X021 o 18 points 28 36 points Y Outputrelay Y000 Y015 10070 l4points 204 points MO0 M2999 M3000 M7999 8000 M Interior relay M8000 M8511 for special using 512 S Flow S0 S511 S512 81023 1024 TO T99 100ms not accumulation T100 T199 100ms accumulation T200 T299 10ms not accumulation T Timer T300 T399 10ms oe 620 T400 T499 lms not accumulation T500 T599 lms accumulation T600 T618 lms with interruption precise time C0 C299 16 bits forth counter C Counter C300 C589 32 bits forth back counter 635 C600 C634 high speed counter D0 D3999 D4000 D7999 8000 D Data Register f For special usage D8000 D8511 512 B FlashROM FD0 FD1535 4096 Register For special usage FD8000 FD8009 1024 292 ELD FEL IIIA HA A A AiR Memo 293 294 LEUR IAS n Nn H ILS Sb SA
155. ne TAN Tangent TCMP Time Compare TZCP Time Zone Compare Clock TADD Time Add Operation TSUB Time Subtract TRD Read RTC data TWR Set RTC data 143 BEARD HE 5 2 Reading Method of Applied Instructions Understanding method of instruction understanding In this manual the applied instructions are described in the following manner Addition Operation ADD 1 16 bits instruction ADDe 32 bits instruction DADDe 1 991A3q apqeyMsg 6 wu C 313 2 nin KA DX pv Bu p8 TD CD P FD evice 8 T C Dnm 5 7 roto 2 6D GD GY7 D10 D12 gt D14 8 The data contained within the two source devices are combined and the total is stored in the Note 9 1 12 13 14 S Source operand its content won t change after executing the instruction specified destination device Each data s highest bit is the sign bit O stands for positive 1 stands for negative All calculations are algebraic processed 5 8 3 If the result of a calculation is O the 0 flag acts If the result exceeds 323 767 16 bits limit or 2 147 483 647 32 bits limit the carry flag acts refer to the next page If the result exceeds 323 768 16 bits limit or 2 147 483 648 32 bits limit the borrow flag acts Refer to the next page When carry on 32 bits operation word device s low 16 bits are assigned the dev
156. nment of the data The related The data register of XC series PLC is a single word 16 bit data register single word data only engross one data register which is assigned by single word object instruction The disposal bound is Dec 327 68 327 67 Hex 0000 FFFF description Single word object instruction D NUM D NUM Object data Double word 32 bit engrosses two data register it s composed by two consecutive data registers the first one is assigned by double word object instruction The dispose bound is Dec 214 748 364 8 214 748 364 7 Hex 00000000 FFFFFFFF Double word object instruction D NUM 1 D NUM Instruction D NUM Object data Object data The denote way of 32 bits instruction If an instruction can not only be 16 bits but also be 32 bits then the denote method for 32 bits instruction is to add a D before 16 bits instruction Eg ADD DO D2 D4 denotes two 16 bits data adds DADD DIO DI2 D14 denotes two 32 bits data adds Instructions list of 16 bits and correspond 32 bits 74 RADI RE 16 bits 32 bits WTD FLT DFLT INT DINT BIN DBIN Data convert ASC HEX DECO ENCO ENCOL ECMP EZCP EADD ESUB Float EMUL operation EDIV ESQR SIN COS TAN TCMP TZCP Clock TADD
157. nt caused by the following operation the preceding data operate with binary 16 bits integer plus The redundant is 2 bytes the low byte is ahead the high byte is behind Write instruction s CRC check code is parameter s to write code 256 67 parameter s to write value ADDR The parameter s to write value is indicated by Hex binary integer No matter write or read the instruments will return the following data The test value PV the given value SV the output value MV and alarm status read written parameter s value CRC check code PV SV and the read parameter s value should be integer format each engrosses 2 bytes MV engrosses one byte the data bound is 0 220 the alarm status engrosses one byte CRC check code engross 2 bytes the total is 10 bytes CRC check code is PV SV alarm status 256 MV parameter s value ADDR the redundant caused by the integer plus the detailed format please refer to AIBUS communication protocol description IIl Compile communication program After power on the program read the current temperature value every 40ms In this period the user could also write the set temperature value Data area definition send data buffer area D10 D19 Accept data buffer area D20 D29 Instrument s station ID D30 Read command s value D31 52 H Write command s value D32 43 H Parameter s code D33 Temperature setting D34 CRC check code D36 Temperature display D200 D201 265 Ha i
158. nter as power cut retentive counter s current value output contact s action and reset status cut power retentive 32 bits counter can also be used as 32 bits data register But 32 bits data register can t be used as device in 16 bits applied instructions Assign 16 bits counter method of the set value Constant assignment K P Cm K100 Indicate assignment CK X000 MOV K100 D5 X001 C o Bs 41 TR TOPE ITE A Be 32 bits counter Constant assignment K X001 5 K43 100 Indicate assignment K X000 4F 4 DMOV K43100 DO X001 DO D1 The count The count mode of counters TO T599 is 16 bits linear increment mode 0 K32767 When counter s count value reaches the max value K32767 the counter will stop counting the counter s status will remain value 42 TROT EI YE A f 3 7 Some Points to Note Action order of input output relay and response delay Input disposal Before PLC executing the program read all the input terminal s ON OFF status of PLC to the image area In the process of executing the program even the input changed the content in the input image area will not change However in the input disposal of next scan cycle read out the change Output disposal Once finish executing all the instructions transfer the ON OFF status of output Y image area to the output lock memory area This will be the ac
159. nters are used for PLC s interior signals usually their response speed is below 10Hz Used for high speed count For power failure retentive use 32 bits counter For plus minus count count bound 2 147 483 648 2 147 483 6487 Single phase plus count single phase plus minus count AB phase count allocate to the special input points High speed counter can count with the frequency below 200kHz independent with the PLC s scan cycle Data register D Data register is the soft unit used by data register to save data XC series PLC s data registers are all 16 bits The high bit is the sign bit Combine two registers can carry on 32 bits data disposal The high bit is the sign bit Just the same with other soft units data registers can also be divided to be two types for common use and power failure retentive use Constant K H In the diverse value used by PLC K means decimal integer H means Hex Value They are used to be the set value and current value for the timer and counter or applied instructions operands Pointer P D Pointers are used for branch and interrupt The pointer P used by branch is the jump aim used for condition jump or subroutine jump Pointer used for interrupt is used for the assigned input interrupt time interrupt 31 TR TOPE E A f 3 2 Device s ID List For the allocate of device s ID please see the following list Besides when connect input output exp
160. ntity of consecutively occurring data elements can be copied to a new destination The source data is identified as a device head address S and a quantity of consecutive data elements n This is moved to the destination device D for the same number of elements n If the quantity of source device n exceeds the actual number of available source devices then only those devices which fall in the available range will be used If the number of source devices exceeds the available space at the destination location then only the available destination devices will be written to n re omo Ik BMOV D5 DI 0 K3 D5 m DI D6 m Di n 3 D7 m DI The BMOV instruction has a built in automatic feature to prevent overwriting errors from occurring when the source S n and destination D n data ranges coincide This is clearly identified in the following diagram NOTE The numbered arrows indicate the order in which the BMOV is processed X1 X2 F BMOV D10 D9 K3 H BMOV D10 D11 K3 DI D9 DII DI DI DII DI0 e DII DII DI DI DI 88 READ RE FMOV Suitable Models 16 bits instruction FMOV 32 bits instruction XCl XC3 XC5 LK H DX oy ow Jos TD CD D Jr cec oH Word A Device y c S Bi Device
161. oY p os a k s ______ Device Device Function amp Action ES OM DO gt DII D10 Single Word Double Word WTD DO DI 0 0orl po DI DI 0 When single word DO is positive integer after executing this instruction the high bit of double word D10 is 0 When single word DO is negative integer after executing this instruction the high bit of double word D10 is 1 183 FLT amp FLTD 16 bits instruction FLT 32 bits instruction DFLT Word GN aoe x oy ow DS jTD CD D FD Device 3 X Y Device Function amp Action 16 Bits HR FLT D10 DI D10 D13 D12 BIN integer Binary float point 32 Bits 2 DFLT DI f DI D11 D10 D13 D12 BIN integer Binary float point 64 Bits I 4 FLTD DI 0 Di4 D13 D12 D11 D10 gt D17 D16 D15 D14 BIN integer Binary float point RRD RE Suitable Models XC3 XC5 Convert BIN integer to binary float point As the constant K H will auto convert by the float operation instruction so this FLT instruction can t be used The instruction is contrary to INT instruction INT 16 bits instruction 32 bits instruction INT a Suitable Models XC3 XC5 RADI RE aon Word xm DX DY DM PDs TD o D FD Device 7 3 Device Function amp Action 16 f Ro omc
162. oints 100mS timer Set time 0 1 3276 7 seconds 10mS timer Set time 0 01 327 67 seconds 1mS timer Set time 0 001 32 767 seconds 635 points 16 bits counter set value KO 32767 32 bits counter set value KO 2147483647 8512 words 2048 words High speed count pulse output external interrupt 0 99mS Note If choose PLC Operation Secret Download User program s capacity 6 bits ASCII Power on self diagnose Monitor timer grammar check XC AJ PLC BG 1 5 Shapeand Size Exterior Size XC1 series 16 points main units XC3 series 14 points main units Including 16 points expansions 0123 4567 XC3 14RT E PIRO 1u04328 3 efuix 9922 0 900 NS 110 102 0Lv09002 31VQ 3 uL E0X 3dAL p37 09 o A Yo LCOWO Bel eae ONT T Ys a a I aT i i E XC1 series 32 points main units Including 24 points main units XC3 series 32 points main units Including 24 points main units 32 points expansions XCS5 series 32 points main units 139 131 O e P P d PP IGT IG Gta f d db IN e om x IX 13 x7 x11 Xs x15 X17 id Coo xo
163. one MCR Denotes the end of T YO Master control Reset a master control block Devices None After the execution of an MCS instruction the bus line LD LDI shifts to a point after the MCS instruction An MCR instruction returns this to the original bus line MCS MCR instructions should use in pair The bus line could be used nesting Between the matched MCS MCR instructions use matched MCS MCR instructions The nest level increase with the using of MCS instruction The max nest level is 10 When executing MCR instruction go back to the upper bus line Whenuse flow program bus line management could only be used in the same flow When end some flow it must go back to the main bus line xi x2 gs LD XI Mi MiB MCS Bus line starts Y1 LD X2 M2 OUT YO LD MI MCS s line nest LD M3 OUT YI LD M2 OUT Y2 MCR MCR Bus line back AE AK MMPS Bt Mnemonic and Function Description Program Mnemonic Function Format and Devices ALT The status of the assigned E ALT M0 Alternate devices inverted on every status operation of the instruction Devices Y M S T C Dn m The status of the destination device is alternated on every operation of the ALT instruction MI 00 1 ALT MO MO YO MO YI LDP ALT LD OUT LDI OUT 59 JEJE RA LH 4 11
164. ot 00g bog 4o 4d if oF FE 4 d od 4 0g 1 ot 0g bor X bt d r ED 4 yf a E 0d gd f b 3 Io 00g p d o4 C4 d Y d Y d Eo dod dob Gode Dog de god wo BOE 0E dh xl o t1 1 1 141 1 1 141 1 1 141 1 1 1 1 1 1 1 gt Decrement count T T T T T A T T T T i T I T p of poo Fo 00g I 4 Io 00g Ed d 4d b od P oy OR ob d 4 I 4 I jy f 4 I 4 I 4 LEP LEP LEP B Bf a 4o d dodo d eh a tds E 1 dl l bp 00g b oo X dd s P Eak Ub 4 0B 4d o 00g 3 0g 1 ot 00g Poh Woo 4 Wo B b qo Wd Ob odd b 3 o od gd f bl 00g Lo o o cp eh b b do oe C4 b wow 4 do do Roh GEL do d od cdb MOOR bb o 4 d d 1 1 1 1 1 1 91 edo o1 1 141 lt i In the condition of testing the same pulses by the counter the count value equals four times under four times frequency mode of that under one time frequency mode FD8241 The setting method of 4 times frequency mode Times of C630 frequency 1 is 1 time frequency 4 is 4 times frequency FD8242 Times of C632 frequency 1 is 1 time frequency 4 is 4 times frequency FD8243 Times of C634 frequency 1 is 1 time frequency 4 is 4 times frequenc 219 RADI He 6 2 Pulse Output Pulse Output Function Normally XC3 series and XC5 series PLC have 2 channels pulse output Via different instruction to program you can realize single dire
165. ouldn t combined to be word device 4 T C means the difference of register s word and bit To T and C register Tn Cn means be a bit register or a word register should be distinguished by the instructions T C could denote the status of timer counter or the current value of time counter it is distinguished by the instructions X0 Tl K 9 MO MOV TII DO TI 1 uu In the preceding example MOV T11 DO T11 means word register LD T11 T11 means bit register 5 Tagtype P I e g P means the tag which using CJ instruction or CALL instruction which could jump I means interrupt tag 36 TR TOTES YE A f 3 5 Timer s Number and Function T Please see the following table for the timer s T number the number is assigned according to Hex 100ms not accumulated 16 bits TO T99 100ms accumulated 16 bits T100 T199 10ms not accumulated 16 bits T200 T299 10ms accumulated 16 bits T300 T399 Ims not accumulated 16 bits T400 T499 Ims accumulated 16 bits T500 T599 The timer accumulates clock pulse of Ims 10ms 10ms inside PLC When Function reach the set value the output contact activates The common timers don t set exclusive instructions use OUT instruction to time use constant K in the program memory also you could use register s content D to indirect assign If drive input X000 of time coil T200 X0 Q K200 is ON T200 accumulates
166. ount the defaulted is 0 282 ELV FEL EUR d A in LEUR s AAR Counter s ID Function Description The current segment means C600 No n segment C602 The current segment C604 The current segment C606 The current segment C608 The current segment C610 The current segment C612 The current segment C614 The current segment C616 The current segment C618 The current segment C620 The current segment C622 The current segment C624 The current segment C626 The current segment C628 The current segment C630 The current segment C632 The current segment C634 The current segment C636 The current segment C638 The current segment 283 ELV FEL IU HA n OS s AAR High frequency pulse ID Function Description PULSE 1 The low 16 bits of accumulated pulse number The high 16 bits of accumulated pulse number The current segment means No n segment PULSE 2 The low 16 bits of accumulated pulse number The high 16 bits of accumulated pulse number The current segment means No n segment PULSE 3 The low 16 bits of accumulated pulse number The high 16 bits of accumulated pulse number The current segment means No n segment PULSE 4 The low 16 bits of accumulated pulse number The high 16 bits of accumulated pul
167. ount format of Timers TO T599 is 16 bits linear increment mode 0 K32 767 If the timer s count value reaches the maximum value K32767 the timer will stop timing the timer s status will remain the same status Output delay on off timer X0 T2 YO AP X0 Pom s When X000 is ON output Y 000 X0 YO 12 s If X000 changes from ON to be OFF T2 20 seconds will be delayed then will output Y 000 cut Flicker Tl T2 TI If X000 activates Y000 starts flicker output T1 controls the OFF time of Y000 T2 controls the ON time of Y000 TBR TOPE ITE IRIURE 3 6 Counter s ID and function C For the counter s number C please refer to the following table Counter s ID Counter s characters 16 bits positive counter C0 C299 32 bits positive negative counter C300 C598 C300 C302 C598 Each one engrosses 2 counter No The number must be even High speed counter C600 C634 C600 C602 C634 Each one engrosses 2 counter No The number must be even The characters of 16 bits counter and 32 bits counter are shown below Items value register Count direction The set value The assigned set Changing of the current value Output contact Reset activates The current value 16 bits counter 32 bits counter Positive Positive negative 1 32 7
168. our of clock data CS 1 Assign the Minute of clock data CS 2 2 Assign the Second of clock data 0 D 1 D42 According to the compare result the 3 devices output ON OFF The valid range of Hour is 0 23 The valid range of Minute is 0 59 The valid range of Second is 0 59 205 ADI HE TZCP Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 Word CD xeu x px px os t 6 T P 6 Device Bit Device K Function amp Action Compare the two assigned time with time data 2 S D La 62 oe TCZP D20 D30 DO MO Ge MO D20 Hour Hour Minute gt Hinute Second Second n DO Hour our Dl mimt S linute D2 Second Second M2 DO Hour D3Q Hour Minute gt D31 Tinute T Second D Second The status of the destination devices is kept even if the TCMP instruction is deactivated Compare the 3 clock data start from s with the two ends on the clock compare bound according to the area bound output the three ON OFF status starts from SU S 1 si 2 Assign the compare low limit in the form of Hour Minute and Second SI s2 i 2 1 2 42 Assign the compare low limit in the form of Hour Minute and Second S 2 ram 1 S 2 Assign the clock data in th
169. p WXOR Suitable Models 16 bits instruction WAND WOR 32 bits instruction DWAND DWOR X XC3 XC5 xg yx Tov ou Tos Tr Tor TP Fa kc sr G2 Device Device Function amp Action Execute logic AND operation with each bit M 0 amp 0 0 0 amp 1 0 WAND DI 0 DI 2 Di4 1 amp 0 0 1 amp 1 1 Execute logic OR operation with each bit Sr S2 D X0 2 Co 0 or 0 0 Oor 1 1 WOR DI 0 DI D 4 l or0 1 lorl l Execute logic Exclusive OR operation with each bit GO WXOR DI 0 DI D 4 0 xor 0 0 0xor1 1 1 xor 0 1 1 xor 1 0 If use this instruction along with CML instruction XOR NOT operation could also be executed SI S2 D P Ik WXOR DI 0 DI D 4 CML DI 4 Di 4 101 RADI He CML Suitable Models 16 bits instruction CML 32 bits instruction DCML XCl XC3 XC5 K Hj DX pv ow jps TD CD D Jr s Word Cs Device K N Device Function amp Action x L2 CML DO DYO A copy of each data bit within the source device is inverted and then moved to the designated destination Each data bit in the source device is inverted 0 gt 1 1 gt 0 and sent to the destination device If use constant K in the source device it can be a
170. ppendix 8 4 XC5 using description Memo 1 Summary of XC series PLC XC series PLC are mini type PLC with powerful function This series products can satisfy diverse control requirement With compact design excellent extend capability cheap price and powerful function XC series PLC has become perfect solution of small size control 1 5 Shape and Size 1 6 Terminal arrangement 1 7 Communication ports definition 1 1 Summary of XC series PLC and program format 6 XC AYI PLC IUDAS XC series programmable controller Introduction 1 0 14 60 points FlashROM memory inside Realtime clock With clock inside Li battery power drop memory Multi COM ports can connect with inverters instruments printers etc Richinstructions convenient to program Program Statement Program Statement program is the format which use LD AND OUT etc these Format SFC instructions to input This format is the basic input form to compile the SFC program But it s not convenient for understanding E g Step Instruction ID 0 LD X000 1 OR Y005 2 ANI X002 3 OUT Y005 Ladder Program Use sequencial control signal and soft unit s ID to draw the sequencial circuit s graph on the screen which is called ladder program As this method uses trigger point s symbols and coil symbols to denote the sequencial control circuit so it is easy to understand the program s contents At the same time it s
171. put terminal and COM terminal with contacts without voltage or NPN open collector transistor if input is ON LED lamp lights which indicates input There are many COM terminals to connect in PLC Input circuit Use optical coupling instrument to insulate the input once circuit and twice circuit There s a C R filter in the twice circuit It is set to avoid wrong operation caused by vibration of input contacts or noise along with input signal As the preceding reason for the changing of input ON OFF OFF ON in PLC the response time delays about 10ms There s a digital filter inside XO00 X015 This kind of filter can very from 0 15ms according to the special register D8020 Input sensitive The PLC s input current is DC24V 7mA but to be safe it needs current up to 3 5mA when it s ON lower than 1 5mA when it s OFF 20 FLUR FELT DIE HA A OS s P RC 2X XC series PLC s input power is supplied by its interior 24V power so if Exterior use exterior power to drive photoelectricity sensor etc this exterior power should be DC24V AV please use NPN open collector type for sensor s output transistor aivanit noad Dc24v Input Connection Sensor z provide power Sensor o o PLCnainframe Switch Extend unit Sensor 21 mj ER UR HERI UE dA d CRUS Sh REC 2 5 Output Specification Relay output Interior power Below
172. rage area even battery drop data could be stored So it could be used to store important technical parameters 2 Written of FWRT needs a long time about 150ms so frequently operate this operation is not recommended 3 The written time of FlashROM is about 1 000 000 times So we suggest using edge signals LDP LDF etc to trigger X Frequently written of FlashROM will ruin FlashROM forever 90 ADI RE MSET Suitable Models 16 bits instruction MSET 32 bits instruction XCl XC3 XCS PRAY DR Du os 73 TO T 5 5 Device E EL COC Device Suitable Models 16 bits instruction ZRST 32 bits instruction XCI XC3 XCS Word E hes LERIECIS Tor To r9 Te T 71 evice kK gt Ed Device Function amp Action oy A x MSET MI 0 MI20 Zone Set Unit M10 M120 9 ZRST M500 M559 Zone Reset Bit Unit M500 M559 Come ZRST DO D100 Zone Reset Word Unit DO D100 e Are specified as the same type of soft units and DI lt When gt only reset the soft unit specified in As soft unit s separate reset instruction RST instruction can be used Other Reset 2 2 to bit unit Y M S and word unit T C D Instruction As fill move for constant KO 0 can be written into DX DY DM DS T C D Xl l ST MO Reset MO ST TO Reset the current value and
173. repeat executing the program from step 0 When debug insert END in each program segment Output disposa to check out each program s action Then after confirm the correction of preceding block s action delete END instruction Besides the first execution of RUN begins with END instruction When executing END instruction refresh monitor timer Check if scan cycle is a long timer 63 JEJE RA LH 4 15 Items To Note When Programming 1 Contacts structure and step number Even in the sequencial control circuit with the same action it s also available to simple the program and save program s steps according to the contacts structure General program principle is a write the circuit with many serial contacts on the top b write the circuit with many parallel contacts in the left 2 Program s executing sequence Handle the sequencial control program by From top to bottom and From left to right Sequencial control instructions also encode following this flow 3 Dual output dual coil s activation and the solution If carry on coil s dual output dual coil in the sequencial control program then the backward action is prior Dual output dual coil doesn t go against the input rule at the program side But as the preceding action is very complicate please modify the program as in the following example X0 2 fi MO X3 X4 MI Mo YO MI
174. rtime Unit 1ms ID of Excursion register D 278 ELD FEL IU HA in LH UR s Sb a 2X Function Description RS232 is sending flag RS232 is receiving flag Receive imperfect flag Receiving finished normally but the received data is less than the required Receive error flag Receive correct flag Timeout judgment flag RS232 is sending flag RS232 is receiving flag Receive imperfect flag Receiving finished normally but the received data is less than the required Receive error flag Receive correct flag Timeout judgment flag RS232 is sending flag RS232 is receiving flag Receive imperfect flag Receiving finished normally but the received data is less than the required Receive error flag Receive correct flag Timeout judgment flag 2779 280 COM3 LU FL I ADH A AiR Function Description Data number received by RS232 Communication error code 7 hardware error 8 CRC check error 9 bureau ID error 10 no start sign 11 no end sign 12 communication time out Data number received by RS232 Communication error code 7 hardware error 8 CRC check error 9 bureau ID error 10 no start sign 11 no end sign 12 communication time out D81
175. rupt disposal with the high speed pulse from special input points So it is independent with the scan cycle the count speed can reach 200KHz gt Convenient MODBUS communication instructions With Modbus communication instruction PLC can easily communicate with every kind of peripheral device as long as they have Modbus protocol High speed pulse output The main units have two routes pulse output output can be sequencial segments each segment of pulse number could be set freely The pulse could reach 400KHz XC series PLC are divided into XC1 XC3 XCS5 these three sub series XC1 economic type This sub series has specifications of 16 I O 24 I O 32 I O The function is simple suitable for common small scale applications They don t support high speed count pulse output free communication these advanced functions also they can not connected with the expansions For the details please refer to the appendix 8 3 XC1 using description XC3 Standard type This sub series belongs to the standard models of XC series PLC They could fulfill most using requirements If no special demonstrate this manual s content are all written for XC3 series PLC XC5 strength type This sub series has specifications of 32 I O 48 I O 60 I O Besides the functions of XC3 PLC XC5 32 has function of 4 channels pulse output XC5 48 XC5 60 support CANBUS instructions they can realize CAN bus network function For the details please refer to the a
176. s similar with other interrupt subroutines It must be written behind the main program start with I40xx instruction end with IRET There are 10 routes time interruption the denote method is I40 49 means time interrupt s time the unit is ms E g I4010 means execute the first route s interruption every 10ms Table of interruption tag Interruption tag Disable interruption Instruction Description 140 M8056 141 M8057 142 M8058 143 44 145 146 147 148 149 denotes the time of time interrupt The bound is 1 99 unit is ms FE JE FELIS ELAS Hey AN HS E P ERU Limitation of interruption s bound Normally time interruption is in the status of enable Use EI Dl instructions can set enable interruption disable interruption bound See the preceding graph in DI EI section all time interruption are disabled while beyond DI EI section all time interruption are enabled E D Enable interruption DI l a gt Disable interruption EI n Enable interruption FEND 14010 Co i Interrupt subroutine IRET Disable Interruption LL tri B For the first 3 routes time interruption EI special relay of disable interruption is B MO o giv
177. s in a value less than 00 00 00 hours the value of the result is the time remaining below 00 00 00 hours When this happens the borrow flag M8021 is set ON Sl S2 D 10 Hour 18 Hour 4 Hour 20 Minute 10 Minute 30 Minute 5 Second 30 Second 35 Second 10 hour 20 min 5 sec 18 hour 10 min 30sec 4 hour 30 min 35 sec When the result is 0 0 hour 0 min 0 sec zero flag set ON The valid range of Hour is 0 23 The valid range of Minute is 0 59 The valid range of Second is 0 59 136 ATI HE TRD Suitable Models 16 bits instruction DIV 32 bits instruction DDIV XC3 XC5 T K 9 oe Den DY 3 25 3 TC L5 T53 7 Device Device Function amp Action The current time and date of the real time E clock are read and stored in the 7 data KS TRD D0 devices specified by the head address D Read PLC s real time clock according to the following format The reading source is the special data register D8013 D8019 which save clock data Unit Item Clock data Unit Item ZL D8018 Year 0 99 DO Year amp D8017 Month 1 12 DI Month B B D8016 Date 1 31 gt m Date 2 D8015 Hour 0 23 D3 Hour aa d D8014 Minute 0 59 D4 Minute 3 D8013 Second 0 59 DS Second 2 D8019 Week 0 Sun 6 Sat D Week
178. se note this point 95 READ RE SUB 16 bits instruction SUB 32 bits instruction DSUB Suitable Models XCl XC3 XC5 KH Dx pv ow fps TD CD D Jr k gt mme Device 5i Device X0 DIO D12 gt D14 un E e t z e i e S1 appoint the soft unit s content subtract the soft unit s content appointed by S2 in the format of algebra The result will be stored in the soft unit appointed by D 5 8 13 The action of each flag the appointment method of 32 bits operation s soft units are both the same with the preceding ADD instruction The importance is in the preceding program if X0 is ON SUB operation will be executed every scan cycle The relationship of the flag s action and vale s positive negative is shown below Zero flag Zero flag Zero flag K c7 yy 2 1 0 32 768 0 1 32 767 0 1 2 e NN A Borrow flag Data s y iN Data s highest highest bit is N f 5 is 0 Tero flag A lx P 147 483 648 EP E px 2 147 483 ED 1 2 Lea 7 Borrow flag Carry flag Zero flag Carry flag 96 KRIE MUL Suitable Models 16 bits instruction MUL 32 bits instruction DMUL XCl XC3 XC5 eg yx Tov ou Tos Tr Tor T 5 Fo l EL m sr e Device Device Function amp action 16 bits operation SI S2 D 3m GD
179. se number The current segment means No n segment Only XC5 32RT E 4 pulse have D8190 PULSE The low 16 bits of accumulated pulse number D8191 The high 16 bits of accumulated pulse number D8192 PULSE 2 The low 16 bits of accumulated pulse number D8193 The high 16 bits of accumulated pulse number D8194 PULSE 3 The low 16 bits of accumulated pulse number D8195 The high 16 bits of accumulated pulse number Only XC5 32RT E 4 D8196 PULSE 4 The low 16 bits of accumulated pulse number eet D8197 The high 16 bits of accumulated pulse number 284 Type ID as register Max LI O channels ELV FEL IU HA in OS Ahi Expansion 1 Input switch quantity X X100 X137 32 points Output switch quantity Y Y100 Y 137 32 points Input analog ID ID100 ID131 16 channels Output analog QD QD100 QD131 16 channels Module s set value D D8250 D8259 Expansion 2 Input switch quantity X X200 X237 32 points Output switch quantity Y Y200 Y237 32 points Input analog ID ID200 1D231 16 channels Output analog QD QD200 QD231 16 channels Module s set value D D8260 D8269 Expansion 3 Input switch quantity X X300 X337 32 points Output switch quantity Y Y300 Y337 32 points Input analog ID ID300 1D331 16 channels Output analog QD QD300 QD331
180. si H ELE TU JUR AN n ee SUAS P PESCA Format of sending data 81H 81H 43H 00H c8H 00H OcH 01H display of the current temperature Setting of communication parameters baud rate 9600 8 bits data bit 2 bits stop bit no check Set FD8220 255 FD8221 5 Note both the host machine and the slave machine should use the version higher than V2 4 266 FEL UE FEL IU HA A OS 5s P REC X MOY Ki D30 T200 K4 MOV D33 D13 MOV KO Di4 MOV D52 D56 ROR D56 KG WAND D56 HFF DIT 267 FLUR FELT IU A a CH UR 5s P REC X 1 MOV H43 D32 D32 write command value MOV D32 D12 MOV D33 D13 HOY D34 D42 D34 temperature setting MOV D52 D156 ROR D56 KG WAND D56 HFF DIT 268 FEL UE FELT IU HA a CH UR 5s P REC 2X Mo SEND D10 Ko K2 M5132 RCV D20 K10 K2 M8134 BMOV D20 D100 Kio ROL D101 KG YOR D101 D100 D200 ROL D103 Ke WOR D102 D103 D201 269 Memo 270 8 Appendix This chapter gives some auxiliary information of XC series PLC 8 1 List of special auxiliary relay special data register 8 2 List of Special FLASH data register SFD 8 3 Brief Introduction of XC1 series PLC 8 4 Brief Introduction of XC5 series PLC ELUS FLEURS rA dr He SS 5 SS 271 272 LEUR IAS n Nn H ILS Sb SA LU FEL IA HA Hn OS AiR 8 1 Listof special auxiliary relay special data re
181. ss it is modified with either the pulse suffix or a controller interlock D25 D22 overflow D21 D18 D25 D22 D17 D14 D21 D18 D13 D10 D17 D14 D 3 D 0 gt D13 D10 Word shift left S p nl n2 xo Pe war DO D10 K16 K4 e ooo n2 words D3 p2 Di Do left shift Je LIN S S S D25 D24 p23 p22 b21 bp20 D19 b18 b17 D16 D15 b14 D13 p12 b11 D10 Bus Ro RL IS ou Word shift right D13 D10 overflow D17 D14 D13 D10 D21 D18 gt D17 D14 D25 D22 D21 D18 D 3 D 0 D25 D22 H s 2 nl n2 wan po v1 sas x Inevery scan cycle loop shift left right action will be executed D3 D2 D1 D0 n2 words right shift D25 p24 D23 p22 D21 D20 D19 D13 D17 p16 D15 D14 D13 p12 D1 p10 000080 181 KIRDE 5 8 Data Convert Mnemonic Function WTD Single word integer converts to double word integer FLT 32 bits integer converts to float point FLTD 64 bits integer converts to float point INT Float point converts to integer BIN BCD convert to binary BCD Binary converts to BCD ASC Hex converts to ASCII HEX ASCII converts to Hex DECO Coding ENCO High bit coding ENCOL Low bit coding 182 RRD RE WTD 16 bits instruction WTD 32 bits instruction Suitable Models XC3 XC5 xap
182. t EMUL K100 D100 D110 K100 x D101 D100 D111 D110 Binary converts to Floating Binary Floating Binary Floating 126 PADI HE EDIV 16 bits instruction 32 bits instruction EDDIV Suitable Models XC3 XC5 wea 300 s 81 K 3 pun REDE Des To D Tr evice 7 R E Device Function amp Action X0 I EDIV DI 0 D20 D50 D11 D10 D21 D20 D51 D50 Binary Floating Binary Floating Binary Floating The floating point value of S1 is divided by the floating point value of S2 The result of the division is stored in D as a floating point value No remainder is calculated Ifaconstant K or H used as source data the value is converted to floating point before the addition operation X1 L EDIV DI 00 K100 D110 D101 D100 K100 D111 D110 Binary Floating Binary converts to Floating Binary Floating IfS2 is zero then a divide by zero error occurs and the operation fails 127 PARTI HE ESQR Suitable Models 16 bits instruction 32 bits instruction ESQR XC3 XCS wed EAS ux xm DX Dy py DS jTD o D FD Device x X Y Device Function amp Action X s D11 D10 D21 D20 ES QR DI D20 Binary Floating Binary Floating k A square root is performed on the floating point value in S the result is stored in D Ifa constant
183. t Parallel comparison contact Active when the comparison S1 S2 is true 153 RADI RE Initial Comparison LD O Suitable Models 16 bits instruction Refer Below 32 bits instruction Refer Below XCI XC3 XC5 k 7 gt wed Gr bere REDE DY Dos T TG T 2 THE evice Device Instruction amp Function The value of S1 and S2 are tested according to the comparison of the instruction If the comparison is true then the LD contact is active If the comparison is false then the LD contact is not active 16 32 Active gt Inactive bits bi condit conditi ts 10n on LD DLD CSI S2 SI S25 LD DLD gt S1 gt S82 SI lt 82 LD DLD lt SI lt 82 S1 2 82 LD DLD lt gt SI S25 S1 S2 LD DLD lt SI lt 82 SI gt S2 LD DLD gt SI 2 82 SI lt S2 brogcum D Kioo Co X0 D gt Doo Ki i SET y DLD gt K68899 C300 Mi 154 RADI HE When the source data s highest bit 16 bits b15 32 bits b31 is 1 use Note Heats the data as a negative The comparison of 32 bits counter C300 must use 32 bits instruction If assigned as 16 bits instruction it will lead the program error or operation error Serial Refer Below AND O Suitable Models 16 bits instruction Refer Below 32 b
184. t 0 1ms Max vale of scan time Unit 0 1ms Second clock 0 59 BCD code format Minute clock 0 59 BCD code format Hour clock 0 23 BCD code format Date clock 0 31 BCD code format Month clock 0 12 BCD code format Year clock 2000 2099 BCD code format Week clock 0 Sunday 6 Saturday BCD code format Function Description Model Low byte Serial number High byte Compatible system s version number Low byte System s version number High byte Compatible model s version number Low byte Model s version number High byte Model s information Max 5 ASC and a 0 Suitable host machine version 2775 ELD FEL I AHR OS AAR Function Description PLC initializing Non retentive register clear Retentive register clear When driving this M ON OFF image memory of Y M S TC and the current value of T C D are all cleared Register retentive stop When PLC changes from RUN to STOP leave all content in image register and data register All output forbidden Set PC s all external contacts to be OFF status Parameter setting Function Communication parameters set flag Description 276 LU FEL IU HA in LEUR AAR Function Description All output reset forbidden When mode shifting
185. t go on exterior connection or use it as relay terminal Please connect the basic unit with extend module s COM terminal HAUS LER SUES d AN d ERU 5 Fe BERG 2X 2 3 Input Specification Basic Units Input signal s DC24V 10 voltage Input signal s 7mA DC24V current Input ON current Up to 4 5mA Input OFF current Low than 1 5mA Input response time About 10ms Input signal s format Contact input or NPN open collector transistor DC Power 24v DC24V Sensor provide power O LoS j i l e CON S Circuit insulation Photo electricity coupling insulation Input action s LED light when display input ON Expansions Input signal s DC24V 10 voltage Input signal s 7mA DC24V current Input ON current Up to 4 5mA Input OFF current Below 1 5mA Input response time About 10ms Input signal s Contacts input or format NPN open collector transistor DC power DC24V a Sensor provide power Circuit insulation Photo electricity coupling insulation Input action s display LED light when input ON ETERRA d AN OS AR 2 4 DC Input Signal s Disposal AC Power Type DC input signal DC24V Sensor provide Sensor Input terminal When connect in
186. the assigned bureau s assigned input coil status to PLC s assigned coil st Far away communication bureau number Operands K TD CD D FD s Far away coil s start number Operands K TD CD D FD 5 Coil number Operands K TD CD D FD Local receive coil s start ID Operands X Y M S T C Port number Bound K1 K2 Instruction description when X0 is ON execute COLR or INPR instruction After finish executing the instruction set communication finish bit No operation when X0 is OFF If communication errors resend automatically If reach 10 times set communication error flag User can check the relative register to judge the reason 237 FE JE FEL ELAS gp AN o HS E P E 3 Single coil write COLW vr m2 sr sz X0 COLW Kl K500 MI K2 Write single coil instruction Modbus function code is 05H Function Write the assigned coil status to PLC s assigned bureau s assigned coil Far away communication bureau number Operands K TD CD D FD Far away communication bureau number Operands K TD CD D FD Csr Local receive coil s start ID Operands X Y M S T C s Port number Bound K1 K2 4 Multi coil write MCLW x or m9 Gr s MCLW Kl K500 K3 MI K2 Write multi coil instruction Modbus function code is OFH Function Write the assigned multi coil status to PLC s assigned bureau s assigned coil Far away communicat
187. the destination device D If a constant K or H used as source data the value is converted to floating point before the addition operation Xl I EAAD D100 K1234 D110 K1234 D101 D100 D111 D110 Binary converts to Floating Binary Floating Binary Floating The same device may be used as a source and as the destination If this is the case then on continuous operation of the EADD instruction the result of the previous operation will be used as a new source value and a new result calculated This will happen every program scan unless the pulse modifier or an interlock program is used 196 PADI He ESUB Suitable Models XC3 XC5 16 bits instruction 32 bits instruction ESUB E2696 SG K 3 xu xx oY ox Jos 1 TO T DA Device CDK 3 Device Function amp Action X0 I ESUB D 0 D20 D50 D11 D10 D2LD20 D51 D50 Binary Floating Binary Floating Binary Floating The floating point value of S2 is subtracted from the floating point value of S1 and the result stored in destination device D Ifaconstant K or H used as source data the value is converted to floating point before the addition operation XI I ESUB K1234 D100 D110 K1234 D101 D100 D111 D110 Binary converts to Floating Binary Floating Binary Floating The same device may be used as a source and as the destination
188. tions are algebraic processed 5 8 3 If the result of a calculation is 0 the 0 flag acts If the result exceeds 323 767 16 bits limit or 2 147 483 647 32 bits limit the carry flag acts refer to the next page If the result exceeds 323 768 16 bits limit or 2 147 483 648 32 bits limit the borrow flag acts Refer to the next page When carry on 32 bits operation word device s low 16 bits are assigned the device following closely the preceding device s ID will be the high bits To avoid ID repetition we recommend you assign device s ID to be even ID The same device may be used as a source and a destination If this 1s the case then the result changes after every scan cycle Please note this point Denote the instruction name 16 bits instruction and 32 bits instruction Denotes the soft units which can be used as the operation object Ladder Example Flag after executing the instruction Instructions without the direct flag will not display Suitable models for the instruction S Source operand its content won t change after executing the instruction Destinate operand its content changes with the execution of the instruction Suitable Models XC1 XC3 XC5e Zerow M8020 p Bomow MB021 p Carye M8022 p BEARD HE 8 Tell the instruction s basic action using way applied example extend function note items etc 71 72 ADI HE ATI RE The assig
189. tions directly to the left bus bar Or use them to define a new block of program when using ANB instruction OUT instruction is the coil drive instruction for the output relay auxiliary relay status timer counter For the input relay cannot use Can not sequentially use parallel OUT command for many times For the timer s time coil or counter s count coil after using OUT instruction set constant K is necessary For the constant K s set bound actual timer constant program s step relative to OUT instruction include the set value See the following table Timer Counter Setting bound of K The actual set value lms timer 0 001 32 767 seconds 1 32 767 10ms timer 0 01 32 767 seconds 100ms timer 0 1 32 767 seconds 16 bits counter 1 32 767 Same as the left 32 bits counter 1 2 147 483 647 Same as the left 49 JEJE RA LH X0 LD X0 XI LDI XI M1203 OUT M1203 OUT TO TO KI SP K19 TO LD TO i r OUT YI 4 3 AND ANI Mnemonic Function Format and Devices Mnemonic AND Serial connection of AND NO Normally Open 2e contacts Devices X Y M S T C Dn m FDn m ANI Serial connection of kii ANdInverse NC Normally Closed ew contacts Devices X Y M S T C Dom FDn m Use the AND and ANI instructions for serial connection of contacts TU As m
190. ts XC E16X16YR XC E16X16YT 32 points 16 points 16 points XC E32X 32 points 32 points XC E32YR 32 points 32 points 10 XC AYI PLC HMI 1 3 Expansion s constitution and ID assignment J XC series PLC can be used independently or used along with the expansions The ESTE following is the chart of a basic unit with 7 expansions mme taa e Ta ee Thinkget
191. ts 16 bits 16 bits 16 bits S1 appoints the device s content be the dividend S appoints the device s content be the divisor D appoints the device and the next one to store the result and the remainder Inthe above example if input X0 is ON devision operation is executed every scan cycle 32 bits operation E DO D2 D4 DDIV Dividend Divisor Result Remainder BIN BIN BIN BIN D1 D0 D3 D2 D5 D4 D7 D6 32 bits 32 bits 32 bits 32 bits The dividend is composed by the device appointed by SI and the next one The divisor is composed by the device appointed by S and the next one The result and the remainder are stored in the four sequential devices the first one is appointed by D Ifthe value of the divisor is 0 then an operation error is executed and the operation of the DIV instruction is cancelled The highest bit of the result and remainder is the symbol bit positive 0 negative 1 When any of the dividend or the divisor is negative then the result will be negative When the dividend is negative then the remainder will be negative RADI RE INC amp DEC Suitable Models 16 bits instruction INC DEC 32 bits instruction DINC DDEC XCl XC3 XCS K Word KH DX DY DM DS TD oo D FD Device Device Function amp Action 1 Increment INC B X0 IK INC DO DO 4 1 D
192. ttery 7 3 The serial No of input coil output relay are octal data other memorizers No are all algorism data Setting of soft unit s power failure saving area TR TOPE ITE IRIURE System s Mnemonic Set area Function defaulted value Start denotation of D power D FD8202 4000 cut save area Start denotation of M power M FD8203 3000 cut save area Start denotation of M power T FD8204 620 cut save area Start denotation of C power C FD8205 320 cut save area Start denotation of S power S FD8206 512 cut save area Memory bound of power drop D4000 D8000 M3000 M8000 Not set C320 C640 8512 81024 33 TR TOPE ITE IRIURE 3 3 Data Disposal of Programmable Controller According to different usage and purpose XC series programmable controllers use 5 types of count format For their usage and function see the following DEC DEC DECIMAL NUMBER gt The set value of timer and counter K constant gt The ID of auxiliary relay M timer T counter C status CS Soft unt s number gt Assignthe value in the operands and instruction s action K constant HEX HEX HEXADECIMAL NUMBER gt The same with DEC data it is used to assign the value in the operands and instruction s action H constant BIN BIN BINARY NUMBER gt Justas said before carry on data allocation to timer counter or data register in the format of DEC or Hex But in the PLC these data are
193. tual output of the PLC The contacts used for the PLC s exterior output will act according to the device s response delay time When use this input output format in a batch the drive time and operation cycle of input filter and output device will also appear response delay 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 20420 25Hz input pulse can t be disposed But this condition could be improved when use PLC s special function and applied instructions Dual output Dual coils action As shown in the left map please consider XI the things of using the same coil Y003 at C Y3 Pbi many positions Y3 E g X001 ON X002 OFF C Y4 x2 At first X001 is ON its image area is ON Y3 output Y 004 is also ON But as input X002 is OFF the image area of Y003 is OFF When executing dual output use dual coil So the actual output is YOO3 OFF the back side act in prior Y004 ON 43 44 TR TOPE YEH A Be 4 Basic Program Instructions In this chapter we tell some basic instructions and their functions 4 1 List of Basic Instructions 4 2 LD LDI OUT 4 3 AND ANI 4 4 OR ORI 4 5 LDP LDF ANDP ANDF ORP ORF 4 6 Compare Instructions 4 7 ORB 4 8 ANB 4 9 MCS
194. ule s set value D D8250 D8259 Input switch quantity X X200 X237 32 points Output switch quantity Y Y200 Y237 32 points Expansion A Input analog quantity ID ID200 1D231 16 channels Output analog quantity QD QD200 QD231 16 channels Module s set value D D8260 D8269 Input switch quantity X X300 X337 32 points Output switch quantity Y Y300 Y337 32 points Expansion i Input analog quantity ID ID300 1D331 16 channels Output analog quantity QD QD300 QD331 16 channels Module s set value D D8270 D8279 Input switch quantity X X400 X437 32 points Output switch quantity Y Y400 Y 437 32 points Expansion Pe Input analog quantity ID ID400 1D431 16 channels Output analog quantity QD QD400 QD431 16 channels Module s set value D D8280 D8289 Input switch quantity X X500 X537 32 points Output switch quantity Y Y500 Y537 32 points Expansion f T Input analog quantity ID ID500 1D531 16 channels Output analog quantity QD QD500 QD531 16 channels Module s set value D D8290 D8299 Input switch quantity X X600 X637 32 points Output switch quantity Y Y600 Y 637 32 points Expansion 5 Input analog quantity ID ID600 1D631 16 channels Output analog quantity QD QD600 QD631 16 channels Module s set value D D8300 D8309 Input switch quantity X X700 X737 32 points Output switch quantity Y Y700 Y 737 32 points Expansion Input analog quantity ID ID700 1D731 16 channels Output analog quantity QD QD700 QD731 16 channels Module s set value D D8310 D8319 Inp
195. ut interruption Main program K ain program Definition of external interrupt port XC3 14 models Input Pointer s tag terminal Rising interrupt Falling interrupt Forbid interrupt instruction X7 10000 10001 XC3 24 32 models XP 18 and XC5 48 60 models Input Pointer s tag terminal Rising interrupt Falling interrupt M8050 Forbid interrupt instruction X2 10000 10001 M8050 X5 10100 10101 M8051 X10 10200 XC3 48 60 models Input Pointer s tag 10201 terminal Rising interrupt Falling interrupt M8052 Forbid interrupt instruction X11 10000 10001 M8050 X10 10100 10101 M8051 X7 Interrupt Instruction 10200 10201 M8052 247 HUS FL ES aan ERU E Sb ERO 2X Enable Interruption EI Disable Interruption DI and Interrupt Return IRET EI FEND IRET END i zs Limitation of interrupt bound EI DI 248 Interruption allow bound Interruption Interruption uondnaoju MOTT y uondniojur o qesi q Normally PLC is in the status of disable interruption if use EI instruction of allow interruption then in the process of scan the program if interrupt input
196. ut switch quantity X X1000 X 1037 32 points Output switch quantity Y Y1000 Y 1037 32 points BD Board Input analog quantity ID ID1000 ID1031 16 channels Output analog quantity QD QD1000 QD1031 16 channels Module s set value D D8320 D8329 XC Adil PLC IUDAS 1 4 General Specification General Specification Insulate voltage Up to DC 500V 2M O 1000V luS pulse per minute Ambient humidit 596 9596 COM 1 RS 232 connect with host machine HMI program or debug COM 2 RS 232 RS 485 connect with network or aptitude instrument inverters et COM 4 CANBUS COM port XC5 series 0 c 60 0 C COM 3 BD board COM port RS 232C RS 485 Can use M3 screw to fix or install directly on DIN46277 Width 35mm orbit The third type grounding can t public ground with strong power system Specifications XC3 series Item XC AYI PLC HMI 24 32 points 48 60 points Program executing format Loop scan format time scan format Both statement and ladder Dispose speed Power cut retentive User program s capaci I O points Interior coil s points M Points Timer T Spec Points Counter iid Data Register D FlashROM Register FD High speed dispose function Setting of time scan space Password protection Self diagnose function 0 5us 8512 points 620 points Use FlashROM and Li battery 2500 steps 8000 steps 81 60 Input 14 18 points Input 28 36 points Output 10 14 points Output 20 24 p
197. uto convert to be binary It s available when you want to inverted output the PLC s output Do o 1 0 1 0 1 0 1 0 o 1o TAE Symbol Bit 0 positive 1 Negative RTPRISREBRISBISBISBISBIS Y17 Y7 Y Y5 Y4 Reading of inverted input X0 The sequential control instruction in the left could be denoted by the following CML instruction cm X2 EA e CML DXO DMO ND em 102 ADI He NEG Suitable Models 16 bits instruction NEG 32 bits instruction DNEG XCl XC3 XC5 O Word ums KH DX DY DM ps TD CD D jr evice Device Function amp Action x5 t NEG DI 0 DID 1 DI0 Thebit format of the selected device is inverted I e any occurrence of a 1 becomes a 0 and any occurrence of 0 becomes 1 when this is complete a further binary 1 is added to the bit format The result is the total logic sigh change of the selected devices contents 103 HUI 5 7 Shift Instructions Mnemonic Function SHL Arithmetic shift left SHR Arithmetic shift right LSL Logic shift left LSR Logic shift right ROL Rotation left ROR Rotation right SFTL Bit shift left SFTR Bit shift right WSFL Word shift left WSFR Word shift right 104 READ RE SHL amp SHR Suitable Models 16 bits instruction SHL SHR 32
198. within the two source devices are combined and the total is stored in the specified destination device Each data s highest bit is the sign bit 0 stands for positive 1 stands for negative All calculations are algebraic processed 5 8 3 Ifthe result ofa calculation is 0 the 0 flag acts If the result exceeds 323 767 16 bits limit or 2 147 483 647 32 bits limit the carry flag acts refer to the next page If the result exceeds 323 768 16 bits limit or 2 147 483 648 32 bits limit the borrow flag acts Refer to the next page When carry on 32 bits operation word device s low 16 bits are assigned the device following closely the preceding device s ID will be the high bits To avoid ID repetition we recommend you assign device s ID to be even ID The same device may be used as a source and a destination If this is the case then the result changes after every scan cycle Please note this point 167 READ RE SUB 16 bits instruction SUB 32 bits instruction DSUB Suitable Models XCl XC3 XC5 KH Dx pv ow fps TD CD D Jr k gt mme Device 5i Device X0 DIO D12 gt D14 un E e t z e i e S1 appoint the soft unit s content subtract the soft unit s content appointed by S2 in the format of algebra The result will be stored in the soft unit appointed by D 5 8 13

Download Pdf Manuals

image

Related Search

Related Contents

manual - Process Controls  Lochinvar PUMP-REC-05 User's Manual  BENDIX SD-06-1600 User's Manual  GembusHub user manual  ACL 360 ROLLER User Manual ver 1  Graco ISPP071AC User's Manual  Turny Evo - manuel d`installation  «Je n`ai pas voulu me sacrifier))  Philips myLiving Spot light 53260/67/16  会社概要 - カプコン  

Copyright © All rights reserved.
Failed to retrieve file