Home
Rockhood Automation XC Series PLC
Contents
1. Function S1 S2 S M G G QG and action TCZP K10 K20 DO MO G MO D21 A gt LDlC2c Ft ON MI DO Hj Dita LDBLCAQ F LED3LCAG oN M2 D30 t Ep LDICZGO p BICA HON i The status of the destination devices is kept even if the TZCP instruction is deactivated e G9 92 and B represent time values Each specifying the head address of 3 data devices B is compared to the time period defined by and D The result is indicated in the 3 bit devices specified by the head address ST ST GD D 1 T 2 Assign the compare time s lower limit with the format of Hour Minute and Second 2 m ED ED 1 ED 2 Assign the compare time s lower limit with the format of Hour Minute and Second CGU Is e 2 Assign the time data with the format of Hour Minute and Second D Q4 1 0242 According to the compare result the 3 devices output ON OFF The valid range of Hour is 0 23 J The valid range of Minute is 0 59 The valid range of Second is 0 59 Operands DX DY DM DS T Applied instructions C D FD K Function X0 TADD D10 D20 and action DIO D11 D12 D20 D21 D22 gt D30 S1 D10 Hour D11 Minute S2 D20 Hour D21 Minute D12 Second D22 Second 10 hour 20 min 30 sec 3 hour 20 min 10 sec D31 D32
2. 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 Applied instructions SHL and SHR Function and action Operands DX DY DM DS T C D FD Arithmetic shift left 5 a EM m mm High Shiftleftn bits Low a o 1 oj 1 0 1 jo 1 o 1 0 i jo 10 Laster one execution High Low 2 fo o a fo fa o a fo a o Jo Jo o o After one execution fill 0 in the low bit Arithmetic shift left n iq xm Tm Tx High Shift right n bits Loy ji o 1 o 1 o 1o 1 o 1 o 1 o 1 0 After once execution Hi gh Low fafa fafa fof fof fo p o rjo1 9 After once execution the highest bit remains NOTE Inevery scan cycle loop shift left right action will be executed The situation of 32 bits is the same Applied instructions LSL and LSR Operands DX DY DM DS T C D FD Logic shift left Function a mie ux p ue High Shift left n bits Leow alofa Joli fofi fof fo fa fof folio J Latter once execution High Low 1 fo Joli fofi fofi fo 1 0 o o o o After once execution fill O in the low bit Logic shift right 5 a pem pers High Shift right n bits Las 1 o 1 o 1 o 1 o 1 o 1 o
3. and action Read the model s assigned register to the assigned bureau s assigned register Communication s bureau ID Register s start ID Receive register s start ID 2 Serial port s ID Bound 1 3 8 Multi register write MRGW xr 22 D s s2 X0 k MRGW KI K500 K3 DI K2 Read the model s assigned input register to the assigned bureau s assigned register st Communication bureau ID s2 Register s start ID Cs Register s number Receive register s start address Serial port s ID Bound 1 3 Instruction description When X0 is ON execute REGW or MRGW instruction After finish executing the instruction set the communication finish flag When XO is OFF no operation If communication error repost automatically When reach 10 times set communication error flag User could inquiry the reason why related register judge error Special Function instructions 6 4 Free format communication Description of COM ports XC series PLC has 3 communication ports free format communication usually use COM1 or COM2 COM1 is RS 232 port COM2 is RS 232 port or RS 485 port Via COMI COM2 communicate with host machine display other serial communication device Communication protocol has program protocol and free format etc Description of free format communication Free Communication Free format communication transfer
4. MI7 MI6 MIS Ml4 MI3 MI2 MII MIO 0 0 1 0 1 0 0 0 7 6 5 4 2 1 0 bO All O If s is word device n lt 16 a OMISE ENCOL DO DI K3 b15 DO b0 oji ofj foji joj fojoj jofi jojojo 76 5 4642 1 0 oO a b15 Di 4 QW D ojo o oro ojo o ojo o rojojo t t b0 All 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 When drive 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 248 256 Applied instructions 5 8 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 Applied instructions Operands DX DY DM DS T C D FD K D11 D10 D21 D20 MO0 MI M2 Function and action ECMP D10 D20 MO MO D11 D10 gt D21 lt D20 MI D11 D10 D21 D20 M2 D11 D10 lt D21 lt D20 T The status of the destination device will be kept even if the ECMP instruction is deactivated The binary float data of S1
5. PRT N Nx 5ms 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 When carrying 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 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 To avoid frequency jump please note the speedup speed down time set value not to small Special Function instructions 6 2 3 PLSNEXT pulse segment shift Operands Y DX DY DM DS T C D K wo PLSY DO D100 YO Function and Action f PLSNEXT YO In the condition of pulse output reaches the highest current value then output stable under this frequency if M1turns from OFF to ON enter the next pulse output with the speedup speed down time Please note in the process of pulse s speedup speed download executing this instruction is inval
6. Mnemonic Function Format and device X Y M S T C ALT The status of the assigned E 1 ALT MO Alternate devices inverted on every state operation of the instruction The status of the destination device is alternated on every operation of the ALT instruction M100 ALT MO MO YO MO Y1 LD ALT LD OUT LDI OUT M100 MO MO YO MO Y1 Basic program instructions 4 11 PLS PLF 2 Mnemonic Function Format and device all but special Mnemonic M and 5 PLS Rising edge pulse T PLS YO Function PuLSe PLF Falling trailing edge i PLF PuLse Falling pulse When a PLS instruction is executed object devices Y and M operate Description 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 x LD X0 PLS MO PLS MO Program Mo SET YO LD MO SET YO ad XI Ra Md MM ELE MM CiU i DI Aexedesabezcebtosensadao PLF MI LD XI MI RST YO PLF MI LD MI RST YO Basic program instructions 4 12 SET RST Mnemonic Mnemonic Function Format and device X Y M S T C and SET Set a bit device SET YO Functi
7. Output relay Relay output circuit Constitution of output circuit DC load AC load Power circuit s specification input output specification and exterior layout For DC induce load please parallel connect with commutate diode If not connect with the commutate diode the contact s life will be 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 Induce load PLC output contact Freewheel diode Induce load PLC outpu contact Surge Absorber Power circuit s specification input output specification and exterior layout 2 7 Disposal of transistor output circuit Transistor output circuit 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 goe
8. DXCH D10 D20 32 bits instruction DXCH swaps value composed by D10 D11 and the value composed by D20 D21 Applied instructions 5 5 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 Applied instructions Operands DX DY DM DS T C D FD K ADD D10 D12 D14 Function E i Gr 2 D10 D12 gt D14 Zero M8020 Borrow M8021 Flag Carry M8022 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 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
9. D10 D13 D12 BIN integer Binary float point 32 bits k DFLT D10 D12 D11 D10 D13 D12 BIN integer Binary float point 64 bits D10 D14 e FLTD D13 D12 D11 D10 gt D17 D16 D15 D14 BIN integer Binary float point 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 Applied instructions Operands DX DY DM DS T C D FD 16 bits Function E 1 INT D10 D20 D11 D10 D20 32 bits X0 C DINT D10 D20 D11 D10 D20 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 Applied instructions Operands DX DY DM DS T C D FD s Data s bound 0 9 999 or 0 99 999 999 is valid Convert and move instruction of Source BCD gt destination BIN When source data is not BCD code M8067 Operation error M8068 COperation error lock will not work Asc
10. 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 Y100 channel 2 starts from X200 Y200 7 expansions could be connected totally Use digital filter in the special input filter of input relay so you can use the program to change 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 1T100 T199 are timers with the unit of 100ms clock pulse their current values are the accumulate values So even though timer coil
11. 180 Appendix 181 High Appendix ID frequency Function Description pulse ID D8170 PULSE 1 The low 16 bits of accumulated pulse number D8171 The high 16 bits of accumulated pulse number D8172 The current segment means No n segment D8173 PULSE 2 The low 16 bits of accumulated pulse number D8174 The high 16 bits of accumulated pulse number D8175 The current segment means No n segment D8176 PULSE 3 The low 16 bits of accumulated pulse number D8177 The high 16 bits of accumulated pulse number D8178 The current segment means No n segment D8179 PULSE 4 The low 16 bits of accumulated pulse number D8180 The high 16 bits of accumulated pulse number D8181 The current segment means No n segment D8182 PULSE 5 The low 16 bits of accumulated pulse number D8183 The high 16 bits of accumulated pulse number D8184 The current segment means No n segment D8190 PULSE 1 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 D8197 The high 16 bits of accumulated pulse number D8198 PULSE 5 The low 16 bits of accumulated pulse number D8199 182
12. Ifthe 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 po A Ko DI KO D2 KO D3 KO DM4 KO Dd KO D6 ko D9 A Function Applied instructions Operands DX DY DM DS T C D FD K 1 Written of a word foo ETE 1 4 FWRT FDO Function write value in DO into FDO 2 Written of double word om EIE 1 3 DFWRT FDO Function write value in DO D1 into FDO FDI 3 Written of multi word DO K3 1 4 FWRT FDO Function write value in DO D2 D3 into FDO FDI 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 Applied instructions Operands All bit word soft units E J TT Function ZRST M500 M559 Zone reset bit device M500 M599 ZRST C235 C255 Zone reset word dev
13. AND lt KI DO Active when the comparison SI lt S2 is true Active when the comparison S1 z S2 is true AND Serial comparison contact HH AND lt K1 DO Active when the comparison SI lt S2 is true AND gt Serial comparison contact AND lt gt Serial comparison contact HH an gt k po gt AND K1 DO Active when the comparison SI 2 S2 is true SI S2 istrue OR Parallel comparison contact Active when the comparison OR K1 DO MEN ae OR gt Parallel comparison contact Active when the comparison OR gt K1 DO CSI gt S2 is true OR Parallel comparison contact 39 Active when the comparison OR lt K1 DO SI lt S2 is true OR lt gt Parallel comparison contact gt Active when the comparison OR lt gt K1 DO S1 S2 is true OR lt Parallel comparison contact 5 Active when the comparison OR lt KI DO Basic program instructions CSI lt S2 is true OR gt Parall
14. According to constant K or to the x3 content of data register D set the RST C300 value to be positive Treat contents x in consecutive data register as a C300 K10 pair and dispose it as 32 bits data So when assign DO dispose DO iius Y1 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 99 N z N e Z 5 e e m S lr 5 5 bY Z un e lr 3 ec lar e 5 e I e e ec 5 zn lt e value turns to be 0 output contact resets When use counter 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 thod of uode Constant assignment K the set value HP cw K100 Indicate assignment K X000 MOV K100 D5 32 bits counter Constant assignment K X001 K43 100 Indicate assignment K X000 X001 DMOV K43100 DO C300 DO D1 Each soft unit s usage and function Each soft unit s usage and function 3 7 Some points to note Action order of input output relay and response delay
15. Function OUT type coil drive RST Reset a bit device RST C ReSeT permanently OFF X10 RST CO CO carries on increase count for the Program of i X11 K10 OFF gt ON of X011 When reach the interior CO Be set value K10 output contact CO counter Yo gt 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 Counter used for power cut retentive Even when power is cut hold the current i status and reset the output contact It s value and output contact s action status necessary to assign constant K or indirect data register s ID behind OUT instruction and reset status count coil MO I Program of high speed C600 counter Lj reset circuit In the preceding example when MO is ON carry on positive count with OFF ON of X0 Counter s 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 Basic program instructions 4 14 NOP END r Mnemonic Function Format and device None Mnemonic NOP No operation or null T NOP and J No Operation step Function END Force the current END END program scan to end When clear the whole prog
16. M6 C622 K10 When M2 is ON C622 counts with OFF ON of X000 Via M7 OFF or ON of X002 judge the RST C622 direction If X003 is OFF execute positive count if X003 is ON execute negative count n pu 3 ga e 3 a 5 tn 3 o 2 Ee lt e LM 2 O ga 5 Z lt e e o e 3 t Special Function instructions 6 1 3 Using method of AB phase high speed counter AB phase AB phase input counter executes increment decrement count via the do judgment of A B phase The output contact s correspond with the current value is the same with the preceding single high speed counter When M8 is ON C630 counts d C630 K10 with the input X000 A phase X001 B phase via interrupt C630 Y002 If M9 is ON execute RST M9 RST C630 If the current value exceeds the set value then Y002 is ON if the current value is less than the set value then be OFF MIO C632 DDOD When M s ON C632 s to count immediately Counter s input C632 is X002 A phase X003 B phase Eas Reset in the sequencial control MII program via M11 RST C632 Ifthe current value is larger than the pre set value Y004 activates if lower than the pre set value then cut In the case of A phase input is OFF ON at the same time B phase input is OFF the counter carries on increment count If at the same time B phase i
17. M8158 C616 Count finished sign 24 segments count finished flag is 1 M8159 C618 Count finished sign 24 segments count finished flag is 1 M8160 C620 Count finished sign 24 segments count finished flag is 1 M8161 C622 Count finished sign 24 segments count finished flag is 1 M8162 C624 Count finished sign 24 segments count finished flag is 1 M8163 C626 Count finished sign 24 segments count finished flag is 1 M8164 C628 Count finished sign 24 segments count finished flag is 1 M8165 C630 Count finished sign 24 segments count finished flag is 1 M8166 C632 Count finished sign 24 segments count finished flag is 1 M8167 C634 Count finished sign 24 segments count finished flag is 1 M8168 C636 Count finished sign 24 segments count finished flag is 1 M8169 C638 Count finished sign 24 segments count finished flag is 1 178 High frequency pulse ID Function Appendix Description PULSE_1 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 PULSE 2 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 PULSE 3 Sending pulse flag Be 1 at pulse sending 32 bits pulse overflow flag sending Be 1 when overflo
18. Note D Instruction s name Q Device which can be used Ladder example Tell the instruction s basic action using way applied example extend function note items etc Flag after executing the instruction Instructions without the direct flag will not display S Source operand its content won t change after executing the instruction Destinate operand its content changes with the execution of the instruction Applied instructions 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 214 748 364 7 Hex 00000000 FFFFFFFFE Double word object instruction D NUM 1 D NUM D NUM a 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 E g ADD DO D2 D4 denotes two 16 bits data adds DADD D10 D12 D14 denotes two 32 bits data adds Instructions
19. Realize write and read to a slave station At this 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 Applied program examples 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 redundant 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 par
20. 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 Applied instructions Operands DX DY DM DS T C D FD K X0 D10 D12 gt D14 Zero M8020 Borrow bit M8021 Flag Carrier M8022 15 nt e 52 e appoint the soft unit s content subtract the soft unit s content appointed by in the format of algebra The result will be stored in the soft unit appointed by 0 5 8 213 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 relationship of the flag s action and positive negative data is the following chart Zero flag Zero flag Zaro flag 4 x 1 0 32 768 ely 3057 31 32 767 0 1 2 MH Nar 3 Borrow flag Data s i Data s Carry flag highest highest bit is 1 d bit is O Zero flag Zero flag A TER 2 od P 147 483 648 mE 0 1 4 2 147 43 647 0 1 2 EPIS SS of Borrow flag Carry flag Applied instructions Operands DX DY DM DS T C D FD K Function 16 bits operation S1 S2 D and action m MUL DO D2 D4 BIN BIN BIN DO X D2 gt D5 D4 16 bits 16bits 32 bits The contents
21. 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 Qe D5 If BMOV D10 K3 D5 cam D10 D6 L D11 n 3 D7 D12 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 1 i BMOV D10 D9 K3 X2 It BMOV D10 D11 K3 D10 2 D9 D11 9 D10 D12 D11 D10 e D11 Dil D12 D D12 D13 Applied instructions Operands DX DY DM DS T C D FD K n KO DO Function L 4 FMOV K10 Move KO to D0 D9 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
22. 1 o 10 After once execution High Low olofo o lo 1 o i o 1 o iloji fo After once execution fill 0 in the highest bit NOTE Inevery scan cycle loop shift left right action will be executed The situation of 32 bits is the same Applied instructions ROL and ROR Operands DX DY DM DS T C D FD The bit format of the destination device is rotated n bit places to the left on every Function operation of the instruction Rotation shift left and action D n T Hi sr Ks High Rotate left io m 022 Zi n bits E amp M8022 0FF Lala a fafa fr fa i Jo Jo fo fo fo fo foo Every time when X000 turns from OFF to ON executes n bits left After once execution d rotation Hi gh Low up fafa fofofofofo jo ojojo 1 1 1 T Rotation shift right O a Xn muB SR ME Every time when X000 High Rotation right Low turns from OFF to ON a fafa fa afa fa fa fo fo fo fo fo o o o executes n bits right 5027 rotation a bits E z M8022 0N fter once execution High Low fo fofo fa fafa fafa hhii fo Jo sac Ed a As there is a carry flag in the rotation circuit so if drive M8022 before executing the Ll2l22 2 2 2 4 rotation instruction it could be sent to the destination address Please note that rotation left right action is executed in every scan cycle The situation of 32 bits is the
23. D8029 172 Function Appendix 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 173 Function Appendix Description All output reset forbidden When mode shifting all output reset are forbidden STL status act When M8047 acts act when any unit of SO S999 turns to be ON ID Function Description M8050 100 Forbid input interruption 0 M8051 m H9 Forbid input interruption 1 After executing EI even interruption allowed but M8052 when M acts at this time the correspond input 120 Forbid input interruption 2 interruption couldn t act separately M8053 Es when M F I 130 Forbid input interruption 3 E f When MBSA a6 CIN IRTECEU LIOS d M8054 forbidden 140 Forbid input interruption 4 M8055 150 Forbid input interruption 5 M8056 m i 160 Forbid time interruption 0 After executing EI even interruption
24. K 30 SET Y1 DLD gt K68899 C300 M50 gt M I When the source data s highest bit 16 bits b15 32 bits b31 is 1 Note Items use the data as a negative The comparison of 32 bits counter C200 must use 32 bits instruction If assigned as 16 bits instruction it will lead the program error or operation error AND O Format and Function contact is not active Basic program instructions 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 16 bits 32 bits Active condition Inactive condition AND DAND SI S82 S1 z S2 AND gt DAND gt S1 gt S2 SI S2 AND DAND lt S1 lt S2 SI S2 AND lt gt DAND lt gt S1 S2 S1 S2 AND DAND lt SI lt S2 S1 gt S2 AND gt DAND gt SI S2 S1 lt S2 Program X0 2 E AND K100 CO X1 AND gt K 30 DO SET Y1 X2 DAND gt K68899 D10 M50 D M4 Note items 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 C200 must be 32 bits instruction If assigned as a 16 bits instruction it will lead the program error or operation error Basic program instructions The value of S1
25. LDI x4 Start of a branch AND X5 ORB End of a parallel circuit block OR X6 End of a parallel circuit block ANB Serial connect with the preceding circuit OR X7 OUT Y20 Mnemonic and Function Description Description Basic program instructions 4 9 MCS MCR Mnemonic Function Format and device MCS Denotes the start of a E Master control master control block IR mE MCR Denotes the end of a f Master control Reset master control block 4 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 When use 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 Xl X2 YO MI M3 Y1 M2 Y2 LD XI MCs Bus line start OUT Y LD M1 MCS Bus line nest LD M3 OUT Yl LD M2 OUT Y2 MCR MCR Bus line back Mnemonic and Function Description Program Basic program instructions 4 10 ALT
26. RST CO cleared However counter used by sd power cut retentive could save the co gt K10 count value after power cut and the counter will go on counting from the CO YO gt value 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 s current value will not change If reset input X000 is ON execute RST instruction counter s current value is 0 output contacts activates E N cz n e zl e m mg Ss 5 e eat a e m 3 e e Pg e zl e e e e l e mie lt e Forthe 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 Each soft unit s usage and function For 32 bits binary increase 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 x2 positive count M8238
27. The high 16 bits of accumulated pulse number ID as register Appendix Input switch quantity X X100 X137 32 points Output switch quantity Y Y100 Y137 32 points Expansion T Input analog ID ID100 ID131 16 channels Output analog QD QD100 QD131 16 channels Module s set value D D8250 D8259 Input switch quantity X X200 X237 32 points Output switch quantity Y Y200 Y237 32 points Expansion m Input analog ID ID200 1D231 16 channels Output analog 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 34 Input analog ID ID300 1D331 16 channels Output analog QD QD300 QD331 16 channels Module s set value D D8270 D8279 Input switch quantity X X400 X437 32 points i Output switch quantity Y Y400 Y437 32 points Expansion 4d Input analog ID ID400 ID431 16 channels Output analog 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 m Input analog ID ID500 ID531 16 channels Output analog 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 Y637 32 points Expansion 6H Input analog ID ID600 ID631 16 channels Output
28. allowed but m 2 Forbid time interruption 1 when M acts at this time the correspond input M8058 interruption couldn t act separately 180 Forbid time interruption 2 M8059 Counter interrupt forbidden Forbid interruption from 1010 1060 174 Function Appendix 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 overtime Unit lms ID of Excursion register D 175 176 COM3 Function Appendix 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 Receive error flag Receiving finished normally but the received data is less than the required Receive correct flag Timeout judgment flag M8140 M8142 RS232 is sending flag M8144 RS232 is receiving flag M8145 Receive impe lag Rone Hed normally but the received data is less than the required M8147 Receive error fl
29. contract list of 16 bits and 32 bits Applied instructions 16 bits 32 bits WTD FLT DFLT INT DINT BIN DBIN Data convert Bee pep 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 Data Shift Ro E ROR DROR SFTL DSFTL SFTR DSFTR WSFL DWSFL WSFR DWSFR Applied instructions 5 3 Program flow instructions Mnemonic Instruction s name 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 Applied instructions Operand P As the instructions of
30. data in the format of data block each block transfer 128 bytes at most At the same time each block could set a start symbol and an end symbol or you needn t set Start symbol 1 byte Data block Max 128 bytes End symbol 1 byte Data format Data bit 7bits 8bits Checkout bit odd check even check no check Stop bit 1 bit 2 bit Start symbol 1 bit End symbol 1 bit The user could set a start end symbol after setting the start end symbol when PLC sending data start end symbol will automatic be added When receiving data automatic delete the start end symbol Communication format 8 bits 16 bits When choose 8 bits cushion format to communicate the register s high byte is invalid in the communication process PLC only use register s low bytes to send and receive data 1 sending data E G GO s fI SEND D10 D100 K1 Data sending instruction once rising edge of MO send once data Send data s first ID 2 ASC number sent n COM port In the process of data sending sending flag M8122 COMI set ON Special Function instructions MO M8122 sending 2 receiving data E Q GG s 1I RCV D20 D200 K1 Data receive instruction the rising edge of MO receive the data s Receive data s start ID 2 The max ASC number received n COM port In the process of data receiving receiving flag M81
31. is compared to S2 The result is indicated by 3 bit devices specified with the head address entered as D If a constant K or H used as source data the value is converted to floating point before the addition operation X0 UU ECMP K500 D100 M10 K500 D101 D100 M10 M11 M12 Applied instructions Operands DX DY DM DS T C D FD K Compare a float range with a float value Function O GO GO D10 D20 EZCP DO M3 and action M3 D20 D21 gt D1 D0 ON M4 D21 D10 lt D1 D0 lt D31 D30 ON MS D1 D0 gt D31 D30 ON li 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 If a constant K or H used as source data the value is converted to floating point before the addition operation X0 I EZCP K10 K2800 D5 MO K10 D6 D5 K2800 MO MI M2 Please set S1 S2 when S2 gt S1 see S2 as the same with S1 and compare them Applied instructions Operands DX DY DM DS T C D FD K Col ey X Function L BADD D10 D20 D50 D11 D10 D21 D20 gt D51 D50 The floating point values stored in the source devices S1 and S2 are algebraically added and the re
32. series PLC cllikhk kd 223013 4 LI IW as UT U TU T Im IA 2 ee ee J D Input terminals 2 BD expansion 3 Input label 4 COM port 5 COM port COM port s cover board Output label Output terminals 9 Screws Input indicate LED l Extension port Programming status indicate LED 3 Output indicate LED XC3 60 main units 36 in 24 out N g COM Xi X3 X5 X7 Xi X13 X15 X17 X21 X23 X25 X27 X31 X33 X35 X37 X41 X43 L F M XO X2 X4 X6 X10 X12 X14 X16 X20 X22 X24 X26 X30 X32 X34 X36 X40 X42 ov CANT CAN e YO Yi Y2 Y3 Y4 coms Y Y10 Y12 7 Yi5 YI Y20 Y22 CONS Y25 Y2T 24V g o 1 l2 M3 M4 Y6 6 Yit Y Y14 Y16 8 bti BENE i Y24 Y26 XC3 48 main units 28 in 20 out N COM X1 X3 X5 X7 X11 X13 X15 X17 X21 X23 X25 X27 X31 X33 L M X0 X2 X4 X6 X10 X12 X14 Xi6 X20 X22 X24 X206 X30 X32 e 24V A CAN e YO Yi Y2 COM3 Y4 Y6 Y7 Yti e Yi3 Yi5 COM6 Y20 Y22 J Y23 e e ov g CAN y M1 2 g Y3 YS 4 Yio Y MS Y14 Y Y17 Y21 M7 XC3 32 main units 18 in 14 out ON e COM X1 X3 X5 X7 X11 X13 X15 X17 X21 L FG COM X0 X2 X4 X6 X10 X12 X14 X16 X20 Ov A COMO COM1 COM2 Y3 Y5 Y6 Y10 p CcoMA Yi3 Y15 24V e B Y Y1 Y2 Y4 COM3 Y7 Y11 Y12 Y14 XC3 24 main units 14 in 10 out 11 Summary of XC series PLC N e cM Xi X3 X Xi Xi X18 X5 e re com xo x2 x4
33. switch mode When M8161 OFF function OFF when RUN OFF M8000 and action oe MSI61 5 O a 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 S ASCII HEX D102 D101 D100 Conversion D200 up 30H OAH Not change to be 0 EXE D200 up 41H D201 down 42H D201 up 43H D202 down 31H D202 up 32H D203 down 33H D203 up 34H vlalwly lalm plo D204 down 35H poo orrjojojojo o rj oror1 1 0j0 O 0 41H gt A 30H 0 pmor opryfo Jo olJopr r o jo r ojJo 1 o 43H C 42H gt B px2 orojojojrjo r oj1 0 1 1 1 1 0 0 9 B Applied instructions Operands DX DY DM DS T C D FD When is software unit n lt 16 Xy REMIZE S n X10 DECO X000 M10 K3 X002 X001 X000 0 1 1 4 VY 7 6 5 4 2 1 0 0 0 0 0 0 0 0 M17 M16 MI5 M14 M13 M12 Mil MIO 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 282256 When drive input is OFF instructions are not ex
34. value D D8290 D8299 Input switch quantity X X600 X637 32 points Output switch quantity Y Y600 Y637 32 points Expansion es Input analog quantity ID ID600 ID631 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 Y737 32 points Expansion a Input analog quantity ID ID700 1D731 16 channels Output analog quantity QD QD700 QD731 16 channels Module s set value D D8310 D8319 Input switch quantity X X1000 X1037 32 points Output switch quantity Y Y1000 Y 1037 32 points BD Input analog quantity ID ID1000 ID1031 16 channels Expansion Output analog quantity QD QD1000 QD1031 16 channels Module s set value D D8320 D8329 Summary of XC series PLC 1 4 General Specification General Items Specifications Specification COM 1 RS 232C connect with host machine HMI rec program or debug COM 2 RS 232C RS 485 connect with network or BRE aptitude instrument inverters etc Installation Can use M3 screw to fix or install directly on DIN46277 Width 35mm orbit Grounding The third type grounding can t public ground with strong power system Summary of XC series PLC Performance Specification 24 32 points 4860 points Program executing Loop scan format time scan format format Use both statement and ladder chart Use FlashROM and Li battery User program s 30000 steps The program is smalle
35. x6 Xio X12 xia gt e ov A como comi cow vs v5 vo vio e e 24v gt B Y Yi v2 v4 o3 v7 vii XC3 14 main units 8 in 6 out N COM X1 X3 X5 X1 L F X0 4 X6 X2 X 24V A YO COMI Y3 YS OV 0 Y Y2 Y4 XC E8X8YR 24V COM X1 X3 X5 X7 OV COM X0 X2 X4 X6 YO yi Y2 COM3 YS Y7 COMO COMI COM2 Y3 Y4 Y6 XC E16X 24V COM X1 X3 X5 X7 OV COM X0 X2 X4 X6 COM X11 X13 X15 X17 e COM X10 X12 X14 X16 e XC E16YR YO Yi Y2 COM3 Y5 Y7 COMO CcOM1 COM2 Y3 Y4 Y6 Y10 Y11 Y12 COM7 Y15 Y17 COM4 COMS COMG Y13 Y14 Y16 12 Summary of XC series PLC 1 7 COM Port definition COMI Pin of COM 1 2 PRG ops 4 RxD 3 4 5 5 TxD 60 lt 8 6 VCC T 8 GND Mini Din 8 core socket Chole COM2 Pin of COM 2 s 4 RxD 3040 50 8 GND 60 0 08 T f Mini Din 8 core socket Chole Cable Connection of programmable cable is the following D l i LAITH NS eec o o eb 0403 8e e 06 ee eee 9 6 Mini Din 8 core socket Chole DB9 pin Chole 14 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 circ
36. 21 5 Note both the host machine and the slave machine should use the version higher than V2 4 Applied program examples Program MOY Ki D30 T200 K4 OV H52 D31 FMOV KO D40 D58 MOV D52 D56 ROR D56 KS WAND D56 HFF D17 Applied program examples Mov H43 D32 D32 write command s value MOV D32 D12 MOV D33 D13 HOY D34 D42 D34 temperature setting MOV D52 D156 ROR D56 KG WAND D56 HFF DIT Applied program examples SEND D10 Ko K2 RCV D20 Kid K2 M5134 BMOY D20 D100 Kio ROL D101 Ke YOR Didi D100 D200 ROL D103 KG YOR D102 D103 D201 168 MEMO Appendix 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 169 Appendix 8 1 List of special auxiliary relay special data register 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 negative pulse OFF when PLC starts coil k scan cycle running Battery voltage too i Act when battery voltage abnormal too low ow Function Description Register s capacity 2 2K step
37. 24 COMI set ON MI M8124 I ECCE About XC series free communication COMI COM2 are both available To the two COM ports communication parameters should be set separately Parameter Setting for communication parameter s setting please refer to the following table Number Function Description 255 is free format 1 254 bits modbus station ID FD8211 Communication format Baud rate data bit stop bit checkout FD8210 Communication mode i Unit ms if set to be 0 it means no timeout FD8212 ASC timeout judgment time waiting COM1 f Unit ms if set to be 0 it means no timeout FD8213 Reply timeout judgment time E waiting FD8214 Start symbol The high 8 bits are invalid FD8215 End symbol The high 8 bits are invalid 8 16 bits cushion FD8216 Free format setting have no start bit have no end bit Special Function instructions 255 is free format 1 254 bits modbus station ID FD8220 Communication mode FD8221 Communication format Baud rate data bit stop bit checkout Unit ms if set to be 0 it means no timeout FD8222 ASC timeout judgment time e waiting i Unit ms if set to be 0 it means no timeout FD8223 Reply timeout judgment time e waiting FD8224 Start symbol The high 8 bits are invalid FD8225 End symbol The high 8 bits are invalid 8 16 bits cushion FD8226 Free format setting have no start b
38. 3 M8000 X7 M15 Basic program instructions Output i M gt aaa PLS wo I drive xO M20 J E scan cycle E In two conditions when XO turns from OFF to ON M20 gets a scan cycle NOTE When X10 turns from OFF to ON X10 Lt MOV Kio Do only execute once MOV instruction When X10 turns from OFF to ON MOV Kio Do each scan cycle execute once MOV instruction X10 Mnemonic and Function Basic program instructions 4 6 Contacts compare instruction Mnemonic Function LD Initial comparison contact Active when the comparison SI S2 is true LD gt Initial comparison contact Active when the comparison SI gt S2 is true LD lt Initial comparison contact Active when the comparison SI lt S2 is true LD lt gt Initial comparison contact Active when the comparison SI S2 is true LD lt Initial comparison contact Active when the comparison SI lt S2 is true LD gt Initial comparison contact Active when the comparison SI S2 is true AND Serial comparison contact Active when the comparison SI S2 is true AND gt Serial comparison contact Active when the comparison SI gt S2 is true AND Serial comparison contact Active when the comparison SI lt S2 is true AND lt gt Serial comparison contact Active when the comparison SI S2 i
39. 8 X00 property 0 positive logic others negative logic FD8139 X01 property FD8140 X02 property FD8201 X77 property Device s power failure retentive area Number Function Description FD8202 Start tag of D power failure Appendix store area Appendix FD8203 store area Start tag of M power failure FD8204 store area Start tag of T power failure FD8205 store area Start tag of C power failure FD8206 6 Communication Number Store area Function Start tag of S power failure Description FD8210 Communicate mode 255 is 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 FD8214 Judgment time of reply timeout Start ASC Unit ms if set to be 0 it means no timeout waiting 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 have no start bit have no 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 S
40. C INPUT SIGNAL AC POWER TYPE eere nnne nnne 20 2 5 OUTPOTGPECTEICATIONG qs pendere Tabu e me t E Hin REMBS 2 6 DISPOSAL OF RELAY OUTPUT CIRCUIT ieren e a a iii 24 2 7 DISPOSAL OF TRANSISTOR OUTPUT CIRCUIT ccccsssssesscescessesscsecseeseesecseceecessesscsecescesesseeeceseenes 26 3 USAGE AND FUNCTION OF EVERY SOFT UNIT eeeeeeeeee eese ete eatn atn ena estas tasa status 29 3214 EVERY DEVICE OF PEG 5 diee decree eve et deret eade et erae eer ee v EA 30 SAA LIST OF DEVICE ID kr stt tecti ree cst ost anto LaL oes OME ONG Ihre eae LI Cs 32 2 9 DATA DISPOSAL OF PEG 22 nR RIBERA IRA 34 3 4 SOME ENCODE PRINCIPLES OF DEVICE eeseeeeeeeeee eene enne nitent en nneenene et nn eintreten innen 35 3 5 TIMER S NUMBER AND FUNCTION T essent enne ntn nennen 37 3 6 COUNTER S NUMBER AND FUNCTION C essen enne eene ennt 40 DET NOTE ITEMS 3 42 greater ebetenenaueyanmeneaveeaun RI 44 4 DESCRIPTION OF BASIC SFC INSTRUCTIONS eeeeeeee eene esee enses nen eta tata sensn etatus 45 4 LIST OF BASIC INSTRUCTIONS 5 eetestsee tse esee etur ianea sie aa Eae Eaa A Eara EEE eea aE NEA TEREA Arkae Eaka 46 E22 Ale 3 CEE LOUTI meree EAT tta E AA n adem A 49 4 3 LAND DANIT ont a Reto tt E I A ERR E ERE 50 4 4 DORT EORIT 5 atri e ird ivan Sha tate i eee etn b adea 51 4 5 DP LDF ANDP ANDF ORP ORF 52 4 6 CONTACT S C
41. D30 Hour D31 Minute D32 Second 13 hour 40 min 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 set ON S1 18 Hour 10 Minute S2 10 Hour 20 Minute 30 Second 5 Second 18 hour 10 min 30 sec 3 hour 20 min 10 sec 4 D 4 Hour 30 Minute 35 Second hour 30 min 35 sec When the result is 0 CO 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 Applied instructions Operands DX DY DM DS T C D FD K TSUB D10 D20 D30 Function ai sr e KS and action D10 D11 D12 D20 D21 D22 gt D30 D31 D32 Sl S2 D10 Hour D10 Hour D10 Hour D11 Minute D11 Minute i D11 Minute D12 Second 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
42. I S2 D GO O L 4 DDIV DO D2 D4 Dividend Divisor Result Result 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 GH and the next one The divisor is composed by the device appointed by 2 and the next one The result and the remainder are stored in the four sequencial devices the first one is appointed by Dy Ifthe value of the divisor is 0 then an operation error is executed and the operation of the DIV instruction is cancelled When appoint the bit device as D the remainder will not obtained 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 INC and DEC Function and action Applied instructions Operands DX DY DM DS T C D FD INC DO DO c1 D0 On every execution of the instruction the device specified as the destination 0 gt 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 RT L 4 DEC DO DO 1 D0 On
43. 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 actual 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 20 20 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 showed in the left map please consider XI the things of using the same coil Y003 at x many position Y3 E g X001 ON X002 OFF Y4 x2 At first X001 is ON its image area is ON Y3 output Y004 is also ON But as input X002 is OFF the image area When executing dual output
44. MO AND Pulse pulse at lt a ANDF Serial connection of MO AND Falling falling trailing edge pulse E pulse OR Parallel connection of NO OR normally open contacts 2 ORI Parallel connection of NC OR Inverse normally closed contacts MO ORP Parallel connection of rising OR Pulse edge pulse MY ORF Parallel connection of an OR Falling falling trailing edge pulse ie pulse LD Initial comparison contact ae ETT gu Active when the comparison x SI S2 is true LD gt Initial comparison contact PES WEST as Basic program instructions LD lt Initial comparison contact B Hu x1 po c_ D gt Active when the comparison SI lt S2 is true LD lt gt Initial comparison contact E H w gt x1 po C_ gt Active when the comparison S1 S2 is true LD lt Initial comparison contact aaa bs s DE Active when the comparison B S1 lt S2 istrue LD gt Initial comparison contact fone eel ape ae Active when the comparison S1 S2 istrue AND Serial comparison contact p s H AND Ki Do Cc gt Active when the comparison S1 S2 is true AND gt Serial comparison contact H AND gt KI DO Active when the comparison SI gt S2 is true AND lt Serial comparison contact
45. NUMBER gt The set value of timer and counter K constant gt The ID of auxiliary relay MD timer T counter C status S Soft unit s number gt Assign the 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 CH 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 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 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 Each soft unit s usage and function 3 4 Some encode princi
46. 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 When time reaches T600 activates then execute the interrupt program with the interrupt tag 13001 for each timer s correspond interrupt tag please refer to the following table X0 Interrupt tag correspond with the timer T600 PE Timer s number Interrupt tag io T600 13001 T602 13002 M0 T604 13003 T606 13004 T608 13005 T610 13006 T612 13007 T614 13008 T616 13004 T618 13010 Special Function instructions 6 8 Interrupt function 6 8 1 Time interrupt Function and action In the condition of the main program has a long executing cycle if you want to dispose special program or in the sequencial control scan a special program should be executed at every certain interval time interrupt function should be used It could be not effected by PLC s scan cycle execute interrupt subroutine every Nms interval X9 Yo gt FEND 14010 M8000 INC DO IRET Time interrupt subroutine is similar with other interrupt subroutines they must be written behind the main program start with the instruction I40xx end with IRET In 140xx xx means interrupt time the unit is ms E g 14010 means every 10ms interval execute once interrupt
47. OMPARE INSTRUCTIONS sireni ieii roaie EEEn EE 54 ATA KORB I rete eee REL MLE 58 A INES ae m PUTENT METOTN EU a E EEUU NU ITEM THIS 59 4 9 EMES MECR nte RR ERR SPD ERR eR res 60 A10 C IM MENU T T mn 61 Ao DPLST EPEE D 2t tte oath besotted Babe delete IE e e eee e 62 4 12 ESET ERST I rh RR ee de eee ete i e based 63 4 13 KOUT RST TO THE COUNTBR 55i Rb RR WDR Un pop dae videretur 64 Un 4214 TENOR TEND ideo ela Rt alli atl le D e ed ult 65 4 15 NOTE ITEMS WHEN PROGRAMMING cscccsssceesseeesseesscecseseeeeseeensaecesceceneceeseeenseeenseeceeneeneaeeesaes 66 DESCRIPTION OF APPLIED INSTRUCTIONS eeeeeee enses enses sensns enses sensns tns essen sa 67 5 1 LIST OF APPLIED INSTRUCTIONS cccsssccsssecessecssseceeseecescecescecsceeensecenseeceseecsscecsaeeseaeeesaeeenaeees 68 5 2 READING METHOD OF APPLIED INSTRUCTIONS ccccsscesssecesseessceesesecesseeesseeceseeeeaeceeaeeseaeeenseees 71 5 3 PROGRAM FLOW INSTRUCTIONS ccsscccsssssccesssscecesscecccesseecesesceeceesseeceeesseecceeseeceseseeeceesseeceeeas 75 5 4 DATA MOVE INSTRUCTIONS 5 ete efe eter toe eee quee eiae eoa eee ae e Quee e No ere eee eae 81 5 5 DATA OPERATION INSTRUCTIONS cc cccccssssccessssecceescecesesscecessssecceesseecceesseeccessseeceeeseeeceesseeeeeeas 89 3 0S DATA SHIRT 5 con detect arene ara EE ae Ee EE t tete ete deett ete tette tei e Ee Teen 99 EMI DUNG ONIS enme 105 5 8 FLOATING OPERATION 512 ccd
48. ON and MI turns from OFF to ON A loop is executed 6 times Everytime if MO turns from OFF to ON and M3 is ON B loop is executed 5 X 7235 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 Applied instructions FEND and END Operand None 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 E 1 um pc mE aa If program the tag of CALL instruction behind FEND instruction OFF X11 ON m XI O OFF ee aaa F20 Xl0 ON 7 77 1 there must be SRET instruction If the interrupt pointer program behind FEND instruction there must be SRET instruction After executing CALL instruction and before executing SRET instruction if execute FEND instruction or execute FEND instruction after executing FOR instruction and bef
49. Rockhood Automation XC Series PLC User Manual Rockhood Automation Co Ltd Rockhood Automation 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 Version 2 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 Correct The models could only be used according to the manual and an only be used along with the peripherial equipments recognized or Application recommended by Rockhood Automation They could only work normally in the condition of be transported kept and installed correctly also please operate and maintain them according to the Rockhood Automation 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 checked th
50. Totally there are 10 routes time interruption from I40xx 149xx 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 7 1 Example of pulse output 7 2 Example of MODBUS instructions 7 3 Example of free format communication 158 Applied program examples 7 1 Example of pulse output E g The following is the program which realize continuous sending high low pulse 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 max frequency is 1OOKHz 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 MO l DMOY K100000 D200 i DMOY K24000 D210 i MOY K100 D220 it i Dwov K10000 D200 i Dwov Ko000 D210 Mi TO K20 e TO i RST Mi i SET MO M8170O i RST M i i SET Mi i ALT M10 MO DPLSR D200 D210 D220 YO Applied program examples Program description When PLC 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 wo
51. UR Sci athe eat Sach d ae INI ack hd 156 6 8 INTERRUPT FUNCTION 5 5 2ete deti eoe Re rd NUR e um e Ry eu Qu t v Uu e Cu PR UR vo OR vt OR oa 157 6 8 time ANSI Pind uere dre ide die ie e eh ee i ete 157 OL P 158 7 1 PULSE OUTPUT APPLIED EXAMPLES essere nnne een enne een nennen tenes nenne rennen rsen tenere 159 7 2 MODBUS INSTRUCTIONS deett thee ree RES FERRE E EEEE exa e ver Heu Rae env axe een eive 161 3 FREE FORMAT COMMUNICATION cessisse eene enne entrent a enne ee tet a E a nennen nns 163 nn 169 8 1 LIST OF SPECIAL AUCILIARY RELAY SPECIAL DATA REGISTER ccssssceesseeeseeeeseeeeseeeseseeesaes 170 8 2 LIST OF SPECIAL FLASH DATA REGISTER SED sssssesssseseeeeeeeeeener enne 183 Preface Specialties of programmable controller The programming of XC series programmable controller has the following characteristic gt 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
52. XOR D10 D12 D14 CML D14 D14 Applied instructions Operands DX DY DM DS T C D FD Pe E E m CML DO DYO 3 V A copy of each data bit within the source device S 7 is inverted and then moved to the designated omes UB destination Fach data bit in the source device is inverted 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 Yl Yl Y15 Yl4 Yl3 Yl2 Yl Yl0 Y Y W Y 3 Y2 Yl YV Reading of inverted input A The sequencial control xi instruction in the left could be C M D denoted by the following CML instruction Ve M2 m k CML DXO DMO X3 me 5 X17 CMT Applied instructions Operands DX DY DM DS T C D FD x5 NEG D10 DIO 1 D10 Function and action The bit format of the selected device is inverted Le 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 Whenusing continually executing instructions then this instruction will be executed in every scan cycle Applied instructions 5 6 Shift instructions
53. ag M8148 Receive correct flag M8149 Timeout judgment flag COM2 Function Appendix 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 D8130 D8131 D8133 Data number received by RS232 D8136 D8137 Communication error code 7 hardware error 10 no start sign 8 CRC check error 9 bureau ID error 11 no end sign D8138 D8139 COM3 D8140 D8141 D8143 Data number received by RS232 D8146 D8147 Communication error code 7 hardware error 8 CRC check error 9 bureau ID error 10 no start sign 11 no end sign D8148 D8149 177 Appendix ID ons Function Description M8150 C600 Count finished sign 24 segments count finished flag is 1 M8151 C602 Count finished sign 24 segments count finished flag is 1 M8152 C604 Count finished sign 24 segments count finished flag is 1 M8153 C606 Count finished sign 24 segments count finished flag is 1 M8154 C608 Count finished sign 24 segments count finished flag is 1 M8155 C610 Count finished sign 24 segments count finished flag is 1 M8156 C612 Count finished sign 24 segments count finished flag is 1 M8157 C614 Count finished sign 24 segments count finished flag is 1
54. ameter 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 III 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 D31252 H Write command s value D32 43 H Parameter s code D33 Temperature setting D34 CRC check code D36 Temperature display D200 D201 Applied program examples 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 FD82
55. analog QD QD600 QD631 16 channels Module s set value D D8300 D8309 Input switch quantity X X700 X737 32 points A Output switch quantity Y Y700 Y737 32 points Expansion m Input analog ID ID700 1D731 16 channels Output analog QD QD700 QD731 16 channels Module s set value D D8310 D8319 Input switch quantity X X1000 X1037 32 points Sb Output switch quantity Y Y1000 Y1037 32 points Input analog ID ID1000 1D1031 16 channels Expansion Output analog QD QD1000 QD1031 16 channels Module s set value D D8320 D8329 8 2 List of special FLASH data register SFD 183 Y M 3 A M Un M 184 I filter Number Function Description X0 X17 FD8000 input filter time value X20 X37 FD8002 input filter time value X40 X57 FD8003 input filter time value FD8004 FD8005 FD8006 FD8007 FD8008 FD8009 I mapping Number Function Description X00 corresponds with I X0 corresponds with the FD8010 number of input image I FD8011 X01 corresponds with I FD8012 X02 corresponds with I FD8073 X77 corresponds with I O mapped Number Function Description FD8074 YOO corresponds with I YO number of input image O corresponds with the FD8075 YO1 corresponds with I FD8076 Y02 corresponds with I FD8137 I property Number Y77 corresponds with I Function Description FD813
56. and S2 are tested according to the instruction If the comparison is wD LE Format and arctica true then the OR contact is active If the comparison is false then the OR contact is not active 16 bits 32 bits Active condition Inactive condition OR DOR SI S2 S1 z S2 OR gt DOR gt S1 gt S2 SI lt S2 OR DOR lt S1 lt S2 SI 2 S2 OR lt gt DOR lt gt S1 S2 SI S2 OR lt DOR lt S1 lt 82 SI gt S2 OR gt DOR gt S1 gt 82 SI lt S2 Program X0 OR K100 CO je cM DOR gt DIO K68899 Note items 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 operation error Basic program instructions Mnemonic Function Format and device ORB Parallel connection of E OR Block multiply parallel circuits am 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 Th
57. 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 indirest 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 Single phase or AB high speed counter The high speed counters in XC series PLC carry on interrupt disposal with the high speed pulse from special input points So it is independent with the scan cycle the count speed can reach 200K Hz 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 gt A Highspeed 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 400K Hz MEMO 1 Summary of XC series PLC XC series PLC is mini model PLC with powerful function This series products can satisfy diverse control demand With compact design excellent extend capability cheap price and powerful function XC series PLC has become perfect resolution of small size control 1 1 Summary of XC series PLC and program format 1 2 XC series PLC s model and type 1 7 Communication ports definiti
58. ction Operand S SET SO STL SO gt SET S1 ST S2 STLE STL S1 T De STLE STL S2 T 2 STLE 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 Applied instructions FOR and NEXT Function Operands DX DY DM DS T C D FD K First execute the instructions between FOR NEXT instructions for several times the loop time is assigned by the source data then execute the steps after NEXT MO ft FOR K5 MI ml FOR K6 INC DO A NEXT M3 C HI FOR K7 INC DI 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 Everytime when MO turns from OFF to
59. e coil M8190 set OFF reset MO Special Function instructions 6 2 2 PLSR with speedup speed down pulse Operands Y DX DY DM DS T C D K 1 pulse output of single segment and single direction Function Cr 2 Cs D PLSR K3000 D300 K300 YO M8170 l RST MO The instruction with the assigned frequency to generate a certain quantity pulse support 32 bit instruction DPLSR S1 highest frequency The bound is 0 400KHz S2 total output pulse number Allowed setting bound 16 bits instruction 0 32 767 32 bits instruction 0 2 147 483 647 If set the pulse number as 0 don t send pulse if assign this value as H 7FFFFFFF there will be no limitation for the generate pulse number S3 speedup speed down time The set bound below 5000ms D assign Y number of output pulse could only be output at YOOO or YOO1 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 If pulse output M000 is OFF pulse output decreases to be 0 according t
60. e 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 Catalog IQ y Yom 1 1 SUMMARY OF XC SERIES PLC esessssssssssesesesesosososososososossesesesesososososesesesososososososssossssesesesesese 2 1 1 SUMMARY OF XC SERIES PLC AND PROGRAM MODE cech 3 1 2 MODEL AND TYPE OF XC SERIES PLC esessessssseeseeseeeeeee teeth trennen ethernet nennen 4 1 3 EXPANSIONS AND THEIR ID cccccccscccssscssessceseessesseesceseesecssesscesecsecssceseesecsseecessesececeseesscseeeeeeases 5 1 47 GENBRALSPECIEICATION S 2 0 3 i e etie ete te ero A ae E E A ea 7 T 5 EXTERINALSIZE ecce descet bee tee aes Ae traite eere rat ee uda ce ro pee Ie v dee Ta qd 9 1 6 TERMINAL ARRANGEMENT c ccscssscsscssceseessesseseeseesecsecsscessesscsecseeesecsecsecsecessesecseceseeseessenseeseeaes 10 1 7 DEFINITION OF COM PORIS ned ee rh sere era a ve rene e ee ea eae 13 2 SPECIFICATION OF CIRCUIT INPUT OUTPUT AND LAYOUT e eeeeee eee etnet 15 2 POWER SPECIFICATION 5 5 itecto n a a r a 16 2 2 AC POWERS DDGNPUT TYPE oe t e ete E E 18 2 3 INPUT SPECIFICATION S ree tiia cde tons rre don toes ene e EE e erdt E REUS 19 2 4 DISPOSAL OF D
61. e set 5 The current lt value process even the input X001 E valu a Yo I cut or drop power when start x2 again go on counting its accumulation time is 20 seconds When reset input X002 is ON timer reset output contact reset Constant assignment K T10 is a timer with the unit of 100ms Assign Assign 100 as a constant then 0 1s X X0 method of E C TIO gt K100 100 10s timer work o the set value Indirect assignment D Write content in indirect data X0 register to program or input via MOV K200 D5 data switch XI When assigned as power cut TIO D D9 retentive register please note that voltage low will cause the set value instable Action X0 T H x0 YO X0 C T2 DK200 vo m3 When X000 is ON output Y000 If X000 changes from ON to be OFF T2C20 seconds will be delayed then will output Y00O cut Flicker X0 T2 ME Tl T2 Tr K20 K10 Each soft unit s usage and function YO TI T2 TI Each soft unit s usage and function 3 6 Counter s ID and function C Counter For the counter s number C please see the following table s ID 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
62. ead INPR st s2 s3 n 72 X0 L INPR K1 K500 K3 MI K2 Read the assigned bureau s assigned input coil to the model s assigned coil si Communication bureau ID 2 Coil s start ID 3 Coil s number Receive coil s start address Serial port s ID Bound 1 3 Instruction description When XO is ON execute COLR or INPR instruction After finish executing the instruction set the communication finish flag When XO is OFF no operation When communication error occurs repost automatically When reach 10 times set communication error flag User could find the reason why the correspond register judge error Special Function instructions 3 Single coil write COLW Function n1 72 si 2 X0 E I COLW K1 K500 MI K2 and action Write the model s assigned coil to the assigned bureau s assigned coil Communication bureau ID Coil s start ID Receive coil s start address 2 Serial port s ID Bound 1 3 4 Multi coil write MCLW m 2 55 s s X0 E L MCLW K1 K500 K3 MI K2 Write the model s assigned multi coil to the assigned bureau s assigned coil Communication bureau ID Coil s start ID Coil s number Receive coil s start coil address 2 Serial port s ID Bound 1 3 Instruction description When X0 is ON execute COLW or MCLW instruction When
63. ecuted the activate coding output keep on activate When is word device n lt 4 iro GJ 3 DO D1 X0 e DECO K3 b15 D b0 0 0 0 0 80 0 0 0 80 0 0 0 0 0 1 1 4 DD All turns to be zero MET a Ss 7 6 5 4 1 0 0 0 0 0 80 0 08 0 0 0 0 0 1 0 0 0 b15 D1 b0 Source ID s low n bits n lt 4 are encoded to the destination ID When n lt 3 destination s high bits all converts to be 0 When n 0 no disposal beyond n 0 4 don t execute the instruction Applied instructions Operands DX DY DM DS T C D FD When Cs is bit device n lt 16 Ay n M10 D10 K3 Function ENCO MI7 MI6 MIS MI4 MI3 MI2 Mil MIO 0 0 0 0 1 0 1 0 7 6 5 4 2 1 0 b15 D10 Zo o o ololo ololololololo lololiTi bO All 0 When Cs is word device n lt 16 GG n HI ENCO DO DI K3 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 282256 Applied instructions Operands DX DY DM DS T C D FD If s isbitdevice n lt 16 er a MIO D10 K3 Function ENCOL
64. eed to use M8015 during real time clock setting 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 135 MEMO 6 Special function instructions In this chapter we introduce the functions of high speed count input high speed output and MODBUS communication instructions of XC series PLC 6 1 High speed count 6 2 Pulse output 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 136 Special Function instructions High speed Interior high speed counter s No is in the following table They re allocated in the input X000 X005 according to the counter s No that cannot be used counter s repeatedly When X000 X005 don t used as high speed count input they could be used as normal input points U count pulse input D count direction judgment OFF is ON is A A phase input B B phase input Single phase count Single phase input count AB phase count C600 C602 C604 C606 C608 C610 C612 C614 C616 C618 C620 C622C624 C626 C628 C630 C632 C634 X000 U U A X001 U D B X002 X003 U U X004 D B X005 X006 U U X007 D B High speed counter executes according to the fo
65. el comparison contact gt Active when the comparison OR gt KI DO SI 2 S2 is true ANB Serial connection of multiply ANd Block parallel circuits ORB Parallel connection of multiply OR Block parallel circuits OUT Final logic operation type coil i YO OUT drive SET Set a bit device permanently ON SET YO SET EA RST Reset a bit device permanently 1 RST YO ReSeT OFF ERI PLS Rising edge pulse If PLS YO PUES 3 PLF Falling trailing ed l alling trailing edge pulse EE a PuLse Falling MCS Connect the public serial F New bus line contacts e start MCR Clear the publi ial contact ear the public serial contacts ism vo Bus line return l T V r ALT The status of the assigned device i ALT MO Alternate state is inverted on every operation of the instruction NOP No operation or null step NOP No Operation END Force the current program scan END END to end Basic program instructions 4 2 LD LDI OUT Mnemonic Function Format and device X Y M S T C LD Initial logic operation contact MO LoaD type NO Normally Open i RM LDI Initial logic operation contact type MO LoaD Inverse NC Normally Closed T DD OUT Final logic operation type drive coil um 0 ui TT OUT Connect the LD and LDI instructions directly to the left bus bar Or use Instruction them to define a new block of progra
66. ere are no limitations to the number of parallel circuits when using an ORB instruction in the sequential processing configuration When using 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 XO X1 H EX ORB D uia connect the block Program batch programming method Recommended sequencial Non preferred programming method LD X0 LD X0 AND XI AND XI LD X2 LD X2 AND X3 AND X3 ORB LDI X4 LDI X4 AND X5 AND X5 ORB ORB ORB OUT Y10 OUT Y10 Basic program instructions 4 8 ANB Mnemonic Mnemonic Function Format and device and ANB Serial connection of VU meal ANd Block multiply parallel circuits Function To declare the starting point of the circuit block use a LD or LDI Description instruction After completing the parallel circuit block connect it to the preceding block in series using the ANB instruction Itis 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 xO Program RB Parallel circuit DR instruction before ANB R instruction after ANB LD X0 OR XI LD X2 Start of a branch AND X3
67. es Main Units 1 Serial Name 2 I O points 3 Output format R Relay output T Transistor output RT Mix output of Transistor Relay YO Y1 are transistor 4 Supply power E AC power C DC power 5 Clock S With Clock inside Model Relay Transistor Mix output Relay Transistor Mix output DC24V CR T output XCHASREC XC3 48R E XC3 48T E XC3 48RT E XC3 48R C XC3 48T C XC3 48RT C 20 points XC3 60R E XC3 60T E XC3 60RT E XC3 60R C XC3 60T C XC3 60RT C 24 points Switch quantity expansion l Serial name 2 E Expansion 3 Input points 4 X Input 5 Output points 6 Output format YR Relay output YT Transistor output Input Relay output cee DC24V EUR R T XC E8YR XC E8YT 8 8poins 8 8 points XC E16X 16 points 16 points XC E16YR XC E16YT 16 points 16 points XC E8X8YR XC E8X8YT 16 points 8 points 8 points XC E16X16YR XC E16X16YT 32 points 16 points 16 points XC E32X 32 points 32 points XC E32YR 32 points 32 points Summary of XC series PLC 1 3 Expansion s constitution and ID assignment XC series PLC can be used independently or used along with the expansions The Expandon following is the chart of a basic unit with 7 expansions 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 i
68. every execution of the instruction the device specified as the destination D gt 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 or 2 147 483 647 to the destination device Applied instructions Operands DX DY DM DS T C D FD 2 n DO DI D2 3 gt D10 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 If the value of n is specified outside the stated range 1 to 64 an error is generated Applied instructions WAND WOR and WXOR Operands DX DY DM DS T C D FD K Execute logic AND operation with each bit Function E i st s2 0 0 amp 0 0 O0 amp 1 0 1 amp 0 0 1 amp 1 1 L WAND D10 D12 D14 Execute logic OR operation with each bit P QU GO B Oor0 0 Oorl l WOR D10 D12 D14 l or0 1 lorl l Execute logic Exclusive OR operation with each bit GO X0 S H WXOR D10 D12 D14 O xor 0 0 0xor l 1 1 xor0 1 1 xor 1 0 If use this instruction along with CML instruction XOR NOT operation could also be executed iis W
69. executing list with CJ instructions the operate cycle and Function f dual coil can be greatly shorten 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 and Action X0 CJ P6 X1 C Yo X2 RST T246 X3 T246 K1000 X4 MOV K3 DO X0 zs CJ P7 X5 o gt 6 RST T246 See the upward graph Y00O turns to be dual coil and output But when X000 OFF X001 activates When X0002ON 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 Applied instructions CALL and SRET Operand P X0 CALL PIO Function E B gt E E S B FEND P10 n 2 amp SRET Jd 8 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 Applied instructions SET ST and STL STLE Fun
70. ey can 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 M10 and OUT Y005 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 NE UND LD x2 rogram Y2 p Mm ann MI p OUT Y2 i C X 2 LD Y2 ANI X3 OUT M2 AND TI OUT Y3 Basic program instructions 4 4 OR ORI Mnemonic Mnemonic Function Format and device X Y M S T C and OR Parallel connection of NO ir DH Function OR Normally Open contacts ORI Parallel connection of NC x as OR Inverse Normally Closed contacts Use the OR and ORI instructions for parallel connection of contacts TE jpg 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 id LD X5 Program X6 OR X6 E OR M11 cal M100 5 OUT Y6 M13 LDI Y6 AND M4 OR M12 ANI X7 OR M13 OUT M100 Relationship en AN LD The parallel connection with OR ORI instructions should connect with LD LDI instructions in pr
71. finish executing the instruction set communication finish flag When XO is OFF no operation If communication error repost automatically When reach ten times set communication error flag User could inquiry about the reason why related register judge error Special Function instructions 5 Register read REGR Function st 2 s3 D1 D2 REGR K1 K500 K3 DI K2 and action Read the model s assigned register to the assigned bureau s assigned register st Communication bureau ID 2 Register s start ID Cs Register s number Receive register s start address Serial port s ID Bound 1 3 6 Input register read INRR st 2 s3 D1 D2 X0 I INRR K1 K500 K3 DI K2 Read the model s assigned input register to the assigned bureau s assigned register st Communication bureau ID 3 Register s start ID s Register s number Receive register s start ID Serial port s ID Bound 1 3 Instruction description When X0 is ON execute REGR or INRR instruction When finish executing set communication finish flag When XO is OFF no operation If communication error repost automatically When reach 10 times set communication error flag User could inquiry the reason why related register judge error Special Function instructions 7 Single register write REGW Function m m s s X0 E REGW K1 K500 D1 K2
72. ice C235 C255 ZRST DO D127 Zone reset status SO S127 DI and D2 are assigned to be the same device and D1 lt D2 When D1 gt D2 only reset device in D1 The instruction is 16 bits but it s available to use D1 D2 to assign 32 bits counter But mix assignment is not allowed I e D1 is a 16 bits counter D2 is a 32 bits counter this condition is not allowed As single reset instruction of device RST instruction is available of Other reset bit device Y M S and word device T C D instructions As Fill Move instruction of KO you could write 0 into device DX DY DM DS T C D Xl Reset MO RST MO RST TO Reset the current value of TO Reset DO RST CO Write KO into DO D9 FMOV KO DO K100 Applied instructions Operands DX DY DM DS T C D FD Function Low 8 bits and high 8 bits change when it is 16 bits instruction If the instruction is a consecutive executing instruction each operation cycle should change Applied instructions Operands DX DY DM DS T C D FD Function 16 bits instruction X0 XCH D10 Dil Before D10 100 After D10 101 D11 101 D11 100 The contents of the two destination devices D1 and D2 are swapped When drive input XO is ON each scan cycle should carry on data exchange please note 32 bits instruction z
73. id MO Ml E tess La pem E RE a a segment 1 M8170 Special Function instructions 6 2 4 PLSF for alterable frequency output Operands Y DX DY DM DS T C D K L PLSF DO YO and Action Function a s Generate the sequencial pulse via change frequency s format Support 32 bits instruction DPLSF S assign pulse s frequency the bound 200 400KHz When set the frequency lower than 200Hz output the frequency with 200Hz D assign Y number of pulse output can only output at YOOO or Y001 In the above example with the changing of setting frequency in DO the frequency output from YO changes The following example the pulse output frequency of YO equals the input frequency from X003 When the frequency from X003 changes YO output frequency changes together FRQM K20 DO K1 X003 PLSF DO YO Special Function instructions 6 3 MODBUS communication instruction Operands DX DY DM DS T C D K Function 1 Coil Read COLR sr sz Cs r and action X0 L COLR K1 K500 K3 MI K2 The command read the assigned bureau s assigned coil to the assigned coil st Communication bureau 2 Coil s start ID s Coil s number Receive coil s start address Serial port s ID Bound 1 3 2 Input coil r
74. inciple But after the ANB instruction it s available to add a LD or with ANB After ANB instruction After ANB instruction i LDI instruction Mnemonic and Function Description Program Basic program instructions 4 5 DP LDF ANDP ANDF ORP ORF Mnemonic Function Format and device X Y M S T C LDP Initial logical Ss gr LoaD Pulse operation Rising edge pulse LDF Initial logical operation iu LoaD Falling Falling trailing edge pulse i pulse ANDP Serial connection of Rising T n EE AND Pulse edge pulse m ANDF Serial connection of ji Ps AND Falling Falling trailing edge pulse S pulse ORP Parallel connection of i QU 9 OR Pulse Rising edge pulse x ORF Parallel connection of i gt OR Falling pulse Falling trailing edge pulse LDP ANDP ORP are active for one program scan after the associated device switches from OFF to ON LDF ANDF ORF are active for one program scan after the associated device switches from ON to OFF X5 M13 J JM Ix j M8000 X7 T MIS 5 X5 I M13 X6 I M8000 X7 mel M15 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 LDP ORP OUT LD ANDP OUT LDF ORF OUT LD ANDF OUT X5 X6 M13 M8000 X7 M15 X5 X6 M1
75. ion and Action S1 pulse cycle number I e In one scan cycle collect tested input pulse cycle number S2 testing result Operands D CD TD Frequency choosing Choose bound K1 or K2 When frequency is K1 frequency testing bound gt 9Hz precise bound 9 18KHz When frequency is K2 frequency testing bound gt 300Hz precise bound 300 400KHz Pulse input port X number When testing the frequency choose the frequency as K2 the frequency testing precise is higher than K1 When X000 is ON each scan cycle of FROM test 20 pulse cycle from X003 calculate the frequency value and store into D100 repeatedly testing If the tested value is smaller than the tested bound return the tested value as 0 Table of X number correspond with frequency testing pulse output Model X number XC3 14 model X2 X3 XC3 24 XC3 32 model Xl X11 X12 XC3 48 XC3 60 model X4 X5 XC3 18R model Xl X6 X7 Special Function instructions 6 7 Precise time Function X0 and Action ft STR T600 K100 T600 YO MO 1 RST T600 timer s number The bound T600 T618 CT600 T602 T604 T618 the time value Operands constant register This instruction is the precise time instruction with the cycle of 1ms When X000 turns from OFF to ON timer T600 starts to time when time accumulation reaches 100ms T600 set if X000 again turns from
76. it have no end bit Setting method of communication parameter FD8210 COM1 FD8220 COM2 300bps 600bps 1200 bps 2400 bps 4800 bps 9600 bps 19 2K bps 38 4K bps 57 6K bps 115 2K bps 0 no check 1 odd 2 even 0 2 stop bits 2 lstop bit 0 8bits data 1 7bits data O ooun NDNA FP WN KF c FD8216 COM1 FD8226 COM2 0 8 bits 1 16 bits keep 0 no start 1 with start 0 no end 1 with end Special Function instructions 6 5 PWM pulse width modify Function X0 m e PWM K100 D10 YO and action SL Assign occupy empty ratio value n The bound is 1 255 S2 Assign output frequency f The bound is 0 72KHz n Assign Y number of output pulse Can only output at YOOO or Y001 please treat as transistor output type Theoutput occupy empty ratio of PMW zn 256 X 10096 PWM output use the unit of 0 1Hz so when set S1 frequency the set value is 10 times of the actual frequency i e 10f E g to set the frequency as 72KHz 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 TO 1 f T T0 n 256 Special Function instructions 6 6 Frequency testing GO G9 GO G9 FROM K20 D100 K1 X003 Funct
77. le 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 xo X xo X li YO xe S X3 X4 3 X4 I I YO x2 I MO X3 X4 MI mo 9 YO MI 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 Memo 5 Applied instruction 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 Move and Compare Instructions 5 5 Arithmetic and Logic Operation Ins
78. lied instructions Operands DX DY DM DS T C D FD K Function X0 B 2 EMUL D10 D20 D50 and action D11 D10 X D21 D20 D51 D50 The floating point value of S1 is multiplied with the floating point value point value of S2 The result of the multiplication is stored at D as a floating point value If a constant K or H used as source data the value is converted to floating point before the addition operation Xl I EMUL K100 D100 D110 K2346 X D101 D100 IILDI110 Applied instructions Operands DX DY DM DS T C D FD K EDIV D10 D20 D50 D11 D10 D21 D20 D51 D50 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 remainer is calculated If a constant K or H used as source data the value is converted to floating point before the addition operation Xl I EDIV D100 K100 D110 DIOLD100 K2346 DIILDII1O IfS2iszero then a divide by zero error occurs and the operation fails Applied instructions Operands DX DY DM DS T C D FD K X0 Function ESOR a D10 D20 and action D11 D10 D21 D20 A square root is performed on the floating point value in S the result is stored in D If a constant K or H
79. loating EMUL Multiplication of floating operation EDIV Division of floating ESQR Extraction of floating SIN SIN operation of floating COS COS operation of floating TAN TAN operation of floating 186 Appendix 2 special functions 1 Alterable frequency pulse output PLSF 2 Frequency testing FROM 187 Appendix 188
80. m when using ANB instruction description 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 Cinclude the set value See the following table Timer counter Setting bound of K The actual set value 1ms 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 X0 Y100 Program Xi M1203 TO TO if Yi LD OUT LDI OUT OUT SP LD OUT X0 Y100 XI M1203 TO K19 TO Y1 Basic program instructions 4 3 AND ANI Income Mnemonic Function Format and device X Y M S T C and AND Serial connection of Dc pec Function AND NO Normally Open B contacts ANI Serial connection of eere lt a ANd Inverse NC Normally Closed contacts Use the AND and ANI instructions for serial connection of contacts Ly un As many contacts as required can be connected in series Th
81. nput is ON the counter carries on decrement count Dual phase The normal rotate encoder s output is phase A and phase B which innnft have 90 phase difference According to this high speed counter automatic execute increment decrement count This dual phase counter activates as counter which increases one Phase A Phase A Phase B De 21 Time Time Special Function instructions 6 2 Pulse output 6 2 1 Pulse output PLSY Operands Y DX DY DM DS T C D K Function a Gr 2 and Action PLSY K30 DI YO M8190 RST MO The instruction with the assigned frequency to generate the assigned pulse support 32 bits instruction DPLS Y 1 assign the frequency The bound 0 400KHz S2 assign the generated pulse quantity The allowed setting bound 16 bits instruction 0 32 767 32 bits instruction 0 2 147 483 647 when the pulse setting number is 0 don t send pulse assign the value as H 7FFFFFFF there is no limitation with the generated pulse number D assign output pulse s Y number can only output at YOOO or YOO1 When MO is ON with this PLSY instruction YO output pulses with the output frequency 30Hz the pulse number is assigned by D1 if set pulse number as H 7FFFFFFF it means send infinity pulses at this time coil M8190 set ON When the output pulse number reaches the set value stop outputting the pulse at this tim
82. nput output specification and exterior layout Exterior XC series PLC s input power is supplied by its interior 24V power so if circuit used use exterior power to drive photoelectricity sensor etc this exterior power should be DC24V 4V please use NPN open collector type for I eos CO X by sensor sensor s output transistor DO power DC2o4V Sensor provide power Exterior power DC24V Sensor Input connection PLCmainframe Extend unit Power circuit s specification input output specification and exterior layout DCc24v Sensor provide power Sensor Switch Power circuit s specification input output specification and exterior layout 2 5 Output specification Interior power Below 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 DC5V 2mA Response OFF ON 10ms time ON OFF 10ms 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 Power circuit s specification input
83. nput output type is not limited both switch or analog quantity are available ID Assignment Summary of XC series PLC Max points Unit Type ID As register Channels Input switch quantity X X100 X137 32 points Output switch quantity Y Y100 Y137 32 points Expansion id Input analog quantity ID ID100 ID131 16 channels Output analog quantity QD QD100 QD131 16 channels Module s set value D D8250 D8259 Input switch quantity X X200 X237 32 points Output switch quantity Y Y200 Y237 32 points Expansion ok 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 ju 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 Y437 32 points Expansion m 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 Ys Input analog quantity ID ID500 1D531 16 channels Output analog quantity QD QD500 QD531 16 channels Module s set
84. nt 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 Each soft unit s usage and function 3 2 Device s ID list For the allocate of device s ID please see the following list Besides when connect input output expansions 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 24 32 48 60 14 points 24 32 points 48 60 points i i points points points X000 X015 X000 X033 f 14 18 28 36 X Input relay X000 X007 8 points X000 X021 X000 X043 points points Y000 YO11 Y000 Y023 1044 2024 Y Output relay Y000 Y005 6 points Y000 Y015 Y000 Y027 points points M0 M2999 M3000 M7999 8000 M Interior relay M8000 M8511 for special using 512 S0 S511 S Flow 1024 S512 S1023 TO T99 100ms not accumulation T100 T199 100ms accumulation 200 T299 10ms not accumulation T Timer T300 T399 10ms accumulation 620 T400 T499 lms not accumulation T500 T599 lms accumulation T600 T618 1ms with interruption precise time C0 C299 16 bits forth counter C Counter C300 C598 32 bits forth back cou
85. nter 635 C600 C634 high speed counter D0 D3999 8000 D4000 D7999 D Data Register For special usage D8000 D8511 512 FDO FD1535 1536 FlashROM FD Register For special usage FD8000 FD8511 512 Each soft unit s usage and function NOTE X1 The memorizer area in is the defaulted power failure retentive area soft elements D M S T C can 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 battery 7X3 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 System s Memory bound Mnemonic Set area Function defaulted of power drop value Start denotation of D power D FD8202 4000 D4000 D8000 cut save area Start denotation of M power M FD8203 3000 M3000 M8000 cut save area Start denotation of M power T FD8204 620 Not set cut save area Start denotation of C power C FD8205 320 C320 C640 cut save area Start denotation of S power S FD8206 512 512 S1024 cut save area Each soft unit s usage and function 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
86. o the assigned slope Stop pulse outputting coil M8170 set OFF iis op l i I L l M8170 Normal Condition stop in the middle way Special Function instructions 2 Pulse output of segments and single phase Function si 2 DO MO PLSR D100 Y3 M8170 l 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 both 0 it means segment finish 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 The set bound is Below 5000ms D assign the Y number of output pulse can only output at YOOO or Y001 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 segment 2 D2 D3 d D i e a aa o Qa 8 23 M8170 Special Function instructions 3 pul
87. ock move FMOV Fill move FWRT FlashROM written MSET Zone set ZRST Zone reset SWAP The high and low byte of the destinated devices are exchanged Applied instructions 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 Applied instructions Common statements of XC3 XC5 SHL Arithmetic Shift Left SHR Arithmetic Shift Right LSL Logic shift left LSR Logic shift right 7 ROL Rotation shift left Data Shift ROR Ritation 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 Data 7 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 Monet EMUL Float Multiplication Point EDIV Float division Operation ESQR Float Square Root SIN Sine COS Cosine TAN Tangent TCMP Time Compare TZCP Time Zone C
88. 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 DO 8 D2 29 D5 D4 72 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 S1 S2 D s k DMUL DO D2 D4 BIN BIN BIN D1 DO X D3 D gt D7 D6 D5 D4 32 bits 32 bits 6E 64 bits e 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 Applied instructions Operands DX DY DM DS T C D FD K 16 bits operation Function SL 52 D x m DIV DO D2 D4 and action Dividend Divisor Result Remainder BIN BIN BIN BIN DO oo D2 D4 D5 16 bits 16 bits 16 bits 6 bits e GD appoints the device s content be the dividend 82 appoints the device s content be the divisor D gt appoints the device and the next one to store the result and the remainder 32 bits operation S
89. ompare Clock TADD Time Add Operation TSUB Time Subtract TRD Read RTC data TWR Set RTC data Applied instructions 5 2 Reading method of the applied instruction s description The understanding method of instruction s description In this manual instructions are described with the following format 1 Operands DX DY DM DS T C D K Function 6 3 and action A CD10 D12 gt Di4 4 vim I 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 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 is the case then the result changes after every scan cycle Please note this point Applied instructions
90. on 1 1 Summary of XC series PLC and program format XC series programmable controller Introduction I O 14 60 points FlashROM memory inside Real time clock With clock inside Li battery power drop memory Multi COM ports can connect with inverters instrucments printers etc Rich instructions convenient to program Statement Program Statement program is the format which use LD AND OUT etc these Program 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 units 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 also available to monitor the PLC s action via the status displayed in the circuit E g AF Y5 The programs compiled with the preceding two methods are both stored in Alternation th PLCs program memory in the format of instruction table So the denotion and edition of this two program format can convert to the other Summary of XC series PLC 1 2 XC series PLC s model and type XC3 O O FOO 1 2 3 4 5 XC seri
91. on SET permanently ON RST Reset a bit device RST YO ReSeT permanently OFF 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 definition 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 definition ID with OUT instruction X10 LD X10 SET YO SET YO Program X11 RST YO LD XII x12 RST YO SET M50 LD X12 X13 RST M50 SET M50 x14 LD X13 SET gt Y RST M50 X15 RST SO LD X14 X10 K10 SET SO T250 LD X15 X17 RST T250 RST S0 LD X10 OUT T250 SP K10 X10 LN LD X17 si f RST T250 pr Basic program instructions 4 13 OUT RST for the counters Mnemonic Mnemonic Function Format and device X Y M S T C and OUT Final logic operation T C c 5
92. onstant K automatically converts to binary so it s not suitable for this instruction Applied instructions Operands DX DY DM DS T C D FD Function Convert and move instruction of source BIN destination BCD BCD D10 DO When use BCD instruction if the converted BCD number exceeds the operational ranges of 0 to 9999 16 bits operation and 0 to 99999999 32 bit operation an error will occur This instruction can be used to output data directly to a seven segment display Function and action Applied instructions Operands DX DY DM DS T C D FD 16 bits convert mode When M8161 OFF OFF when RUN OFF M8000 S D n s 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 0 230H 1 231H 5 235H D100 0ABCH A 41H 2 32H 6 236H D101 1234H B 242H 3 233H 7 237H D102 5678H C 43H 4 34H 8 38H gt a fo n n D200 down te B ta 0 t43 t31 t27 D201 down A D202 down Pech t ta D202 up Dm D D203 up D204 down Applied instructions Operands DX DY DM DS T C D FD 16 bits
93. ore 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 Applied instructions 5 4 Data Move Mnemonic Function MOV Move BMOV Block Move FMOV Fill Move FWRT Written of FlashROM ZRST Zone Reset SWAP Float To Scientific XCH Exchange Applied instructions Operands DX DY DM DS T C D FD K S Move data from one storage area to a new 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 E MOV TO D20 TO current value D20 It s the same with the counter Indirect assign the set value of timer counter X2 MOV K10 D20 K10 D10 MO D20 K10 T20 D20 Move of 32 bits data DMOV DO D10 D1 DO gt D11 D10 C235 current value D21 D20 DMOV C235 D20 Applied instructions Function Operands DX DY DM DS T C D FD K 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
94. output specification and exterior layout 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 ACI00V 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 inductance load below 80VA CACIOOV or AC200V and lamp load below 100W CACIO0V or AC200V Opencircuit s leak current When the output contact be OFF and there s no leak current can directly drive Ne lamp etc Thelife of relay output contacts Standard life of induce AC load such as contactor electromagnetism valve 5 million times for 20VAload Cut power device s life according to the company s test for 80VA load the action life is up to 2 million times Output connection example To avoid burning PLC s basic panel s layout caused by load short current etc set a 5 10A fuse every four points 5 7 104 DJ C power X AC250V
95. ples 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 1 MOV K5 DO M8000 MOV D10 D0 D100 YO D0 In the preceding example when DO 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 DO 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 D 2 Bitunits compose word Input X output Y middle coil M could compose 16 bits word E g DXO means X0 X17compose to be a 16 bits data DX20 means X20 X37 combines a 16 bits data Format Add a D before bit device Bit devices combine to be word devices DX DY DM DS DT DC MO 1 MOV K21 DYO MI 1 MOV K3 DO M8000 MOV DX2 D0 D10 In the preceding example when MO turns from OFF to be ON the value of the word DYO composed by YO Y17 equals 21 i e 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 Mlturns 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 Please note the word composed by bit device couldn t car
96. r than 1M capacity I O points 8 in 6 output 14 18 in 28 36 in 10 14 out 20 24 out Interior S 8512 points points eee 620 Points Timer 100mS timer Set time 0 1 3276 7 seconds Spec 10mS timer Set time 0 01 327 67 seconds 1mS timer Set time 0 01 327 67 seconds Points No No 635 Points Count 16 bits counter set value KO 32767 er C Mise 32 bits counter set value K0 2147483647 FlashROM Register 2048 words FD High speed 3 types high speed count format Single direction counter exterior double direction AB phase interrupt 2 routes exterior interruption Rising edge Falling edge Setting of time scan 0 99mS space Password 6 bits ASCII E ei Self diagnose Power on self diagnose Monitor timer grammar Summary of XC series PLC 1 5 Exterior Size XC3 series 14 points main units Including 16 points expansions XC3 series 32 points main units Including 24 points main units 32 points expansion 63 d cot MI MLICIMmMIIIIX ILI III I xlh 110 2g ES gi E m Sx ao GENET EJESeelielo 4 a XC3 series 60 points main units Including 48 points main units Summary of XC series PLC KETTE RETE RPTRE TRPTE RP RSS RORIS RP TP RT HESOeooeeomeeoooomeome 110 f rng XC3 amp 0R E c 01234587 un snes 99226029 00 NS Olpogoo2 31v 1 6 Terminal arrangement Main Unit 10 Summary of XC
97. ram 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 circuit will be changed please note this OUT NOP w So Ey A AND NOP ANI NOP Contacts short circuit v OR NoP Open circuit ORI NOP 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 repeat executing the program from step 0 When debug insert END in each program segment to Output disposa 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 Basic program instructions 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 availab
98. rk 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 MI 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 Applied program examples 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 No 2 communication port Ladder program ms002 MOV K2 DO MOV KO D1 STL sa m8138 T200 K2 C 1 jor DO Kio KS D10 D1 K2 s1 S REGR DO K15 K5 D15 D1 K2 ADD Kio Di Di MOY K2 DO MOV KO Di STLE Applied program examples 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 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
99. rmat in the upward table and EO to the special inputs Go on high speed action according to the interrupt disposal It s independent with the PLC s scan cycle This type of counters could be divided into the following three types Item Single phase Single phase count input AB phase count input positive count input Count Only positive When direction judgment input A phase exceed B phase direction s count is ok is OFF pulse input is positive 90 positive count A assign method count When direction phase lag B phase 90 judgment input is ON pulse negative count input is negative count Special Function instructions 6 1 2 Using method of single phase high speed counter Action MO When MO is ON C600 count with C C600 D KS OFF ON of X000 MI If MI is ON reset when execute RST RST C600 instruction 3 C604 starts to count when M2 is ON M C C604 DDOD The count input is X004 in this examples the set value use the content junoo eAnrsod eseud op gurg RST C604 in the indirect data register As showed in the above graph execute reset via M3 in the program When M4 is ON C620 counts with OFF ON of X000 Via M4 C620 DDOD OFF or ON of X001 judge the ME count direction If X001 is OFF RST C620 execute positive count if X001 is ON execute negative count
100. ry on bit searching address Each soft unit s usage and function 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 OXimx 15 D0 4 YO ID5 D1 4 Xr 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 DI 5 it says D5 D1 means the number 4 bit of D10 The bit of word device with offset is denoted as Dn Dm x Please note to the bit of word device they couldn 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 als T11 2K99 1 MOV T11 DO Y1 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 Each soft unit s usage and function 3 5 Timer s number and function T Please see the following table for the timer s T number the number is Timer s assigned according to Hex number 100ms not accumulated 16 bit
101. s 4 4K steps 88K steps Battery voltage 0 1V unit 170 Function Appendix Description Shake with the cycle of 10ms Shake with the cycle of 100ms Shake with the cycle of 1 Shake with the cycle of 1 Bits of year Function Defaulted is OFF OFF 2 ON 4 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 RAMP mode 171 Appendix ID Function Description D8010 The current scan cycle Unit 0 1ms D8011 Mini value of scan time Unit 0 1ms D8012 Max vale of scan time Unit 0 1ms D8013 Second clock 0 59 BCD code format D8014 Minute clock 0 59 BCD code format D8015 Hour clock 0 23 BCD code format D8016 Date clock 0 31 BCD code format D8017 Month clock 0 12 BCD code format D8018 Year clock 2000 2099 BCD code format D8019 Week clock 0 Sunday 6 Saturday BCD code format ID Function Description Model Low byte D8021 Serial number High byte Compatible system s version number Low byte D8022 System s version number High byte Compatible model s version number Low byte D8023 Model s version number High byte D8024 D8025 Model s information D8026 Max 5 ASC anda 0 D8027 D8028 suitable host machine version
102. s T0 T99 100ms accumulated 16 bits T100 T199 10ms not accumulated 16 bits T200 T299 10ms accumulated 16 bits T300 T399 lms not accumulated 16 bits T400 T499 lms accumulated 16 bits T500 T599 T600 T618 T600 T602 T618 each Ims with interrupt precise time 32 bits engrosses 2 timers number the number should be even The timer accumulates clock pulse of lms 10ms 10ms inside PLC When onc 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 xb If drive input X000 of time coil C T200 K200 T200 is ON T200 accumulates Q T200 10ms clock pulse with the E current value timer If this s s current value equals the set 5 X0 value K200 timer s output E E j Ihe Set contact AE fem That is output valug contact activates after 2 seconds 0 of coil driving Driving input X000 cut or power cut timer reset output contact reset Each soft unit s usage and function If the drive input X001 of X1 K2000 Cno gt timer s coil T300 is ON T300 T300 z l Yo gt accumulates 10ms clock pulse X2 1 5 BST T300 with the current value counter E When the value reaches the set e E tl 2 11402206 value K2000 counter s output gt X1 EE contact activates In the count aA Th
103. s drive input is cut they will still hold the current value go on accumulating the action Each soft unit s usage and function 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 2 147 483 647 These counters 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 curre
104. s true AND lt Serial comparison contact Active when the comparison SI lt S2 is true AND gt Serial comparison contact Active when the comparison SI S2 is true OR Parallel comparison contact Active when the comparison SI 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 SI 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 SI lt S2 is true OR Parallel comparison contact Active when the comparison SI S2 is true Basic program instructions LD O Format and The value of S1 and S2 are tested according to the comparison of the instruction If Function the comparison is true then the LD contact is active If the comparison is false then the LD contact is not active 16 bits 32 bits Active condition Inactive condition LD DLD SI S82 S1 4 S2 LD gt DLD gt S1 gt S2 S1 lt S2 LD lt DLD lt S1 lt S2 S1 2 S2 LD lt gt DLD lt gt S1 4 S2 S1 S2 LD lt DLD lt SI S2 SI gt S2 LD gt DLD gt SI 2 S2 CSI lt S2 C m X0 Program i LD K100 co X0 LD gt D200
105. s 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 DC power DC5 30V Optical coupling drive circuit Power circuit s specification input output specification and exterior layout E g The following is the connection graph of RT type PLC with step motor driver PLC side k J YO 7 A K A 4 COMO E Y1 Ay J AN a A Co E Step motor driver PU n4 A UN CS PU o d ON C Power circuit s specification input output specification and exterior layout MEMO 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 is the base to use PLC 3 1 Every soft unit of PLC 3 2 Soft unit s ID list 3 3 Disposal of data 29 Each soft unit s usage and function 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
106. same Applied instructions SFTL and SFTR Operands DX DY DM DS T C D FD The instruction copies n2 source devices to a bit stack of length nl ugs 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 and action 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 interlack Bit shift left M15 M12 gt overflow M11 M 8 MI5 M 12 M 7 M 4 gt M11 M8 M 3 M 0 M7 M4 X 3 X 0 M3 MO 6 0G 8G GoO0 o Gn 2 Pt set is ow ue e X2 X1 n2 bits shift left Cees ee EE tas as sas ncaa cai cao ne we c Me No mes ne M2 MI Mp RU RA R D D D Bit shift right M3 M 0 overflow M 7 M 4 M3 MO QQ a 2 s M15 M12 gt M11 M8 amp X3 X0 MI15 M12 Applied instructions WSFL and WSFR Function and action Operands DX DY DM DS T C D FD The instruction copies n2 source devices to a word stack of length nl 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 everytime the instruction is processed unless i
107. se output of segment dual direction Function im Gr 99 PLSR DO D100 YO Y3 M8170 I RST MO Instruction of generate a certain quantity pulse with the assigned frequency S1 an area take Dn or FDn with the start address In the preceding example DO 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 S2 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 The set bound below 5000ms D1 assign Y number of output pulse can only output at YOOO or Y001 D2 assign Y number of output pulse direction can be assigned at your will E g In S1 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 Segment 1 Segment 2 Segment 3 1 M8170 Special Function instructions 1 some basic parameters of speedup speed down Note Items output YO or Y p 81 vels each 5 level 5ms B 3z
108. speed counter C600 C634 C600 C602 C634 Each one engrosses 2 counter No The number must be even Counter s The characters of 16 bits counter and 32 bits counter are the following characteristic Items 16 bits counter 32 bits counter Count direction Positive Positive negative The set value 1 32 767 2 147 483 648 2 147 483 647 The assigned set value register Constant K or data Same as the left but data register must be in a couple Changing of the current value count Change after positive Change after positive count Loop counter Output contact D positive count Hold the action after Hold the action after positive count reset if negative count Reset activates When executing RST command counter s current value is 0 output contacts recover The current value 16 bits register 32 bits Each soft unit s usage and function About the assignment of normally used counter and power failure retentive Function counter could be changed in the method of changing FD parameters setting via the peripheral device 16 bits binary increase 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
109. 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 4 Hour 20 Minute 10 Minute 30 Minute 5 Second 30 Second 35 Second 10 hour 20 min 5 sec 18 hour 10 min 30 sec 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 Applied instructions Operands DX DY DM DS T C D FD K rom E The current time and date of the real time KS TRD DO clock are read and stored in the 7 data 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 Moni Yea Month Dae Applied instructions Operands DX DY DM DS T C D FD K TWR DIO The 7 data devices specified with the Function X0 Cs KS head address S are used to set a new current value of the real time clock Write the set clock data into PLC s real time clock In order to wirte real time clock the 7 data devices specified with the head address S should be set Device Meaning 8018 Year 8015 Hours Minutes Seconds This instruction removes the n
110. sult 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 t EADD D100 K1234 D110 K1234 DIOLDIOO DIILDIIO 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 prevous 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 Applied instructions Operands DX DY DM DS T C D FD K me D10 D20 D50 Function X0 L ESUB and action D11 D10 D21 D20 gt D51 D50 The floating point value of S2 is subtracted from the floating point value of S1 and the result stored in 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 ESUB K1234 D100 D110 K1234 DIOLDIOO D111 D110 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 App
111. t Constitution and connection Power circuit s specification input output specification and exterior layout 2 2 AC power DC input type DC24V E 24v Sensor provide power AC DC convert 24V IC Power L AC100V AC240V 5OHZ 60HZ 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 t go on exterior connection or use it as relay terminal Please connect the basic unit with extend module s COM terminal Basic units Power circuit s specification input output specification and exterior layout 2 3 Input Specification format 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 Contact input or NPN open collector transistor 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 inpu
112. t is modified with either the pulse suffix or a controller interlock Word shift left xn 8 D ni n i SFR Do DO Kie K4 D25 D22 overflow D21 D18 D25 D22 D17 D14 D21 D18 D13 D10 D17 D14 D 3 D 0 D13 D10 G amp e amp eG maGoO Word shift right D13 D10 overflow D17 D14 D13 D10 D21 D18 D17 D14 D25 D22 D21 D18 D 3 D 0 D25 D22 mL OQ 2 wae ir J oo eae ee Applied instructions 5 7 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 Applied instructions Operands DX DY DM DS T C D FD DO gt D11 D10 Single word Double word WTD D10 Function E k DO Oor 1 DO D11 D10 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 Applied instructions FLT and FLTD Operands DX DY DM DS T C D FD 16 bits Function XO s k FLT D10 D12
113. t or format NPN open collector transistor Circuit insulation Photo electricity coupling insulation Input action s display LED light when input ON DC24V Sensor provide pca4wv Sensor provide power keIS o o Power circuit s specification input output specification and exterior layout 2 4 DC input signal s disposal AC power type DC input signal DG Power Input terminal When connect input terminal and COM DC24V Sensor provide Sensor 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 lOms There s a digital filter inside X000 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 Power circuit s specification i
114. tart ASC Unit ms FD8225 End ASC Unit ms if set to be 0 it means no timeout waiting FD8226 Free format setting 8 16 bits cushion have no start bit have no end bit 255 is free format COM3 FD8230 Communicate mode 1 254 bits modbus station ID FD8231 Communicate format Baud rate data bit stop bit checkout Judgment time of ASC FD8232 High 8 bits be of no effect timeout 185 Appendix Judgment time of reply i FD8233 Low 8 bits be of no effect timeout FD8234 Start ASC Unit ms Unit ms if set to be 0 it means no timeout FD8235 End ASC n waiting 8 16 bits cushion FD8236 Free format setting have no start bit have no end bit Remark Some of instructions stated in this manual are still in developing please note 1 Applied instructions SFTL Bit shift left Data SFTR Bit shift right Shift WSFL Word shift left WSFR Word shift right FLT 16 bits integer converts to be floating Du FLTD 64 bits integer converts to be floating pP INT Floating converts to be integer BIN BCD converts to be binary BCD Binary converts to be BCD TCMP Clock data compare Clock TZCP Zone compare of clock data operation TADD Addition of clock data TSUB Subtraction of clock data ECMP Floating compare EZCP Zone compare of floating EADD Addition of floating ESUB Subtracting of floating F
115. ting point value in S The result is stored in D s RAD value Angle X IT 180 Assign binary float point value D61 TAN value Binary float point Applied instructions Applied instructions 5 9 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 Applied instructions Operands DX DY DM DS T C D FD K Compare the assigned time with time data E G GD G Function A D mwn I 10 20 30 gt S ON L 10 20 30 S ON Sis a 10 20 30 S ON The status of the destination devices is kept even if the TCMP instruction is deactivated e 6D 2 and 3 represent hours minutes and seconds respectively This time is compared to i apt CS eas the time value in the 3 data devices specified by the head address The result is indicated in the 3 bit devices specified by the head address 55 GY Hour S2 Minute S3 Second CS Hour S 1 Minute S 2 Second DO 1 D 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 J The valid range of Second is 0 59 Applied instructions Operands DX DY DM DS T C D FD K Compare the two assigned time with time data
116. tructions 5 6 Loop and Shift Instructions 5 7 Data Convert 5 8 Floating Operation 5 9 Clock Operation 5 1 Applied Instruction List Applied instructions 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 Program 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 SI 4 S2 LD lt LD activates if S1 lt S2 LD gt LD activates if SI 2 S2 ND AND activates if S1 S2 AND gt AND activates if S1 gt S2 Data AND lt AND activates if SI S2 Compare AND lt gt AND activates if S1 4 S2 AND lt AND activates if S1 lt S2 AND gt AND activates if SI S2 OR OR activates if S1 S2 OR gt OR activates if S1 gt S2 OR lt OR activates if S1 S2 OR lt gt OR activates if S1 z S2 OR lt OR activates if S1 lt S2 OR OR activates if S1 2 S2 Data MOV Move Move BMOV Bl
117. uit 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 theuser manual 2 5 Output specification 2 6 Disposal of relay output circuit 2 7 Disposal of transistor output circuit 15 Power circuit s specification input output specification and exterior layout 2 1 Power specification For the power specification of XC series programmable controller s basic units see the following table AC power Rated voltage AC100V 240V type Voltage allow AC90V 265V bound Rated frequency 50 60Hz Allow momentary Interrupt time lt 0 5 AC cycle alternation 1 sec power cut time Impact current Max 40A 5mS below AC100V max 60A 5mS below AC200V Max power 12W consumption 24VDC 10 max 400mA 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 DC power type Rated voltage DC24V Voltage allow bound DC21 6V 26 4V Input current 120mA DC24V Only basic unit Allow momentary 10mS DC24V power cut time Max power 12W o ME ME 24VDC 10 Max 400mA use Power circuit s specification input output specification and exterior layou
118. use dual of Y003 is OFF coil the back side act in prior So the actual output is YOO3 OFF Y004z ON Memo 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 MCR 4 10 ALT 4 11 PLS PLF 4 12 SET RST 4 13 OUT RST Compare with counter s soft unit 4 14 NOP END 4 15 Note items when programming 4 1 List of basic instructions Basic program instructions Active when the comparison S1 gt S2 is true Mnemonic Function Format and device LD Initial logical operation contact MO LoaD type NO normally open j 4 LDI Initial logical operation contact MO LoaD Inverse type NC normally closed ex eS LDP Initial logical operation Rising MO LoaD Pulse edge pulse l a LDF Initial logical operation Falling MO LoaD Falling trailing edge pulse E AL Pulse AND Serial connection of NO MO AND normally open contacts I cH M ANI Senal connection of NC MO AND Inverse normally closed contacts AF ANDP Serial connection of rising edge
119. used as source data the value is converted to floating point before the addition operation Xi K1024 gt D111 D110 ESOR K1024 D110 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 Applied instructions Operands DX DY DM DS T C D FD K m SIN D50 D60 D51 D50 D61 D60 SIN This instruction performs the mathematical SIN operation on the floating point value in S angle RAD The result is stored in D RAD value angle X I1 180 s DS8 T9 7 Assign binary float point value D61 SIN value Binary float point Applied instructions Operands DX DY DM DS T C D FD K Function X0 K COS D50 D60 and action D51 D50 RAD gt D61 D60 COS 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 I1 180 s si 3507 Assign binary float point value Del COS value Binary float point Applied instructions Operands DX DY DM DS T C D FD K Function X0 TAN e D50 D60 D51 D50 RAD gt D61 D60 TAN This instruction performs the mathematical TAN operation on the floa
120. vancaduad edi rire rin Mt M ete be te Giieeutadebadtan isvededesadessants 116 3 0 CLOCK OPERATION rette PERSE FEES E ERR RR AREE I ENQUR ERE IIR UFU eer Ea 128 SPECIAL FUNCTION INSTRUCTIONS eese eere e teens en etna enata etat ta enata sons ta tasa enata sensa tu 136 6z1 HIGHSPEED COUNTER i5 dite R ete EN RR EET ET E NEN e YR 137 6 1 1 HSC s number and function nennen nennen nennen rennen 137 6 1 2 using method of single phase HSC sessi nennen 138 6 1 3 using method of AB phase HSC sessi eerte eerte 139 6 2 PULSE OUTPUT i eene ie P ERE ER SNR CRAS HE REA EE RE BRE AEE AE NE Bae EET IE E eiua 140 6 2 1 BEES Y lof pulse output eem eee ere meteo tue e edm eo edes 140 6 2 2 PLSR with speedup speed down pulse output esee 141 6 2 3 PLSNEXT pulse segment shift essent 145 6 2 4 PLSF alterable frequency pulse output esee 146 6 3 MODBUS COMMUNICATION INSTRUCTIONS ssssssssssssesesssesesssesessnesessnees TA AEM BE 6 4 FREE FORMAT COMMUNICATION u ccsccccesssseccesssceccesssccceesscecceesssecceesseecesessecceesseeccssseeceessseeees 147 6 5 PWM PULSE WIDTH MODULATE cccssccssseeeseceeeeeececscecesseeeeaeecnseecscecseneeeeseecsaaeeneeeeneaeenaes 154 6 6 FREQUENCY TESTING ssi aches eine PRESENTA CUR Ree TER a sic ee Fee Mae He ee ed eee Eee anaes 155 OST PRECISE DIME noitaa eite siesta ict IR ett ceo om UR Sul et
121. w Direction flag l is positive direction the correspond direction port is ON PULSE 4 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 Sending pulse flag Be at pulse sending 32 bits pulse overflow flag 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 Control of positive negative count 0 is plus count 1 is minus count the defaulted is 0 179 Appendix ID Counter s ID Function Description D8150 C600 dut gment means D8151 C602 The current segment D8152 C604 The current segment D8153 C606 The current segment D8154 C608 The current segment D8155 C610 The current segment D8156 C612 The current segment D8157 C614 The current segment D8158 C616 The current segment D8159 C618 The current segment D8160 C620 The current segment D8161 C622 The current segment D8162 C624 The current segment D8163 C626 The current segment D8164 C628 The current segment D8165 C630 The current segment D8166 C632 The current segment D8167 C634 The current segment D8168 C636 The current segment D8169 C638 The current segment
Download Pdf Manuals
Related Search
Related Contents
ThorSoft spirometry software User`s manual - TAG Heuer Timing Systems Stains All Gel Staining Kit for Acidic Proteins - B User Manual LMm (SA3C32A) Smalltalk Solutions 2005 Report LG WM3050CW Energy Guide Finisar FTLF8524P3BNL network transceiver module Soin professionnel des plaies pour l`industrie agro Copyright © All rights reserved.
Failed to retrieve file