Home

1 Program Summary

image

Contents

1. M8000 M8285 S Y2 S Y2 MN OUT C340 K1000000 M8000 DMOV K75000 D4000 DMOV K15000 D4002 DMOV K 75000 D4004 DMOV K 15000 D4006 M8000 OUT C630 K30000000 D4000 M8000 7 HSCR C630 D200 FEND 12501 M8000 Y4 S IRET 12502 M8000 Y4 R Y2 R Y3 S IRET 12503 M8000 Y4 S IRET 12504 M8000 Y3 R Y4 R 4 Y2 S IRET Instruction List Form LD M8002 SET M8285 SET Y2 M8002 is initial positive pulse coil special auxiliary relay set ON to enable C630 continuous loop set output coil Y2 i e Start run forth LDP Y2 knit weaving machine back forth times counter s activate condition Y2 forth rising edge activate OUT C340 K1000000 LD M8000 DMOV_ K75000 D4000 DMOV_ K15000 D4002 DMOV_ K 75000 D4004 DMOV_ K 15000 D4006 LD M8000 OUT C630 K30000000 D4000 LD M8000 HSCR C630 D200 FEND 12501 LD M8000 SET Y4 IRET 2502 LD M8000 RST Y4 RST Y2 SET Y3 IRET 2503 LD M8000 SET Y4 IRET 2504 LD M8000 RST Y3 RST Y4 SET Y2 IRET counter C340 starts to count M8000 is normally ON coil set segment 1 ID D4000 to be K75000 set segment 2 D4002 to be K15000 set segment 3 D4004
2. DLDI K68899 C300 M50 When the source data s highest bit 16 bits b15 32 bits b31 is 1 Note tems 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 i 4 4 2 AND Compare ANDO a 1 Summary ANDLI The compare instruction to serial connect with the other contactors AND Compare AND Execution Normally ON OFF coil Suitable XC1 XC2 XC3 XC5 XCM condition Models Hardware Software requirement requirement 2 Operands Operands Function Data Type 1 Specify the Data to be compared or soft 16 32bit BIN component s address code S2 Specify the comparand s value or soft 16 32bit BIN component s address code 3 suitable soft components pjm m ox py m os aD sit STF T et 4 applied instructions oa Jsd 0s 0SD00 s Tsps0sy 0 SD0 082 Jsbz0s 0 SD0 082 i ANDO K100 C0 C Y gt X1 AND K 30 DO SET Y1 X2 DANDO K68899 D10 M50 M4 When the source data s highest bit 16 bits b15 32 bits b31 is 1 Note tems 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
3. M8000 HSCR C630 DIO M8000 HSCR C632 D20 D10 K1000 YO 1D2 k 8 3 D20 K5000 YO De C E 2S 5 6 20 Write HSC value HSCW IL Instruction Summary Write the specified register value into HSC Write HSC value HSCW 16 bits 32 bits HSCW fmm iran Execution Normally ON OFF Suitable XC2 XC3U XC5 XCM fenator_ wsmpotngsye mets nn Hardware V3 1c and above Software requirement requirement 2 operands Specify HSC code 32 bits BIN Do Specify the read written register 32 bits BIN 3 suitable soft components DJe Je o x or afm xn pO S FUNCTIONS AND ACTIONS v a HSCW C630 D20 When the activate condition is true write the value in D20 DWORD into C630 DWORD the original value is replaced We suggest the users to apply high speed counter only with HSCR and HSCW not with other instructions like DMOV LD gt DMUL etc and users must run after converting HSC to be other registers 5 7 HSC Reset M ode Reset HSC via software MO C600 K2000 H i MI C600 f H R In the above graph when MO is ON C600 starts to count the input pulse on XO when M1 changes from OFF to be ON reset C600 clear the count value 5 80 AB Phase counter multiplication setting About AB phase counter modify the frequency multiplication value via setting FLASH data register FD8241 FD8242 FD8243
4. Ee 2 D1 D2 o gen S2 DI Rae DRVA K30000 K3000 YO Y4 32 bit instruction form Br 2 pt C2 MO St 52 D1 ma DDRVA D100 D200 YO Y4 Y0 D8171 D8170 Y 1 D8174 D8173 30000 YO origin current position target position Pulse output ID only YO or Y1 Pulse output direction can specify any Y Acceleration deceleration time is specified by D8230 single word The relative drive form means move from the origin position Target position means S1 correspond with the following current value register as the absolute position 6 2 10 Absolute position multi segment pulse control PL SA PLSA DPLSA has two control modes below we will introduce one by one y M ode 1 uni directional pulse output PL SA IL Instruction Summary Generate absolute position segmented pulse with the specified frequency acceleration deceleration time and pulse direction Absolute position multi segment pulse control PLSA 16 bits PLSA 32 bits DPLSA Execution Normally ON OFF coil Suitable XC2 XC3 XCS XCM ee a Hardware Software 2 Operands S1 Specify the soft component s number to output the pulse 16 32bit BIN parameters 2 S Specify the acceleration deceleration time or soft component s 16 32 bit BIN number D o Specify the pulse output port 3L suitable soft components TD CD DX DY DM DS KH ID QD Word
5. 6 6 Relative coils and registers of pulse output Some flags of pulse output are listed below M8170 PULSE_1I sending pulse flag Being ON when sending the pulse overflow flag of 32 bits pulse When overflow Flag is on sending Dr cuoni 1 is positive direction the correspond irection fla i direction port is on M8173 PULSE_2 sending pulse flag Being ON when sending the pulse overflow flag of 32 bits pulse D M8170 M8173 When overflow Flag is on sending Direction fl 1 is positive direction the correspond irection fla j direction port is on sending pulse flag Being ON when sending the pulse overflow flag of 32 bits pulse When overflow Flag is on sending Direction flag 1 is positive direction the correspond ef airectionportisoom S M8179 PULSE_4 sending pulse flag Being ON when sending the pulse overflow flag of 32 bits pulse M8180 When overflow Flag is on sending a 1 is positive direction the correspond M8181 Direction flag direction port is on Pulse alarm flag frequency M8210 PULSE_1 change suddenly l is alarm O is correct M8211 Neglect the alarm or not When flag is 1 stop sending alarm Pulse alarm flag frequency M8212 PULSE_2 change suddenly l is alarm O is correct M8213 Neglect the alarm or not When flag is 1 stop sending alarm Pulse alarm flag frequency M8214 PULSE_3 change sudden
6. Y The soft components with offset the offset can be represent by soft component D Timer T Counter C For common usage 16 bits represent the current value of timer counter For common usage 32 bits via combine two sequential 16 bits registers To represent them just use the letter ID method such as T10 C11 T11 DO D In the above example MOV T11 DO T11 represents word register LD T11 T11 represents bit register FlashROM Register FD For power off retentive usage 16 bits For power off retentive usage 16 bits via combine two sequential 16 bits registers For special usage occupied by the system can t be used as common instruction s parameters Expansion s internal register ED For common usage 16 bits For common usage 32 bits via combine two sequential 16 bits registers Bit soft components combined to be register For common usage 16 bits via combine two sequential 16 bits registers The soft components which can be combined to be words are X YL MLI SL TU C Format add D in front of soft components like DM10 represents a 16 bits data from M10 M25 Get 16 points from DXn but not beyond the soft components range The word combined by bit soft components can t realize bit addressing E g MOV DX2 D0 D10 When MO changes from OFF to be ON the value in the w
7. D51 D50 ATAN gt D61 D60 RAD Binary Floating Binary Floating Calculate the arctan value radian save the result in the target address Cs ATAN value Binary Floating su RAD value angle x Tt 180 Do Assign the binary floating value 4 applied instructions 4 10 RTC Instructions Clock data read 4 10 1 Clock data write 4 10 2 X 1 To use the instructions The Model should be equipped with RTC function 4 applied instructions 4 10 1 Read the clock data TRD 1 Instruction Summary Read the clock data Read the clock data TRD Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware V2 51 and above Software 2 Operands Function Data Type D Register to save clock data 16 bits BIN 3 Suitable Soft Components pjm m m ox by m os xa D Functions And Actions CER DO The current time and date of the real time 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 Unit Item Clock data Unit Item D8018 Year 0 99 gt DO Year me oa w Pe re 1 YOoTO own BOI 10 19 S1331 gyep eIoads 4 applied instructions 4 10 21 Write Clock Data TWR 1 Instruction Summary Write the clock
8. 4 applied instructions 4 5 11 Data Operation eo e 4 6 1 4 6 2 4 6 3 4 6 4 4 6 5 4 6 5 4 6 6 Negative i NEG D 4 6 9 Data Shift SFTL S D nl n2 4 7 4 Bit shift left 4 applied instructions oe SFTIR S D nl n2 SFTR Bit shift right 4 7 5 m WSFL S Dnt n2 WSFL Word shift left 4 7 6 TOEN WSFR S D nt n2 WSFR Word shift right 4 7 7 Data Convert Single word integer converts WTD l WTD S D 4 8 1 to double word integer 16 bits integer converts to FLT a raris p 4 8 2 float point 32 bits int ts t DFLT we een ene e d a e 4a 4 8 2 float point 64 bits integer converts to FLTD IK FLTD S D 4 8 2 float point INT Float point converts to integer INT S amp S D 4 8 3 pw BCD converts to binary BIN S D 4 8 4 BCD Binary converts to BCD BCD S D 4 8 5 Hex converts to ASCII ASCI S D n 4 8 6 HEX ASCII conver
9. A square root is performed on the floating point value in S the result is stored in D Ifa constant K or H used as source data the value is converted to floating point before the addition operation X1 ESQR K1024 D110 K1024 gt D111 D1100 Binary converts to Floating Binary Floating When the result is zero zero flag activates Only when the source data is positive will the operation be effective If S is negative then an error occurs and error flag M8067 is set ON the instruction can t be executed 4 applied instructions 4 9 80 Sine SIN 1 Summary Float Sine SIN fists Sid SIN Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software er a oe 2 Operands The soft element address need to do sine 32 bits BIN Do The result address 32 bits BIN 3 Suitable soft components S a SIN D50 D60 Description D51 D50 gt D61 D60 SIN Binary Floating Binary Floating This instruction performs the mathematical SIN operation on the floating point value in S angle RAD The result is stored in D Cs RAD value anglex Tt 180 Assign the binary floating value Dor 00 eed Binary Floating 4 applied instructions 4 9 9 Cosine SIN 1 Summary Float Cosine COS ww Sid wd Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software er a oe 2 Operands Soft elem
10. register DO and D1 will be seemed as one RST X4 32bits value X004 is ON C300 starts to count Cy gt Oo NO ey N O G o lt T jad 0 lt AS If X003 is ON reset the counter and C300 output If use retentive counter the count value will be stored in PLC 32 bits counter can be used as 32 bits register Set the count It includes 16 bits and 32 bits count value value u 16 bits counter set as constant K set in D register X000 x001 MOV KIO D5 C co D K100 X001 u 32 bits counter set as constant K set in D register x001 X000 f C300 K43 100 DMOV K43 100 DO X001 C300 DOD D10 Count value CO C299 are 16 bits linear increase counter 0 32767 when the counter value reaches 32767 it will stop count and keep the state C300 C599 are 32 bits linear increase decrease counter 2147483648 2 147483647 when the counter value reaches 2147483647 it will become 2147483648 when the counter value reaches 2147483648 it will become 2147483647 the counter state will change as the count value 2 9 Data register D XC series PLC data register D address is shown as below Address list RANGE NAME FORCOMMON FOR POWER OFF FOR SPECIAL USE USE RETENTIVE USE D8000 D8029 D8060 D8079 D8120 D8179 DO D99 D10
11. ee Description i ZOP C20 OBO DO M M m en CA DAN M SS C oo M M CIA Cn M a i Even X000 0FF stop ZOP instruction MO M2 will keep the original status Compare CS data with lt p and 2 output the three point s ON OFF status according to the zone size 10 2 the three point s ON OFF output according to the result H 4 5 30 MOV MOV E 1 Summary Move the specified data to the other soft components MOV MOV isbis MOV DMOV Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition rising falling edge Models Hardware Software requirement requirement 2 Operands Specify the source data or register s address code 16 bit 32 bit BIN gt Specify the target soft component s address code 16 bit 32 bit BIN 3 Suitable soft component pjm m ox by m os xa D sot E E a a E S a E E E ptt ft ft tf E E Description lt read the counter s or time s current value gt MOV K10 D10 The same as counter lt Move the 32bits data gt MOV TO D20 The current value of TO D20 DMOV DO D10 DMOV C235 D20 D1 DO D11 D10 the current value of C235 D21 D20 4 applied instructions Move the source data to the target When X000 is off the data keeps same Convert constant K10 to be BIN code automatically
12. Serial connection of multiply Devices none parallel circuits To declare the starting point of the circuit block use a LD or LDI Statements instruction After completing the parallel circuit block connect it to the preceding block in series using the ANB instruction It is possible to use as many ANB instructions as necessary to connect a number of parallel circuit blocks to the preceding block in series Program circuit DR instruction before AHB OR instruction after ANB LD OR LD AND LDI AND ORB OR ANB OR OUT XO XI X2 Start of a branch X3 X4 X5 mi End of a parallel circuit block X6 X7 Serial connect with the preceding circuit Y20 3 97 IMCS MCR Mnemonic and Function Mnemonic Function Format and Devices MCS Denotes the Master start of a control master control block MCR Denotes the Master end of a master control control block Reset Devices None After the execution of an MCS instruction the bus lin LD LDI shifts Statements 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
13. Cl Inverter status read into To read the status from the frequency inverter to the PLC register Riese dec Inverter Action Inverter Status Read Into User Define Status Error Code Output Yoltagze Motor s Rotate Speed Setting Frequency Module s Temperature 7 Output Frequency VI Analoz Input 7 Qutput Current CI Analog Input Bus Voltage Software Version 7 DU User define To write or read the frequency inverter address flexible Control Inverter Bisel Inverter Status Read Into Add Edit Delete Address Reg Number Comment For example add a writing inverter instruction User Define Comment write to inverter Read Inverter trite Inverter Interver Address HEX 2000 Write Const Value al Write From Register D100 Add a reading inverter instruction User Define E3 Read Inverter b Write Inverter Interver Address HEX 2100 Register Address m00 The result after adding Cancel Control Inverter Action Inverter Status Read Into User Define Add Edit Delete Type Address Rez Humber Comment j i X 1 Frequency inverter instructions will not expand in the block g 10 3 6 Free format communication item Add free format communication instructions in the block For example select send instruction first address set to DO serial port is 2 16 bits Add Edit Delete Upwards D
14. 4 3 47 FOR and NEXT 1 Summary Loop execute the program between FOR and NEXT with the specified times Loop starts FOR Execution Rising Falling edge Suitable XC1 XC2 XC3 XC5 XCM condition Hardware Software Loop ends NEXT Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition Rising Falling edge Hardware Software 2 Operands Operands Function Data Type Program s loop times between FOR NEXT 16 bits BIN i 3 Suitable Soft Components m fofo tt E Description FOR NEXT instructions must be programmed as a pair Nesting is allowed and the nesting level is 8 Between FOR NEXT LDP LDF instructions are effective for one time Every time when MO turns from OFF to ON and M1 turns from OFF to ON A loop is executed 6 times Every time if MO turns from OFF to ON and M3 is ON B loop is executed 5X 7 35 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 4 applied instructions ii FOR K5 M1 ii FOR K6 INC DO A NEXT M3 C FOR K7 INC D1 B NEXT NEXT 4 3 50 FEND a
15. S2 K J p lt K J p LDO LDO LDO K J pd LDI L LD activates when S1 S2 LDI L LD activates when S1 lt S2 LDI LD activates when S1 S2 KR Ba ANDO D 142 AND AND activates when S1 S S2 4 4 2 AND I AND activates when S1 S2 4 4 2 K K a 4 applied instructions ORO OR activates when SDU S2 4 4 3 OR activates when SDU S2 4 4 3 OR activates when SDU S2 4 4 3 OR I OR activates when S1 S2 4 4 3 OR I OR activates when S1 S2 4 4 3 OR I OR activates when S1 S2 4 4 3 4 4 1 LD Compare LDL 1 Summary LDL is the point compare instruction connected with the generatrix LD Compare LD Execution Suitable XC1 XC2 XC3 XC5 XCM condition OO e Hardware Software 2 Operands S1 Specify the Data to be compared or soft 16 32bits BIN a component s address code S2 Specify the comparand s value or soft 16 32 bits BIN ae component s address code oe T 3 Suitable soft components gt m gt m lo ox ov or os xn p Description 16 bits instruction Not Activate Condition LD DLD SDE U S2 SI S2 LD 0 sDO 0 2 0 SD0 S2 4 applied instructions TSM 0s _ Osn 0s Tsne0sy 0 SD0 082 JsDz0 s 0 SD0 89 Tsp 0sy 0SD00 s2 XO LD K100 o i C Yo gt LDO D200 K 30 SET Y1
16. S3 3 43 will be occupied by this instruction so please don t use them as the common data registers This instruction executes when each sampling time interval comes To the operation result D the data registers are used to store PID output values the output points are used to output the occupy ratio in the form of ON OFF PID control rules are shown as below Differential t elt y r t _e T Integral ut gt d Be controlled object e t r t c t 1 1 u t Kp e t 1 Ti e t dt TD de t dt 1 2 Here e t is warp r t 1s the given value c t is the actual output value u t is the control value In function 1 2 Kp is the proportion coefficient Ti is the integration time coefficient and TD is the differential time coefficient The result of the operation 1 Analog output MV digital form of u t the default range is O 4095 2 Digital output Y T MV PID output upper limit Y is the output s activate time within the control cycle T is the control cycle equals to the sampling time PID output upper limit default value is 4095 i 8 3 Parameters Setting Users can call PID instruction in XCP Pro software directly and set the parameters in the window see graph below for the details please refer to XCPPro user manual Users can also write the parameters into the specified registers by MOV instructions before PID operation PID Instruction Paramet
17. 32 bit instruction form G2 io Gy DPLSR DO D100 YO M8170 I RST MO The parameters address is a section starts from Dn or FDn In the above example 16bit instruction form DO set the first segment pulse s highest frequency D1 set the first segment s pulse number D2 set the second segment pulse s highest frequency D3 set the second segment s pulse number if the set value in Dn Dn 1 is 0 this represents the end of segment the segment number is not limited To 32 bit instruction DPLSR DO D1 set the first segment pulse s highest frequency D2 D3 set the first segment s pulse number D4 D5 set the second segment pulse s highest frequency DOL D7 set the second segment s pulse number Acceleration deceleration time is the time from the start to the first segment s highest frequency Meantime it defines the slope of all segment s frequency to time In this way the following acceleration deceleration will perform according to this slope Pulse can be output at only YOOO or YOO1 Frequency range 0 400KHz Pulse number range 0 K32 767 16 bits instruction 0 K2 147 483 647 32 bits instruction Acceleration deceleration time below 65535 ms MO segment 1 segment 2 bo Dt D2 B3 Ms1 70 Mode2 segmented dual directional pulse output PL SR IL Instruction Summary Generate certain pulse quantity with
18. Floataresin oo d y w S y ACOS Floatarccos S Vy w y ATAN Floatarctan TV Clock ERD ReadRTCdata o J Syy y y TWR SetRTCdata ET X 1 All the instructions are 16bits except the instructions with 1 which has 32bits 32bits instructions are added D in front of its 16bits instruction Such as ADD 16bits DADD 32bits X 2 These instructions are 32bits and have no 16bits format X3 V means this series support the instruction Appendix 2 instructions list Sort Mnemonic nemonic Function unction XC3 oe ee segment accelerate decelerate pulse sae Relative position multi segment pulse control Changeable frequency pulse output voyo pulse Absolute position multi segment T pulse control PLSNEXT eee l the pulse segment PLSNT PLSMV Save Save the pulse number in the register pulse number in the register Hectic A A ell Pulsestop o o wy y y Y High Speed HSCR Read high speed counter value y yY yY Y Counter HSC HSCW Write high speed counter value y yY y Y COIR MODBUS coilread yY IY Jy Y INPR_ MODBUS input coil read yY y yY Y COLW___ MODBUS single coil write Y y yY Y MODBUS MCLW___ MODBUS multi coil write y yY Jy JY communication REGR MODBUS register read y Jy yY Y INRR_ _ MODBUS input register write Y Jy yY Y REGW___ MODBUS single register write VY Jy yY yY MRGW__ MODBUS multi register write Y Jy
19. PID operation range Diff unit 0 1 O QD100 Y 100 QD101 Y101 Kp QD106 Ki QD107 Kd QD108 Diff QD109 Kp QD110 Ki QD111 Kd QD112 Diff QD113 QD105 Y105 COMMENTSAND DESCRIPTIONS module 1 ID105 module 1 module 1 module 1 module 1 Auto tune activate signal enter auto tune stage if being set to be 1 when auto turn finish PID parameters and temperature control cycle value are refreshed reset this bit automatically Users can also read its status 1 represents auto tune processing 0 represents no atto tune or auto tune finished Digital output value range OL 4095 If PID output is analogue control like steam valve open scale or thyistor ON angle transfer this value to the analogue output module to realize the control requirements Via PID auto tune to get the best parameters If the current PID control can t fulfill the control requirements users can also write the PID parameters according to experience Modules carry on PID control according to the set PID parameters PID operation activates between Diff range In real temperature control La tmp ia environments if the temperature is lower than Pi PID output the max T Dif PID output the mini value set temp value if the temperature is higher than Appendix 1 special soft device list sample temperature Temperature difference 10 display temperature value Then Temperature
20. System s version number High byte Compatible model s version number Low byte Model s version number High byte Model s information Max 5 characters 0 D8027 D8028 Suitable program software version D8029 Appendix 1 special soft device list Error check D8067 D 80980 D8067 Operation error code s Nr The error of divide zero CDs068 tock te Nr oferorcoas E D8074 Nr of offset registers D a a Communication D8120 D8149 D D8122 the left data RS232 should send D8123 Data number RS232 received D8126 7 hardware error 8 CRC Parity error 9 station number error Com 1 D8127 Communication error code 10 no start code 11 no end code 12 communication time out 0 correct Modbus communication error 1 don t support function ID D8128 the replied message from slaves 2 address error overrun address when the master send errors 3 Data error the number of data 8 saving data error rewrite Flash D8129 Com2 D8130 D8131 D8132 the left data RS232 should send D8133 Data number RS232 received D8136 fo ID D8150 D8151 D8152 D8153 D8154 D8155 D8156 D8157 Communication error code Modbus communication error the replied message from slaves when the master send errors Appendix 1 special soft device list 7 hardware error 8 CRC check error 9 station number error 10 no start sign 11 no end sign 12 communication time out
21. lt indirectly specify the counter s time s set value gt MOV K10 D20 T20 D20 KIOU D10 D20 K10 Please use DMOV when the value is 32 bits such as MUL instruction high speed counter 4 applied instructions 4 5 40 Data block M ove BM OV 1 Summary Move the specified data block to Data block move BMOV Execution Normally ON OFF coil Suitable XC1 XC2 XC3 XC5 XCM condition Models Hardware Software requirement requirement 2 Operands Operands Function Data Type Specify the source data block or soft component 16 bits BIN bit address code Specify the target soft components address code 16 bits BIN bit Specify the move data s number 16 bits BIN 3 Suitable soft components gt gt gt lo x ov or ms en D s Trrrrrrfrty ft o a E oo COCO EOE E s err o OCOC Move the specified n data to the specified n soft components in the Description fora block n BMOV D5 D10 K3 X D5 D10 D6 a D11 gt n 3 D7 D12 i 4 applied instructions As the following picture when the data address overlapped the instruction will do from 1 to 3 1 BMOV D10 D9 K3 X2 BMOV D10 D11 K3 D10 D9 D11 D10 D12 aii
22. 9 8 Function List 9 1 Summary This is the new added function in XCPPro software This function enable the customers to write function blocks with C language in XCPPo and call the function blocks at any necessary place This function supports most of C language functions strength the program s security As users can call the function at many places and call different functions this function increase the programmer s efficiency greatly 9 2 Instruction Format IL Instruction Summary Call the C language Func Block at the specified place the C language Func Block NAME _ bits NAME C bits saan e Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 Condition Rising Falling Edge Models XCM activation Hardware V3 0C and above Software V3 0C and above Requirement Requirement 2 Operands Cees Foret name of C aun Block defined by the user Sting ill iann kl Function Correspond with the start ID of word B in C language 16bits BIN Function 3 Suitable Soft Components gt gt gt x oo en oo a rrtrtrrttrtit ttl Operands System po System S O ss tT ht ht UT Functions and Actions xO s1 s2 NAME_C DO MO The name is composed by numbers letters and underlines the first character can t be numbers the name s length shouldn t longer than 8 ASC The name can t be same with PLC s self instructions like LD ADD SUB
23. Models Hardware Software 2 Operands Operands Function Source soft element head address Target soft element head address Source data quantity Shift right times 3 Suitable soft components pjm m m ox by m os xa D soot tT TSTS T Loata The instruction copies n2 source devices to a word stack of length n1 For each addition of n2 words the existing data within the word stack is shifted n2 words to the right Any word data moving to a position exceeding the n1 limit is diverted to an overflow area 4 applied instructions In every scan cycle loop shift right action will be executed se De nl n D13 D10 gt Overflow X0 WSFR DO D10 K16 K4 D17 D14 gt D13 D10 D21 D18 D17 D14 D25 D22 D21 D18 n2 words right 6 D 3 D 0 gt D25 D22 shift 4 8 Data Convert double word integer point point FLTD 64 bits integer converts to float 4 8 2 point mex fasci comenson asr 4 applied instructions 4 8 1 1 Single word integer converts to double word integer WTD 1 Summary Single word integer converts to double word integer WTD 16 bits WTD Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM condition rising falling edge Hardware Software 2 Operands Operands Function Data Type Source soft element address 16 bits BIN Target soft element address 32 bits BIN 3 Suitable soft components lm gt m lo ox ov or os xm p
24. Specify the port to refresh the pulse Bit 3 suitable soft components Deje po x or ow ms xn w wo srtrrrtrrritl tt operands system S ystem Functions And Actions 32 bit instruction form MO PLSR DO D100 YO Y1 FEND 10000 E oe sS D M8000 PLSMV KO YO IRET origin signal X2 i ee working table T RA I A A A i ifii forward backward When the working table is moving backward it gets the origin signal X2 execute the external interruption PLSMV command run immediately not effected by the scan cycle Refresh the pulse number from YO and send to D8170 This instruction is used remove the accumulation difference caused in pulse control 6 2 7 Back to the Origin ZRN IL Instruction Summary Back to the Origin Back to the Origin ZRN 16 bits ZRN 32 bits DZRN meen y a Execution Normally ON OFF coil Suitable XC2 XC3 XCS XCM ee E Hardware Software bce e 2 Operands Specify the backward speed or soft components ID 16 32bit BIN Specify the creeping speed or soft components ID 16 32 bit BIN Specify the soft components ID of the close point s signal Bit gt Specify the pulse output port Bit 3 suitable soft components Word operands D WH ED TD CD DX DY DM DS KH D QD operands system S om Dam o Fun
25. transfer format if call the Func Block in ladder the transferred D and M is the start ID of W and B Take the above graph as the example start with DO and MO then W 0 is DO W 10 is D10 B O is MO Ri 10 is M10 If in the ladder the used parameters are D100 M100 then W O is D100 BL OL is M100 So word and bit component s start address is defined in PLC program by the user Parameter W represent Word soft component use in the form of data group E g W 0O 1 W 1 W 2 W 3 in the program use according to standard C language rules Parameter B represent Bit soft component use in the form of data group Support SET and RESET E g B O 1 B 1 0 And assignment for example B O B 1L Double word operation add D in front of W e g DW 10 100000 it means assignment to the double word W 10 W 11 Floating Operation Support the definition of floating variable in the function and execute floating operation Function Library In Func Block users can use the Functions and Variables in function library directly For the Functions and Variables in function library see the list in Appendix The other data type supported BOOL BOOL Quantity INT8U 8 bits unsigned integral INT8S 8 bits signed integral INT16U 16 bits unsigned integral INTI6S 8 bits signed integral INT32U 32 bits unsigned integral INT32S 32 bits signed integral FP32 Single precision Floating FP64 Doubleprecision Floating
26. yY The retentive register range can be set by user g y Special type Special register is used to set special data or occupied by the system Some special registers are initialized when PLC is power on y Please refer to the appendix for the special register address and function Used as offset indirect appoint Data register can be used as offset of soft element Format Dn Dm Xn Dm Yn Dm Mn Dm Word offset DXn Dm means DX n Dm The offset value only can be set as D register MOV KO DO MOV K5 DO MOV D10 D0 D100 When D0 0 D100 D10 YO is ON When M2 is from OFF gt ON DO 5 D100 D15 Y5 is ON D10 D0 D 10 D0 YO DO Y 0 D0 y y 3 y yioo M2 i M8000 Example Data storage Data register D can deal with many kinds of data and realize various controls MO j MOV K100 DO M1 DMOV K 41100 D10 Data transfer MO MOV DO D10 Read the timer and counter MO MOV C10 DO When MO is ON write 100 into DO 16 bits value When M1 is ON write 41100 into D11 D10 32bits value When MO is ON transfer the value of D10 to DO When MO is ON move the value of C10 to DO As the set value of timer and counter X0 g Dy When XO is ON T10 starts to work the time is set in DO Ps C300
27. 3 6 5 Initial logical 5 3 3 3 6 3 3 3 6 3 3 3 3 operation Falling trailing edge pulse Serial connection of NO normally open contacts Read the status from the contact directly Serial connection of NC normally closed contacts Read the normally closed x contact directly H c ANDF AND Falling pulse ORI OR Inverse ORF OR Falling pulse Serial connection of rising edge pulse Serial connection of falling trailing edge pulse Parallel connection of NO normally open contacts Read the status from the contact directly Parallel connection of NC normally closed contacts Read the normally closed contact directly Parallel connection of rising edge pulse Parallel connection of falling trailing edge pulse Serial connection of multiply parallel circuits Parallel connection of multiply parallel circuits Final logic operation type coil drive gt i X YU ME SE TU CU Dn m FDn m X YU ME SE TU CU Dn m FDn m MO YU MLI SU TU CU Dn m E j Pa x0 YO MO SO TO CO Dn mf FD N k 4 n m OUTD Output to the contact directly SET Set a bit device SET permanently ON RST Reset a bit device ReSeT permanently OFF PLS Rising edge pulse PuLSe LF
28. Hyperbolic tangent function double tanh double x float tanhf float x tanh x e x e x e42 e x SEQUENCE BLOCK This chapter will introduce the sequence block instruction and the application 10 1 Concept of the BLOCK 10 2 Call the BLOCK 10 3 Edit the instruction inside the BLOCK 10 4 Running form of the BLOCK 10 5 BLOCK instruction editing rules 10 6 BLOCK related instructions 10 7 BLOCK flag bit and register 10 8 Program example Block instruction Block BSTOP Stop the BLOCK J BSTOP SL S2 Continue running BGOON BGOON S1 82 BLOCK 10 1 Concept of the BLOCK i Sequence block which is also called block is a program block can realize certain function Block is a special flow all the instructions run in order this is the difference from other flows BLOCK starts from SBLOCK and ends by SBLOCKE you can write program between them If there are many pulse output instructions or other instructions they will run one after one according to the condition After one pulse outputting over then the next pulse will output The construction of the block is as the following SBLOCK n gt BLOCK start User s program Pulse output mmunication i i i Communicatio p The instructions in the Frequency inverter BLOCK run one after one Wait instruction Instruction list SBLOCKE gt BLOCK end 10 1 2 Th
29. Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM fins unas Software rs ae Specify the data to be compared or soft 16 bit BIN component s address code Specify the comparand s value or soft 16 bit BIN component s address code Specify the compare result s address code Word Operands D QD DLO gt LO CN 9 DIO O 9 MP DLO lt LO Even XOOO OFF to stop ZCP instruction MO M2 will Keep the original status Compare data SI and GD output the three points ON OFF status start with according to the value 4 applied instructions IOD 2 the three point s on off output according to the valve 4 5 2 Data zone compare ZCP 1 Summary Compare the two specify Data with the current data output the result Data Zone compare ZCP Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition rising falling edge ee Hardware Software 2 Operands S1 Specify the down limit Data of the compare 16 bit BIN a S S Specify the Up limit Data of the compare stand 16 bit BIN eaa EN S Specify the current data or soft component s 16 bit BIN Pf A Sort Specify the compare results data or soft bit component s address code 3 Suitable soft components pjm m ox py m os xa D sit TE SS T ed ed E s T 4 applied instructions
30. OL correct 1 don t support function ID 2 address error overrun address 3 Data error the number of data 8 saving data error rewrite Flash D8142 the left data RS232 should send S D8143 Data number RS232 received D8147 Communication error code Modbus communication error the replied message from slaves when the master send errors 7 hardware error 8 CRC check error 9 station number error 10 no start sign 11 no end sign 12 communication time out OL correct 1 don t support function ID 2 address error overrun address 3 Data error the number of data 8 saving data error rewrite Flash HSC Interruption Station D8150 D 8169 specification The current segment No n segment Appendix 1 special soft device list The current segment The current segment The current segment Pulse output D8170 D8220 The low 16 bits of accumulated pulse number D8170 PULSE_1 D8171 o The high 16 bits of accumulated pulse number D8172 The current segment means Nr n segment The low 16 bits of accumulated pulse number D8173 PULSE_2 D8174 a The high 16 bits of accumulated pulse number D8175 The current segment means Nr n segment The low 16 bits of accumulated pulse number PULSE_3 The high 16 bits of accumulated pulse number The current segment means Nr n segment Only XC5 32RT E The low 16 bits of accumulated pulse number 4PLS model has D8179 PULSE_
31. To use this function please use hardware V3 1c or above 5 10 1 Instruction Description for the program about interruption please refer chapter 5 10 4 MO C600 K20000 D4000 M1 C600 ni R J LD MO HSC activate condition MO interruption count condition OUT C600 K20000 D4000 THSC value and set the start ID of 24 segment LDP M1 activate condition reset RST C600 HSC and 24 segment reset interruption reset As shown in the above graph data register D4000 is the start ID of 24 segment pre set value area Behind it save each pre set value in DWORD form Please pay attention when using HSC If certain pre set value is O it means count interruption stops at this segment Set the interruption pre set value but not write the correspond interruption program is not allowed 24 segment interruption of HSC occurs in order I e If the first segment interruption doesn t happen then the second segment interruption will not happen 24 segment pre set value can be specified to be relative value or absolute value Meantime users can specify the et value to be loop or not But the oop mode can t be used together with absolute value i 5 10 2 Interruption tags to HSC In the below table we list each counter s 24 segment pre set value to its interruption tag E e 24 segment pre set value of counter C600 correspond with the interruption pointer 11001 11002 11003 11024 Increment mode pul
32. Unidirectional ration pulse output without ACC DEC time change PLS Y 16 bits PLSY 32 bits DPLSY Fis al 5 Execution Normally ON OFF coil Suitable XC2 XC3 XCS5 XCM ee ee Hardwarere Software wl ee ooo 2 Operands Specify the frequency s value or register ID 16 bits 32 bits BIN Specify the pulse number or register s ID 16 bits 32 bits BIN Specify the pulse output port bit 3 Suitable soft components Word P X TD DX DY DM DS KH ID QD operands Functions And Actions 16 bits instruction E o PLSY K30 I RST MO Frequency Range 0 400KHzZ Pulse Quantity Range 0O K32767 Pulse output from YOOO or YOO1I only When MO is ON PLSY instruction output 30Hz pulse at YO the pulse number is decided by D1 M8170 is set ON only when sending the pulse When the output pulse number reaches the set value stop sending the pulse M8170 is set to be OFF reset MO 32 bits instruction DPLSY K 30 D1 YO I RST MO Frequency Range 0 400KHz Pulse Quantity Range O0 K2147483647 Pulse output from YOOO or YOO1 only When MO is ON DPLSY instruction output 30Hz pulse at YO the pulse number is decided by D2D1 M8170 is set ON only when sending the pulse When the output pulse number reaches the set value stop sending the pulse M8170 is set to be OFF reset MO Outp
33. operands Functions And Actions 16 bit instruction form s1 s2 dD PLSA DO D100 YO M8170 RST MO 32 bit instruction form O O O DPLSA DO D100 YO M8170 i RST MO The parameters address is a section starts from Dn or F Dn In the above example DO set the first segment pulse s highest frequency D1 set the first segment s absolute position D2 set the second segment pulse s highest frequency D3 set the second segment s absolute position if the set value in Dn Dn l is 0 this represents the end of segment we can set 24 segments in total Acceleration deceleration time is the time from the start to the first segment s highest frequency Meantime it defines the slope of all segment s frequency to time In this way the following acceleration deceleration will perform according to this slope Pulse can be output at only YOOO or YOO1 y M ode2 dual directional pulse output PL SA IL Instruction Summary Generate absolute position pulse with the specified frequency acceleration deceleration time and pulse direction Absolute position multi segment pulse control PLSA 16 bits PLSA 32 bits DPLSA Instruction Instruction Execution Normally ON OFF coil Suitable XC2 XC3 XCS XCM condition Models Hardware Software requirement requirement 2 Operands Function Type
34. represents time Interruption range s limitation Normally time interruption is in allow status With EI DI can set interruption s allow or forbidden area As in the above graph all time interruptions are forbidden between DI EI and allowed beyond DI EI Cc D gt i Interruption Allowed DI Interruption Forbidden EI i a Interruption Allowed FEND 14010 i C gt D Interruption Program IRET Interruption Forbidden FI The first 3CH interruptions are equipped Interruption with special relays M8056 M8059 to M8056 Allowed forbid interrupt JO C i Inthe left example program if use MO to 14020 enable M8056 ON the forbid OCH s in Interruption time interruption Program IRET END i 2 Application Program Samples In this chapter we make some samples about pulse output instruction Modbus communication instructions and free format communication instructions etc 12 1 Pulse Output Sample 12 2 Modbus Communication Sample 12 3 Free Format Communication Sample fi 12 10 Pulse Output A pplication Example below is the example program to send high low pulse in turn Each Parameter Stepping motor parameters step angle 1 8 degrees step scale 40 pulse number per rotate is 8000 High frequency pulse maximum frequency is 100KHz total p
35. 3 suitable soft components Word operands CD DX DY DM DS KH ID QD Functions And Actions 16 bit instruction form Csi s2 pl D2 DRVI K30000 K3000 YO Y4 32 bit instruction form Mo se w DRVI D100 D200 YO Y4 3 0000 YO origin current position target position Pulse output ID only YO or Y1 Pulse output direction can specify any Y Acceleration deceleration time is specified by D8230 single word The relative drive form means move from the current position 6 2 9 Absolute position uni segment pulse control DRVA E IL Instruction Summary Absolute position uni segment pulse control Absolute position uni segment pulse control DRVA 16 bits DRVA 32 bits DDRVA Instruction Instruction Execution Normally ON OFF coil XC2 XC3 XC5U XCM Models Hardware Software requirement requirement 2 Operands Specify the output pulse value or soft components ID 16 32bit BIN Specify the output pulse frequency or soft components ID 16 32 bit BIN 3 2 condition Specify the pulse output port Specify tne pulse owtput pon fee Specify the pulse output direction port 3L suitable soft components DJe Je mw xrm o s CCC fl x C COCCOCCOCCO CEO operands system S m w fS TTT li l Functions And Actions 16 bit instruction form
36. 3 3 S3 4 S3 5 S3 6 Proportion Gain Kp Integration time TT 0 is taken as no integral Differential time TD PID operation zone 0 is taken as no differential PID adjustment band width value OL 32767 PID value keeps constant in death zone S3 7 control death zone S3 8 PID auto tune cycle full scale AD value 0 3 1 varied value S3 9 PID auto tune 0 enable overshoot overshoot permission 1 disable overshoot S3 10 current target value adjustment percent in auto tune finishing transition stage S3 11 current target value resident count in auto tune finishing transition stage S3 12 S3 39 occupied by PID operation s internal process Below is the ID of advanced PID mode setting S3 41 0 no differential gain H 8 3 2 Parameters Description M ovement Direction Positive movement the output value MV will increase with the increasing of the detected value PV usually used for cooling control Negative movement the output value MV will decrease with the increasing of the detected value PV usually used for heating control Mode Setting y Common Mode The parameter s register zone is from 3 to 3 43 S3 to S3 11 needs to be set by users 3 12 to 3 43 12 are occupied by the system users can t use them y Advanced Mode The parameter s register zone is from S3 to 3 43 S3 to S3 11 and S3 40 to 3 43 need to be set by users S3 12 to S3 39 ar
37. 32 bits forward backward counter Counter C600 C619 single phase HSC C620 C629 double phase HSC C630 C639 AB phase HSC Data DO0O D999 Register 0 D4000 D49997 For Special Usage D8000 D8511 M For Special Usage D8630 D8729 Register For Special Usage gt FD8000 FD8383 XC3 Series Mnemonic Name 24 32 48 60 14 T O 24 32 I O 48 60 I O VO O l X0 X15 X0 X33 Input Points X0 X7 14 18 28 36 X0 X21 X0 X43 YO Y11 YO Y23 Output Points YO Y5 10 14 20 24 YO Y15 YO Y27 X0 X 1037 544 14 VO Internal Relay Internal Relay YO Y 1037 544 MO0 M2999 Internal Relay O M3000 M7999 4 For Special Usage M8000 M8767 768 8000 S0 S511 a 1024 O 512 S1023 TO T99 100ms not accumulation T100 T199 100ms accumulation T200 T299 10ms not accumulation T TIMER T300 T399 10ms accumulation 640 T400 T499 Ims not accumulation T500 T599 Ims accumulation T600 T639 Ims precise time CO C299 16 bits forward counter C300 C599 32 bits forward backward counter COUNTER C600 C619 single phase HSC 640 C620 C629 double phase HSC C630 C639 AB phase HSC DO D3999 D4000 D79997 Pee REGISTER s5 For Special Usage D8000 D9023 1024 FlashROM FDO FD1535 1536 x6 oer For Special Usage gt FD8000 FD8511 EXPANSION S INTERNAL EDO ED 16383 16384 REGISTER VO RANGE POINTS Mnemonic Name 24 32 T O 48 60 I O 24 32 T O 48 60 I O X0 X15 X0 X33 Input Points 14 18 28 36 X0
38. DJe gt po ox or ow ms xn w wo m tTrtritrritl ttl operands system FUNCTIONS AND ACTIONS D1 Timer s number Range T600 T618 T600 T602 T604 T618 the Precise Time STR T600 K100 w gt RST number should be even D2 Time Value T600 The precise timer works in form of 1 ms The precise timer is 32 bits the count range is 0 2 147 483 647 When X000 turns from OFF to ON timer T600 starts to time when time accumulation reaches 100ms set T600 1f X000 again turns from OFF to ON timer T600 turns from ON to OFF restart to time when time accumulation reaches 100ms T600 again reset See graph below When run STR instruction reset the timer then start to time See time graph below JX i XO T600 100ms MO 100ms read the precise time stop precise time X0 il STRR T600 m ii STRS T600 When X000 changes from OFF to ON move the current precise time value into TD600 immediately no relate to the scan cycle When M000 changes from OFF to ON execute STRS instruction immediately stop precise time and refresh the count value in TD600 No relate to the scan c ycle Precious Time Interruption When the precise time reaches the count value generate a correspond interruption tag execute some interruption sub
39. INTERRUPTION SERIESINAME I O XCM I 24 10000 10001 There are 10 channels time interruption 32 10100 10101 the represent method is 140 49 10200 10201 represents interruption time the unitis mm Tag P is usually used in flow it is used with CJ condition jump CALL subroutine calletc Condition Jump CJ X0 CJ P1 i If coil XO gets ON jump to the step behind X1 tag P1 i Cc ya gt If the coil XO is not ON do not execute Pa jump action but run with the original program 2 RST TO y Call the subroutine CALL za X0 CALL P10 z If XO gets ON jump to the D A C z subroutine from the main program S ie If the coil is not ON run with the FEND original program P10 _ i q LO 5 After executing the subroutine l E 2 return to the main program C gt 5 SRET E Tag I is usually used in interruption including external interruption time interruption etc use with IRET interruption return EI enable interruption DI disable interruption External interruption Accept the input signal from the special input terminals not effected by the scan 4 cycle Activate the input signal execute the interruption subroutine Q ss Q Y With external interruption PLC can dispose the signal shorter than scan cycle So it can be used as essential priority disposal in sequence
40. S Description l WID DO D10 DOO gt D110 D100 Single Word Double Oorl 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 4 applied instructions 4 8 2 16 bits integer converts to float point FLT 1 Summary 16 bits integer converts to float point FLT Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software owe e 2 Operands Source soft element address 16 bits 32 bits 64 bits BIN D gt Target soft element address 32 bits 64 bits BIN 3 Suitable soft components S lt 16 bits gt Description m Cs 1 D10g gt D13 D12 FLT D10 D12 BIN integer Binary float point lt 32 bits gt XO Cs O D11 D109 gt O D13 D120 i DFLT D10 D12 BIN integer Binary float point lt 64 bits gt XO 1 FLTD D10 D14 O0 D13 D12 D11 D100 gt O D17 D16 D15 D140 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 4 applied instructions 4 8 3 Float point converts to integer INT 1 Summary Floa
41. S a ee FD8009 S 20 mapping FD8010 X00 corresponds with X0 corresponds with number of input image I FD8011 X01 corresponds with Initial values are all decimal l 2 FD8073 X77 corresponds with 30 O mapping FD8074 Y 00 corresponds with YO corresponds with the number of output image O Appendix 1 special soft device list FD8075 Y 01 corresponds with Initial value are all decimal 1 oo 2 _ X00 property all be O 0 positive logic others negative logic 5 power off retentive area of soft components D uncon d o oa oF T power offeenive aren S rps205 tart tag of C poweroffretentvearea 320 Start tag of S power off retentive area oo S a oo Start tag of ED power off retentive area FD8209 Pulse director and pulse delay time setting 6 Communication Communicate Mode 255 FF is free model FD8210 l station number 1 254 is modbus station number Baud rate Data bit stop bit FD8211 Communicate format 8710 parity Judgment time of ASC Unit ms if set to be 0 it means no FD8212 3 R timeout timeout waiting COMI Judgment time of reply Unit ms 1f set to be 0 it means no FD8213 300 i a timeout timeout waiting FD8214 Start ASC O High 8 bits invalid FD8215 End ASC O High 8 bits invalid 8 16 bits buffer FD8216 Free format setting With without start bit With without stop bit 8710 Communicate Mode 25
42. Specify the soft component s number to output the pulse 16 32bit BIN parameters Specify the acceleration deceleration time or soft component s 16 32 bit BIN number S1 Specify the pulse output port Specify the pulse direction port 3 suitable soft components DJe Je m xom xm oo operands system S w fS TTT oo E hv hv E TT Functions And Actions 16 bit instruction form Sl s2 Die Ba Mo ete Cee eer cates PLSA DO D100 YO Y3 M8170 i RST MO 32 bit instruction form 0 St S82 Dt D2 DPLSA DO D100 YO Y3 M8170 T RST MO The parameters address is a section starts from Dn or F Dn In the above example DO set the first segment pulse s highest frequency D1 set the first segment s absolute position D2 set the second segment pulse s highest frequency D3 set the second segment s absolute position if the set value in Dn Dn 1 is 0 this represents the end of segment we can set 24 segments in total Acceleration deceleration time is the time from the start to the first segment s highest frequency Meantime it defines the slope of all segment s frequency to time In this way the following acceleration deceleration will perform according to this slope Pulse can be output at only YOOO or YOO1 The Y port to output the pulse direction can be set freely MO
43. SsS msi C618 Q4seemens OOOO mexo C620 24seemens OOOO ms201 C622 4 segmen OO ms202 C624 Q4segments OOOO ms C626 24seemens OOOO mece oasemng OOOO m8205 C630 4 segmen OO msx 063224 seemens dP OO msr C634 Q4seemens OOOO M8208 C636 24 segments M8209 C638 24 segments a A Pulse alarm flag frequency change M8210 suddenly l is alarm 0 is correct PULSE_1 M8211 Neglect the alarm or not When flag is 1 stop sending alarm PULSE_1 Pulse alarm flag frequency change M8212 suddenly l is alarm 0 is correct PULSE_2 M8213 Neglect the alarm or not When flag is 1 stop sending alarm PULSE_2 Pulse alarm flag frequency change M8214 suddenly l is alarm O is correct PULSE_3 M8215 Neglect the alarm or not When flag is 1 stop sending alarm PULSE_3 Pulse alarm flag frequency change M8216 suddenly l is alarm 0 is correct PULSE 4 Appendix 1 special soft device list M8217 Neglect the alarm or not When flag is 1 stop sending alarm PULSE_4 Pulse alarm flag frequency change M8218 suddenly l is alarm 0 is correct PULSE_5 M8219 Neglect the alarm or not When flag is 1 stop sending alarm PULSE_5 Positive negative count Positive negative counter 0 is increment counter 1 is decrement M8238 C300 C498 control counter default is O 24 segments HSC interruption loop M 8270 M 8289 24 segments HSC interruption loop C600 if set it to be 1 then loop executing the
44. XCM Condition aoe ee a Hardware Software 2 Operands Specify the start ID of local PLC 16bits BIN Specify the ASC number to send or soft component s ID 16bits BIN Specify the COM port Nr 16bits BIN 3L Suitable soft components gt r m m ox by m os kar gt so f TS TSS STS s TSTST Tf i di liT idk ff il SEND D10 D100 K2 Function MO s1 s2 i Data send instruction send data on the rising edge of MO Serial port K2 K3 When sending data set sending flag M8132 COM2 ON MO send data __ lt start gt ran p lt data gt an i stop gt y Receive Date RCV IL Summary Write the specified station s data to the local specified ID Receive data RCV 16 bits RCV 32 bits instruction instruction Execution Normally ON OFF rising Suitable XC2 XC3U XC5 XCM Hardware Software 2 Operands Specify the start ID of local PLC 16bits BIN Specify the ASC number to receive or soft component s ID 16bits BIN Specify the COM port Nr 16bits BIN 3 Suitable soft components gt r m m ox by m os kar gt sit ct TSTS S STS S2 Function il RCV D20 D200 K2 Data receive instruction receive data on the rising edge of MO Serial port K2 K3 When receiving data set receiving flag M8134 COM2 ON MA M5134 receive X 1 If you r
45. is same with the environment temperature value This value is very important once it s wrong temperature difference will be wrong then effect the display temperature The output when auto tune use as the unit 100 represents 100 of full scale Auto tune output value output 80 represents 80 of full scale output XC E3AD4PT 2DA PID parameters K pf K if AD PID output CH Nr PID run stop bit Set value Kd control range Diff signal value death range Death ID100 ID107 Y100 QD102 a ID101 ID108 Y101 QD103 D102 ID109 Y 102 QD104 PID output CH Nr P PID run stop bit Set value pea ETS D103 DHO O yB QDI05 a ID104 ID111 Y104 QD106 ID105 ID112 Y105 QD107 ID106 ID113 Y 106 QD108 om a signal pf fe Fon oaa Diff QD112 Death QD113 Appendix 1 special soft device list C a a XC E2AD2PT2DA RELATIVE COMMENTSAND DESCRIPTIONS Display temperature ID100 ID101 ID102 ID103 module 1 unit 0 1 O PID output X input which returns module 1 to main unit Connecting status 0 is connect 1 is module 1 disconnect PID auto tune error bit 0 is normal 1 is module 1 parameters error Enable channel s module 1 signal Auto tune activate signal enter auto tune stage if being set to be 1 when auto turn finish PID parameters and temperature control cycle value are refreshed Auto tune PID control 7 reset this bit automatically it U
46. std tw Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM Hardware Software o ems Flow starts STL fists stim 4 applied instructions Execution Suitable condition Models Hardware Software requirement requirement Flow ends STLE Execution Suitable XC1 XC2 XC3 XC5 XCM Hardware Software 2 operands Function Data Type Jump to the target flow S Flow ID 3 Suitable Soft Components System Description STL and STLE should be used in pairs STL represents the start of a flow STLE represents the end of a flow After executing of SET SXXX instruction the flow specified by these instructions is ON After executing RST SXXX instruction the specified 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 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 After executing of SET Sxxx instruction the pulse instructions will be closed including one segment multi segment relative or absolute return to the origin SET SO STL SO ae SET SI ST 52 STLE STL Sl ae STLE STL S2 4 applied instructions 4 applied instructions
47. usually use them with Une Oe instruction STL In the form on flow this can make the program s structure much clear and easy to modify For common use After shut off the PLC power this type of relays will be OFF status For Power Off Retentive Use The status relays for power off retentive usage even the PLC is OFF they can keep the ON OFF status before power OFF y Power off retentive zone can be modified by the user The status relays also have countless normally ON OFF contactors So users can use them freely in the program 2 Timer T XC series PLC s timers T are addressed in form of decimal each Address L ist subfamily s ID are listed below SERIES NAME RANGE FOR COMMON USE POINTS TO T23 100ms not accumulation T100 T115 100ms accumulation T200 T223 10ms not accumulation T400 T403 Ims not accumulation TS500 T503 Ims accumulation T300 T307 10ms accumulation TO T99 100ms not accumulation T100 T199 100ms accumulation T 640 T600 T639 1ms with precise time The timers accumulate the Ims 10ms 10ms clock pulse the output contactor Function activates when the accumulation reaches the set value We use OUT or TMR instruction to time for the normal timers We use constant K to set the value or use data register D to indirect point the set value XQ T200 K200 N T200 yo EE moment to run the instruction one scan
48. 10ms not accumulation T300 T399 10ms accumulation T400 T499 Ims not accumulation T500 T599 Ims accumulation T600 T639 Ims precise time FD REGISTER For Special Usage gt FD8000 FD8349 For Special Usage FD8890 FD8999 EXPANSION S INTERNAL EDO ED36863 REGISTER X 1 I O points means the terminal number that users can use to wire the input output X 2 X means the internal input relay the X beyond Input points can be used as middle relay X 3 Y means the internal output relay the Y beyond Output points can be used as middle relay X 4 The memory zone in is power off retentive zone soft components DL M SU TL C can change the retentive area via setting Please refer to 2 3 2 for details X 5 for special use means the special registers occupied by the system can t be used for other purpose Please refer to Appendix 1 X 6 FlashROM registers needn t set the power off retentive zone when power is off no battery the data will not lose X 7 Expansion s internal register ED require PLC hardware V3 0 or above X 8 Input coils output relays are in octal form the other registers are in decimal form X 9 The I O that are not wired with external device can be used as fast internal relays X 10 for the soft components of expansion devices please refer to relate manuals 2 3 2 Power Off Retentive Zone The power off retentive area of XC series PLC are set as below this area can
49. 2 PRG 40 RxD 4 RxD 5SH TxD SL TxD 8 GND 6O VCC 8 GND Mini Din 8 pin female Mini Din 8 pin female 20 RS485 COM port About RS485 COM port A is signal B is signal The A B terminals RS485 on XC series PLC comes from COM2 so you can t only use two at the same time 20 CAN COM port CAN port can be used to realize CANbus communication The pin terminals are CAN CAN For the detailed CAN communication functions please refer to 6 8 CAN bus function XC5 series 7 1 20 Communication Parameters a Communication Parameters Station Modbus Station number 1 254 255 FF is free format communication Baud Rate 300bps 115 2Kbps Data Bit 8 bits data 7 bits data Stop Bit 2 stop bits 1 stop bit Parity Even Odd _ No check The default parameters of COM 1 Station number is 1 baud rate is 19200bps 8 data bit 1 stop bit Even Parameters Setting Set the parameters with the COM ports on XC series PLC ae 255 is free format FD8210 Communication mode WON l 1 254 bit is M odbus station number FD8211 Baud rate data bit stop bit parity Unit ms if set to be O it means no FD8212 ASC timeout judgment time l _ timeout waiting COM 1 Unit ms if set to be O it means no FD8213 Reply timeout judgment time T timeout waiting FD8214 Start symbol High 8 bits invalid FD8215 End symbol High 8 bits invalid 8 16 bits cushion FD8216
50. 4 Scanning period 5 Scanning period 3 O When MO is from OFF gt ON run DSPLSR DO D2 D4 YO in the BLOCK to output the pulse when M2 is from OFF gt ON stop the BLOCK the pulse will stop slowly with slope when M3 is from OFF ON abandon the rest pulses 4 BSTOP K1 K10 BGOONJ K1 KIN Mo SBLOCK Sequence Block DSPLSR DO D2 D4 YO SBLOCKE Wiz A TOP KI KA hig BGOON KA K1 bcanning period 1 Scanning period 2 Scanning period 3 Scanning period 4 Scanning period 5 x R R O Condition M 4 lt a om Nn p When MO is from OFF gt ON run DSPLSR DO D2 D4 YO in the BLOCK to output the pulse when M2 is from OFF ON stop running the BLOCK the pulse will stop slowly with slope when M4 is from OFF ON output the rest pulses Please note that though the BSTOP stops the pulse with slope there maybe still some pulses in this case if run BGOON K1 K1 again it will output the rest of the pulses i 10 70 BLOCK flag bit and register 1L BLOCK flag bit Address Function Explanation M8631 BLOCK 1 running flag M8632 BLOCK2 running flag 1 running M8730 BLOCK100 running flag 2 BLOCK flag register poo D8730 BLOCK10 current running instruction Example 10 8 Program example This example is used in
51. 4 9 1 Float Compare ECM P 1 Summary Float Compare ECMP Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software 2 Operands S1 Soft element address need compare 32 bits BIN S2 Soft element address need compare 32 bits BIN Compare result bit 3 Suitable soft components Operands System Constant Module Word P y Constant Module ED TD CD DX DY DM DS KA D QD Operands po System O O 2 1 D11 D100 O 0 D21 D200 gt M0 M1 M2 Description Binary Floating Binary Floating ECMP D10 D20 MO MO D11 D10 gt D21 lt D20 a Binary Floating Binary Floating MI D11 D10 D21 lt D20 Binary Floating Binary Floating D11 D10 lt D21 lt D20 Binary Floating Binary Floating The status of the destination device will be kept even if the ECMP instruction is deactivated 4 applied instructions The binary float data of S1 is compared to S2 The result is indicated by 3 bit devices specified with the head address entered as D If a constant K or H used as source data the value is converted to floating point before the addition operation XO t ECMP K500 D100 M10 O K500 D101 D100L M10 M11 M12 Binary converts Binary floating to floating 4 9 2 Float Zone Compare EZCP 1 Summary Float Zone Compare EZCP fois ooo o Execution Normally ON OFF S
52. Comment can modify the note for this instruction MOY DO D1 MUL 15 110 veo After setting the block will be changed as the following SBLOCK Sequence Block M20 SBLOCKE 10 3 2 Pulse item Open the pulse item window Pulse Config Skip Comment Single OQ 24 Segment O pposite O Absolute Frequency D0 Pulse Humber De Accelerate And Decelerate Time D4 Output Pulse Y Num YO Config Yalue Accelerate And Decelerems Time O Er 1 Frequency 1 Pulse Hum O 2 Read From PLC Write To PLC OK Cancel Set the pulse output frequency numbers output terminals accelerate decelerate time and so on Then add the pulse instruction in the block SBLOCK Sequence Block DSPLSR SBLOCKE X 1 the pulse output instructions are all 32bits BB 0 3 30 Modbus item ee Open the modbus item window Modbus Config Skip Comment 2 lea E Select Instruction Coil Read COLE J Coil Eead COLR Remote Station Mum COM Hum Ke Remote Coil Address Coil Count Local Coil Address Select the modbus instructions set the address and com port then software will build an instruction SBLOCK Sequence Block COLR KI KO K1 MIOO K2 SBLOCKE fi 10 3 4 Wait item There are two modes to wait Al flag bit Hait Config X C Wait T Timer Tie BL timer wait Wait Config X _
53. D8231 COM 3 15 14 is jiz fu fiofo js 7 Jo s 4 js 2 i jo a es OL 300bps 1L 600bps 2 1200 bps 3L 2400 bps 4 4800 bps SL 9600 bps 6 19 2K bps OL 8bits data 7U 38 4K bps IL 7bits data 8 57 6K bps 9 115 2K bps oL No check 1 Odd check 2 Even check OL 2 stop bits 2 Istop bit FD8216 COM 1 FD8226 COM 2 F D8236 COM 3 as e o 29 87 sees 4 3 Bet eee i Reserved 0 8 bits communication 1 16 bits communication 0 without start symbol 1 with start symbol 0 without end symbol pd with end symbol 7 2 MODBUS Communication E XC series PLC support both Modbus master and Modbus slave Master format When PLC is set to be master PLC sends request to other slave devices via Modbus instructions other devices response the master Slave format when PLC is set to be slave it can only response with other master devices The default status of XC PLC is Modbus slave BB 2 Address CO For the soft component s number in PLC which corresponds with Modbus address number please see the following table Coil Space M odbus ID prefix is Ox 0 BitID M odbusl D M odbus I D decimal K Hex H MO M7999 0 7999 0 1F3F X0 X1037 16384 16927 4000 421F YO Y 1037 18432 18975 4800 4A1F Register Space Modbus ID prefix is 4x Word ID M odbusl D M odbus I D e decimal K H ex H X 1 Bit soft components X Y
54. Free format setting with without start bit with without stop bit SET 255 is free format FD8220 Communication mode o l 1 254 bit is M odbus station number FD8221 Baud rate data bit stop bit parity Unit ms if set to be O it means no FD8222 ASC timeout judgment time We timeout waiting Unit ms if set to be 0 it means no COM 2 FD8223 Reply timeout judgment time y timeout waiting FD8224 Start symbol High 8 bits invalid FD8225 End symbol High 8 bits invalid 8 16 bits cushion FD8226 Free format setting with without start bit with without stop bit FD8231 Baud rate data bit stop bit parity i Unit ms if set to be O it means no FD8232 ASC timeout judgment time l o timeout waiting Unit ms if set to be 0 it means no FD8233 Reply timeout judgment time timeout waiting FD8234 Start symbol High 8 bits invalid FD8235 End symbol High 8 bits invalid 8 16 bits cushion FD8236 Free format setting with without start bit with without stop bit X 1 The PLC will be Off line after changing the communication parameters use stop when reboot function to a 255 is free format FD8230 Communication mode ya 1 254 bit is M odbus station number COM 3 keep PLC online X 2 After modifying the data with special FLASH data registers the new data will get into effect after reboot o Set the communication parameters FD8211 COM 1 FD8221 COM 2 F
55. Once I I i i High execution Low High Execution Low i i Llll Jofofo ofofofofofofo fof thill lililililolololo i FY fo ee eee a een seas sass esses es assssasses 4 gt 1 M8 022 usoz2 o he 4 7 4 Logic shift left LSL Logic shift right LSR 1 Summary Do logic shift right left for the numbers Logic shift left LSL 16 bits LSL DLSL Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM condition rising falling edge Models Hardware Software Logic shift right LSR 16 bits LSR 32 bits DLSR Execution Normally ON OFF XC2 XC3 XC5 XCM condition rising falling edge Models Hardware Software requirement requirement 2 Operands Function Data Type D Source data address 16 bits 32 bits BIN Arithmetic shift left right times 16 bits 32bits BIN 3 Suitable soft components pjm m m ox by m os xa D ee ee eee eee 4 applied instructions After once execution the low bit is filled in 0 the final bit is stored in Description carry flag LSL meaning and operation are the same as SHL After once execution the high bit is same with the bit before shifting the final bit is stored in carry flag LSR and SHR is different LSR add 0 in high bit when moving SHR all bits are moved lt Logic shift left gt lt Logic shift right gt D n Epa AH o e XO B mee a High Shift right Left M8 022 x 7 M8022 High After D
56. PLSR etc The name can t be same with the func blocks exist in current PLC p 9 3 Operation Steps 1LlOpen PLC edit tool in the left Project toolbar choose Func Block right click it and choose Add New Func Block ne Project 33 PLCI B L Code pE Ladder ld Instruction List Func Block Config Blo Add Hew Func Block Include Func Block From Disk Reg Commen ER Free Monitor Data Monitor pN Set Reg Init Value a PLC Config fee Password f Serial Port Bo BD CaN CAN Wy Save Hold Memory 000 Module ral 1 0 2 See graph below fill in the information of your function Func Hlock Info Edit Func Block Hame FUNC uoo 1 0 0 Description Matha Jate 20094 6H 687 a ee 3L After new create the Func Block you can see the edit interface as shown below Main function s name it s function block s name this name can t be changed freely and FLC1 Ladder FuncBlock FURCl1 a E users should modify in the edit window PRT RATAARAAATAAA ATA AAA AAA AAA AAA ATR HH FunctionBlockWame FUNC 1 3 Version h B o PN 4 Author 5 UpdateTime 2009 6 6 846 6 Comment 7 5 THETA THAT TATA ATTA TAHT HAHAHAHAHA HEARERS TATRA TAKA T HRT E AHH 9 woid FUNC1I WORD W BIT E WORD W correspond with soft component D Edit your C language BIT B correspond with soft component M program between Parameters
57. acts the count value clears to be 0 Counter CH According to different application and purpose we can divide the counters to different types as below For internal count for general using power off retentive usage Y 16 bits counter for increment count the count range is 1 32 767 Y 32 bits counter for increment count the count range is 1 2 147 483 647 Y These counters can be used by PLC s internal signal The response speed is one scan cycle or longer For High Speed Count Power off retentive Y 32 bits counter for increment decrement count the count range is 2 147 483 648 2 147 483 647 single phase increment count single phase increment decrement count AB phase cont specify to special input points Y The high speed counter can count 80KHz frequency it separates with the PLC s scan cycle Data Register DI Usage of Data Registers Data Registers are used to store data represent with D Addressing Form The data registers in XC series PLC are all 16 bits the highest bit is the sign bit combine two data registers together can operate 32 bits the highest bit is the sign bit data process Points to note Same with other soft components data registers also have common usage type and power off retentive type FlashROM Register FD Usage of FlashROM registers FlashROM registers are used to store data soft components represent with FD Addressing Form In basic units
58. are in Octal form the left are in decimal form 7 2 3 Communication nstr uctions Modbus instructions include coil read write register read write below we describe these instructions in details y Coil Read COLR IL Instruction Summary Read the specified station s specified coil status to the local PLC Coil read COLR 16 bits COLR 32 bits instruction instruction Execution Normally ON OFF coil Suitable XC2 XC3 XC5 XCM Condition Models Hardware Software 2 Operands Specify the remote communication station or soft component s ID 16bits BIN Specify the remote coil s start ID or soft component s ID 16bits BIN Specify the coil number or soft component s ID 16bits BIN Specify the start ID of the local receive coils Specify the serial port s number 16bits BIN 3 suitable soft components Operands gt r m m ox by m os kar gt sit TSTS STS zt hE a so TJT Tf i i liT idiki f r w n CE EEE Function X0 K500 K3 M1 K2 COLR Read coil instruction Modbus code is 01H Serial Port K1 K3 V Input Coil Read INPR 1 Instruction Read the specified station s specified input coils into local coils Input coil read INPR 16 bits INPR 32 bits instruction instruction Execution Normally ON OFF rising edge Suitable Models XC2 XC3 XC5 XCM Condition Hardware Software Requi
59. auxiliary address in the form of decimal Points to note This type of relays are different with the input output relays they can t get external load can only use in program Retentive relays can keep its ON OFF status in case of PLC power OFF Status Relays SO Usage of status relays Used as relays in Ladder represent with S Address assignment principle In basic units assign the ID in the form of decimal Points to note If not used as operation number they can be used as auxiliary relays program as normal contactors coils Besides they can be used as signal alarms for external diagnose Usage of the timers Timers are used to calculate the time pulse like Ims 10ms 100ms etc when reach the set value the output contactors acts represent with T Address assignment principle In basic units assign the timer s ID in the form of decimal But divide ID into several parts according to the clock pulse accumulate or not Please refer to chapter 2 2 for details Time pulse There are three specifications for the timer s clock pulse 1ms 10ms 100ms If choose 10ms timer carry on addition operation with 10ms time pulse Accumulation not accumulation The times are divided into two modes accumulation time means even the timer coil s driver is OFF the timer will still keep the current value while the not accumulation time means when the count value reaches the set value the output contact
60. 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 Jis low 8 bits high 8 bits store ASCII data The convert result is this D202 down S 4 applied instructions ci Assign start device D100 0ABCH D101 1234H D102 5678H O 30H 1J 31H 5 35H A 41H 2 32H 6 36H B 42H 3 33H 7 37H C 43H 4 34H 8 38H 4 8 7 ASCII convert to Hex HEX 1 Summary ASCII converts to Hex HEX 16 bits HEX Execution ON OFF Suitable rising falling edge Models Software requirement 2 Operands Function Date type Operands Source soft element address ASCII DD Target soft element address 2 bits HEX Character quantity 16 bits BIN 3 Suitable soft components Normally condition Hardware requirement Operands gt gt gt m o x mlm xn oo s Trrrrtrrtfrtl fl C ee eee eee a n ae X0 oan HEX D200 D100 K4 Convert the high and low 8 bits in source S to HEX data Move 4 bits every time to destination assigned by n The convert alphanumeric number is 4 applied instructions The convert of the upward program is the following 41H A i 30H 0 D201 0f 1FOFOTOFOFIFIFOTI FOF IF opyori go 43H C 42H B D100 FU TOTOT OT TOU TOT POT TTT TT TOT ro A FT 8B F J fi 4 8 80 Coding DECO E 1 Summary
61. difference unit 0 1 O temperature display value can equal or close to the real temperature value This unit U parameter has sign negative or positive Unit is 0 1 C the default value is 0 The set temperature Control system s target temperature value The range is O 1000 C the precision is value unit 0 1 C 0 1 C Temperature control cycle Control cycle s range is 0 5s 200s the minimum precision is 0 1s the write value is unit O 1s the real temperature control cycle multiply 10 i e 0 5s control cycle should write 5 200s control cycle should write 2000 If users think the environment temperature is different with the display temperature he can write in the known temperature value At the moment of value written in calculate the temperature difference and save Calculate the temperature difference value adjust environment temperature value sample temperature value Unit 0 1 C Adjust environment E g under heat balance status user test the environmental temperature as 60 0 C with temperature value mercurial thermometer the display temperature is 55 0 C correspond sample unit 0 1 O temperature is 550 temperature difference O at this time users write this parameters with 600 temperature difference is re calculated to be 50 5 O then the display temperature sample temperature temperature difference 10 60 C Note when users write the adjust temperature value make sure that the temperature
62. interruption or else execute only one time interruption 24 segments HSC interruption loop C602 24 segments HSC interruption loop C604 lt SS 24 segments HSC interruption loop C608 SSS O 24 segments HSC interruption loop C610 O 24 segments HSC interruption loop C612 24 segments HSC interruption loop C618 SSS O 24 segments HSC interruption loop C620 if set it to be 1 then loop executing the interruption or else execute only one time interruption 24 segments HSC interruption loop C606 24 segments HSC interruption loop C614 24 segments HSC interruption loop C622 E Ee 24 segments HSC interruption loop C628 SS 24 segments HSC interruption loop C630 if set it to be 1 then loop executing the interruption or else execute only one time interruption 24 segments HSC interruption loop C638 Appendix 1 special soft device list Read amp Write the Expansions M 8340 M 8341 M8340 Read the expansion error flag read instruction M8341 Write the expansion error flag write instruction BLOCK Execution M 8630 M 8730 ID M8630 Function Specification a T a a ee oe ee we O e M8730 BLOCKIOO is raming tag SSCS Appendix 1 special soft device list fi Appendix 1 2 List of special memory and special data register Clock D8010 D8019 F lag D8021 D 8029 D8021 A l Compatible system s version number Low byte D8022
63. output M 8170 M 8238 M8170 PULSE_1 sending pulse flag Being ON when sending the pulse overflow flag of 32 bits pulse M8171 When overflow Flag is on sending ae 1 is positive direction the correspond M8172 Direction flag ee direction port is on M8173 PULSE_2 sending pulse flag Being ON when sending the pulse overflow flag of 32 bits pulse M8174 noe When overflow Flag is on sending oe 1 is positive direction the correspond M8175 Direction flag oe direction port is on M8176 PULSE_3 sending pulse flag Being ON when sending the pulse M8177 ae overflow flag of 32 bits pulse When overflow Flag is on Appendix 1 special soft device list ae 1 is positive direction the correspond M8178 Direction flag ection 48H M8179 PULSE_4 sending pulse flag Being ON when sending the pulse overflow flag of 32 bits pulse M8180 When overflow Flag is on sending a 1 is positive direction the correspond M8181 Direction flag ae direction port is on absolute relative bit a e e O O OoOo M8190 C600 4 segmen Tis absolute Ois relative M8191 C602 24 segmen Tis absolute Ois relative M8192 C604 4 segment is absolute Ois relative M8193 C606 4 segmen is absolute Ois relative M8194 C608 24 segments 1 is absolute Ois relative M8195 C610 4 segmen fee id M8196 C612 24 segments M8197 C614 4 segmen O m8198 C616 4 segmen SS
64. pulse output with the acceleration deceleration time Run the instruction within the acceleration deceleration time is invalid L P l segment 1 Segment 2 segment 3 M5170 eee the dashed line represents the original pulse output 6 2 5 Pulse Stop STOP IL Instruction Summary Stop pulse output immediately Pulse stop STOP 16 bits STOP 32 bits Execution Rising falling edge Suitable XC2 XC3 XC5 XCM Hardware Software requirement a requirement 2 Operands Operands Specify the port to stop pulse output Bit 3 suitable soft components Functions And Actions 16 bit instruction form MO PLSR DO D100 YO a CP l STOP YO M8170 l RST MO When M000 changes from OFF to be ON PLSR output pulse at YOOO DO specify the frequency D001 specify the pulse number D100 specify the acceleration deceleration time when the output pulse number reaches the set value stop outputting the pulse on the rising edge of MOOI STOP instruction stops outputting the pulse at YOOO 6 2 60 Refresh the pulse number at the port PLSM V IL Instruction Summary Refresh the pulse number at the port Refresh the pulse number at the port PLSMV 16 bits 32 bits PLSMV Execution Normally ON OFF coil Suitable XC2 XC3 XCS XCM Hardware Software fone ES o 2 Operands Specify the pulse number or soft components ID 32bit BIN
65. scanning time They run one after another when the condition is ON AL Without SKIP condition Y a M i Y1 1 SBLOCK Sequence bl ockl DPLSR D 0 D2 D4 YO DPLSR D 0 D2 D4 Y1 Inverter Config SBLOCKE iit The instructions running sequence in block 1 is shown as below Scanning period 1 l Scanning period 2 M2 i PLS YO PLS Y1 Scanning period 3 Scanning period 4 Scanning period 5 i i i PE BLOCK condition is OFF and all the sequence instructions are finished running MO YO MI Y1 M2 SBLOCK Sequence block1 M3 DPLSR DO D2 D4 YO M4 DPLSR DO D2 D4 Y1 M5 Inverter config SBLOCKE Explanation A When M2 is ON block 1 is running B All the instructions run in sequence in the block C M3 M4 M5 are the sign of SKIP when they are ON this instruction will not run D When M3 is OFF if no other instructions use this YO pulse DPLSR DO D2 D4 YO will run if not the DPLSR DO D2 D4 YO will run after it 1s released by other instructions E After DPLSR DO D2 D4 YO is over check M4 If M4 is OFF check DPLSR DO D2 D4 Y1 if M4 is ON check M5 If M5 is OFF inverter config will run 10 5 BLOCK instruction editing rules In the BLOCK the instruction editing should accord with some s
66. simple the program and save program s steps according to the contacts structure General program principle is Jal 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 andl From left to right Sequencial control instructions also encode following this flow 30 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 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 4 applied instructions Applied Instructions In this chapter we describe applied instruction s function of XC series PLC 4 1 Table of Applied Instructions 4 2 Reading Method of Applied Instructions 4 3 Flow Instructions 4 4 Contactors Compare Instructions 4 5 Move Instructions 4 6 Arithmetic and Logic Operation Instructions 4 7 Loop and Shift Instructions 4 8 Data C
67. the communication station to be S0 2 rf S Evaluate the offset to be 0 M2 M22 2 communication error reset M3 M23 3 communication error reset M4 M24 E 4 communication error reset T202 K200 SO starts T202 counts 2S which is the M8138 communication wait time OUT T200 When the communication wait time M8137 reaches no matter the communication T202 succeeds or not T200 time 20ms this time is used start the next communication T200 MRGw Do K10 K5 D10 D 1 T200 time reaches or on the power M8002 S up execute the RUN operation to S _ thetarget station Lie Open the flow S1 STL S1 S1 OUT T203 K200 T201 veen o es e 8 M8002 s2 S STLE STL 2 S2 M8137 MO D0 pe M8138 MO D0 m R M8137 S3 5 pj M8138 STLE STL S3 S3 DO K4 o e or SO S STLE END Program Explanation SO starts T203 time 2s which is the communication waiting time When communication waiting time reaches no matter the communication succeeded or not T201 counts 20ms this time is used to start the next communication T201 times reach or on the power up execute the read operation with the target stations Open flow S2 Flow S2 is used to judge the communication status Failure will set the correspond coil success will reset the correspond coil If the station number is not larger than 4 the station register add 1 the offset add
68. the end step and then repeat executing the program from step 0 When debug insert END in each program segment to check out each program s action Then after confirm the correction of preceding block s action delete END instruction Besides the first execution of RUN begins with END instruction When executing END instruction refresh monitor timer Check if scan cycle is a long timer 3 150 GROUP GROUPE M nemonic and Function Mnemonic Function Format and Device GROUP GROUP Devices None GROUPE GROUP END GROUPE Devices None Statements GROUP and GROUPE should used in pairs GROUP and GROUPE don t have practical meaning they are used to optimize the program structure So add or delete these instructions doesn t effect the program s running The using method of GROUP and GROUPE 1s similar with flow instructions enter GROUP instruction at the beginning of group part enter GROUPE instruction at the end of group part Generally GROUP and GROUPE instruction can be programmed according to GROUP MO the group s function Meantime the MOV KIC DO programmed instructions can be FOLDED or UNFOLDED To a redundant project these two instructions are quite useful MRO GROUPE 3 16 Items To Note W hen Programming 1 Contacts structure and step number Even in the sequencial control circuit with the same action it s also available to
69. the high byte of DO Relate Special Soft Components L ist 1L FD8000 als 0 not usable FD8350 CAN Mode 1 XC CAN network 2 Free format FREE 0 IK BPS initial value actual is SKBPS 1 2K BPS initial value actual is SKBPS 2 SKBPS initial value 3 LIOKBPS initial value 4 20KBPS initial value 5 40KBPS initial value 6 SOKBPS initial value 7 80KBPS initial value FD8351 CAN baud rate eat oe as 9 ISOKBPS initial value 10 200KBPS initial value 11 250KBPS initial value 12 300KBPS initial value 13 400KBPS initial value 14 SOOKBPS initial value 15 600KBPS initial value 16 SOOKBPS initial value 17 LOOOKBPS initial value low 8 bits O standard frame CAN free format low 8 bits 1 expansion frame FD8358 l l mode high 8 bits 0 8 bits data store high 8 bits 1 16 bits data store accept l FD8359 for free format using unit ms timeout time CAN send timeout fixed to be 5ms time 2 System M8000 flag ON error happens OFF normal M8240 CAN error flag l if set M8242 as ON and manually set M8240 as ON this will enable CAN reset XC CAN mode valid CAN node dropped off M8241 A ON certain node nodes are dropped off a i OFF Normal l ON CAN reset automatically when error do reset or not if CAN M8242 happens error happens OFF take no operation when error happens FREE mode valid M8243 CAN send accept finished ON receive accept finish flag reset ON automatically when starting to send
70. the n1 limit is diverted to an overflow area In every scan cycle loop shift right action will be executed M 3 M 0 gt Overflow M 7 M 4 gt M3 M0 M11 M 8 gt M7 M4 M15 M12 gt M11 M8 X 3 X 0 gt M15 M12 i CE nl ri m xo to ee e Q oO ow oO 4 applied instructions 4 7 6 Word shift left W SFL 1 Summary Word shift left Word shift left WSFL Execution rising falling edge Suitable XC2 XC3 XC5 XCM Hardware Software 2 Operands Source soft element head address Target soft element head address Source data quantity Word shift left times 3 Suitable soft components pjm m m ox by m os xa D sot tT E E E a E S T E E E Description The instruction copies n2 source devices to a word stack of length n1 For each addition of n2 words the existing data within the word stack is shifted n2 words to the left Any word data moving to a position exceeding the n1 limit is diverted to an overflow area Inevery scan cycle loop shift left action will be executed D25 D22 Overflow D21 D18 D25 D22 D17 D14 D21 D18 D13 D10 D17 D14 D 3 D 0 gt D13 D10 e oS 0 Oo n2 word shift left 4 applied instructions 5 D nl n2 lt 0 3 wart po pro xis xt es 52 or oo n2 words left shift 4 7 1 Word shift right W SFR 1 Summary Word shift right Word shift right WSFR Execution rising falling edge Suitable XC2 XC3 XC5 XCM condition
71. the specified frequency acceleration deceleration time and pulse direction Segmented dual directional pulse output PLSR 16 bits PLSR 32 bits DPLSR Instruction Instruction Execution Normally ON OFF coil Suitable XC2 XC3 XCS XCM a a e Hardware Software requirement TS requirement 2 Operands Specify the soft component s start ID of the segmented pulse 16 bit 32 bit SI parameters BIN S2 Specify acceleration deceleration time or soft component s ID 16 bit 32 bit BIN D2 Specify the pulse output port Bit D2 Specify the pulse output direction s port 3 suitable soft components pjm m o x by ow bs kar DL sit TT T ft ilil ik I operands system Dam fJ TTT l Functions And Actions 16 bit instruction form Q PLSR D100 YO Y3 I RST MO The parameters address is a section starts from Dn or FDn In the above example DO set the first segment pulse s highest frequency D1 set the first segment s pulse number D2 set the second segment pulse s highest frequency D3 set the second segment s pulse number if the set value in Dn Dn 1 is 0 this represents the end of segment the segment number is not limited Acceleration deceleration time is the time from the start to the first segment s highest frequency Meantime it defines the slope of all
72. to be K 75000 set segment 4 D4004 to be K 15000 M8000 is normally ON coil IHSC and start ID of 24 segment M8000 is normally ON coil read the HSC value of C630 to D200 main program end Ainterruption tag of segment 1 M8000 is normally ON coil output coil Y4 set low speed run with speed 1 Ainterruption return tag interruption tag of segment 2 M8000 is normally ON coil output coil Y4 reset low speed run stop output coil Y2 reset run forward stops output coil Y3 set back running interruption return tag nterruption tag of segment 3 M8000 is normally ON coil output coil Y4 set low speed run with speed 1 interruption return tag interruption tag of segment 4 M8000 is normally ON coil output coil Y3 reset back running stop output coil Y4 reset low speed run stop output coil Y2 set run forward interruption return tag PULSE OUTPUT In this chapter we tell the pulse function of XC series PLC The content includes pulse output instructions input output wiring items to note and relate coils and registers e on 6 1 Functions Summary 6 2 Pulse Output Types and Instructions 6 3 Output Wiring 6 4 Items To Note 6 5 Sample Programs 6 6 Coils and Registers Relate To Pulse Output Pulse Output Instructions List Circuit And Soft Device Chapter PULSE OUTPUT PLSY PLSF PLSR PLSNEXT PLSNT STOP PLSMV ZRN DRVI DRVA PLS
73. yY Y Freeformat SEND Free format datasend JY IY Jy Y communication RCV Free format data receive _ _ y yY Jy JY CCOLR CANBUScoilread dT S Wy S CANBUS CCOLW _ CANBUS coil write J T J w P communication CREGR CANBUSregisterread WY CREGW__ CANBUS register write o J WY STR Precisiontime O IY vy IY Y Precision time STRR_ Read precision time register y JY Jy JY STRS Stop precision time yY IY Jy Y EI Enable interruption O yY vy yY I r E BE B E A E IRET_ Interruptionreturn TE IY Jy IY Y BSTOP Stoptheblock yY Jy yY Y BLOCK BGOON Continue runningthe block TV y yY IY WAT Wit CS y yi y y Read write FROM_ Readthe module CTV expansion TO Writethe module CE Jy FRQM_ Frequency measurement TV Jy Y ones poi Pawn tines A PID PID control o O TV X 1 All the instructions are 16bits except the instructions with 1 which has 32bits 32bits instructions are added D in front of its 16bits instruction Such as ADD 16bits DADD 32bits X 2 These instructions are 32bits and have no 16bits format X3 V means this series support the instruction Appendix 2 instructions list Appendix 2 4 MOTION CONTROL INSTRUCTIONS LIST FUNCTION ZRN Originretun NE y y DRVA Absolute position CEC CT yvy Vv DRVI Relative position CEC CT yvy y ABS Absolute address O f Jo S T T y CCW Circular
74. 0 D149 138 D8240 D8249 D8306 D8313 D8460 D8469 XCI XC2 D8000 D8511 D0 D999 D4000 D4999 6 D8630 D8729 DO D3999 D4000 D7999 D8000 D9023 1024 DO0 D2999 D3000 D4999 D8000 D9023 1024 Structure Data register is soft element which used to store data it includes 16 bits and 32 bits 32 bits contains two registers the highest bit is sign bit XC3 XC5 XCM 16 bits register range is 32 768 32 767 DO0 16 bits 01 00 00 1001 1 00 0 0 0 bl I bO O oO Sign bit it O positive 1 negative Use the applied instruction to read and write the register data Or use other devices such as HMI 32 bits value is consisted of two registers The range is 2147483648 2147483647 High D1 16 bits X DO 16 bits gt rox Ne ww OF 100001001 100000010000 1001 10000 0 bi T bO gt Be ip Sign bit O positive 1 negative When appoint the 32bits register if set DO the PLC will connect the next register D1 as the high bits Generally we often appoint even address register Function Normal type When write a new value in the register the former value will be covered Y When PLC from RUN to STOP or STOP to RUN the value in the register will be cleared Retentive type Y When PLC from RUN to STOP or power off the value in the register will be retained
75. 1 1 u Pressure system P 3000 7000 I minutes 0 4 3 u Liquid level system P 2000 8000 I minutes 1 5 8 Program Example PID Control Program is shown below M8000 MOV ID100 D10 Move ID100 content into D10 MI D4002 7 S convert PID mode to be auto tune at the beginning of auto tune control Starts or auto tune finish MO PID Do pio D4000 start PID DO is target value D10 is Mirs detected value from D4000 the zone M2 is PID parameters area output PID result via YO M2 D4002 7 R PID control finish close auto tune PID D4002 8 D4009 KO M1 mode C R 3 if auto tune is successful and D4002 7 D4009 KI a overshoot is permitted close auto tune control bit auto tune finish If auto tune turns to be manual mode and auto tune is not permitted close auto tune control bit Soft components function comments D4000 7 auto tune bit D4002 8 auto tune successful sign MO normal PID control M1 auto tune control M2 enter into PID control after auto tune C Language F unction Block In this chapter we focus on C language function block s specifications edition instruction calling application points etc we also attach the common Function list 9 1 Functions Summary 9 2 Instrument Form 9 3 Operation Steps 9 4 Import and Export of the Functions 9 5 Edit the Function Block 9 6 Example Program 9 7 Application Points
76. 1 D110 Binary converts to Floating Binary Floating Binary Floating 4 applied instructions 4 9 6 Float Div EDIV 1 Summary Float Divide EDIV fois i Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software er a oe 2 Operands D reses OOOO BIN 3 Suitable soft components ee X0 Description o EDV D10 D20 D50 I D11 D100 0 D21 D200 gt 0 D51 D500 Binary Floating Binary Floating Binary Floating The floating point value of S1 is divided by the floating point value of S2 The result of the division is stored in D as a floating point value No remainder is calculated Ifa constant K or H used as source data the value is converted to floating point before the addition operation X1 m EDIV D100 K100 D110 D101 D100 K100 gt D111 D110 Binary converts to Floating Binary Floating Binary Floating If S2 is O the calculate is error the instruction can not work 4 applied instructions 4 9 7 Float Square Root ESQR 1 Summary Float Square Root ESQR fois id SOR Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software 2 Operands The soft element address need to do square root 32 bits BIN Do The result address 32 bits BIN 3 Suitable soft components S Description XO a om O0 D11 D100 gt D21 D200 p ESQR D10 D20 Binary Floating Binary Floating
77. 10 If the station number is larger than 4 evaluate the station register 1 clear the offset register Open flow SO When PLC turns from STOP to RUN M8002 gets a scan cycle SO flow open write the master s DIO D14 to slave 2 DIO D14 no matter the communication is success or not turn to S1 flow check the previous communication written condition After certain time delay continue to read DI5 D19 data from 2 After this reading entr S2 flow check if the communication is success If failed set M23 enter alarming After finishing the communication with 2 enter S3 then flow S3 will judge with the station number If the station number is less than 1 the offset add 10 or else start from 2 again e g 2 Below is the sample of XINJE XC series PLC with two of XINJE inverters they communicate via Modbus communication XC series PLC write the frequency to the two inverters set the first inverter s station to be 1 set the second inverter s station to be 2 store the frequency s set value in D1000 and D2000 execute the frequency setting order via COM ports Program Description On the rising edge of M8012 write frequency to the first inverter on the falling edge of M8012 write frequency to the second inverter 12 3 Free Format Communication Example In this example we use DH107 DH108 series instruments IL Interface Specifications DH107 DH108 series instruments use asynchronous se
78. 2 24 segments HSC interruption loop C614 24 segments HSC interruption loop C616 24 segments HSC interruption loop C618 24 segments HSC interruption loop C620 24 segments HSC interruption loop C622 24 segments HSC interruption loop C624 24 segments HSC interruption loop C626 24 segments HSC interruption loop C628 24 segments HSC interruption loop C630 24 segments HSC interruption loop C632 24 segments HSC interruption loop C634 5 10 4 Example of HSC Interruption E g 2 Application on knit weaving machine continous loop mode The system theory is shown as below Control the inverter via PLC thereby control the motor Meantime via the feedback signal from encoder control the knit weaving machine and realize the precise position AB phase HSC input PLC forward backward control speed 1 control ee signal V5 series inverter control Knit weaving machine C630 K15000 K15000 12503 C630 K90000 K75000 C630 K75000 K15000 12501 C630 K0 K75000 high speed IUN tow speed high speed run low speed pane forward run forward backward Sark frequency f fT r forward backward Below is PLC program Y2 represents forward output signal Y3 represents backward output signal Y4 represents output signal of speed 1 C340 Back forth times accumulation counter C630 AB phase HSC
79. 20 Execute CCOLW instruction when X0 changes from OFF to ON write the local M20 M23 to the remote station 2th coil s start ID K20 y Read Register CREGR IL Summary Read the specified station s specified register to the local specified register Read register CREGR bits CREGR 32 bits instruction instruction Execution Normally ON OFF rising edge Suitable Models p e Hardware Software Requirement o 2 Operands D1 Specify remote communication station ID or soft component s 16bits BIN number D2 Specify the remote register s start ID or soft component s number 16bits BIN Specify the register number or soft component s number 16bits BIN Specify the local receive coil s start ID 16bits BIN 3 Suitable soft components sit s aka ise e K20 K4 D20 Function ij CREGR Execute CREGR instruction when XO changes from OFF to ON read the remote station 2th coil s start ID K20 to the local D20 D23 V Write the Register CREGW 1 Summary Write the specified local input register to the specified station s specified register Write the register CREGW 16 bits CREGW 32 bits instruction instruction Execution Normally ON OFF rising edge Suitable XC5 Condition Models Hardware Software Requirement Requirement 2 Operands D1 Specify remote communication station ID or soft 16bi
80. 4 D8181 The current segment means Nr n segment The low 16 bits of the current accumulated current D8190 PULSE_1 pulse number D8191 The high 16 bits of the current accumulated current pulse number The low 16 bits of the current accumulated current D8192 PULSE __ pulse number D8180 The high 16 bits of accumulated pulse number Appendix 1 special soft device list D8193 The high 16 bits of the current accumulated current pulse number The low 16 bits of the current accumulated current D8194 PULSE pulse number The high 16 bits of the current accumulated D8195 current pulse number Only XC5 32RT E Eo The low 16 bits of the current accumulated current 4PLS model has D8196 PULSE_4 pulse number The high 16 bits of the current accumulated D8197 current pulse number PULSE 3 Error segment number PULSE 3 Frequency indicate the bit Nr Behind Testing the decimal dot 1 means D8220 Precision 10 2 means 100 Absolute Positioning R elative Positioning the Origin Return D8230 D 8239 ID Pulse Function Description D8230 Rising time of the absolute relation position instruction YO a D8231 Falling time of the origin return instruction YO D8232 ULSE Rising time of the absolute relation position instruction Y 1 a D8233 Falling time of the origin return instruction Y1 CF P D8234 Rising time of the absolute relation position instruction Y2 E PULSE P D8235 Falling time of the origin return ins
81. 5 highest Shee bit is bit is Zero flag Zero tlag sie Ble A 147 4a ds ri Doen 2 147 43 647 DL 2 c N ae aa Borrow flag Carry flag 4 6 3 M ultiplication M UL 1 Summary Multiply two numbers store the result Multiplication MUL Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM Hardware Software 2 Operands SI The number address 16 bits 32bits BIN S2 The number address 16 bits 32bits BIN The result address 16 bits 32bits BIN 3 Suitable soft component 4 applied instructions pjm m m ox py m os xa D sit TE TSTS T so tT TTS T ptt ft T lt 16 bits Operation gt Description BIN BIN BIN xo G DOE x D2 gt I D50 D4 MUL DO D2 D4 16 bits 16 bits 32 bits The contents of the two source devices are multiplied together and the result is stored at the destination device in the format of 32 bits As in the upward chart when DO 8 D2 9 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 lt 32 bits Operation gt O an BIN BIN DMUL DO D2 D4 O DIO DOO x O D30 D20 gt O D70 Def D50 D4 32 bits 32 bits gt 64 bits When use 2 bits Operation the result is stored at the destination device i
82. 5 FF is free model COM2 FD8220 station number 1 254 is modbus station number Baud rate Data bit stop bit FD8221 Communicate format 3 parity Appendix 1 special soft device list timeout timeout waiting Unit ms if set to be 0 it means no timeout waiting io High 8 bits invalid FD8225 End ASC O High 8 bits invalid 8 16 bits buffer FD8226 Free format setting 8710 With without start bit With without stop bit i Communicate Mode 255 FF is free model FD8230 8710 station number 1 254 is modbus station number COM3 tme of reply Baud rate Data bit stop bit FD8231 Communicate format 3 parity Judgment time of ASC Unit ms if set to be 0 it means no FD8232 300 T timeout timeout waiting Judgment time of reply Unit ms if set to be 0 it means no FD8233 os timeout timeout waiting FD8234 Start ASC High 8 bits invalid FD8235 End ASC High 8 bits invalid 8 16 bits buffer FD8236 Free format setting 8710 With without start bit With without stop bit 710 Subsection Power off R etentive Zone of Timer T Initial Nr Function Value FD8323 Set the retentive zone s start tag of 100ms non accumulation timer i FD8324 Set the retentive zone s start tag of 100ms accumulation timer LF FD8325 Set the retentive zone s start tag of 1Oms non accumulation timer a FD8326 Set the retentive zone s start tag of 1Oms accumulation timer a FD8327 Set the retentive z
83. A Unidirectional ration pulse output without ACC DEC time change Variable frequency pulse output Ration pulse output with ACC DEC speed nulls Section PLSNT s Switch Pulse Stop STOP S Refresh Pulse Nr S D immediately Original ZRN 511 s2 s3 D Return Relative Position Control Absolute Position Control Absolute Position multi section pulse control 2 1 OD 23 2 4 25 2 6 OF 2 8 2 9 6 2 10 6 1 Functions Summary Generally XC3 and XC5 series PLC are equipped with 2CH pulse output function Via different instructions users can realize unidirectional pulse output without ACC DEC speed unidirectional pulse output with ACC DEC speed multi segments positive negative output etc the output frequency can reach 400K Hz Stepping Motor X 1 To use pulse output please choose PLC with transistor output like XC3 14T E or XC3 60RT E etc X 2 XC5 series 32I O PLC has 4CH YO Y1 Y2 Y3 pulse output function 6 27 Pulse Output Types and Instructions 6 2 1 Unidirectional ration pulse output without ACC DEC time change PLSY IL Instruction Summary Instruction to generate ration pulse with the specified frequency
84. ATAAAAT TARA AAA AAA ATTA AAT AAA ATTA ATT AA AAT AT AAT TH HHH 2 FunctionBlockName ADD 1 3 Version 1 020 4 kuchar 5 UpdateTime 2009 6 6 10 31 47 6 Comme nt I Wl2 WCL 0 0 SG FAAARAAH AAA AA HARRAH AAA THAR ATA AAA ATA TATRA TATRA TERRA RATT RRA 3 void ADD 1i WORD W BIT E ioH 11i W 2 W 1 W 0 ie I t3 ch tmplPriFuncBya0D_1 c 3 Write PLC program assign value 10 and 20 into registers DO D1 separately then call Func Block ADD_2 see graph below Mapag ADD_2 DO 4 Download program into PLC run PLC and set MO ADD_2 DO 10 5 From Free Monitor in he toolbar we can see that D2 changes to be 30 it means the assignment is successful OHOGeaxy28na 2 154 8400 OR ak besa ab WH dE Ve ik db lt gt lt gt lt s gt 1 FE OK men a a Ins eines Del Del F5 F5 F6 F8 F7 F11 Free M onitor 9 6 Program Example Function calculate CRC parity value via Func Block CRC calculation rules 1 Set 16 bits register CRC register FFFF H 2 XOR Exclusive OR 8 bits information with the low byte of the 16 bits CRC register 3 Right shift 1 bit of CRC register fill O in the highest bit 4 Check the right shifted value if it is 0 save the new value from step3 into CRC register if it is not 0 XOR the CRC register value with A001 H and save the result into the CRC register 5 Repeat step3 amp 4 until all the 8 bits have been ca
85. CAN COM port COM 1 Port1 is the program port it can be used to download the program and connect with the other devices The parameters baud rate data bit etc of this COM port are fixed can t be re set COM 2 Port2 is communication port it can be used to download program and connect with the other devices The parameters baud rate data bit etc of this COM port can be re set via software Via BD cards XC series PLC can expend other COM ports These COM ports can be RS232 and RS485 01234567 10 11 12 13 14 15 16 17 Thinget 20 21 22 23 24 25 26 27 30 31 32 33 34 36 36 37 40 41 42 43 Kx PVR XC5 60R E BNO PORTI PORT2 ERRO EN ENA NAITA 01234567 J ED 10 11 12 13 1415 16 17 NSST 20 21 22 23 24 25 26 27 10 RS232 COM Port COM1 Pin Definition COM2 Pin Definition
86. CK There are two methods to modify the block AL double click the start or end instruction to modify all the instructions in the block ma me CBELOCK Sequence Block i DSPLSR DO D2 D4 YO SBLOCKE Edit Sequence Block 1 gt Add Edit Delete Upwards Downwards Output Insert BU double click one instruction in the block to modify it SBLOCK Sequence Block Pulse Config C Skip 1 Comment Pulse Config Single 24 Segment Opposite Absolute Frequency D0 Fulse Number D2 Accelerate And Decelerate Time Qutput Pulse Y Num Config Yalue Accelerate And Decelerems Time 1 Frequency 1 Pulse Num 9 oul Read From PLC Write To PLC E OK Cancel a 10 3 Edit the instruction inside the BLOCK Fi Use command to edit the program Open the block editing window click add common item Comment Sequence Flockl Add Edit Delete Upwards Dowwards d Common Iten j Pulse Item Modbus Item Frequency Inverter Item Free Format Communication Item Wait Item It will show the editing window Instruction List x Skip Comment Instruction List Moy Do Di MUL DS D10 peo User can add instructions in this window SKIP condition can control the stop and running of the instructions When select skip and enter coil in it if the coil is ON the instructions will stop
87. D1 When X1 is ON once C300 increase 1 when C300 value D1 C300 coil outputs 2 10 Constant XC series PLC use the following 5 number systems Data process DEC DECIMAL NUMBER The preset number of counter and timer constant K The number of Auxiliary relay M timer T counter C state S y Set as the operand value and action of applied instruction constant K HEX HEXADECIMAL NUMBER y Set as the operand value and action of applied instruction constant K BIN BINARY NUMBER Inside the PLC all the numbers will be processed by binary But when monitoring on the device all the binary will be transformed into HEX or DEC OCT OCTAL NUMBER XC series PLC I O relays are addressed in OCT Such as 0 7 10 17 70 77 100 107 BCD BINARY CODE DECIMAL BCD uses 4 bits binary number to display decimal number 0 9 BCD can be used in 7 segments LED and BCD output digital switch Other numbers float number XC series PLC can calculate high precision float numbers It is calculated by binary numbers and display by decimal numbers Display PLC program should use K H to process values K means decimal numbers H means hex numbers Please note the PLC input output relay use octal address Constant K K is used to display decimal numbers K10 means decimal number 10 It is used to set timer and counter value operand value of applied instruction Constant H H is used to display hex n
88. D10 1 D10 The bit format of the selected device is inverted I e any occurrence of a I 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 4 applied instructions 4 70 Shift Instructions WSFL WSFR T 4 applied instructions 4 7 10 Arithmetic shift left SHL Arithmetic shift right SHR 1 Summary Do arithmetic shift left right for the numbers Arithmetic shift left SHL 16 bits SHL DSHL Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM condition rising falling edge Hardware Software Arithmetic shift right SHR 16 bits SHR DSHR Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM condition rising falling edge Hardware Software 2 Operands D The source data address 16bit 32bit BIN Shift left or right times 1 6bit 32bit BIN 3 Suitable soft components m m x oy m ps x p ft After once execution the low bit is filled in 0 the final bit is stored Description in carry flag After once execution the high bit is same with the bit before shifting the final bit is stored in carry flag lt Arithmetic shift left gt lt Arithmetic shift right gt 4 applied instructions ES n ae n XO X1 sa o a fs A ees After once After
89. D11 D10 gt D11 D11 D12 D12 a D13 4 applied instructions 4 5 50 Data block M ove PM OV 1 Summary Move the specified data block to the other soft components Data block mov PMOV Normally ON OFF coil Suitable Sonome fice Software a Function Data Type Specify the source data block or soft component 16 bits BIN bit address code Specify the target soft components address code 16 bits BIN bit Specify the move data s number 16 bits BIN Word po System Constant Moe Move the specifed n data to the specified n soft components in form Description of block COREG me D5 x0 PMOV D10 K3 N D5 D10 D6 _ D11 gt n 3 D7 a D12 e 4 applied instructions The function of PMOV and BMOV is mostly the same but the PMOV has the faster speed PMOV finish in one scan cycle when executing PMOV close all the interruptions Mistake many happen if there is a repeat with source address and target address 4 5 60 Fill Move FM OV 1 Summary Move the specified data block to the other soft components Fill Move FMOV Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM Hardware DFMOV need above V3 0 Software 2 Operands Operands Function Data Type S Specify the source data block or soft component 16 bits BIN bit address code Specify the t
90. Decrement DEC gt 4 applied instructions I DEC DO 0 bDoUO1 DO E On every execution of the instruction the device specified as the destination has its current value decremented decreased by a value of 1 When 32 768 or 2 147 483 648 is reached the next decrement will write 32 767 or 2 147 483 647 to the destination device 4 6 6 M ean M EAN 1 Summary Get the mean value of numbers Mean MEAN Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition rising falling edge Hardware Software 2 Operands The head address of the numbers Do o The mean result address 3 Suitable soft components gt r m m ox ox m bs xa p soot tT E a eee eee eee Description X0 MEAN CG9 Q a DO D10 K3 D0 D1 D2 3 gt D10 4 applied instructions The value of all the devices within the source range is summed and then divided by the number of devices summed 1 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 4 6 7 Logic AND WAND Logic OR WOR Logic Exclusive OR WXOR 1 Summary Do logic AND OR XOR for numbers Logic AND WAND Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condit
91. Description MSET M10 M120 Zone set unit M10 M120 Are specified as the same type of soft units and lt When pj gt D2 will not run Zone set set M8004 M8067 and D8067 2 4 applied instructions 4 5 9 Zone reset ZRST 1 Summary Reset the soft element in the certain range Multi reset ZRST Execution Normally ON OFF Suitable Hardware Software 2 Operands Start address of soft element Bit 16 bits BIN End address of soft element Bit 16 bits BIN Tm gt x oo en oo j Description f ZRST M500 M559 Zone reset bits M5 00 M559 ZRST DO D100 Zone reset words DO D100 Are specified as the same type of soft units and i When gt only reset the soft unit specified in D1 and set M8004 M8067 D8067 2 Other Reset As soft unit s separate reset instruction RST instruction can be used Instruction to bit unit Y M S and word unit T C D As fill move for constant KO 0 can be written into DX DY DM DS T C D 4 applied instructions 4 5 10 Swap the high and low byte SWAP 1 Summary Swap the high and low byte High and low byte swap SWAP fists SWAP p Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM Hardware Software 2 Operands The address of the soft element 16 bits BIN 3 Suitable soft components Dm gt x oo en oo Cy ee ee E E am
92. E High Execution Left I erecution fonnnoooaoaannnan oogogoonanonooong E j EEE seer een i i gt N Q022 M8022 o W 4 7 3 Rotation shift left ROL Rotation shift right ROR 1 Summary Continue and cycle shift left or right Rotation shift left ROL Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software feo mur Rotation shift right ROR Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM condition rising falling edge Hardware Software requirement re requirement 2 Operands 4 applied instructions gt Source data address 16 bits 32 bits BIN Shift right or left times 16 bits 32 bits BIN 3 Suitable soft components gt m gt m o x oo en oo o The bit format of the destination device is rotated n bit places to the left Description l l l on every operation of the instruction lt Rotation shift left gt lt Rotation shift right gt r L i m Sig a X a ROR DO K4 Right HIgh Rotation Low peepee EE peer eee ae fter once After once 1 execution execution High Left High Low jolofolo stats tizislals elelalo T tof 1 i 022 M802 o fe x X g 4 7 40 Bit shift left SFT L W 1 Summary Bit shift left Bit shift left SFTL Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM condition rising falling edge Models Hardware Software requirement requirement 2 Operands Source soft element head address 4 applied in
93. F rising Suitable XC5 Hardware Software 2 Operands Specify remote communication station ID or soft component s 16bits number Specify the coil number or soft component s number i Specify the remote coil s start ID or soft component s number 16bits BIN BIN gt Specify the local receive coil s start ID 3 Suitable Soft Components gt gt gt m o x ole en oo S1 zt tT a a a E a ss ft tft ft ett ttt Gy Gy Gy K20 K4 M20 XO Function ii CCOLR Execute CCOLR instruction when XO changes from OFF to ON read the four coils data of remote station 2th coil s start ID K20 to local M20 M23 V Writethe Coil CCOLW IL Summary Write the local specified multi coils status into the specified station s specified coils Write the coil CCOLW 16 bits CCOLW 32 bits E Execution Normally ON OFF rising Suitable XC5 Hardware Software 2 Operands Specify remote communication station ID or soft 16 bit BIN component s number Specify the coil number or soft component s number 16 bit BIN Specify the local receive coil s start ID 3 Suitable soft components D2 Specify the remote coil s start ID or soft component s 16 bit BIN number gt lm gt ml lo lm xn oo S1 s TSTST Tf s Tl Operands System o System S O a xo 2 unction ni CCOLW K2 K20 M
94. FlashROM registers are addressed in form of decimal Points to note Even the battery powered off this area can keep the data So this area is used to store important parameters FlashROM can write in about 1 000 000 times and it takes time at every write Frequently write can cause permanent damage of FD Constant BIT KO HU In every type of data in PLC B represents Binary K represents Decimal H represents Hexadecimal They are used to set timers and counters value or operands of application instructions 2 2 Structure of Soft Components 2 2 1 Structure of M emory if In XC series PLC there are many registers Besides the common data registers D FlashROM registers we can also make registers by combining bit soft components Data Register D For common use 16 bits For common use 32 bits via combine two sequential 16 bits registers For power off retentive usage can modify the retentive zone For special usage occupied by the system can t be used as common instruction s parameters For offset usage indirect specifies y Form Dn Dm Xn Dm Yn Dm O Mn Dm etc MOV KO DO D10 D0 D100 In the above sample 1f DO O then D100 D10 YO is ON If M2 turns from OFF to be ON DO 5 then D100 D15 Y5 is ON Therein D10 D0 D 10 D0 YO DO Y 0 D0 The word offset combined by bit soft components DXn Dm represents DX n Dm
95. G OF HIGH SPEED COUNTER 5 5 INPUT TERMINALS ASSIGNMENT FOR HSC 5 6 READ AND WRITE THE HSC VALUE 5 7 RESET MODE OF HSC 5 8 FREQUENCY MULTIPLICATION OF AB PHASE HSC 5 9 HSC EXAMPLES 5 10 HSC INTERRUPTION Instructions List for HSC MNEMONIC FUNCTION CIRCUIT AND SOFT COMPONENTS CHAPTER READ WRITE HIGH SPEED COUNTER HSCR Read HSC HSCW Write HSC HSCW Cn Kn D ee i RST E _ en Spri HSC High Speed Counter 3 13 5 1 Functions Summary XC series PLC has HSC High Speed Counter function which is independent with the scan cycle Via choosing different counter test the high speed input signals with detect sensors and rotary encoders The highest testing frequency can reach SOKHz count input 5 20 HSC Mode XC series high speed counter s function has three count modes Increment Mode Pulse Direction Mode and AB phase Mode Increment M ode Under this mode count and input the pulse signal the count value increase at each pulse s rising edge count imput L counter s current value Pulse Direction M ode Under this mode the pulse signal and direction signal are all inputted the count value increase or decrease with the direction signal s status When the count signal is OFF the count input s rising edge carry on plus count When the count signal is ON the count input s risi
96. ID is in DO 8 bits data transfer the transferred data is DOLL DIL D2L D3L DOL means the low byte of DO 16 bits data transfer the transferred data is DOL DOH JD1L D1H DOH means the high byte of DO Standard Frame the valid bits of the data package ID number that is specified by D10 is the low 11 bits the left bits are invalid The expansion frame the valid bits of the data package ID number that is specified by D10 is the low 29 bits the left bits are invalid The maximum data bits specified by D20 1s 8 if exceeds 8 the instruction will send only 8 bits y CAN Receive CRECV IL Instructions Summary Write the specified data in one unit to a specified address in another unit data transfers between different units CAN Receive CRECV 16 bits CRECV 32 bits instruction instruction Executing Normally ON OFF Rising Suitable XC5 E e me Hardware Software 2 Operands specify the ID number to receive the data package 16bits BIN S2 specify the first ID number of received soft 16bits BIN component locally specify the byte number of received data 16bits BIN S4 specify the soft component s start ID number of ID 16bits BIN filter code 3L Suitable soft components gt gt gt m x oo en oo a Trrrrtrrttrtl ft so EE so tT TCi cE T Functions and Actions i CRECV DO D10 D20 D30 The 32 bits memory combined by D1 DO DO
97. If the value is 1 it is 1 time frequency if it is 4 it is 4 time frequency a l time frequency FD8241 Frequency multiplication of C630 4 4 time frequency 1 time frequency FD8242 Frequency multiplication of C632 FD8243 Frequency multiplication of C634 e l E 2 4 time frequency poy uow pow g es ng 5 90 HSC Example Below we take XC3 60 PLC as the example to introduce HSC s program form MO C600 K2000 l M1 C600 t R 5 When MO is ON C600 starts the HSC with the OFF gt ON of X000 When comes the rising edge of M1 reset HSC C600 M8000 C600 K88888888 X HSCR C600 DO M1 C600 fi Cu DO D2 D lt YO DO D2 DO D4 D2 _D lt Yl DO D4 D gt W When normally ON coil M8000 is ON set the value of C600 the set value is K888888888 read the HSC value DWORD into data register DO DWORD If the value in C600 is smaller than value in D2 set the output coil YO ON If the value in C600 equals or be larger than value in D2 and smaller than value in D4 set the output coil Y1 ON If the value in C600 equals or be larger than value in D4 set the output coil Y2 ON When comes the rising edge of M1 reset HSC C600 and stop counting M4 C620 K999999 D M5 C620 e R When M4 is ON C620 starts the HSC with the OFF gt ON of X000 judge the count direction according to the input X001 s
98. K 9 5 Edit eh Func Blocks Example Add DO and D1 in PLC s registers then assign the value to D2 1 In Project toolbar new create a Func Block here we name the Func Block as ADD_ 2 then edit C language program 2 Click compile after edition PLC1 Ladder Funchlock ADD 1 Information Export Compile Fai i a a a a a a a a a a a a a a a a a e a a a a a a a a a a 2 FunctionblockName ADD 1 3 Version ee Se E 4 Author D UpdateTime 2009 6 6 8 46 36 6 Corie nt 7 WE2 wfto w fil 5 iioo i a a a a a a e a a a TTT a a a a a a a TTT TTT TTT a AAA TTT a a g void ADD 1 i WORD W BIT E LOE 4 al WL2 W O W 1 L2 i 13 4 iiil Inform ati on Error List Output 1 Erroricconm ftmpfPriFuncBb 400 i c line amp parse error at near ers CC oee re cea eee ee eee Ee Rr eee ns eee ee ee orm ee Ses cee ae teeter Error ccom ftmp PriFuncB 40D_1 c line 8 parse error at near eh EmpyPriFuncBAD0 1 c The information list According to the information shown in the output blank we can search and modify the grammar error in C language program Here we can see that in the program there is no sign behind W 2 W 0 W 1 Compile the program again after modify the program In the information list we can corfirm that there is no grammar error in the program FLUI Ladder FumeBlock ADD 1 Information Export Compile 14 PRTTKHHHTKATTTAAA
99. P Falling trailing edge pulse PuLse Falling MCS Connect the public serial New bus contacts line start MCR Clear the public serial Bus line contacts return ALT The status of the assigned Alternate device is inverted on every state operation of the instruction XU YU M SU TU CU Dn m END Force the current program END scan to end a GROUPE Group End il ALT 3 20 LD LDI OUT Mnemonic and Function Format and Operands LD Initial logic operation en LoaD contact type NO Wee a Normally Open Operands X YO M SO TO CU Dn m FDn m LDI Initial logic operation o LoaD Inverse contact type NC C Normally Closed Devices X YU M S T C Dn mf FDn m Final logic operation C Yo type drive coil Operands X YU MU SU TU CU Dn m Statement Connect the LD and LDI instructions directly to the left bus bar Or use them to define a new block of program when using ANB instruction OUT instruction is the coil drive instruction for the output relays auxiliary relays status timers counters But this instruction can t be used for the input relays 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 const
100. Predefined Marco define true l define false 0 define TRUE 1 define FALSE 0 9 47 Import and Export the Functions IL Export 1 Function export the function as the file then other PLC program can import to use pe Project Aa PLCI a 1 Code k Ladder ld Instruction List REFON A Edit ersion E 0 Fune Block Hane FUNC FR Free Monitor Description Data Monitor gl Set Reg Init value gj PLC Config jee Password Serial Port Bo BD cay CAN Author Date 2003 6H 6H w TY Save Hold Memory Export 100 Module Bait Wo Edit 2 Export Format a Editable export the source codes out and save as a file If import again the file is editable b Not editable don t export the source code if import the file it s not editable 2 Import Function Import the exist Func Block file to use in the PLC program ne Project Ea PLCI S J Code p Ladder ld Instruction List Func Confi Rez Comm R Free Monitor Data Monitor il Set Rez Init Value a PLO Config sex Password Serial Port Bo BD can CAN wa Save Hold Memory DOU Module vol 1 0 fa FLC Information 3 PLC CPV Information a jeo ED Information ETI Expansion Information gt Scan Cycle TE wa Instruction Class Choose the Func Block right click Import Func Block From Disk choose the correct file then click O
101. Program Summary XC series PLC as the controllers accept the signal and execute the program in the controller to fulfill the requirements from the users In this chapter we start with the program forms introduce the main features the supported two program languages etc 1 1 Programmer Controller s Features 1 2 Program Language 1 3 Program Format 1 1 Program Controller s Features Program Language XC series PLC support two kinds of program languages instruction list and ladder the two languages can convert to the other Security of the Program To avoid the stolen or wrong modifying of user program we encrypt the program When uploading the encrypted program it will check in the form of password This can maintain the user s copyright meantime it limits the download to avoid the modification with the program spitefully Program s comments When the user program is too long adding comments to the program and its soft components is necessary Offset Function Add offset appendix like X3 D100 M10 D100 DO D100 behind coils data registers can realize indirect addressing For example when D100 9 X3 D100 X14 M10 D100 M19 DO D100 D9 Rich Basic Functions XC series PLC offers enough basic instructions can fulfill basic sequential control data moving and comparing arithmetic operation logic control data loop and shift etc XC series PLC also support special compare high speed pul
102. RC parity code is the reminder from the result of PV SV alarm status 256 M V para value A DDR for details please refer to AIBUS communication description 3 Write the program After power on the PLC the PLC read the current temperature every 40ms During this period the user can write the set temperature Data zone definition buffer area of sending data DIO D19 buffer area of accepting data D20 D29 instruction s station number D30 read command s value D31 52 H write command s value D32 43 H parameter s code D33 temperature setting D34 CRC parity code D36 Temperature display D200 D201 The send data form 81H 81H 43H 00H c8H OOH OcH 01H current temperature display Communication parameters setting baud rate 9600 8 data bits 2 stop bits no parity Set FD8220 255 FD8221 5 the hardware and software must be V2 4 or above Ladder Write instrument s station Nr K1 in to D30 Time 40ms Output M10 Write the read code 52H into D31 Clear registers D40 D56 D30 add H80 to get value 81H move D40 81H to D10 move D40 81H to D11 move D31 read code 52H to D12 move D33 para code to D13 write zero to D14 write zero to D15 below is to calculate CRC parity D33 multiply K256 the result is saved in D42 D42 add K82 the result is stored in D44 D44 add D30 instrument s station the result is saved in D52 Move D52 into D54 Logic AND D54 with HFF save the result
103. SEND and RCV D23 SV low high bytes bytes commands from free format communication user will get the communication with the objects Appendix 1 special soft device list Appendix 1 Special soft device list Here we mainly introduce the functions of special soft device data register and FlashROM and introduce the address of expansion Users can scan fast Appendix 1 1 Special Auxiliary Relay List Appendix 1 2 Special Data Register List Appendix 1 3 Special Module Address List Appendix 1 4 Special Flash Register List Appendix 1 1 Special Auxiliary Relay List Appendix 1 special soft device list PC Status M 8000 M 8003 Normally ON coil when running Normally OFF coil when running Initial positive pulse coil Initial negative pulse coil RUN ne Mso00 M8001 Meso02 M2003 A k scan cycle Clock M 8011 M 8014 M8000 keeps being ON status when PLC is running M8001 keeps being OFF status when PLC is running M8002 be ON in first scan cycle M8003 be OFF in first scan cycle Shake with the cycle of 10ms Shake with the cycle of 100ms Shake with the cycle of 10sec Shake with the cycle of 1min Appendix 1 special soft device list Flag M 8020 M 8029 ID Function Description M8020 Zero The plus minus operation result is O When
104. Skip la Comment Wait Contig C Wait Coil Flag yf Timer Tna The ladder chart is as the following SBLOCK Sequence Block SBLOCKE g 10 3 5 Frequency inverter item a Users only have to set the parameters in below window the PLC will communicate with the frequency inverter Interver Config L C Skip Comment Inverter Station Hum GO com come coms Control Inverter Action Inverter Status Read Into User Define F Write Const Value Run Inching Run Decelerating Stop Forward Run Inching Forward Run Exigent Stop Backward Run Inching Backward Kun Inching Stop Error Reset F Write From Reg Se There are four areas in the window the following will introduce one by one AL Inverter station number and serial number Set the station number of the frequency inverter and the PLC serial port Interver Config skip Comment Inverter Station Num 1 g Ocom come coms Control Inverter Action Inver ter Status Read Into User Define BL Control inverter action There are two modes to set parameters First one is write constant value User Define Control Inverter Action Inverter Status Read Into Write Const Value O Fun iInching Run O Decelerating Stop O Forward Run Inching Forward Run O Exigent Stop O Backward Run P Inching Backward Run O Inching Stop O Error Reset Second one is to set the parameters in register Write From Keg
105. Suitable XC1 XC2 XC3 XC5 XCM condition a fa Hardware Software 2 Operands The number address The number address Dp The result address 3 Suitable soft components gt gt gt m o x ov ow m xn D a TrrrTrrrrtyl tt zt tT STS T diTi T e QQ Description ADD D10 D12 D14 D100 O U D120 gt U D140 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 O stands for positive 1 stands for negative All calculations are algebraic processed 5 8 3 Ifthe 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 pagel 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 pagel 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 4 applied instructions R elated flag Flag meaning ON the calculate result i
106. T YO i a a eo eee ae eS PLF M1 LD X1 M1 PLF MI RST YO LD MI RST YO 3 120 SET RST Mnemonic and Function Mnemonic Function Format and Devices SETH Set Set a bit device permanently RST Reset Reset a device permanently OFF Devices YO M SO TO CO Dn m Statements Program Turning ON X010 causes YOOO to turn ON YOOO remains ON even after X010 turns OFF Turning ON X011 causes YOOO to turn OFF YOOO 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 Besides it s also possible to use RST instruction to reset the current contents of timer counter and contacts When use SET RST commands avoid to use the same ID with OUT command X10 SET YO X11 RST YO X12 SET M50 X13 RST M50 X14 SET SO X15 RST SO X10 K10 7 lt P RST X10 T X11 LD SET LD RST LD SET LD RST LD SET LD RST LD OUT LD RST X10 YO X11 YO X12 M50 X13 M50 X14 SO X15 SO X10 T250 X17 T250 K10 3 13 7 OUT O RSTQ for the counters Mnemonic and Function Mnemonic Function Format and Devices Final logic operation type coil drive T9 T Reset
107. Transform the ASCII code to Hex numbers Coding DECO Normally ON OFF Suitable rising falling edge Software es a 2 Operands S Source soft element address ASCII Target soft element address 2 bits HEX The coding soft element quantity 16bits BIN 2 Suitable soft components 4 applied instructions gt lm gt wm o ox or ow ms xm p sTrrrrrrfrty ft a A Operands System System O O mp lt When D is bit unit gt n 16 Description CS n X10 DECO DXO M10 K3 X002 X001 X000 0 1 1 4 ye 7 6 5 4 2 1 0 0 0 0 0 1 0 0 0 M17 M16 M15 M14 M13 M12 MII 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 is soft unit it s point is 2 16 65536 When drive input is OFF instructions are not executed the activate coding output keep on activate CG n DO D1 K3 X0 l DECO b15 Bo bo ajojajojajojojojaejajajajtjajaji 4 De All turns to be zero nn a ae ia ee ojojojojojojojojojojojojijojojo b15 D1 bo Low n bits n lt 4 of source address is decoded to target address n lt 3 the high bit of target address all become 0 When n 0 no operation beyond n 0 14 d
108. X21 X0 X43 YO Y11 YO Y23 Output Points 10 14 20 24 YO Y15 YO Y27 Internal Relay YO Y 1037 MO0 M3999 Internal Relay M4000 M7999 4 For Special Usage M8000 M8767 S0 S511 0 512 S1023 C0 C299 16 bits forward counter C300 C599 32 bits forward backward counter COUNTER C600 C619 single phase HSC C620 C629 double phase HSC C630 C639 AB phase HSC DO D3999 DATA 1 D4000 D79997 REGISTER For Special Usage D8000 D9023 FlashROM FDO FD5119 TO T99 100ms not accumulation T100 T199 100ms accumulation T200 T299 10ms not accumulation T TIMER T300 T399 10ms accumulation T400 T499 Ims not accumulation T500 T599 Ims accumulation T600 T639 Ims precise time 6 REGISTER For Special Usage FD8000 FD9023 1024 EXPANSION S INTERNAL ED0 ED36863 36864 REGISTER XCM Series 24 32 I O 48 I O 24 32 I O 48 I O X0 X15 X0 X33 14 18 X0 X21 ap Y0 Y11 Y0 Y23 10 14 Output Points YO Y15 Internal Relay X0 X 1037 Internal Relay YO Y 1037 MO0 M2999 Internal Relay M3000 M7999 4 For Special Usage M8000 M8767 S0 S511 O S512 S10230 C0 C299 16 bits forward counter C300 C599 32 bits forward backward counter COUNTER C600 C619 single phase HSC C620 C629 double phase HSC C630 C639 AB phase HSC D0 D2999 0 D4000 D49997 For a Usage D8000 D9023 FlashROM EDO FD63 DATA REGISTER TO T99 100ms not accumulation T100 T199 100ms accumulation T200 T299
109. XC5 XCM condition rising falling edge Hardware Software 2 Operands Source number address 16 bits 32 bits BIN Result address 16 bits 32 bits BIN 3 Suitable soft components gt gt m o ox or ow ms xn p S1 a on MO Description T CML DYO DO 0 1 0 10 101010 10 1 0 1 Gq Ofpositi vg hi t 1 negat i vg 10 1 0101010101010 Y17 Y7 Y6 Y5 Y4 Each data bit in the source device is inverted 17 0 0 gt 1 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 lt Reading of inverted input gt 4 applied instructions X0 Ae The sequential control instruction in the a left could be denoted by the following AF CML instruction AP M8000 to CML DXO DMO X17 AP SOG 4 6 9 Negative NEG 1 Summary Get the negative number Negative NEG 16 bits NEG DNEG Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition rising falling edge Hardware Software 2 Operands Function Data Type D The source number address 16 bits bits BIN 3 Suitable soft components pjm m m ox by m os xa p m Description 7 NEG D10
110. a bit device permanently OFF Programming of interior counter Counter used for power cut retentive Even when power is cut hold the current value and output contact s action status and reset status Programmi ng of high speed reset circuit RST CO carries on increase count for the OFF gt ON of X011 When reach the set value K10 output contact CO activates Afterwards even X011 turns from OFF to ON counter s current value will not change output contact keep on activating To clear this let X010 be the activate status and reset the output contact It s necessary to assign constant K or indirect data register s ID behind OUT instruction count coil In the preceding example when MO is ON carry on positive count with OFF ON of XO 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 END 3 140 M nemonic and Function END END Force the END current program scan Devices None to end PLC repeatedly carry on input disposal program Statements l executing and output disposal If write END Input disposal instruction at the end of the program then the instructions behind END instruction won t be Step O00 executed If there s no END instruction in the program the PLC executes
111. accept FREE mode valid M8244 CAN send accept timeout ON send accept timeout flag Set OFF automatically when starting to send accept 3L System D8000 0 no error 2 initializing error CAN error information 30 CAN bus error 31 error alarm 32 data overflow configure item number when D8241 XC CAN valid error happens data package number sent both XC CAN and FREE modes are every second valid data package number both XC CAN and FREE modes are accepted every second valid o correspond with M8240 CAN communication error D8244 at every CAN error M8240 will be set counter l l ON one time D8244 increase 1 PID Control Function In this chapter we mainly introduce the applications of PID instructions for XC series PLC basic units including call the instructions set the parameters items to notice sample programs etc 8 1 Brief Introduction of The Functions 8 2 Instruction Formats 8 3 Parameter Setting 8 4 Auto Tune M ode 8 5 Advanced M ode 8 6 A pplication Outlines 8 7 Sample Programs 8 1 Brief Introductions of T he Functions PID instruction and auto tune function are added into XC series PLC basic units Version 3 0 and above Via auto tune method users can get the best sampling time and PID parameters and improve the control precision The previous versions can not support PID function on basic units unless they extend analog module or BD cards PID instruction has brought m
112. al coils action As shown in the left map please consider Y the things of using the same coil YOO3 at many positions Y E g XOO1 ON XO02 OFF 8 Y At first X001 is ON its image area is ON output Y004 is also ON 19 When executing dual output use dual coil But as input X002 is OFF the image area the back side act in prior of YOO3 is OFF So the actual output is YOO3 OFF Y004 ON Basic Program Instructions In this chapter we tell the basic instructions and their functions 3 1 Basic Instructions List 3 20 LD LDI OUT 3 30 AND ANT 3 4 OR ORT 3 50 LDP LDF ANDP ANDF ORP ORF 3 60 LDD LDDI 3 70 ORB 3 80 ANB 3 91 MCS MCR 3 100 ALT 3 110 PLS PLF 3 12 SET RST 3 13 OUT RST Aim at counter device 3 14 NOP END 3 15 GROUP GROUPE 3 16 Items to be attended when programming 3 1 Basic Instructions List All XC1 XC2 XC3 XCS5 XCM series support the below instructions Initial logical operation a contact type NO normally C LD LoaD LDD LoaD Directly LDI LoaD Inverse LDF LoaD Falling Pulse ANI AND Inverse open Read the status from the contact directly Initial logical operation contact type NC normally closed Read the normally closed contact directly Initial logical operation Rising edge pulse 2 3 6 2
113. al i i l l Interruption Interruption instruction X7 10000 10001 M8050 XC2 series X C3 24 32 X C5 48 60 Input Rising Falling interruption Terminal i i l Interruption Interruption instruction 10000 10001 M8050 10100 10101 M8051 10200 10201 M8052 XC3 48 60 XC3 19AR E oe Risi Falli int ti l isin allin interruption Terminal F j l P l Interruption Interruption instruction 10000 10001 M8050 10100 10101 M8051 10200 10201 M8052 XC5 24 32 XCM 24 32 Input T Fai DE Terminal ising alling n errup n Interruption Interruption instruction 10000 10001 M8050 10100 10101 M8051 X10 10200 10201 M8052 X11 10300 10301 M8053 X12 10400 10401 M8054 Interruption Instruction E nable Interruption EI J Disable Interruption DI Interruption Return IRET _ gt If use EI instruction to allow a interruption then when scanning the range program if interruption input changes JD from OFF to be ON then execute subroutine return to the original main program 3 i 10000 interruption 1 Interruption pointer 1 should be behind ICD FEND instruction IRET PLC is default to allow interruption T0100 interruption 2 RE E Interruption s Range Limitation interruption allowed interruption forbidden interruption allowed M Ms OS0 IRET interruption forbidden Via program with DI instruction set interruption forbidden area Allo
114. ansion 7 D8626 write the expansion s error times D8627_ write the expansion s error e Appendix 1 30 ist of the E xpansions Take the first expansion module as the example AD DA PID PID PID parameter K p Ki Kd Channel signal signal Output run stop bit Set value control range Diff Death value range death XC E8AD ocn mo mo vio ooo Cie mo __ mo vo f oo oen mo muo yvi obo Cse mo o wir yo ow aom moa moma vio pies Kk epi Csom mos mpm vos obo Den ODII ecn mos ma voe ono en mo apis vo ov XC E4AD2DA ocn mo moa vwo m Cim oo o mo vo oo oem mo o f moe vo f oo sam mos mo vo onos BE ODI wa e Loa l e e l ao Ce E e e E id XC E4DA XC E2DA XC E6PT P XC E6TC P Appendix 1 special soft device list Current Thefirst 3CH The last 3CH C 1 Set temp PID run stop bit temp PID value PID value ID100 ID101 H Nr 0CH D102 QD102 Y102 1D103 QD103 Y103 ID104 QD104 Y104 5CH ID105 XC E6TCA P RELATIVE PARAMETERS Display temperature unit 0 1 C PID output X input which returns to main unit Thermocouple s connecting status 0 is connect 1 is disconnect PID auto tune error bit 0 is normal is parameters error Enable channel s signal Auto tune PID control bit PID output value operation value PID parameters EPU I D
115. ant K s setting range actual timer constant program s step relative to OUT instruction include the setting value See table below Timer Counter Setting Range of constant K The actual setting value 0 0011 32 767 sec 10 32 767 0 010 327 67 sec 100ms Timer 0 1 3276 7 sec 16 bits counter 1 32 767 Same as the left 10 2 147 483 647 Same as the left Program 1x D OUT Y100 H M1203 D gt ID XI OUT M1203 m OUT TO K19 i Cyl gt H ID T OUT YI id 3 30 AND ANI Mnemonic and Function Mnemonic Function Format and Operands Serial connection of NO Normally Open contacts ANI Serial connection of ANd NC Normally Inverse Closed contacts Operands X YU MU SU TU CU Dn m FDn m Statements Use the AND and the ANI instruction for serial connection of contacts As many contacts as required can be connected in series They 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 M2 and OUT Y003 Follow on outputs are permitted repeatedly as long as the output order is correct There s no limit for the serial connected contacts Nr and follow on outputs number A C 2 gt LD X2 Program Y2 X3 AND MI B e OUT Y2 i Crn D LD Y2 ANI X3 OUT M2 AND TI OUT Y3 M nemonic and Function Format and O
116. anticlockwise interpolation J I yY Servo end check CW Circular clockwise interpolation DRV Highspeed Cd LIN Linear interpolation positioning PLAN Plane selection CW DRV INC LIN PLAN TIM Delayed time Set electrical zero SETP SETR Ls el e l as FOLLOW Follow movement instruction Incremental address E X 1 The instructions with 1 sign have 32 bits form generally 32 bits instructions are represented as adding D before 16 bits instructions like this 32 bits ADD instructions is DADD X 2 The instructions with 2 sign are 32 bits form they don t have 16 bits form Appendix 3 version for special function Appendix 3 Version for special function Generally the functions and instructions described in this manual don t have software and hardware requirements But for some special functions we have software and hardware versions requirement Below we list these requirements for the special functions Read write XC E6TCA P XC E2AD2PT3DA XC E2AD2PT2DA Expand register ED V3 0 and above V3 0 and above Appendix 3 version for special function Appendix 4 PLC Configuration List This part is used to check each model s configurations Via this table we can judge the model easily selectable xNot ae Vsupport communication NO of NO of high speed counter speed counter No of Pulse Pulse T BD Models expansion mo
117. any facilities to the users 1 The output can be data form D and on off quantity Y user can choose them freely when program 2 Via auto tune users can get the best sampling time and PID parameters and improve the control precision 3 User can choose positive or negative movement via software setting The former is used in heating control the later is used in cooling control 4 PID control separates the basic units with the expansions this improves the flexibility of this function 8 2 Instruction Forms 1 Brief Introductions of the Instructions Execute PID control instructions with the data in specified registers PID control PID 16 bits 32 bits instruction instruction Executing Normally ON normally closed Suitable XC2 XC3 XCS5 XCM Hardware V3 0 or above Software V3 0 or above Condition Condition 2 Operands Sl set the ID Nr of the target value SV 16bits BIN S2 set the ID Nr of the tested value PV 16 bits BIN S3 set the first ID Nr of the control parameters 16 bits BIN the ID Nr of the operation resule MV or output port 16 bits BIN 3 Suitable soft components gt gt gt m x ov ow os xm Do as TPFrrytrrry ff s O O EOE e s O O EOE N o d T TS 0 S Operands System po System S O Functions 2 2 E X0 ang f PID D10 D4000 D100 Actions n PID D10 D4000
118. arameter to control the overshooting But response delay may occur if this value is too small The defaulted value is 100 which means the parameter is not effective The recommended range is 50 80 Cutline Explanation Current target value adjustment percent is 2 3 S3 10 67 the original temperature of the system is 0 C target temperature is 100 C the current target temperature adjustment situation is shown as below Next current target value current target value final target value current target value x 2 3 So the changing sequence of current target is 66 C 88 C 96 C 98 C 99 C 100 C target value current target value current target value 2 current target value 1 current value of the system The stay times of the current target value at auto tune process finishing transition stage S3 11 This parameter is valid only when 349 is 1 If entering into PID control directly after auto tune small range of overshoot may occur It 1s good for preventing the overshoot if increasing this parameter properly But it will cause response lag if this value is too large The default value is 15 times The recommended range is from 5 to 20 8 5 Advanced M ode Users can set some parameters in advanced mode in order to get the better effect of PID control Enter into the advanced mode please set S3 2 bit 15 to be 1 or set it in the XCP Pro software Input Filter constant It wi
119. arget soft components address code 16 bits BIN bit G Specify the move data s number 16 bits BIN 3 Suitable soft component pjm m m ox by m os xa p s S tT TSTS T C CC i CT S T T lt 16 bits instruction gt Description x0 2 FMOV DO K10 4 applied instructions Move KO to DO D9 copy a single data device to a range of destination device The data stored in the source device S is copied to every device within the destination range The range is specified by a device head address D and a quantity of consecutive elements n If the specified number of destination devices n exceeds the available space at the destination location then only the available destination devices will be written to lt 32 bits instruction gt o Q er 1 DO DFMOV D10 K3 lt 16 bits Fill Move gt KO KO KO KO KO KO KO KO KO KO KO Move DO D1 to D10 D11 D12 D13 D14 D15 lt 32 bits Fill move gt _ DL D1 1 le m0 a D D14 4 applied instructions 4 5 7 FlashROM Write FWRT 1 Summary Write the specified data to other soft components FlashROM Write FWRT FWRT Execution rising falling edge Suitable XC1 XC2 XC3 XC5 XCM cae fie SEE Hardwar
120. ative Movement C0 Positive Movement Negative Movement Along with the increase of the measures definite value FY outputvalue MV will also reduce It s usually used in heat up control Positive Movement Along with the increase of the measures definite value FY outputvalue MY will also increase It s usually used in cool control Hold Mem Register Can t Read Paramter Range D4000 D4043 a ee es ee ee For the details of panel configuration please refer XC series PLC user manual software partl Soft Component s F unction In chapter 1 we briefly tell the program language of XC series PLC However the most important element to a program is the operands These elements relate to the relays and registers inside the controller In this chapter we will describe the functions and using methods of these relays and registers 2 1 Summary of the Soft Components 2 2 Structure of the Soft Components 2 3 List of the Soft Components 2 4 Input output Relays X Y 2 5 Auxiliary Relays M 2 6 Status Relays S 2 7 Timers T 2 8 Counters C 2 9 Data Registers D 2 10 Constant K H 2 11 Pointer P D 2 12 Program Principle fi 2 10 Summary of the Soft Components There are many relays timers and counters inside PLC They all have countless NO Normally ON and NC Normally Closed contactors Connect these contactors with the coils will make a sequential control cir
121. be set by user again System s Soft SET R etentive FUNCTION default components AREA oie Zone D FD8202 Start tag of D power off retentive zone D100 D149 Start tag of M power off retentive M FD8203 200 M200 M319 XCl zone Series D F0s202 Str tag of D power off retentive zone 4000 4000 4999 Start tag of M power off retentive M FD8203 3000 M3000 M7999 XC2 zone D r8202 Sar tag of power off retentive zone 4000 D4000 D7005 Start tag of M power off retentive M FD8203 3000 M3000 M7999 zone XC3 FD8204 Start tag of T power off retentive zone Series FD8205 Start tag of C power off retentive zone C320 C639 FD8206 Start tag of S power off retentive zone S 512 S1023 Start tag of ED power off retentive ED FD8207 EDO ED 16383 zone D FD8202 Start tag of D power off retentive zone 4000 D4000 D7999 Start tag of M power off retentive M FD8203 4000 M4000 M7999 zone XC5 FD8204 Start tag of T power off retentive zone Series FD8205 Start tag of C power off retentive zone C320 C639 FD8206 Start tag of S power off retentive zone 512 S1023 Start tag of ED power off retentive ED FD8207 EDO ED36863 zone XCM D FD8202 Start tag of D power off retentive zone 4000 D4000 D4999 Series Start tag of M power off retentive M FD8203 3000 M3000 M7999 zone FD8204 Start tag of T power off retentive zone FD8205 Start tag of C power off retentive zone C320 C639 Rien FD8206 Start tag of S power of
122. ble soft components lm gt m lo ox ov ow ms xn p S Convert and move instruction of Source BCD destination BIN XO BIN D10 DO Description When source data is not BCD code M8067 Operation error M8004 error occurs As constant K automatically converts to binary so it s not suitable for this instruction 4 applied instructions 4 8 5 Binary convert to BCD BCD 1 Summary Binary convert to BCD BCD ibis BCD Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM condition rising falling edge Hardware Software 2 Operands Source soft element address 16 bits 32 bits BIN Target soft element address BCD code 3 Suitable soft components gt gt gt x ole en oo S Convert and move instruction of source BIN gt destination BCD XO BCD D10 DO Description This instruction can be used to output data directly to a seven segment display 4 applied instructions 4 8 6 Hex converts to ASCII ASCI 1 Summary Hex convert to ASCII ASCI w asa p Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software a oe 2 Operands gt Target soft element adress code 3 Suitable soft components Word P y Constant Module D Q ss n Description ASCI D100 D200 K4 Convert each bit of source s S Hex format data to
123. carry occurs in plus operation or overflow M8022 Carry e i occurs in bit shift operation PC M ode M 8030 M 8038 M8031 When driving this M ON OFF mapping memory of Y M S TC and the current values of T C D are all When PLC changes from RUN to STOP leave all M8033 Registers keep stopping content in mapping registers and data registers M8034 All output forbidden Set PC s all external contacts to be OFF status M8038 Set communication parameters flag Stepping L adder M 8041 M 8046 Co reaa O o When shifting the mode all outputs reset M8045 All output reset forbidden functions are forbidden When M8047 activating act when any device of M8046 STL status activate S0 S999 turns to be ON Appendix 1 special soft device list Interruption M 8050 M 8059 M8050 After executing EI instruction even the L B a Ane a interruption is allowed but if M acts at this time the correspond input interruption Forbid the input interruption 2 couldn t act separately M8053 l l l E g when M8050 is ON interrupt IOOOL is 1030 Forbid the input interruption 3 forbidden M8054 1040 Forbid the input interruption 4 M8055 1050 Forbid the input interruption 5 M8056 140 Forbid the time interruption 0 After executing EI instruction even the M8057 iene interruption is allowed but if M acts at this Ee Forbid the time interruption 1 time the correspond time interruption oe Idn t act tel 142 Forbid the time int
124. comparing the current value with the next value this difference value is larger than control death region value it will do the PID control with 135 8 47 Auto Tune M ode If users do not know how to set the PID parameters they can choose auto tune mode which can find the optimal control parameters sampling time proportion gain Kp integral time Ti differential time T D automatically Auto tune mode is suitable for these objectives temperature pressure not suitable for liquid level and flow Users can set the sampling cycle to be O at the beginning of the auto tune process then modify the value manually in terms of practical needs after the auto tune process is completed Before doing auto tune the system should be under the no control steady state Take the temperature for example the detected temperature should be the same as the environment temperature To enter the auto tune mode please set bit7 of S3 2 to be 1 and turn on PID working condition If bit8 of S3 2 turn to 1 it means the auto tune is successful PID auto tune period value S3 8 Set this value in S3 8 during auto tune This value decides the auto tune performance in a general way set this value to be the AD result corresponding to one standard detected unit The default value is 10 The suggested setting range full scale AD result x 0 3 1 User don t need to change this value However if the system is interfered greatly by outs
125. continue to work the output activates Call the programs which need to be executed together decrease the program s steps Subroutine Call CALL Normally ON OFF Rising Falling edge Software requirement 16 bits Execution condition Hardware requirement Subroutine Return SRET 16 bits Execution condition Hardware requirement 2 Operands Operands Pn 3 Suitable Soft Components Jump to the target with pointer Nr P PO P9999 Suitable XC1 XC2 XC3 XC5 XCM Models Suitable XC1 XC2 XC3 XC5 XCM Software 4 applied instructions Others CALL PIO Description If X000 ON execute the call instruction and jump to the step tagged by WeISOIg UUN FEND P10 after executing the subroutine return the original step via SRET instruction Program the tag with FEND instruction will describe this instruction later sunnoiqns SRET In the subroutine 9 times call is allowed so totally END there can be 10 nestings 4 3 3 Flow SET ST STL STLE IL Summary Instructions to specify the start end open close of a flow Open the specified flow close the local flow SET ww SET Ci Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM N ate Hardware Software ea eure Open the specified flow not close the local flow ST fous
126. control or used in short time pulse control Time interruption Execute the interruption subroutine at each specified interruption loop tine Use this interruption in the control which requires it to be different with PLC s operation cycle Action order of input output relays and response delay Input disposal Before PLC executing the program read all the input terminal s ON OFF status of PLC to the image area In the process of executing the program even the input changed the content in the input image area will not change However in the input disposal of next scan cycle read out the change Output disposal Once finish executing all the instructions transfer the ON OFF status of output Y image area to the output lock memory area This will be the 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 Du
127. ctions And Actions 16 bit instruction form i ONONO ZRN K1000 K100 X3 YO 32 bit instruction form MO E N 4 eer 4 KL DZRN D100 D200 X3 YO backward speed 1 pulse one scan cycle creeping speed output YO m2 closed point a signal pulse flag M8170 i Pulse output address YO or Y1 only S1 and S2 direction is same and the absolute value of S1 is greater than S2 After driving the instruction move with the origin return speed S1 When the closed point signal turns from OFF to be ON decrease the speed to be S2 When the closed point signal turns from ON to be OFF write to registers Y0 D8171 D8170 Y 1 D8174 D8173 when stopping pulse output The decrease time can be specified by D8230 D8239 please refer to chapter 6 6 for details 6 2 8 Relative position uni segment pulse control DRVI IL Instruction Summary Relative position uni segment pulse control Relative position uni segment pulse control DRVI 16 bits DRVI 32 bits DDRVI Instruction Instruction Execution Normally ON OFF coil Suitable Hardware Software 2 Operands Operands Function Type S1 Specify the output pulse value or soft components ID 16 32bit BIN S2 Specify the output pulse frequency or soft components ID 16 32 bit BIN D1 Specify the pulse output port Bit D2 Specify the pulse output direction port Bit
128. cuit Below we will introduce these soft components briefly Input Relay X Usage of the input relays The input relays are used to accept the external ON OFF signal we use X to state Address Specify Principle In each basic unit specify the ID of input relay output relay in the form of X000 X007 X010 X017 Y000 Y007 YO1O Y017 octal form Y The expansion module s ID obeys the principle of channel starts from X100 Y100 channel 2 starts from X200 Y 200 7 expansions can be connected in total Points to pay attention when using For the input relay s input filter we use digital filter Users can change the filter parameters via relate settings We equip enough output relays inside PLC for the output relays beyond the input output points use them as auxiliary relays program as normal contactors coils Output Relay YD Usage of the output relays Output relays are the interface of drive external loads represent with sign Y Address Assignment Principle In each basic unit assign the ID of output relays in the form of Y000 Y007 YO10 YO17 this octal format Y The ID of expansion obeys the principle of channel 1 starts from Y100 channel 2 starts from Y200 7 expansions could be connected totally Auxiliary Relays M Usage of Auxiliary Relays Auxiliary relays are equipped inside PLC represent with the sign of M Address assignment principle In basic units assign the
129. cycle odA Jew oN O E If XO is ON then T200 accumulate 10ms clock pulse based on the current value when the accumulation value reaches the set value K200 the timer s output contact activates I e the output contact activates 2s later If X0 breaks the timer resets the output contact resets Both OUT and TMR can realize the time function But if use OUT the start time is 0 if use TMR the start time is 1 scan cycle odA uone NUIND Vy Specify the set value Timer Value Action Example XI K2000 tl 2 t1 t2 20s i Siae lt the set value Yo x2 Constant K If X001 is ON then T300 accumulate 10ms clock pulse based on the current value when the accumulation value reaches the set value K2000 the timer s output contact activates Le the output contact activates 2s later Even if X0 breaks continue to accumulation on re starting the timer will The accumulation time 1s 20ms If X002 is ON the timer will be reset the output contacts reset T10 is the timer with 100ms as the unit Specify 100 as the constant then a T10 K100 Q 1s 100 10s timer works Register D Write the value of indirect XO data register in the MOV K200 D5 program or input by value xX switch i T10 D5 If set as the retentive register make sure the battery voltage is enough the be unstable or value will Time
130. data Write clock data TRD Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware V2 51 and above Software 2 Operands Function Data Type Write the clock data to the register 16 bits BIN 3 Suitable Soft Components pjm m m ox by m os km p Ce ee ee es ee E Cs The 7 data devices specified with the head Functions XO TWR DO address S are used to set a new current value of And Actions the real time clock Write the set clock data into PLC s real time clock In order to write real time clock the 7 data devices specified with the head address s should be pre set Unit Item Clock data D10 Year 0 99 0 Sun 6 Sat 1 Yoo owy J jab jab zi O O x DN oO pad 0 gt ga BOI 10 19 S1331 gyep eroads 4 applied instructions After executing TWR instruction the time in real time clock will immediately change to be the new set time So when setting the time it is a good idea to set the source data to a time a number of minutes ahead and then drive the instruction when the real time reaches this value 4 applied instructions HIGH SPEED COUNTER HSC In this chapter we tell high speed counter s functions including high speed count model wiring method read write HSC value reset etc 5 1 FUNCTIONS SUMMARY 5 2 HIGH SPEED COUNTER S MODE 5 3 HIGH SPEED COUNTER S RANGE 5 4 INPUT WIRIN
131. del CAN Modbus Free board Increase directo XCI Series XC1 10 XC1 16 XC1 24 XC1 32 XC2 Series xez f T ee Ts 2 2 2 xoxo x x x x x 5s 2 2 2 xea x YE YM s y os fe fe xcez32 ft xe MEY s y s fF 2 fe fo XC2 48 ae a a xerox Pv Pv s y s a2 2 XC3 Series XC3 14 IESE REENEER RET a A YT YT a a xes ds MEY y Ev e fa fo fo XC3 48 E D eee a ea XC3 60 a a a XC5 Series External interrupt Oo GW GW GW GB JT Go pd Go G Go G Go Appendix 3 version for special function X 1 If use BD board Y1 can t be used for pulse X 2 it just can be used for Modbus slave Appendix 5 common question A amp Q Appendix 5 common question A amp Q The following are the common questions may happen when using the PLC Q10 why the coil is not set when the condition is satisfied Alf the probable reasons 1 use one coil for many times double coils output the later coil has priority 2 some conditions reset the coil please use monitor function to find the reset point and modify the program Q20 set on the pulse output Instruction the pulse doesn t output A 2 there are many pulse output instructions in the program Q30 why connect the high speed counter but no counter value A 3 the probable reasons 1 make sure the PLC has high speed counter photo couplers 2L when the PLC hardware version is 2 5 and softwar
132. e but the zone can be modified For Power Off Retentive Use Y The auxiliary relays for power off retentive usage even the PLC is OFF they can keep the ON OFF status before power OFF Power off retentive zone can be modified by the user Power off retentive relays are usually used to memory the status before stop the power then when power the PLC on again the status can run again For Special Usage Special relays refer some relays which are defined with special meanings or functions start from M8000 There are two types of usages for special relays one type is used to drive the coil the other type is used to the specified execution E g M8002 is the initial pulse activates only at the moment of start M8033 is all output disabled y Special auxiliary relays can t be used as normal relay M XC series PLC s status relays S are addressed in form of decimal each Address List l l subfamily s ID are listed below RANGE SERIES NAME FOR COMMON USE FOR POWER OFF RETENTIVE USE RANGE SERIES NAME FOR COMMON USE FOR POWER OFF RETENTIVE USE a Ss SO000 S511 512 S1023 RANGE SERIES NAME FOR COMMON USE FOR POWER OFF RETENTIVE USE eran SO00 S511 512 S1023 RANGE SERIES NAME FOR COMMON USE FOR POWER OFF RETENTIVE USE es Ss SO00 S511 512 S1023 RANGE SERIES NAME FOR COMMON USE FOR POWER OFF RETENTIVE USE xXcCM Ss SO00 S511 512 S1023 Status relays are very import in ladder program
133. e ASCII to hex numbers Low bit coding ENCOL Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM rising falling edge Hardware Software pee re 2 Operands S Soft element address need coding 16bit BIN bit Soft element address to save coding result 16bit BIN The soft element quantity to save result 16bit BIN 3 Suitable soft components 4 applied instructions pjm m a ox by m os km D s CTS TSS T s C TiC i dT S f T s COCCO lt if s is bit device gt n lt 16 Description A P ENCOL M10 D10 K3 M17 M16 M15 M14 M13 M12 Mil MIO e olf lt if s is word device gt n lt 4 DO D1 K3 Xi ENCOL 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 All be 0 If many bits in the source ID are 1 ignore the high bits If source ID are all O 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 es is bit unit it s point number is 248 256 4 applied instructions 4 91 Floating Operation ESQR Float Square Root smo fse SIN 4 applied instructions
134. e Software 2 Operands Function Data Type The data write in the source or save in the soft 16 bits 32 bits BIN element Do Write in target soft element 16 bits 32 bits BIN Write in target soft element start address 16 bits 32 bits BIN 3 Suitable soft components pjm m m ox by m os xa D sot tT E E E a E S T E E E mt TE T o gt C0 T lt Written of a word gt Description E 2 a FWRT DO FDO Write value in DO into FDO lt Written of double word gt lt Written of multi word gt i OO x QQ f DFWRT DO FDO I FWRT DO FDO K3 Write value in D0 D1 into FDO FD1 Write value in DO D1 D2 into FDO FD1 FD2 X 1 FWRT instruction only allow to write data into FlashRom register In this storage even battery drop data could be used to store important technical parameters X 2 Written of FWRT needs a long time about 150ms so frequently operate this operate this operate operation is 4 applied instructions recommended X 3 The written time of Flshrom is about 1 000 000 times So we suggest using edge signal LDP LDF etc to trigger X 4 Frequently written of FlashROM 4 5 8 Zone set M SET 1 Summary Set or reset the soft element in certain range Multi set MSET Normally ON OFF Suitable enone fic Software a a Function Start soft element address End soft element address
135. e occupied by the system users can t use them Sample Time S3 The system samples the current value according to certain time interval and compare them with the output value This time interval is the sample time T There is no requirement for T during AD output T should be larger than one PLC scan period during port output T value should be chosen among 100 1000 times of PLC scan periods PID Operation Zone S3 46 PID control is entirely opened at the beginning and close to the target value with the highest speed the defaulted value is 4095 when it entered into the PID computation range parameters Kp Ti TD will be effective See graph below output value a FID operation area target value dk elt ad eee n ee ee ee ek is esl ee ed ee o D FID open completely time t If the target value is 100 PID operation zone is 10 then the real PID s operation zone is from 90 to 110 Death R egion S3 7 If the detected value changed slightly for a long time and PID control is still in working mode then it belongs to meanless control Via setting the control death region we can overcome this condition See graph below output value next value current value last value time t Suppose we set the death region value to be 10 Then in the above graph the difference is only 2 comparing the current value with the last value It will not do PID control The difference is 13 more than death region 10
136. e reason to use BLOCK To optimize the editing method of pulse and communication instr uction in the process In former program XC series PLC can not support many pulse or communication instructions in one process but BLOCK can support this and the instructions will run in sequence oD Unavailable 0 x 0 Available 0 v 0 PLSR DO D2 D4 YO PLSR DO D2 D4 YO PLSR DO D2 D4 YO Former PLSR DO D2 D4 YO SBLOCK Sequence bl ockl DPLSR DO D2 D4 YO DPLSR D6 D8 D10 YO SBLOCKE 10 2 Call the BLOCK In one program file it can call many BLOCK the following is the method to add BLOCK in the program W oomen N Open XCPpro software right click the sequence block in the project bar Froject H Froject d a PLCI d O Code me Ladder bit ER Free Monitor hani Eg Naka Mamniknar Insert You can edit the program in this window Upwards and downwards are used to change the position of the instruction in the block There is a Insert choice on the bottom left of the window when selecting it the add button will become insert Edit Sequence Block 1 Comment Sequence Blockl The difference between insert and add Add is to add instructions in the end of the block insert can add instruction in any place in the block Click add button you will see the instructions ca
137. e rest pulse K1 continue running the BLOCK but abandon the instructions have not finished last time Such as the pulse output instruction if the pulse has not finished last time BGOON will not continue outputting this pulse but go to the next instruction in the BLOCK g 10 6 2 The timing sequence of the instructions 1 BSTOP K1 KO BGOON K1 KOD Mo a SBLOCK Sequence Block E DSPLSR DO D2 D4 YO SBLOCKE hdi BS eee KO hs BGOON K1 KO Scanning period Scanning period 3 Scanning period 2 Scanning period 4 Scanning period 4 When MO is from OFF gt ON run DSPLSR DO D2 D4 YO in the BLOCK to output the pulse when M1 is from OFF ON the BLOCK stops running pulse outputting stops at once when M3 is from OFF ON abandon the rest pulse 2 BSTOP K1 KON BGOONJ K1 K1 Mio SBLOCK Sequence Block DSPLSR DO D2 D4 Y0 SALOCKE hi A TOP KA KO Wig BOON KA K1 Scanning period 4 Scanning period 5 bcanning period 1 Scanning period 2 Scanning period 3 When MO is from OFF gt ON run DSPLSR DO D2 D4 YO in the BLOCK to output the pulse when M1 is from OFF ON the BLOCK stops running the pulse outputting stops at once when M4 is from OFF ON output the rest pulses 30 BSTOP K1 K1 BGOONJ K1 KOD Mo SBLOCK Sequence Block DSPLSR DO D2 D4 0 HLOCKE Ln Bs errs K1 Mia BSOON KA KO bcanning period 1 Scanning period 2 Scanning period
138. e soft components gt r m m ox by m os xa o oot TE E E E E E S E T E E D2 Function ai s2 XO REGW Kl K500 D1 K2 Write the single register Modbus code 1s 06H Serial port K1 K3 y M ulti register write M RGW IL Summary Instruction to write the local specified register to the specified station s specified register Multi register write MRGW 16 bits MRGW 32 bits instruction instruction Execution Normally ON OFF rising Suitable XC2 XC3U XC5 XCM Condition edge Models Hardware Software Requirement Requirement 2 Operands D1 Specify the remote communication station or soft 16bits BIN component s ID gt je Specify the remote coil s start ID or soft component s 16bits BIN D3 Specify the coil number or soft component s ID 16bit BIN BIN Specify the start ID of the local receive coils bit Specify the serial port s number 16bits BIN 3 Suitable soft components gt fm gt m o ox or oo xm v lo B XO MRGW KI K500 Instruction to write the multiply registers Modbus code is 10H Serial port K1 K3 When XO is ON execute REGW or MRGW instruction set communication flag after execution the instruction when XO is OFF no operation If error happens during communication resend automatically If the errors reach 4 times set the communication error flag The
139. e strong electricity make sure there is certain distance between them If the device has motor inverter make sure to connect the ground correctly Appendix 5 common question A amp Q
140. e version is 3 0 it is not available to use HSC please update the hardware version to 3 0 Q40 What s the difference between com1 and com2 A4 the communication parameters of com1 and com2 can set by users The difference is com can return to default parameters by stop PLC after power on Q50 Why free format communication is failure A 5 check the communication parameters if use com2 please set the FD8220 to HFF FD8221 set to corresponding parameters Q6 why the real time clock RT C can not work A 6 XC3 14 and XP1 do not have RTC function Q70 why PLC can not communicate with other device A 7 the probable reasons 1 communication parameters PLC com port and device parameters must be the same 2 communication cable connection correct and good 3L communication serial port check the serial port download the PLC program if download successful the serial port is no problem 4 ask manufacturer for help Q 8 how long can the PLC battery be used A 8 for 3 5 years Q90 why the temper ature fluctuates serious under normal temperature when connecting the ther mocouple with the temper ature module A9 the probable reasons Appendix 5 common question A amp Q 1 check if the thermocouple cold point is short with the outside cover If short please change another thermocouple 2 the weak electricity such as outside interference thermocouple temperature module should separate from th
141. ent address need to do cos 32 bits BIN Do Result address 32 bits BIN 3 Suitable soft components S m Cs Description m COS D50 D60 D51 D50 RAD gt D61 D60 COS Binary Floating Binary Floating This instruction performs the mathematical COS operation on the floating point value in S angle RAD The result is stored in D s RAD value angle x Tt 180 Assign the binary floating value D COS value Binary Floating 4 applied instructions 4 9 10 TAN TAN 1 Summary TAN TAN fists dN Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software er a oe 2 Operands Soft element address need to do tan 32bit BIN Do Result address 32bit BIN 3 Suitable soft components S a Cs Description m TAN D50 D60 D51 D50 RAD gt D61 D60 TAN Binary Floating Binary Floating This instruction performs the mathematical TAN operation on the floating point value in S The result is stored in D RAD value angle X Tt 180 Cs Assign the binary floating value TAN value D6l f D60 4 applied instructions 4 9 11 ASIN ASIN 1 Summary ASIN ASIN ww ooo p SYS Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware V3 0 and above version Software roe OM ee 2 Operands Soft element address need to do arcsin 32 bits BIN Do Result address 32 bits BIN 3 Suitable soft compone
142. ents The function of LDD ANDD ORD instructions are similar with LD AND OR LDDI ANDDI ORDI instructions are similar with LDI ANDI ORI but if the operand is X the LDD ANDD ORD commands read the signal from the terminals directly this is the only difference OUTD and OUT are output instructions But if use OUTD output immediately if the condition comes true needn t wait the next scan cycle x0 X2 YO LDD XO Program D Pf C D J LDDI X2 a ORD X2 ANB OUTD YO i 3 70 ORB Mnemonic and Function Mnemonic Function Format and Devices ORB Parallel connection OR Block of multiply parallel circuits Devices none Statements The serial connection with two or more contacts is called serial block If parallel connect the serial block use LD LDI at the branch start place use ORB at the stop place As the ANB instruction an ORB instruction is an independent instruction and is not associated with any device number There are no limitations to the number of parallel circuits when using an ORB instruction in the sequential processing configuration Program AU l FH Sani al connect the block Recommended good Non preferred batch programming method programming method LD XO LD XO AND XI AND XI LD X2 LD X2 AND X3 AND X3 ORB LD X4 LD X4 AND X5 AND X5 ORB ORB ORB 3 80 ANB Mnemonic and Function Mnemonic Function Format and Devices
143. equire PLC to receive but not send or receive before send you need to set the communication timeout as Oms 7 44 CAN Bus Functions 7 4 1 Brief Introduction of CAN bus XC5 series PLC support CANbus bus function Below we will give some basic concept on CANbus Sub address 00 120R CAN bus Node CAN bus Node CAN bus Node CAN bus Node Sub address Ol Sub address 02 Sub address 03 Sub address 04 CAN Controller Area Network belongs to industrial area bus category Compared with common communication bus CAN bus data communication has performance of outstanding dependability real time ability and flexibility CAN controller works under multi master format In the network each node can send data to bus according to the bus visit priority These characters enable each node in CAN bus network to have stronger data communication real time performance and easy to construct redundant structure improve the system s dependability and flexibility In CANBUS network any node can initiatively send message at any time to any other node no master and no slave Flexibility communication it s easy to compose multi device backup system distributing format monitor control system To fulfill different real time requirement the nodes can be divided to be different priority level With non destroy bus arbitrament technology when two nodes send message to the network at the same time the low level priority node initia
144. er we mainly introduce PWM pulse width modulation frequency detect precise time interruption etc 11 1 PWM Pulse Width Modulation 11 2 Frequency Detect 11 3 Precise Time 11 4 Interruption Instructions List Circuit and soft components Chapter Pulse Width M odulation Frequency Detection Output pulse with the PWM specified occupied p ratio and frequency FRQM Frequency Detection Time Precise Time STRR Pead Precise Time Register STRS Stop Precise Time Interruption Enable Interruption Disable Interruption Interruption Return 11 10 PWM Pulse Width M odulation IL Instruction s Summary Instruction to realize PWM pulse width modulation PWM pulse width modulation PWM 16 bits PWM 32 bits fasion a execution normally ON OFF coil suitable XC1 XC2 XC3 XCS5 l e rows XCM hardware software pe E ae 2 Operands Function oa a e number D specify the pulse output port bit 3 Suitable Soft Components gt gt gt lo ox ov ow ms xn D Operands System Function and X0 PWM K100 D10 Action The occupy ratio N 1 255 Output pulse f 0 72KHz Pulse is output at YOOO or Y001 Please use transistor output The output occupy empty ratio of PMW n 256X 100 PWM ou
145. er Config x Target Value YV Do Measure Value PY mo Parameter p20 Qutput fro Mode Contig Common Mode C Advanced Mode Parameter Config Manual Sampling Time Input Filter Constant Differential Increase ED Froportion Gain MEF 0 X Integration Time IT fo 100ms Differential Time TD fo 10m5 FID Limit Belt Value 0 x Output Upper Limit Value 4045 Qutput Lower Limit Yalue p Direction Config Death Region G Hegative Movement Positive Movement Negative Movement Along with the increase of the measures definite value FY outputyvalue MY will also reduce It s usually used in heat up control Overshoot Contig Enable Overshoot Disable Overshoot ee Positive Movement Along with the increase of the measures definite value PY outputvalue MY will also increase It s usually used in cool control ii 8 3 1 Registers and their functions i For PID control instruction s relative parameters ID please refer to the below table sampling time 32 bits without sign Unit ms sampling time 32 bits without sign Unit ms mode setting bitO 0 Negative 1 Negative bitl bit6 not usable bit7 Nn S3 1 S3 2 0 Manual PID 1 auto tune PID bit8 1 auto tune successful flag bit9 bitl4 not usable bit15 0 regular mode 1 advanced mode Range 1 32767 OL 32767 100ms OL 32767 10ms OL 32767
146. erands lt 16 bits instruction gt Description Gr 2 X0 l ADD D10 D12 D14 0 D100 0 0 D120 gt 0 D140 lt 32 bits instruction gt E X0 DADD D10 D12 D14 0 D11D100 0 0 D13D120 gt 0 D15D140 The data contained within the two source devices are combined and total is stored in the specified 4 applied instructions destination device Each data s highest bit is the sign bit O stands for positive 1 stand for negative All calculations are algebraic processed 5 8 3 If the result of a calculations is 0 the O flag acts If the result exceeds 323 767 16 bits limit or 2 147 483 648 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 16 bits are assigned the device follow 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 a source and a destination If this is the case then the result changes after every scan cycle Please note this point Related flag ON the calculate result is zero M8020 Zero OFF the calculate result is not zero ON the calculate result is over 32767 16bits or 2147483647 32bits M8021 Borrow OFF the calculate result
147. error flag The user can check the relative registers to judge the error IL Summary Read the specified station s specified register to the local register Register read REGR 16 bits REGR 32 bits instruction instruction Execution Normally ON OFF rising edge Suitable XC2 XC3 XCS XCM Condition Models Hardware Software Requirement Requirement 2 Operands 1 Specify the remote communication station or soft component s ID 16bits BIN 2 Specify the remote coil s start ID or soft component s ID 16bits BIN S3 Specify the coil number or soft component s ID 16bits BIN D1 Specify the start ID of the local receive coils bit D2 Specify the serial port s number 16bits BIN 3 Suitable soft components gt fm gt m o ox ov oo xm v S1 s TSTST Tf so hE TSTST Tf wa TST Tf i i liT idi Function X0 REGR Ce a K500 K3 D1 K2 Instruction to read the REGISTERS Modbus code is 03H Serial port K1 K3 y Read Input R egister INRR 1 Summary Read the specified station s specified input register to the local register Read Input Register INRR 16 bits INRR 32 bits instruction instruction Execution Normally ON OFF rising edge Suitable Condition Models Hardware Software Requirement Requirement 2 Operands Specify the remote communication station or soft component s ID 16bits BIN Specify the remote c
148. error D8241 The configure item s Nr which has error configure item D8242 Data package number sent every second a ee D8243 Data package number received every second i ee D8244 CAN communication error count y CAN Sending CSEND 1 Instructions Summary 7 4 6 CAN Free Format Communication Write the specified data from the unit to a specified address data transfer in one unit CAN Sending CSEND 1 6bits CSEND 32bits freon ime Executing Normally ON OFF Rising edge Suitable XC5 fica ONO owe Hardware Software 2 Operands specify the ID number to send the data package S2 specify the first ID number of sent data or soft 16bits BIN aa T specify the byte number of sent data 3 Suitable soft components gt lm gt ml x ox ole kn oo s rrrrrtrftl ft s TJT Tf ss fy Functions and Actions m il CSEND K100 DO K4 Instruction to enable data sending send data at every rising edge of MO ID number of sending data package is 100 4 bytes data the first ID is in DO 8 bits data transfer the transferred data is DOLL DILU D2L D3L DOL means the low byte of DO 16 bits data transfer the transferred data is DOL JDOH JD1L D1H DOH means the high byte of DO Mo i CSEND D10 DO D20 The ID of sending data package is specified by D10 the data number is specified by D20 the first
149. erruption 2 SOU are palate M8059 Forbid the interruption Forbid all interruption Error Testing M 8067 M 8072 ID Function Description M8067 happen when calculating M8071 Internal codes parity error M8072 execution codes or configure table parity error Appendix 1 special soft device list Communication M 8120 M 8148 M8122 sending by RS232 flag M8123 RS232 receiving finish flag RS232 receiving flag acceptance ends normally but the accepted M8125 Receive incomplete flag data number is less than the required number M8126 Global signal M8127 Accept error flag M8128 Accept correct flag M8130 as RS232 receiving flag acceptance ends normally but the accepted M8135 Receive incomplete flag data number is less than the required number M8139 M8140 RS232 receiving flag COM3 acceptance ends normally but the accepted M8145 Receive incomplete flag data number is less than the required number M8146 _ Global signal E M8147 Accept error flag o M8148 Accept correct flag M8149 J o o Appendix 1 special soft device list High Speed Counter Interruption Finished Flag M 8150 M 8169 Counter ot als ID a Function Description Count Interruption Finished Flag Set flag ON when count interruption finish Count Interruption Finished Flag Set flag ON when count interruption finish Pulse
150. 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 X1 x2 LD X1 Program MCS Bus line starts MI M3 I C YDH LD X2 M2 OUT YO i Cv LD M1 MCS Bus line nest LD M3 OUT Y1 LD M2 OUT Y2 MCR MCR Bus line back Mnemonic and Function Mnemonic Function Format and Devices ALT The status of the Alternate assigned devices status inverted on every operation of the Devices YO MU SO TO CO Dn m instruction The status of the destination device is alternated on every operation of the Statements ALT instruction p MN ALT MO a s rogram i ALT M0 MO oa Cu OUT YO et lt OUT Y1 fi 3 11 PLS PLF Mnemonic and Function Mnemonic Function Format and Devices PLS Rising Pulse pulse PLF Falling trailing Pulse edge pulse Falling Devices YU M SU TU CL Dn m Statements When a PLS instruction is executed object devices Y and M operate for one operation cycle after the drive input signal has turned ON When a PLF instruction is executed object devices Y and M operate for one operation cycle after the drive input signal has turned OFF LD XO PLS MO Program i a oa SET YO me SE
151. f retentive zone 512 S1023 Start tag of ED power off retentive ED FD8207 EDO ED36863 zone For timer T we can set not only retentive zone but also set certain timer s retentive zone Soft Set area Function R etentive Zone Components FD8323 Set the start tag of 100ms not accumulation timer s The set value T99 Pee fee ont ee FD8324 Set the start tag of 100ms accumulation timer s retentive The set value T199 FD8325 Set the start tag of 10ms not accumulation timer s The set value T299 eee wens o r m e ne T FD8326 Set the start tag of 10ms accumulation timer s retentive The set value T399 FD8327 Set the start tag of Ims not accumulation timer s The set value T499 biad jee aa Dee FD8328 Set the start tag of Ims accumulation timer s retentive The set value T599 zone FD8329 Set the start tag of Ims precise timer s retentive zone The set value T639 For counter C we can set not only retentive zone but also set certain counter s retentive zone Soft Set area Function R etentive Zone Components FD8330 Set the start tag of 16 bits positive counter s retentive The set value C299 FD8331 Set the start tag of 32 bits positive negative counter s The set value C599 C mien retentive zone FD8332 Set the start tag of single phase HSC s retentive zone The set value C619 FD8333 Set the start tag of dual direction HSC s retentive zone The set value C629 FD8334 Set the start ta
152. fet ft ft ft fat xo fof fer Tt fet PEER X003 XC 3 480 60 PLC e a ceadesceocoodceoies oeiee coiden cacesz mar feofsochochio f fodo posod m a a Pe Count V jv v v v Interrupt U xos d tet SS SS SS SS XC5 24 32 PLC XCM 24 32 PLC ere Paci AB Pane Mode ee Se E Oe 4 times F times F Count Interrupt C D EAR O B R O EE X001 Dir B xos jo Ff ett xo rf TT xo xo tT tt tt 5 60 Read Write HSC value All high speed counters support read instruction HSCR and write instruction HSCW but users need to use hardware V3 1c and above 5 6 1 Read HSC value HSCR IL Instruction Summary Read HSC value to the specified register 16 bits 32 bits HSCR pa a a Execution Normally ON OFF Suitable XC2 XC31 XC5 XCM preg pree mer nn Hardware V3 1c and above Software 2 Operands Specify HSC code 32 bits BIN D Specify the read written register 32 bits BIN 3 Suitable Soft Components gt gt gt po ox or ow ms xn w wo s JS te TST F J D AEE AE FUNCTIONS AND ACTIONS QD HSCR C630 D10 When the activate condition is true read the HSC value in C630 DWORD into D10 DWORD Instruction HSCR read the HSC value into the specified register improve HSC value s precision Sample Program
153. g U Dir A Pulse input Count Direction Judgment A phase input OFF increment ON decrement Normally XO and X1 can accept 80KHz frequency under single phase mode and AB phase mode Other terminals can accept only 10KHz under single phase mode 5KHz under AB phase mode X can use as normal input terminals when they are not used as high speed input The detailed assignment is shown as below XC2 series PLC Tm rakes paroarspaxoarfpoporepeidporperporporher Pak fsoxleoxfiox wxliox xos je S fe fT a xoa ft tT Tf fee Pf xo xo jul xox je a xo rd cE X011 ooo S Increment Pulse Dir Input AB Phase Mode Sr a SO Sppe oxi f s times F IBA E R A R OE PE DG a A D a e Count E x E D S O O A R REELS E oe x jet SS S xw jul rT TE TT xw Et EE S os tT tet Pe SSS C600 C620 C630 can support 80KHz with special requirement XC3 19AR E Increment Pulse Dir Input AB Phase Mode Se a A OOCOEEEEEECTHEHEE a pee ee c XC 3 247 32 PLC and XC5 48 60 PLC cree Pueri mpa AB Pine Ma canfosoenieandcangoifeaibsieaidpsisesafososndcaadoeastsnfesdoen MaF 80K sox 10K 10K 10K 10K sok 10K 10K _ 80K SK sx sims e fv meme TTT eT EEE Pe errup xw jo ft
154. g edge pulse Danae E Falling pulse gt XLI YUMLU SUTU CLU Dn m FDn m Serial connection of a Rising edge pulse R 5 gt XUI YUMLU SUTU CLU Dn m FDn m ANDF Serial connection of a AND Falling trailing edge pulse C a Falling pulse gt X YUMLU SUTU CLU Dn m FDn m Parallel connection of i Rising edge pulse eens a gt X YUMI ISTU CIU Dn m FDn m ORF Parallel connection of a OR Falling trailing edge pulse Falling pulse Operands X YU MLI SUTUCL Dn m FDn m Statements LDP L ANDP JORP are active for one program scan after the associated devices switch from X5 X6 M13 M8000 X7 OFF to ON LDF J ANDF JORF are active for one program scan after the associated devices switch from ON to OFF X5 LDP T M13 Program oi ORP M8000 X7 it M15 OUT LD ANDP OUT M15 3 60 LDD LDDI ANDD ANDDI ORD ORDIJQ OUTD Mnemonic and Function Mnemonic Function Read the status from the contact directly Read the normally closed contact directly Read the status from the contact directly Read the normally closed contact directly Read the status from the contact directly Format and Operands Ht Devices X r Devices X pH Devices X Li Devices X the normally closed contact directly Devices X Output to the contact directly Devices Y Statem
155. g of AB phase HSC s retentive zone The set value C639 X 1 if the whole power off retentive zone is smaller than the segment s retentive area then the segment s area is invalid If the total counter s set range is T200 T640 FD8324 value is 150 then the 100ms accumulate timer s retentive area T150 T199 is invalid 2 41 Input output relays XO YQ Number List XC series PLC s input output are all in octal form each series numbers are listed below Series Name 101 0 16 I O 24 I O 32 I O Cuo ono aro aio oilt hi 32 I O a e peee a a e ee O EACE FEDEA Series Name 48 60 14 I O 16 I O 24 32 I O 48 60 I O ie 24 32 I O X0 X15 X0 X33 X0 X7 X0 X7 14 18 28 36 X0 X21 X0 X43 YO Y11 YO Y23 YO Y5 YO Y7 10 14 20 24 YO Y15 YO Y27 Range Points o Series Name 48 60 14 O 24 32 I O 48 60 I O 14 I O 24 32 I O X0 X15 X0 X33 X0 X7 14 18 28 36 X0 X21 X0 X43 YO Y 11 YO Y23 YO Y5 10 14 20 24 YO Y15 YO Y27 er1es ame 24 32 I O 48 60 I O 24 32 I O 48 60 I O XO0 X15 X0 X33 14 18 28 36 X0 X21 X0 X43 YO Y 11 YO Y23 10 14 20 24 YO Y15 YO Y27 Range Points sete weep Le 24 I O 32 I O 48 I O 2417 0 32 1 0 48 I O XCM Function XC series PLC CPU unit oO ans T am 3 ja pi p lt ynduy eusIS euIOIXY A PUW yndino yndyno eusis eux Input Relay X PLC s input terminals are used to accept the external signal input while the input relays are a t
156. ide this value should be increased modestly to avoid wrong judgment for positive or negative movement If this value is too large the PID control period sampling time got from the auto tune process will be too long As the result do not set this value too large X 1 1f users have no experience please use the defaulted value 10 set PID sampling time control period to be Oms then start the auto tune PID auto tune overshooting permission setting S3 9 If set O overshooting is permitted the system can study the optimal PID parameters all the time But in self study process detected value may be lower or higher than the target value safety factor should be considered here If set 1 overshooting is not permitted For these objectives which have strict safety demand such as pressure vessel set S3 9 to be 1 to prevent from detected value seriously over the target value In this process if S3 2 bit8 changes from 0 to 1 it means the auto tune is successful and the optimal parameters are got if S3 2 is always 0 until S3 2 bit7 changes from 1 to O it means the auto tune is completed but the parameters are not the best and need to be modified by users Every adjustment percent of current target value at auto tune process finishing transition stage S3 10 This parameter is effective only when 3 9 is 1 If doing PID control after auto tune small range of overshooting may be occurred It is better to decrease this p
157. in D16 Move D52 into D56 Right shift 8 bits with D56 convert the high Sbits to the low 8 bits Logic AND D56 with HFF save the result in D17 M11 M10 i y MOV H43 D32 FMOV K0 D40 D56 ADD D30 H80 D40 MOV D40 D10 MOV D40 D11 MOV D32 D12 MOV D33 D13 MOV D34 D42 WAND D42 HFF D14 MOV D34 D44 ROR D44 K8 WAND D44 HFF D15 MUL D33 K256 D46 ADD D46 K67 D48 ADD D48 D34 D50 ADD D50 D30 D52 MOV D52 D54 WAND D54 HFF D16 MOV D52 D56 ROR D56 K8 WAND D56 HFF D17 M10 f SEND D10 K8 K2 M11 f M8132 y RCV D20 K10 K2 M8134 y BMOV D20 D100 KIO ROL D101 K8 WOR D101 D100 D200 ROL D103 K8 WOR D102 D103 D201 Write code H43 into D32 Clear registers D40 D56 D30 station Nr add H80 save the result in D40 Move D40 to D10 Move D40 to D11 Move D32 write code H43 to D12 Move D33 para code to D13 Move D34 temp set to D42 Logic and D42 with HFF save data in D14 Move D34 tem
158. ine TV on T i OO Program flow STL Flow stat NTN y STIE Flowend EVE VE YTV vy SET Open the assigned flow close the current flow ST Open the assigned flow not close the Do LT FOR StartofaFOR NEXTloop VL V Vv Vv vy NEXT ENDofaFOR NEXTloop VV V V Vv v FEND End of main program CV CV UV UV TV LD LDactivateif SD S _ VE VE YT vy y LD gt LD activate if SI gt S2 _ VE VT VT y LD lt LD activate if SI lt S2 _ VT VE YT vy y PLD LDactivateif SIwS2 y VE YT VV LD gt __ LD activate if SI gt S2 _ y VE VT VV LD lt LD activate ifSD lt S VE VT VT VV AND _ AND activate if SD S2 _ VV Vv VT v Data LAND gt AND activate if SD gt SD VV VV VY VT compare LAND lt AND activate if SD lt S VE VT YT VT AND lt gt _ AND activate iSDASD VE VT VT YTV AND gt _ AND activate i SD gt S y VT VY VV AND lt _ AND activate i SD lt 6 y VT VY VT Vv OR ORactivateif S S2 VE VE YT vy y POR gt OR activate if SI gt S2 _ VE VE VT YT OR lt OR activate if SI lt S VE VE VT vy y OR lt gt OR activate i SDAS y VE YT y OR gt OR activate i SD gt S VE VE YT VV OR lt OR activate if S1 lt S2 _ VE VE VT y CMP Data compare TV VE YT y Data move XCH Sort Mnemonic function ADD addition VT vyv SUB subtraction VE y MUL multiplication VV DIV di
159. instructions list Appendix 2 1 Basic Instructions L ist Mnemonic Function Initial logical operation contact type NO normally open D p OlT Initial logical operation contact type NC normally closed Final logic operation type coil drive Serial connection of NO Serial connection of NC Parallel connection of NO ORI Parallel connection of NC LDP Rising edge pulse LDF Falling edge pulse DP DF Serial connection of rising edge pulse Serial connection of falling edge pulse Parallel connection of rising edge pulse ORF Parallel connection of falling edge pulse J J O O O ee Read the point Read NC Read the point and serial connection DDI Read NC and serial connection Read the point and parallel connection Read NC and parallel connection Output the point Parallel connection of parallel multiply parallel circuit Serial connection of parallel multiply parallel circuit MCS New bus line start MCR Bus line return ALT Alternate state L L E ST U nN Rising edge pulse Falling edge pulse Set a bit device permanently on Reset a bit device permanently off E olwla w a Output counter coil RST Output reset and current data reset to zero END I O process and return to step0 GROUP GROUPE TMR Time Instruction block fold start Instruction block fold end Appendix 2 instructions list Appendix 2 2 Applied instruction list a Cr ConditionJump vv CALL Call subrout
160. ion deceleration speed to D220 set MO the motor starts to run 3 rounds with high frequency Meantime M8170 sets the motor runs 3 rounds and decelerate stop coil M8170 reset then reset MO set M1 NOT M10 set the low frequency pulse parameters into D200 D210 the timer time lags 2sec when time reaches reset M1 set MO the motors starts to run 1 round with low frequency after this starts to run with high frequency Repeat this alternation time by time fi 12 20 MODBUS COMMUNICATION SAM PLES E g 1 realize Modbus read write among one master and three slaves Operation 1 write content in D10 D14 to D10 D14 of 2 slave 2 read D15 D19 of the slaves to D15 D19 of the mater anyhow write the first five registers content to the slaves the left five registers are used to store the content from the slaves 3L 3 4 slaves are similar Soft component s comments DO communication station number D1 offset M2 2 communication error SO write the target station S1 read the target station S2 judge the communication status S3 offset the communication ID M3 3 communication error T200 communication interval 1 M4 4 communication error T201 communication interval 2 M8137 COM2 communication error end signal T202 self reset 1 of communication error M8138 COM2 communication correct end signal T203 self reset 2 of communication error L adder M8002 In PLC s first scan cycle evaluate MOV
161. ion rising falling edge Hardware Software Logic OR WOR 16 bits WOR DWOR Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition rising falling edge Hardware Software Logic Exclusive OR WXOR Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition rising falling edge Hardware Software 2 Operands Sl The soft element address 16bit 32bit BIN S2 The soft element address 16bit 32bit BIN The result address 16bit 32bit BIN 4 applied instructions 3 Suitable soft components gt gt gt ox or oo em oo a rrtrrtfrtfrtl fl sz tT S E O E O O E ptt tt tt T lt Execute logic AND operation with each bit gt Description st G 0 amp 0 0 0 amp 1 0 WAND D10 D12 D14 1 amp 0 0 1 amp 1 1 lt Execute logic OR operation with each bit gt xo s s2 Oor0 0 Oor1 1 WOR D10 D12 D14 lor0 1 lorl l lt Execute logic Exclusive OR operation with each bit gt a a X0 2 j WXOR D10 D12 D14 UROEUUS ion T 1 xor 0 1 1 xor 1 0 If use this instruction along with CML instruction XOR NOT operation could also be executed P O WXOR D10 D12 D14 CML D14 D14 4 applied instructions 4 6 8 Converse CM L 1 Summary Converse the phase of the numbers Converse CML Execution Normally ON OFF Suitable XC1 XC2 XC3
162. is low byte D1 is high byte is used to stock ID number of the received data package The received data length is stored in D20 The data content is stored in registers start from D10 D30 specifies the received ID filter code if the received data doesn t fit the filter codes then it will keep the RECV status ID filter code D30 specifies the start address of ID filter codes the instruction specifies two groups of filter codes occupy D30 D37 zone D30 low bytes D31 high bytes D30 OxFFFF D31 0x0000 then they compose a 32 bits mask the mask code is OxOQQOFFFF D30 0x1234 D31 0x0000 then D32 low bytes D33 high bytes filter value is Ox00001234 they compose a 32 bits filter If ID and OxOOOQOFFFF equals value Ox00001234 the pass the first D34 low bytes D35 high bytes group of filter If the ID pass any of they compose a 32 bits mask two groups the allow the reception code D36 low bytes D37 high bytes they compose a 32 bits filter Standard expansion frame the setting of FD8358 has no effect to reception If the data frame fulfills ID mask codes the standard frame and the expansion frames can be all received When receive the standard frame the ID bits is 11 but will still occupy the 32 bits memory combined by D1 D0 8 bits data transfer the transfer data is DOL D1L D2L D3L DOL means the low byte of DO 16 bits data transfer the transfer data is DOL DOH DIL D1H DOH means
163. is not over 32767 16bits or 2147483647 32bits ON the calculate result is over 32767 16bits or 2147483647 32bits M8022 Carry OFF the calculate result is not over 32767 16bits or 2147483647 32bits The related The assignment of the data The data register of XC series PLC is a single word 16 bit data description 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 Single word object instruction D NUM D NUM gt Double word 32 bit engrosses two data register it s composed by two consecutive data registers the first one is assigned by double word object instruction The dispose bound is Dec 214 748 364 8 214 748 364 7 Hex 00000000 FFFFFFFF Double word object instruction D NUM 1 D NUM D NUM _ 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 gi ADD DO D2 D4 denotes two 16 bits data adds DADD D10 D12 D14 denotes two 32 bits data adds 4 applied instructions 1 Flag after executing the instruction Instructions without the direct flag will not display 27 CS Source operand its content won t change after executing the instruction 30 Destinate operand its content changes with the execution of the i
164. it will lead the program error or operation error g 4 4 3 Parallel Compare ORDO a 1 Summary ORLI The compare instruction to parallel connect with the other contactors Parallel Compare ORT 4 applied instructions Hardware Software requirement requirement 2 Operands S1 Specify the Data to be compared or soft 16 32 bit BIN component s address code 2 Specify the comparand s value or soft 16 32 bit BIN i component s address code a condition 3 suitable soft components lm gt m x ole en oo a TrrtrTrtrrttrtl ft s O COCCO pnmon Not Activate Condition ORD DORI Hspoos2 0 SD 0 s2 ORD PORD OSsDOOS O SDS0 SD DorRg SHO0S2 OsD 0 82 ORO O DorIo oOsd 0s OSH 0 82 Osp 0s2 O sp 0 82 Osp 0s2 0 sO 82 OR K100 CO DOR D10 K68899 4 applied instructions When the source data s highest bit 16 bits b15 32 bits b31 is 1 use the data as a negative Note Items 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 4 5 Data M ove SWAP The high and low byte of the destinated 45 10 devices are exchanged 4 applied instructions 4 5 1 Data Compare CM P 1 Summary Compare the two specified Data output the result Data compare CMP
165. itive count Loop counter current value Hold the action after Hold the action after positive count reset if Output contact positive count negative count When executing RST command counter s current value is 0 output contacts Reset activates recover The current value register Function The assignment of common use counters and power off retentive counters can me changed via FD parameters from peripheral devices 16 bits binary increment counters the valid value is K1 K32 767 decimal type constant The set value KO and K1 has the same meaning 1 e the output contact works on the first count starts If cut the PLC power supply the normal counter value become zero the retentive X1 I C D K10 counter can store the value it can CO accumulate the value of last time ad SATIUDIOI TPULIOU 19 UNOD S Iq QT When X001 is ON once the counter increases 1 When the counter value is 10 its output is activated After when the X001 is ON again the counter continues increasing 1 If X000 is ON reset counter the counter value becomes zero It also can set the counter value in D register For example D10 123 is the same as K123 32 bits increase decrease count range is 2147483648 2147483647 Set the increase or decrease count mode in M8238 If M8238 1 it is decrease mode M8238 0 it is increase mode Set the count value in K or D if set in DO
166. lculated 6 Repeat step2 5 then calculate the next 8 bits information Until all the information has been calculated the result will be the CRC parity code in CRC register Edit C language Func Block program see graph below 9 void CRO CHECK WORD W BIT E 10 1 int 1 1 2 n 12 unsigned int reg cre 0xffff K 13 14 fori i 0 i lt W O i 15 16 reg ere 14 1 17 for 320 493 j 16 d 19 if reg crce 0xdl1 20 reg CEE reg Cressy Drau al else 22 reg cre reg cre gt gt 1 an I 24 I 25 26 m 0 1 27 n W 0 2 25 k reg cre Oxffoo ao Wm K gt gt 6 30 Wn req crecOoxtftf lt ph Edit PLC ladder program DO Parity data byte number D1 D5 Parity data s content see graph below M8002 MO cn CHECK Do mo Download to PLC then RUN PLC set MO via Free Monitor we can find that values in D6 and D7 are the highest and lowest bit of CRC parity value 9 7 Application Points When upload the PLC program in which there are some Func Blocks the Func Blocks can t be uploaded there will be an error say There is an unknown instruction In one Func Block file you can write many subsidry functions can call each other Each Func Block files are independent they can t call its owned functions Func Block files can call C language library functions in form of floating arithmetic like sin cos tan etc 9 80 Function Table T he default functi
167. ll smooth the sampling value The default value is 0 which means no filter Differential Gain The low pass filtering process will relax the sharp change of the output value The default value is 50 the relaxing effect will be more obviously if increasing this value Users do not need to change it Upper limit and lower limit value Users can choose the analog output range via setting this value Default value lower limit output 0 Upper limit 4095 8 6 Application Outlines Under the circumstances of continuous output the system whose effect ability will die down with the change of the feedback value can do self study such as temperature or pressure It is not suitable for flux or liquid level Under the condition of overshoot permission the system will get the optimal PID parameters from self study Under the condition of overshoot not allowed the PID parameters got from self study is up to the target value it means that different target value will produce different PID parameters which are not the optimal parameters of the system and for reference only If the self study is not available users can set the PID parameters according to practical experience Users need to modify the parameters when debugging Below are some experience values of the control system for your reference U Temperature system P 2000 6000 I minutes 3 10 D minutes 0 5 3 u Flux system P 4000 10000 I minutes 0
168. ly l is alarm O is correct M8215 Neglect the alarm or not When flag is 1 stop sending alarm Pulse alarm flag frequency M8216 PULSE_4 l change suddenly l is alarm O is correct M8217 Neglect the alarm or not When flag is 1 stop sending alarm Pulse alarm flag frequency M8218 PULSE_5 l change suddenly l is alarm O is correct M8219 i Neglect the alarm or not When flag is 1 stop sending alarm Some special registers of pulse output are listed below ID Pulse ID Function Specification The low 16 bits of accumulated pulse number D8170 PULSE_1 The high 16 bits of accumulated pulse D8171 number D8172 E The current segment means Nr n segment LC The low 16 bits of accumulated pulse number D8173 PULSE_2 The high 16 bits of accumulated pulse D8174 number D8175 ooo The current segment means Nr n segment Le The low 16 bits of accumulated pulse number PULSE_3 The high 16 bits of accumulated pulse D8177 number D8178 rd The current segment means Nr n segment CO The low 16 bits of accumulated pulse number D8179 PULSE_4 D8180 gt 4 The high 16 bits of accumulated pulse ee number D8181 SS The current segment means Nr n segment The low 16 bits of the current accumulated D8190 PULSE_1 current pulse number The high 16 bits of the current accumulated D8191 current pulse number The low 16 bits of the current accumulated D8192 PULSE_2 current pulse number The high 16 bits of
169. n the format of 64 bits Even use word device 64 bits results can t be monitored at once 4 6 4 Division DIV 1 Summary Divide two numbers and store the result Division DIV 16 bits DIV DDIV Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition rising falling edge Hardware Software 2 Operands 1 The number address 16 bits 32 bits BIN 2 The number address 16 bits 32 bits BIN 4 applied instructions D The result address 16 bits 32 bits BIN 3 Suitable soft components gt lm gt m lo ox ov or os xn p a TrrrTrrrrty tt S2 lt 16 bits operation gt Description xo G 2 DIV DO D2 D4 Dividend Divisor Result Remainder BIN BIN BIN BIN DO D2 gt D4 D5 16 bits 16 bits 16 bits 16 bits S appoints the device s content be the dividend s2 appoints the device s content be the divisor D appoints the device and the next one to store the result and the remainder In the above example if input XO is ON devision operation is executed every scan cycle lt 32 bits operation gt n O DDIV DO D2 D4 Dividend Divisor Result Remainder BIN BIN BIN BIN D1 D0 D3 D2 D5 D4 D7 D6 32 bits 32 bits 32 bits 32 bits The dividend is composed by the device appointed by s1 and the next one The divisor is composed by the device appointed by szand the next one The result a
170. n be added in the block Fdit Sequence Block 1 Comment Sequence Blockl Common Item Pulse Item Modbus Item Free Format Communication Item Wait Item W oanvenso If you want to move the block to other position you have to select the former block and delete it BLOCK Sequence Block DSFPLSRA DO D2 O4 YO DSPLSF D6 DS D010 YO SBLOCKE Then put the cursor in the place you want to move Ma p m Right click the add to lad in the project bar Project i ge Project GS PLC _ Code hT Ladder Id Instruction List E Func Black fg Config Block a Sequence Block Sequence Block Comment Editor Add To Lad FR Free Monitor Delete Sequence Block Fey Data Monitor p fe eee ee PBLOCK Sequence Block DSPLSR DO D2 D4 YO DSFPLSA DE DS D10 0 SBLOCKE g 10 2 3 Delete the BLOCK You can select the whole block and delete it If you want to delete the block forever please right click the block you want to delete in the project bar and select delete sequence block After this operation you can not call this block anymore Project n H Project Ead ey PLCI E a Code Eha Ladder PLC1 Ladder Fs a Func Block Config Block S 5 Sequence Block fe Sequence Bloga E Comment Editor Add To Lad FR Free Monitor Delete Sequence Block Era Maks Mamnikar g 10 2 4 M odify the BLO
171. nd END 1 Summary FEND means the main program ends while END means program ends program ends END Execution condition E Suitable Models XC1 XC2 XC3 XC5 XCM 2 Operands Operands Function Data Type 3 Suitable Soft Components None D ot Even though FEND instruction represents the end of the main program if escri ption i P execute this instruction the function is same with END Execute the output input disposal monitor the refresh of the timer return to the Oth step OFF X10 OFF P20 4 applied instructions 0 Main program i ql Fi T ea a He 1 i zE I k Maj FEND pan m m a E o FD Pal 210 ON i main program i If program the tag of CALL instruction behind FEND instruction there must be SRET instruction If the interrupt pointer program behind FEND instruction there must be IRET instruction 1100 After executing CALL instruction and before executing SRET instruction if execute FEND instruction or execute FEND instruction after executing FOR instruction and before executing NEXT then an error will occur In the condition of using many FEND instruction please compile routine or subroutine between the last FEND instruction and END instruction 4 41 Data compare function LD activates when S1 S2 LD activates when S1 S2 LD activates when S1
172. nd the remainder are stored in the four sequential devices the first one is appointed by If the value of the divisor is 0 then an operation error is executed and the operation of the DIV instruction is cancelled The highest bit of the result and remainder is the symbol bit positive 0 negative 1 When any of the dividend or the divisor is negative then the result will be negative When the dividend is negative then the remainder will be negative 4 applied instructions 4 6 5 Increment INC amp Decrement DEC 1 Summary Increase or decrease the number Increment I INC Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition rising falling edge Hardware Software Increment 1 DEC Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition rising falling edge Models Hardware Software requirement requirement 2 Operands Operands The number address 16 bits 32bits BIN 3 Suitable soft components gt gt x oo en oo lt Increment INC gt Description m I INC DO 0 Dog O 1 gt D0 On every execution of the instruction the device specified as the destination has its current value incremented increased by a value of 1 In 16 bits operation when 32 767 is reached the next increment will write 32 767 to the destination device In this case there s no additional flag to identify this change in the counted value lt
173. ng edge carry on minus count tie a 2S eeee see eee eases count direction f counter s current value U AB Phase M ode Under this mode the HSC value increase or decrease according to two differential signal A phase and B phase According to the multiplication we have 1 time frequency and 4 time frequency two modes but the default count mode is 4 time mode 1 time frequency and 4 time frequency modes are shown below 1 time Frequency L es o ee ee a Tl B phase imput j i current 0 ae counter s value 4 time Frequency counter s current value L 0 da W PY ian if a il 5 3 HSC Range HSC s count range is K 2 147 483 648 K 2 147 483 647 If the count value overflows this range then up flow or down flow appears For up flow it means the count value jumps from K 2 147 483 647 to be K 2 147 483 648 then continue to count For down flow it means the count value jumps from K 2 147 483 648 to be K 2 147 483 647 then continue to count 5 41 HSC Input Wiring For the counter s pulse input wiring things differ with different PLC model and counter model several typical input wiring are shown below take XC3 48 as the example increment mode Counter C600 Pulse Input Pulse Direction Mode C620 Pulse Input Direction Input AB phase Mode C630 A phase mput B phase Input 5 50 HSC ports assignment Each letter s Meanin
174. nstruction X 4 Tell the instruction s basic action using way applied example extend function note items 4 3 Program Flow Instructions Mnemonic Instruction s name Chapter SET Open the assigned flow close the current flow flow 43 3 jump ST Open the assigned flow not close the current flow Open 43 3 the new flow 4 applied instructions pi 4 3 10 Condition Jump C a 1 Summary As used to run a part of program CJ shorten the operation cycle and using the dual coil Condition Jump CJ ww er p Execution Normally ON OFF coil Suitable XC1 XC2 XC3 XC5 XCM Hardware Software 2 Operands Jump to the target with pointer Nr P PO P9999 3 Suitable Soft Components eit In the below graph if X000 is ON jump from the first step to the next step Description behind P6 tag If X000 OFF do not execute the jump construction 1 Summary 0 CJ P6 X1 2 RST T246 X3 T246 K1000 X4 MOV K3 DO XO ar CJ P7 X5 Y gt X6 RST T246 4 3 2 Call subroutine CALL and Subroutine return SRET 4 applied instructions In the left graph YOOO becomes to be dual coil output but when XOOO OFF X001 activates when XOOO ON X005 activates CJ can t jump from one STL to another STL After driving time TO T640 and HSC C600 C640 if execute CJ
175. nter s current value is 20000 generate first interruption 12501 When start to count the counter s current value is 25000 generate first interruption I2502 When start to count the counter s current value is 45000 generate first interruption 12503 See graph below K10000 K10000 K5000 K20000 12501 C600 K10000 K 10000 K20000 C600 K20000 K5000 K25000 2503 C600 K25000 K20000 K45000 2502 5 10 3 Loop mode of HSC Interruption M ode 1 Unicycle normal mode Not happen after HSC interruption ends The conditions below can re start the interruption 1 reset the HSC 2 Reboot the HSC activate condition M ode 2 Continuous loop Restart after HSC interruption ends This mode is especially suitable for the following application 1 continous back forth movement 2 Generate cycle interruption according to the defined pulse Via setting he special auxiliary relays users can set the HSC interruption to be unicycle mode or continous loop mode The loop mode is only suitable with the relative count The detailed assignment is show below HSC ID Setting 24 segments HSC interruption loop C600 OFF unicycle mode 24 segments HSC interruption loop C602 ON continous loop mode 24 segments HSC interruption loop C604 24 segments HSC interruption loop C606 24 segments HSC interruption loop C608 24 segments HSC interruption loop C610 24 segments HSC interruption loop C61
176. nts S M amp Description m ASIN D50 D60 D51 D50 ASIN gt D61 D60 RAD Binary Floating Binary Floating This instruction performs the mathematical ASIN operation on the floating point value in S The result is stored in D Cs ASIN value Binary Floating Dol D60 Assign the binary floating value 4 applied instructions 4 9 12 ACOS ACOS 1 Summary ACOS ACOS TO Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware V3 0 and above Software some eee 2 Operands Soft element address need to do arccos 32 bits BIN Do Result address 32 bits BIN 3 Suitable soft components S m amp Description ACOS D50 D60 D51 D50 ACOS gt D61 D60 RAD Binary Floating Binary Floating Calculate the arcos value radian save the result in the target address s TCOS value Binary Floating DAN D6O RAD value angle X Tt 180 Assign the binary floating value 4 applied instructions 4 9 1300 ATAN ATAN 1 Summary ATAN ATAN Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware V3 0 and above Software 2 Operands Soft element address need to do arctan 32 bit BIN Do Result address 32 bit BIN 3 Suitable soft components Word P y Constant Module D FD ED T DX DY DM DS KA ID QD S D a a E CS e a E e a a a E E E M amp Description m ATAN D50 D60
177. oil s start ID or soft component s ID 16bits BIN S3 Specify the coil number or soft component s ID 16bits BIN D1 Specify the start ID of the local receive coils bit D2 Specify the serial port s number 16bits BIN 3 Suitable soft components gt fm gt m o ox or oo xm o o s TJT Tf Function ij s1 s2 s3 INRR Ki K500 K3 D K2 Instruction to read the input registers Modbus code is 04H Serial port K1 K3 When XO is ON execute REGR or INRR instruction set communication flag after execution the instruction when X0 is OFF no operation If error happens during communication resend automatically If the errors reach 4 times set the communication error flag The user can check the relative registers to judge the error y Single register write REGW IL summary Instruction to write the local specified register into the specified station s specified register Single register write REGW 16 bits REGW 32 bits instruction instruction Execution Normally ON OFF rising edge Suitable XC2 XC3 XCS5 XCM Condition Models Hardware Software Requirement Requirement 2 Operands DI Specify the remote communication station or soft 16bits BIN component s ID D Specify the remote coil s start ID or soft component s 16bits BIN ID Specify the start ID of the local receive coils 16bits BIN Specify the serial port s number 16bits BIN 3 Suitabl
178. on t execute the instruction 4 applied instructions 4 8 9 High bit coding ENCO 1 Summary Transform the ASCII code to hex numbers High bit coding ENCO Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM condition rising falling edge Hardware Software 2 Operands data address need coding D Coding result address soft element quantity to save result 3 Suitable soft components gt gt gt lo x ov or ms en p s Trrrrrrfrty ft a E s eee eee ee s Prt trtt lt When s is bit device gt nS 16 m O n ENCO M10 D10 K3 Description M17 Ml6 M15 Mli4 M13 M12 Mi MIO 0 0 0 0 1 0 1 0 7 6 5 4 s 2 1 0 b15 D10 olo o o o o o o o O 1010 0 oTr All be 0 4 applied instructions lt When is word device gt n lt 4 ps O ENCO DO D1 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 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 4 8 10 Low bit coding ENCOL 1 Summary Transform th
179. on library Pi PI _PIP2 double 1 57079632679489661923132169163975 PI 2 _PIP2x3 double 4 71238898038468985 76939650749 1925 PI 3 2 Sing Function l Return the first C position among n memchr const void s int c size_t n kie n words before S position Compare the first N words of position Sl and S2 Copy N words from position S2 to memcmp const void s1 const void s2 size_t n memcpy void s1 const void s2 size_t n sland return sl Replace the N words start from S memset void s int c size_t n position with word C and return position S char strcat char s1 const char s2 Connect string Ct behind string S Return the first word C position in char strchr const char s int c string S int stremp const char sl const char s2 Compare string s1 and s2 char strcpy char s1 const char s2 Copy string s1 to string s2 Double precision math Single precision math ae Description function function double acos double x float acosf float x double asin double x float asinf float x double atan double x float atanf float x double atan2 double y double Inverse tangent value of float atan2f float y float x x parameter y x Return the smallest double double ceil double x float ceilf float x integral which is greater or equal with parameter X double cos double x float cosf float x Hyperbolic cosine function double cosh double x float coshf float x c
180. one s start tag of 1ms non accumulation timer a FD8328 Set the retentive zone s start tag of 1 ms accumulation timer i i FD8329 Set the retentive zone s start tag of Ims precise timer 8 Subsection power off retentive zone of counter C FD8330 Set the retentive zone s start tag of 16 bits positive counter FD8331 Set the retentive zone s start tag of 32 bits positive negative counter FD8333 Set the retentive zone s start tag of dual phase HSC FD8334 Set the retentive zone s start tag of AB phase HSC FD8332 Set the retentive zone s start tag of single phase HSC GF Appendix 1 special soft device list X 1 If you change special FLASH memory it will take into effect after restart the PLC Appendix 2 instructions list Appendix 2 Instructions List In this chapter we will list all the instructions XC series PLC support These instructions include basic instructions application instructions special function instructions and motion control instructions Also we declare each instruction s application range This part enables the users to check the instruction s functions much faster For the detailed application please refer tol XC Series Programmable Controller Instruction Part Appendix 2 1 Basic Instructions List Appendix 2 2 Application Instructions List Appendix 2 3 Special Function Instructions List Appendix 2 4 Motion Control Instructions List Appendix 2
181. onvert 4 9 Floating Operation 4 10 Clock Operation 4 applied instructions 4 applied instructions 4 1 Applied Instruction List Function Ladder chart Program Flow Condition jump i C Pn 4 3 1 Call subroutine CALL Pn 4 3 2 pem Open the assigned flow close Ca ae the current flow Open the assigned flow not ae close the current flow Mnemonic Data ae nN LDO 0 LD activates iff S1 S2 LDO 0 LD activates if S1 lt S2 LD 0 LD activates iff S1 S2 LDO s1 S2 4 4 1 AND activates iff S1DDO S20 E n T 59 4 4 2 4 applied instructions ae a OR activates if SIU s S2 Q z 4 4 3 OR activates if S1 S2 Data Move Oo e N 4 4 3 i UN N OR S1 4 4 3 Compare the data k CMP S1 S D 4 5 1 ya ce ZCP Compare the data in certain area n FWRT D0 FDO K3 4 5 2 gt x lt oO T na Nn 4 5 6 4 5 7 4 5 8 4 5 9 4 5 10 XCH Exchange two values
182. ord which is combined by YO Y17 equals 21 i e YOL Y2 Y4 becomes to be ON Before M1 activates if DO 0 DX2 D0 represents a word combined by X2 X21 If M1 changes from OFF ON DO 3 then DX2 DO represents a pi 2 2 2 Structure of Bit Soft Components K Bit soft components structure is simple the common ones are X YU M S TU C besides a bit of a register can also represents Input Relay X octal type Output Relay Y octal type Auxiliary Relay M S decimal type Auxiliary Relay T C decimal type as the represent method is same with registers so we need to judge if it s word register or bit register according to the register Register s Bit Composed by register s bit support register D Represent method Dn m OS m lt 15 the Nr m bit of Dn register The represent method of word with offset Dn Dm x Bit of Word can t compose to be word again E g Y w gt D D5 D1 4 D0 4 means when the Nr 4 bit of DO is 1 set YOON Y D5 D1 4 means bit addressing with offset if D1 5 then D5 D1 means the Nr 4 bit of D10 2 3 Soft Components L ist 2 3 1 Soft Components L ist X C1 Series spss Output Poins vo vs vo v7 vo via vov s s 2 16 E erare SCOT o a 64 MO0 M199 M200 M319 320 For Special Usage M8000 M8079 For Special Usage M8120 M8139 For Special Usage M8170 M8172 128 For Special Usage M8238 M8242 For S
183. osh x ex e x 2 double exp double x float expf float x Exponent e x of a nature data double fabs double x float fabsf float x Absolute value of parameter x Return the largets dounble double floor double x float floorf float x integral which is smaller or equals with X double fmod double x double If y is not zero return the float fmodf float x float y y reminder of floating x y Break floating data X to be double frexp double val int float frexpf float val int mantissa and exponent X _far exp _far exp ae return the mantissa of save the logarithm into exp double Idexp double x float Idexpf float x X multipy the two to the power exp exp of n is x 24n double log double x float logf float x Nature logarithm logx double log10 double x float log10f float x logarithm log10x Break floating data X to be double modf double val float modff float val float integral part and decimal part double pd pd return the decimal part save the integral part into parameter ip double pow double x double float powf float x float y Power value of parameter y x y a sin double x float sinf float x sine sine function Hyperbolic sine function double sinh double x float sinhf float x sinh x e x e x 2 double ae x float E x Square root of parameter X double double tan double x X float float tanf floatx Xx tangent function
184. ownwards serialPort Config Send Recy First o com com coms C abit ibbit There are two methods to set the data Const data is to set the value directly Reg is to set the value via register Free Comm Config Check Dut Const Data 100 Check Out Change to check out tab select the checking mode Free Comm Config Check Out SM O Start Address BO r O LAC Modbus ASCII Check Out Length 5 CRC Modbus RTU Besides it needs to set the communication parameters Click serial port config H B Fe haf TA ese Add Edit Delete Upwards Dowrwards Seriatport confie aferat e E a Send Recy First Address D0 com come coms O Sbit 16bit i 10 40 Running form of the BLOCK IL If there are many blocks they run as the normal program The block is running when the condition is ON A the condition is normal ON normal OFF coil M1 SBLOCK Sequence block 1 SBLOCK Sequence block 2 SBLOCK Sequence block 3 _8 m OW Scanning period 1 Scanning period 2 l Scanning period 3 l Blockl Block1 Block2 Block1l Block2 Block3 B the condition is rising or falling edge of pulse MI l M2 l M3 l When M1 M2 M3 is from OFF to ON all these blocks will run once 2 The instructions in the block run in sequence according to the
185. p Description SWAP D10 D10 0 80 0 80 Pe eee 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 4 applied instructions 4 5 11f Exchange XCH 1 Summary Exchange the data in two soft element Exchange XCH Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition a i enn Hardware Software 2 Operands D1 The soft element address 16 bits BIN D2 The soft element address 16 bits BIN 3 Suitable soft component woa o const Mae D FD ED TD C DX DY DM DS KA ID QD D1 lt 16 bits instruction gt Description X0 XCH D10 D11 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 X0 is ON each scan cycle should carry on data exchange please note lt 32 bits instruction gt p DXCH D10 D20 32 bits instruction DXCH swaps value composed by D10 D11 and the value composed by D20 D21 4 applied instructions 4 6 Data Operation Instructions CM Co W D UL IV C OR L EG N 4 applied instructions 4 6 1 Addition ADD 1 Summary Add two numbers and store the result Add ADD Execution Normally ON OFF
186. p set to D44 D44 right shift 8 bits Logic and D44 with HFF save data in D15 Below is to calculate CRC parity D33 para code multiply K256 save result in D46 D46 add K67 save data in D48 D48 add D34 save data in D50 D50 add D30 save data in D52 Move D52 to D54 Logic and D54 with HFF save result in D16 Move D52 to D56 Right shift 8 bits with D56 Logic and D56 with HFF save result in D17 Send data D10 D17 out Read the returned data and save in D20 D29 Move the returned data to D100 109 Left shift 8 bits with D101 Logic OR D101 with D100 save result in D200 Left shift 8 bits with D103 Logic OR D102 with D103 save result in D201 Program Description The above program is written according to DH instrument s communication protocol the soft component s functions are listed below Relationship of sent SEND data string and registers oo on o2 pa bu os pe gt 16 D Read Address Address Read Parameters CRC C code code code code low hi 52H bytes bytes 17 RC ich CRC ich Write Address Address Write Parameters low high CRC code code code code bytes of bytes of low hi 42H the the bytes bytes written written data data Relationship of received RCV data data returned by the instrument and the registers D24 SV Output Alarm Read write Read write value status low bytes So if write data string according to the communication objects protocol use
187. pecial Usage M8350 M8370 TO T23 100ms not accumulation T100 T115 100ms accumulation T200 T223 10ms not accumulation ab Timer T300 T307 10ms accumulation T400 T403 Ims not accumulation T500 T503 Ims accumulation CO C23 16 bits forward counter C300 C315 32 bits forward backward counter C Counter C600 C603 single phase HSC C620 C621 C630 C63 1 DO D99 D100 D149f 1 For Special Usage D8000 D8029 For Special Usage 1D8060 D8079 Data Register For Special Usage D8120 D8179 For Special Usage D8240 D8249 For Special Usage D8306 D8313 For Special Usage D8460 D8469 FD FlashROM FDO FD411 412 Internal Relay ey N OO N 0 138 Register P For Special Usage FD8000 FD8011 For Special Usage FD8202 FD8229 For Special Usage FD8306 FD83 15 For Special Usage FD8323 FD8335 For Special Usage FD8350 FD8384 XC2 Series Mnemonic Name 14 16 24 32 48 60 14VO 16VO 24 3210 48 60 I O VO 10 TO T O Input X0 X15 X0 X33 l X0 X7 X0 X7 14 18 28 36 I O Points Points X0 X21 X0 X43 Output Y0 Y11 Y0 Y23 YO Y5 YO Y7 10 14 20 24 Points YO Y15 YO Y27 Internal X X0 X1037 544 Relay 3 Internal X YO Y 1037 544 Relay M0 M2999 O M3000 M7999 For Special Usage M8000 M8767 S0 S511 0 S512 S1023f TO T99 100ms not accumulation T100 T199 100ms accumulation Timer Internal Relay S Flow 1 CO C299 16 bits forward counter C300 C599
188. perands OR Parallel connection a OR of NO Normally e 5 Open contacts Operands X YU MU SU TU CU Dn m FDn m ORI Parallel connection a S OR of NC Normally _ 2 a 5 Inverse Closed contacts Statements Use the OR and ORI instructions for parallel connection of contacts To connect a block 3 40 OR ORI Operands X YU MU SU TU CU Dn m FDn m that contains more than one contact connected in series to another circuit block in parallel use an ORB instruction which will be described later 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 i E gt a lt Y6 Program T os nO 3 i OR M11 Y6 M4 X7 HH OUT Y6 io T Pa LDI Y6 M13 AND M4 OR M12 ANI X7 OR M13 OUT M100 Relationship with ANB The parallel connection with OR ORI instructions should connect with LD LDI instructions in principle But behind the ANB instruction it s still ok to add a LD or LDI instruction behind ANB instruction OR behind ANB mnstucton 3 50 LDP LDF ANDP ANDF ORP ORF M nemonic and F unction Format and Operands LDP Initial logical o LoaD operation Rising edge C g Pulse pulse gt XUI YUMLU SLUTUCLU Dn m FDn m LDF Initial logical operation a LoaD Falling trailin
189. r remote node s station remote node s object ID local object s ID number the correspond register ID is FD8370 FD8373 represents Nr 1 item FD8374 FD8377 represents Nr 2 item FD9390 FD9393 represents Nr 256 item totally we can set 256 items see table below Communication Setting FD8350 CAN communication mode 0 represents not use represents internal protocol FD8351 CAN baud rate See CAN baud rate setting table FD8352 Self CAN station For CAN protocol use the default value is 1 The set value s unit is MS represents send every MS Configured FD8354 if set to be O it means send every cycle the default value is frequency 5ms The Nr 1 item s configuration FD8372 Local object s ID FD9390 Remote node s ID FD9391 Remote node s object ID The Nr 256 item s configuration FD9392 Local object s ID Status Flag Baud Rate Setting CAN self check Set 1 if error set O if M8240 FD8351 error flag correct Error flag of CAN Set 1 if error set O if M8241 l configure correct If set to be 1 then recover after error happens Automatically If set to be 1 then M8242 recover the control CAN stops working after CAN bus error after error happens The default value is 1 this flag is not power off retentive Register Status 0 no error 2 initialize error CAN error information 30 bus error 31 error alarm 32 data overflow Show the first number of
190. r TO T599 is 16 bits linear increment mode 0 K32767 when the timer s value reaches the max value K32767 it stops timing The timer s status keeps still output delay OFF timer T2 g YO XO When X000 is ON output YOOO K200 XO YO v 12 x When X000 from ON to OFF delay T2 20s then output YOOO is OFF glitter X0 T2 T2 K10 TI I2 TI gt When X000 is ON YOOO starts to glitter T1 controls the OFF time of YOOO T2 controls the ON time of YOOO 2 80 Counter C XC series PLC counters number are all decimal please see the following Number list table for all the counter numbers SERIES AGN FOR COMMON USE C300 C315 32 bits forward backward counter os XCM i C620 C629 double phase HSC C630 C639 AB phase HSC All the counters number meaning TYPE DESCRIPTION 16 bits forward counter C0 C299 32 bits forward backward C300 C599 C300 C302 C598 each occupies 2 counters HSC High Speed C600 C634 C600 C602 C634 each occupies 2 counters X 1 Please see chapter 5 for high speed counter Counter The characteristics of 16 bits and 32 bits counters characteristics 1 32 767 2 147 483 648 2 147 483 647 The assigned set Same as the left but data register must be in a Constant K or data register value couple Changing of the Change after positive count Change after pos
191. recision is 0 1s the write value is the cycle unit 0 1s real temperature control cycle multiply 10 1 e 0 5s control cycle should write 5 200s control cycle should write 2000 If users think the environment temperature is different with the display temperature he can write in the known temperature value At the moment of value written in calculate the temperature difference and save Calculate the temperature difference value adjust environment temperature value sample temperature value Unit 0 1 C E g under heat balance status user test the environmental temperature as 60 0 C with Real value mercurial thermometer the display temperature is 55 0 C correspond sample temperature unit 0 1 O play p p p p is 550 temperature difference 0 at this time users write this parameters with 600 temperature difference is re calculated to be 50 5 C then the display temperature sample temperature temperature difference 10 60 Q Note when users write the adjust temperature value make sure that the temperature is same with the environment temperature value This value is very important once it s wrong temperature difference will be wrong then effect the display temperature The output when auto tune use as the unit 100 represents 100 of full scale output 80 Auto tune output value represents 80 of full scale output H Appendix 1 4 Special Flash Register List 10 filter FO a a S oop
192. rement Requirement 2 Operands Operands Function Type 1 Specify the remote communication station or soft component s ID 16bits BIN 2 Specify the remote coil s start ID or soft component s ID 16bits BIN S3 Specify the coil number or soft component s ID 16bits BIN D1 Specify the start ID of the local receive coils bit D2 Specify the serial port s number 16bits BIN 3 Suitable Soft Components gt fm gt m o ox ov oo xm v o 2 a Function X0 INPR K500 K3 M1 K2 Instruction to read the input coil Modbus code is 02H Serial port K1 K3 When XO is ON execute COLR or INPR instruction set communication flag after execution the instruction when X0 is OFF no operation If error happens during communication resend automatically If the errors reach 3 times set the communication error flag The user can check the relative registers to judge the error V single coil write COLW 1 summary Write the local coil status to the specified station s specified coil Single coil write COLW 16 bits COLW 32 bits instruction instruction Execution Normally ON OFF rising edge Suitable Models XC2 XC3 XCS5 XCM Condition Hardware Software Requirement Requirement 2 Operands Specify the remote communication station or soft component s ID 16bits BIN D2 Specify the remote coil s start ID or soft component s ID 16bits BIN Specify the star
193. rial communication interface the interface level fits RS232C or RS485 standard The data format is 1 start bit 8 data bits no parity one two stop bit The baud rate can be 1200 19200bit s 2 Communication Instruction Format DH107 108 instruments use Hex data form to represent each instruction code and data Read write instructions Read address code 52H 82 the para to read code 0 0 C RC parity code Write address code 43H 670 the para to write code How bytes of the wrote data high bytes of the wrote data CRC parity code The read instruction s CRC parity code is the para to read code 256 82 A DDR ADDR is instrument s address para the range is 0 100 pay attention not to add 80H CRC is the remainder from the addition of the above data binary 1 6bits integral The reminder is 2 bytes the high byte is behind the low byte The write instruction s CRC parity code is the para to write code 256 6 7 the para value to write ADDR The para to write represents with 16 bits binary integral No matter to write or read the instrument should return data as shown below The test value PV given value SV output value MV and alarm status read write parameters value CRC parity code Among in PVL SV and the read parameters are all in integral form each occupies two bytes MV occupies one byte the value range is 0 220 alarm status occupies one byte CRC parity code occupies two bytes totally 10 byes C
194. routines Start the precise time in precise time interruption Every precise timer has its own interruption tag see table below XO il STR T600 K100 i case MO il RST T600 When X000 changes from OFF to be ON timer T600 starts to time When time accumulates to 100ms set T600 meantime generate an interruption the program jumps to interruption tag 3001 and execute the subroutine Interruption Tag correspond with the Timer fi 11 49 Interruption XC series PLC are equipped with interruption function The interruption function includes external interruption and time interruption Via interruption function we can dispose some special programs This function is not effected by the scan cycle 11 4 1 External Interruption i The input terminals X can be used to input external interruption Each input terminal corresponds with one external interruption The input s rising falling edge can activate the interruption The interruption subroutine is written behind the main program behind FEND After interruption generates the main program stops running immediately turn to run the correspond subroutine After subroutine running ends continue to execute the main program Main Prog Main Prog Subroutine y Input interrupt External Interruption s Port Definition XC 3 14 Input Rising Falling interruption Termin
195. s communication free communication and CAN bus communication 7 1 Summary 7 2 Modbus Communication 7 3 Free Communication 7 4 CAN Communication Relative Instructions Circuit and Soft Components Chapter MODBUS Communication COLR jcoiteas cor F ree Communication CAN bus Communication 7 1 Summary XC2 PLC XC3 PLC XC5 PLC main units can fulfill your requirement on communication and network They not only support simple network Modbus protocol free communication protocol but also support those complicate network XC2 PLC XC3 PLC XC5 PLC offer communication access with which you can communicate with the devices such as printer instruments etc that have their own communication protocol XC2 PLC XC3 PLC XC5 PLC all support Modbus protocol free protocol these communication function XC5 PLC also have CANbus function 7 1 10 COM port COM Port There are 2 COM ports Port1 Port2 on XC3 series PLC basic units while there are 3 COM ports on XC5 series PLC main units Besides the same COM ports COM1 COM2 they have also
196. s zero M8020 Zero OFF the calculate result is not zero ON the calculate result is less than 32768 16 bit or 2147483648 32bit OFF the calculate result is over 32768 16 bit or 2147483648 32bit M8022 ON the calculate result 1S Ove 32 68 16 bit Ol 2 14 483648 3 bit Carry i 4 6 20 Subtraction SUB H M8021 Borrow 1 Summary Sub two numbers store the result Subtraction SUB Execution Normally ON OFF Suitable XC1 XC2 XC3 XC5 XCM condition oe ie Hardware Software 2 Operands Operands Function 1 The number address 2 The number address The result address 3 Suitable soft component ppppENEMALCHOC s n e tt_ so CTS TSS T E eT 4 applied instructions E QQ Description SUB D10 D12 D14 O D100 Y D120 gt O D141 SI appoint the soft unit s content subtract the soft unit s content appointed by S2 in the format of algebra The result will be stored in the soft unit appointed by D 5 8 13 The action of each flag the appointment method of 32 bits operation s soft units are both the same with the preceding ADD instruction The importance is in the preceding program if XO is ON SUB operation will be executed every scan cycle The relationship of the flag s action and vale s positive negative is shown below Zero fla zero flag Zero flag E T B D Ne a Fe I l 2 Fite Ox e 2 Nu Fa a Borrow flaz Carry flag Tata Data
197. se frequency testing precise time PID control position control etc for interruption high speed counter HSC C Language Function Block XC series PLC support C language function block users can call the edited function block freely This function reduces the program quantity greatly Stop when power ON Function XC series PLC support Stop when power on PLC function With this function when there is a serious problem during PLC running use this method to stop all output immediately Besides with this method connect PLC when parameters are set wrongly Communication Function XC series PLC support many communication formats like basic Modbus communication CABBUS communication free format communication Besides via special network module connect to Ether net GPRS net 1 2 Program Language E XC series PLC support two types of program language Instruction List Instruction list inputs in the form of LD AND OUT etc This is the basic input form of the programs but it s hard to read and understand E g Step Instruction Soft Components 0 LD X000 1 OR Y005 2 ANI X002 3 OUT Y005 Ladder With sequential control signal and soft components draw the sequential control graph on program interface this method is called Ladder This method use coil signs etc to represent sequential circuit so it s easier to understand the program Meantime monitor PLC with the circui
198. se direction mode AB phase mode C600 11001 I1024 C620 2001 I2024 C630 12501 12524 11101 11124 C622 2101 2124 12601 12624 C604 11201 11224 C624 2201 12224 C634 12701 12724 C606 11301 11324 C626 12301 12324 C636 12801 I2824 C608 11401 11424 C628 12401 12424 C638 12901 12924 C610 11501 11524 C612 11601 11624 cso cen 11701 11724 css css C616 11801 11824 C618 11901 11924 Define the presetvalue HSC 24 segment pre set value is the difference value the count value equals the counter s current value plus the preset value generate the interruption N interruption tags correspond with N interruptionpreset values The N 1 preset value is 0 E g 1 the current value is C630 is O the first preset value is 10000 the preset value in segment 2 is 5000 the preset value in segment 3 is 20000 When start to count the counter s current value is 10000 generate first interruption 12501 When start to count the counter s current value is 5000 generate first interruption 12502 When start to count the counter s current value is 25000 generate first interruption 2503 See graph below K10000 K 5000 K20000 12501 C600 K0 K 10000 K 10000 _ _ 2502 C600 K10000 K 5000 K5000 2503 C600 K5000 K20000 K25000 E g 2 the current value is C630 is 10000 the first preset value is 10000 the preset value in segment 2 is 5000 the preset value in segment 3 is 20000 When start to count the cou
199. segment s frequency to time In this way the following acceleration deceleration will perform according to this slope Pulse can be output at only YOOO or YOO1 Y for Pulse direction can be specified freely E g if in S1 the first segment the pulse number is positive Y output is ON if the pulse number is negative Y output is OFF Note in the first segment s pulse output the pulse direction is only decided by the pulse number s nature positive or negative of the first segment Frequency range 0 400KHz Pulse number range 0 K32 767 16 bits instruction 0 K2 147 483 647 32 bits instruction Acceleration deceleration time below 65535 ms segment 1 segment2 segment M170 6 2 4 Pulse Segment Switch PLSNEXT PLSNT a IL Instruction Summary Enter the next pulse output Pulse segment switch PLSNEXT PLSNT 16 bits PLSNEXT PLSNT 32 bits Instruction Instruction Execution Rising falling edge Suitable XC2 XC3 XCS XCM condition Models Hardware Software requirement requirement 2 Operands D Specify the pulse output port Bit 3L suitable soft components Functions And Actions 16 bit instruction form PLSR DO D100 YO M1 gt ii PLSNEXT YO If the pulse output reaches the highest frequency at the current segment and output steadily at this frequency when M1 changes from OFF to ON then enter the next
200. segment 1 segment 2 seament 3 absolute position DS absolute position D1 absolute position D3 frequency DO frequency D4 frequency D2 M8170 6 30 Output Wiring YO Y1 Y2 COMO COMI COM2 Q Q O Output port YO Pulse output port O single phase Output port Y1 Pulse output port 1 single phase Below is the graph to show the output terminals and stepping driver wiring PLC side Stepping driver side Dr he CoMo gt I mE Baa wie PU A A cont e 124 Se V 6 4 Items to Note 1 Concept of Step Frequency output YO or Y1 N steps speed each step 5ms N 4Sme N 5ms l During ACC DEC each step time is 5ms this time is fixed and not changeable The minimum step frequency each step s rising falling time is 10Hz If the frequency is lower than 10Hz calculate as 10Hz the maximum step frequency is 15Hz If the frequency is larger than 15Hz calculate as 15Hz In case of frequency larger than 200Hz please make sure each segmen
201. sers can also read its status 1 represents auto tune processing 0 represents no atto tune or auto tune finished Digital output value range OL 4095 PID output value l l l If PID output is analogue control like steam valve open scale or thyistor ON angle operation value l l l transfer this value to the analogue output module to realize the control requirements Via PID auto tune to get the best parameters PID parameters If the current PID control can t fulfill the control requirements users can also write the PID PU IL D parameters according to experience Modules carry on PID control according to the set PID parameters PID operation activates between Diff range In real temperature control environments if Lewy A i iii Pif PID output the max value if the temperature is PID operation range Diff unit 0 1 C higher than Larp tipi PID output the mini value the temperature is lower than Temperature difference sample temperature Temperature difference 10 display temperature value Then temperature display value can equal or close to the real temperature value This parameter unit 0 1 C has sign negative or positive Unit is 0 1 C the default value is 0 The set temperature value unit 0 1 C Control system s target temperature value The range is O 1000 C the precision is 0 1 C Appendix 1 special soft device list Temperature control Control cycle s range is 0 5s 200s the minimum p
202. structions Source data quantity 16 bits 32 bits BIN Shift left times 16 bits 32 bits BIN 3 Suitable soft components Word Operands ra D FD ED TD 0 DX DY DM DS KA ID QD System The instruction copies n2 source devices to a bit stack of length nl For every Description new addition of n2 bits the existing data within the bit stack is shifted n2 bits to the left right Any bit data moving to the position exceeding the nl limit is diverted to an overflow area In every scan cycle loop shift left action will be executed M15 M12 Overflow M11 M 8 MI5 M 12 M 7 M 4 M11 M8 amp M 3 M 0 gt M7 M4 X 3 X 0 gt M3 MO Qe oo oO 1 OOs 2 Ata oo wo es Te m bits shift left pee a a itis pias no as ae Raa mo ww oes er ne aes aw we xa Pa PO i 4 7 5 Bit shift right SFTR a 1 Summary Bit shift right Bit shift right SFTR rising falling edge XC2 XC3 XC5 XCM 4 applied instructions Software requirement requirement 2 Operands Source soft element head address bit Dp o Target soft element head address bit Source data quantity 3 Suitable soft components Tm gt w o x ov or m xn plo s r D o The instruction copies n2 source devices to a bit stack of length n1 For Description every new addition of n2 bits the existing data within the bit stack is shifted n2 bits to the left right Any bit data moving to the position exceeding
203. t s pulse number no less than 10 if the set value is less than 10 send as 200Hz 2 frequency jump in segment pulse output segment 1 Me170 When outputting the segmented pulse if the current segment s pulse has been set out while meantime it doesn t reach the highest frequency then from the current segment to the next pulse output segment pulse jump appears see graph above 30 dual pulse output Is invalid In one main program users can t write two or more pulse output instructions with one output port Y The below sample is wrong PLSR DO D100 YO PLSR D200 D1000 YO 6 50 Sample Programs E g 1 Stop at certain length With instruction PLSR and PLSNEXT realize this stop at certain length function Take the sample program as the example set MoO two segments pulse output in DO JD1 and D2 MI D3 with the same frequency value In second segment pulse output set pulse number D3 as the output pulse number after receive M1 signal This will realize stop at certain length function See graph by the left side segment 1 M3170 segment 2 E g 2 follow function In this sample the pulse frequency from YO equals with the frequency tested from X003 If the frequency tested from X003 changes the pulse frequency from YO changes FRQM K20 DO K1 X003 PLSF DO YO
204. t s status Es 1 2 2 Alternation Convert the above two methods freely Ladder 1 3 Program Format Direct Input The above two program methods can input in the correspond interface separately especially in the ladder window there is a instruction hint function which improves the program efficiency greatly PLCl Ladder M6000 TO K100 Panel Configuration As in XC series PLC there are many instructions which has complicate usage and many using methods like pulse output instruction main unit PID etc XCPPro also support the configure interface for these special instructions In the correcpond configure interface input the parameters and ID according to the requirements will be ok r PID Instruction Parameter Config Measure Yalue FY Target Value S DO Parameter Config Manual Sampling Time Froportion Gain KP Integration Time TI 100ms Differential Time TD 10ms FID Computation Scope FID Control Death Band e 12 Cc re 2 fs pe pee eee A y LRR ate Self Study Periodic Value Overshoot Contig Enable Overshoot Disable Overshoot Each time adjust the increase 100 Current target value resident C 110 Parameter D4000 Output Y Mode Config Common Mode O Advanced Mode Input Filter Constant Differential Increase Output Upper Limit Value 4095 Limit Value Output Lower Direction Config Neg
205. t ID of the local receive coils bit S2 Specify the serial port s number 16bits BIN 3 suitable soft components gt lm gt m oo ov ow xn po Function s1 s2 M1 K2 XO COLW K1 K500 Write the single coil Modbus code is 05H Serial port K1 K3 y multi coil write M CLW 1 Summary Write the local multi coil status into the specified station s specified coil Multi coil write MCLW 16 bits MCLW 32 bits instruction instruction Execution Normally ON OFF rising edge Suitable Models XC2 XC3 XC5 XCM Condition Hardware Software Requirement Requirement 2 Operands Specify the remote communication station or soft component s 16bits BIN ID Specify the remote coil s start ID or soft component s ID Specify the coil number or soft component s ID Specify the start ID of the local receive coils Specify the serial port s number 3 Suitable soft components p m m m ox oy m os xu o w TJT Tf D2 s OCC E CRE SEER M1 K2 Function MCLW K1 K500 K3 Instruction to write the multiply coils Modbus code is OFH Serial port K1 K3 When XO is ON execute COLW or MCLW instruction set communication flag after execution the instruction when X0 is OFF no operation If error happens during communication resend automatically If the errors reach 4 times set the communication
206. t point converts to integer INT Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software 2 Operands Source soft element address 16 bits 32 bits BIN Target soft element address 16 bits 32 bits BIN 3 Suitable soft components Word P y Constant Module D P ED TD CD DX DY DM DS KH ID QD lt 16 bits gt Description O0 D11 D10 gt D20 XO Cs Binary Float BIN integer INT D10 D20 Give up the data after the decimal dot lt 32 bits gt Cs O D11 D100 gt D20 D21 X0 DINT D10 D20 Binary Float BIN integer Give up the data after the decimal dot The binary source number is converted into a BIN integer and stored at the destination device Abandon the value behind the decimal point This instruction is contrary to FLT instruction When the result is 0 the flag bit is ON When converting less than and abandon it zero flag is ON The result is over below data the carry flag is ON 16 bits operation 32 768 32 767 32 bits operation 2 147 483 648 2 147 483 647 4 applied instructions 4 8 47 BCD convert to binary BIN 1 Summary BCD convert to binary BIN 16 bits BIN Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM condition rising falling edge Hardware Software 2 Operands Operands Function Data Type Source soft element address BCD Target soft element address 16 bits 32 bits BIN 3 Suita
207. t value of S1 and the result stored in destination device D Ifa constant K or H used as source data the value is converted to floating point before the addition operation X1 ESUB K1234 D100 D110 K1234 D101 D100 DI11 D110 Binary converts to Floating Binary Floating Binary Floating The same device may be used as a source and as the destination If this is the case then on continuous operation of the EADD instruction the result of the previous operation will be used as a new source value and a new result calculated This will happen every program scan unless the pulse modifier or an interlock program is used 4 applied instructions 4 9 50 Float M ul EM UL 1 Summary Float Multiply EMUL ow ooo o p Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software a a 2 Operands D resres OO O ise 3 Suitable soft components Word P y Constant Module D Q EMUL D10 D20 D50 0 D110 D100 x 0 D21 D200 gt 0O D51 D500 Binary Floating Binary Floating Binary Floating The floating value of S1 is multiplied with the floating value point value of S2 The result of the multiplication is stored at D as a floating value Ifa constant K or H used as source data the value is converted to floating point before the addition operation X1 m EMUL K100 D100 D110 L K100 x L D101 D100 gt D11
208. tandards IL Do not use the same pulse output terminal in different BLOCK SBLOCK Sequence block1 SBLOCK Sequence block DPLSR DO D2 D4 YO DPLSR DO D2 D4 YO SBLOCKE SBLOCKE SBLOCK Sequence bl ock2 SBLOCK Sequence block2 DPLSR D10 D12 D14 YO DPLSR D10 D12 D14 Y1 SBLOCKE SBLOCKE 2 Do not use the same pulse output terminal in BLOCK and main program YESO VQ DPLSR DO D2 D4 YO DPLSR DO D2 D4 Y1 SBLOCK Sequence bl ock1 SBLOCK Sequence block1 DPLSR D10 D12 D14 YO DPLSR D10 D12 D14 YO SBLOCKE SBLOCKE 3 There only can be one SKIP condition for one BLOCK instruction SBLOCK Sequence block1 SBLOCK Sequence block1 DPLSR D0 D2 D4 YO DPLSR D0 D2 D4 YO SBLOCKE SBLOCKE 4 The SKIP condition only can use M X can not use other coil or register NOY xq YESOVO SBLOCK Sequence block SBLOCK Sequence block1 DPLSR DO D2 D4 YO DPLSR DO D2 D4 YO M2 D 10 DPLSR DO D2 D4 Y1 DPLSR DO D2 D4 Y1 SBLOCKE SBLOCKE 5 The output instructions can not be HSC PLSF PWM FRQM SBLOCK Sequence block SBLOCK Sequence block1 as HSCR C600 DO i PLSF DO YO hae M PWM K100 DO Y1 DPLSY K30 D1 YO DPLSR DO D2 D4 Y1 SBLOCKE 6 LabelKind type can not be used in
209. tatus OFF or ON If X001 is OFF it s increment count if X001 is ON it s decrement count When comes the rising edge of M5 reset HSC C620 and stop counting opou seyd gy M8 C630 K999999 ooo M8000 HSCR C630 DO DO K3000 D gt M9 C630 i R J When M8 is ON C630 starts to count immediately Count input via X000 B Phase X001 A Phase When the count value exceeds K3000 output coil Y2 is ON When comes the rising edge of M9 reset HSC C630 M8002 C630 R M8000 C630 K88888888 HSCR C630 DO KO DO K100 D gt ID lt YO DO K100 DO K200 _D D lt YI DO K200 Da m It When therising edge of initial positive pulse coil M8002 comes 1 e Each scan cycle starts HSC C630 reset and clear the count value When set coil M8000 ON C630 starts to count the count value is set to be K8888888 If the count value is greater than KO but smaller than K100 the output coil YO set ON If the count value is greater thanK100 but smaller than K200 the output coil Y1 set ON If the count value is greater thanK200 the output coilY2 set ON 5 10 HSC Interruption To XC series PLC each HSC channels has 24 segments 32 bit pre set value When the HSC difference value equals the correspond 24 segment pre set value then interruption occures according to the interruption tag
210. ternal output will act according to the device s response delay time 2 2 M Number List The auxiliary relays M in XC series PLC are all in decimal form please refer the details from tables below RANGE SERIES NAME FOR COMMON FOR POWER OFF FOR SPECIAL USE M USE RETENTIVE USE M8000 M8079 M8120 M8139 MO000 M199 M200 M319 M8170 M8172 M8238 M8242 M8350 M8370 XCI RANGE SERIES NAME FOR COMMON FOR POWER OFF FOR SPECIAL USE USE RETENTIVE USE M000 M2999 M3000 M7999 M8 amp 000 M8767 RANGE SERIES NAME FOR COMMON FOR POWER OFF FOR SPECIAL USE USE RETENTIVE USE MO000 M2999 M3000 M7999 M8 amp 000 M8767 SERIES NAME RANGE FOR COMMON FOR POWER OFF FOR SPECIAL USE USE RETENTIVE USE MO000 M3999 M4000 M7999 M8 amp 000 M8767 RANGE SERIES NAME FOR COMMON FOR POWER OFF FOR SPECIAL USE USE RETENTIVE USE M MO000 M2999 M3000 M7999 M8 amp 000 M8767 Function In PLC auxiliary relays M are used frequently This type of relay s coil is same with the output relay They are driven by soft components in PLC auxiliary relays M have countless normally ON OFF contactors They can be used freely but this type of contactors can t drive the external loads For common use This type of auxiliary relays can be used only as normal auxiliary relays I e if power supply suddenly stop during the running the relays will disconnect y Common usage relays can t be used for power off retentiv
211. the block Sign P I can not be used in block Even they can be added in block but they do not work in fact 10 60 BLOCK related instructions 10 6 1 Instruction explanation a y stop running theBLOCK BSTOP 1 Summarization Stop the instructions running in the block BSTOP NO NC coil and pulse edge Suitable types XC1 XC2 XC3 XCS5 XCM V3 11 and above V3 1h and above 2 Operand The number of the BLOCK 16 bits BIN The mode to stop the BLOCK 16 bits BIN 3L Suitable component Function or ae BSTOP Kl KO S2 is the mode to stop BLOCK operand K1 K2 KO stop the BLOCK slowly if the pulse is outputting the BLOCK will stop after the pulse outputting is finished K1 stop the BLOCK immediately stop all the instructions running in the BLOCK y Continue running theBLOCK BGOON 1 Summarization This instruction is opposite to BSTOP To continue running the BLOCK BGOON Pulse edge Suitable types XCI XC2 XC3 XC5U XCM V3 11 and above V3 1h and above 2 Operand The number of the BLOCK 16 bits BIN The mode to continue running the BLOCK 16 bits BIN 3L Suitable component Function M3 fi BGOON Kl KO S2 is the mode to continue running the BLOCK Operand KO K1 KO continue running the instructions in the BLOCK For example if pulse outputting stopped last time BGOON will continue outputting th
212. the current accumulated D8193 current pulse number The low 16 bits of the current accumulated D8 194 PULSE _ 3 current pulse number D8195 The high 16 bits of the current accumulated current pulse number Only XC5 32RT E The low 16 bits of the current accumulated 4PLS model has D8196 PULSE_4 current pulse number The high 16 bits of the current accumulated D8197 current pulse number D8212 PULSE 2 The error pulse segments position D8214 PULSE 3 The error pulse segment s position D8216 PULSE A The error pulse segments positon D8218 PULSE 5 The error pulse segments position Absolute position relative position back to origin Rising time of the absolute relation position D8230 l instruction Y0 PULSE_1 Falling time of the origin return instruction D8231 YO Rising time of the absolute relation position D8232 instruction Y 1 PULSE_2 Falling time of the origin return instruction Y1 Rising time of the absolute relation position D8234 instruction Y2 B a D8233 Falling time of the origin return instruction D8235 Y2 D8236 Rising time of the absolute relation position PULSE_4 instruction Y3 D8237 Falling time of the origin return instruction Y3 Rising time of the absolute relation position PULSE_5 instruction Falling time of the origin return instruction Communication F unction This chapter mainly includes basic concept of communication Modbu
213. the tracking system The process is like this Output some pulses and prohibit the exterior interruption Continue outputting the pulse but at low speed and open the exterior interruption When checked the exterior cursor signal stop the pulse outputting and machine running Ladder chart M8002 M8050 S XO f SBLOCK Sequence bl ock1 DPLSR DO D2 D4 Yo M Instruction list DPLSR D100 D102 D104 YO SBLOCKE M8000 MOV K1000 DO MOV K20000 D2 MOV KO D4 MOV K100 D100 MOV K300 D102 MOV K20 D104 10000 M8000 E STOP YO M8050 S IRET T he instruction list content RST M8050 N otes M8050 prohibit the exterior interruption PLC power on prohibit the exterior interruption BLOCK starts Output the pulses and move some distance Reset M8050 open the exterior interruption Output the pulses at low speed BLOCK ends The first pulse frequency The first pulse numbers Accelerate decelerate time for the first pulse The second pulse frequency The second pulse numbers Accelerate decelerate time for the second pulse The interruption starts Stop outputting the pulse Close the interruption The interruption ends Special Function Instructions In this chapt
214. tively stop data sending while high level priority node can continue transferring data without any influence So there is function of node to node node to multi node bureau broadcasting sending receiving data Each frame s valid byte number is 8 so the transfer time is short the probability ratio is low g 7 4 2 External Wiring a CAN Bus Communication Port CAN U CAN The wiring among each node of CAN bus is shown in the following graph at the two ends add 120 ohm middle terminal resistors E a ax o ANT BE ANT ANT o 7 4 30 CAN Bus Network Form There are two forms of CAN bus network one is instructions communication format the other is internal protocol communication format These two forms can work at the same time y Instructions communication format This format means in the local PLC program via CAN bus instructions execute bit or word reading writing with the specified remote PLC y Internal protocol communication format This format means via setting of special register via configure table format realize allude with each other among PLC s certain soft component s space In this way realize PLC source sharing in CAN bus network 7 4 4 CAN bus Instructions y Read Coil CCOLR IL Instruction Description Function Read the specified station s specified coil status into the local specified coil Read Coil CCOLR 16 bits CCOLR 32 bits E Execution Normally ON OF
215. tput use the unit of 0 1Hz so when set S2 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 S2 is 720000 When X000 is ON output PWM wave when X000 is OFF stop output PMW output doesn t have pulse accumulation In the left graph TO 1 f T TO n 256 TO 11 2 Frequency Testing IL Instruction s Summary Instruction to realize frequency testing frequency testing FRQM 16 bits FRQM 32 bits instruction instruction execution normally ON OFF coil suitable XC1 XC2 XC3 XC5 XCM condition models hardware software requirement requirement 2 Operands Specify the sampling pulse number or soft component s 16 bits BIN ID number Specify the frequency division choice s number 16 bits BIN Specify the pulse input port Dp specify the tested result s soft component s number 16 bits BIN 3 Suitable Soft Components gt lm gt m o ox ov or os xn p a TrrrTrrrrty tt s O E o OOO OOO s CCC n E FRQM K20 D100 K1 X003 ACTIONS FUNCTIONS AND S1 sampling pulse number the number to calculate the pulse frequency D tested result the unit is Hz S2 Frequency division choice It can be K1 or K2 When the frequency division is K1 the range is no less than 9Hz precision range 9 18KHz When the frequenc
216. truction Y2 D8237 Falling time of the origin return instruction Y3 a D8238 PULSE Rising time of the absolute relation position instruction D8239 Falling time of the origin return instruction i 2 E Ld D8236 Rising time of the absolute relation position instruction Y3 i SE_5 Appendix 1 special soft device list R ead W rite the Expansion D8315 D8316 D8315 Read the expansion s error type USS D8316 Write the expansion s error type Sequential Function Block D8630 D8730 a The current executing instruction of The current executing instruction of en The current executing instruction of D8730 BLOCK 100 The value is used when BLOCK is monitoring Error information of the E xpansions D8600 D 8627 Read the expansion s error times D8601 Read the expansion s error expansion s CRC parity error xpansion s address error expansion s accepted data length error expansion s accept buffer zone overflow xpansion s timeout error Expansion CRC parity error when PLC is accepting data unknown error somes TE Expansion 2 AIEEE a tee Appendix 1 special soft device list D8612 Read the expansion stimes D8613 Read the expansion s errors TAR 5 Expansion 4 D8614 write the expansion s error times D8615 write the expansion s error e D8624 Read the expansion stimes D8625 Read the expansion s error bas l ae Exp
217. ts BIN component s number leanne D2 Specify the remote register s start ID or soft 16bits BIN ae component s number 3 BIN BIN D Specify the register number or soft component s 16bits number Specify the local receive coil s start ID 3 Suitable soft components 52 gt ron p il CREGW K2 K20 K4 D20 Execute CREGW instruction when X0 changes from OFF to ON write the local D20 D23 to the remote station 2th coil s start ID K20 7 4 5 Communication Form of Internal Protocol Function Open close the internal protocol communication function Set the value in register FD8350 0 do not use CAN internal protocol communication 1 use CAN internal protocol communication CAN internal protocol communication is default to be closed Set the communication parameters See the setting methods with baud rate station number sending frequency etc in the below table Define the configure items Internal protocol communication is to communicate via setting the configure items The configure items include read the bit read the word write the bit write the word The configure form Step 1 add the four configure items number separately FD8360 read the bit items FD8361 read the word items FD8362 write the bit items FD8363 write the word items Step 2 set each configure item s communication object each item includes four paramete
218. ts to Hex I HEA S D n 4 8 7 High bit coding i ENCO S D n 4 8 9 Low bit coding ENCOL S DJ on 4 8 10 Float Point Operation ECMP Float compare E ECMP S1 S2 D 4 9 1 EZCP Float Zone compare i EZCP S1 S2 D1 D2 4 9 2 Float Add Helsi se o ass Float Subtract ESUB S1 S2 D 4 9 4 4 applied instructions Float Multiplication Float Square Root Sine Cosine Tangent Floating Sine Floating Cosine ATAN Floating Tangent Se ae ee e ete e O oO ON Nn Clock Operation Read RTC data Write RTC data 4 applied instructions 4 27 Reading M ethod of Applied Instructions In this manual the applied instructions are described in the following manner 1 Summary ADDITION ADD Execution Normally ON OFF Rising Falling Suitable XC1 XC2 XC3 XC5 XCM Hardware Software eea a 2 Operands Specify the augend data or register Specify the summand data or register Specify the register to store the sum 3 Suitable Soft Components gt gt m ox or opm an lo sa CCL Enn ft s CCC OCCO Op
219. tware er a oe 2 Operands D reses OOO O BIN 3 Suitable soft components 7 D O Description EADD D10 D20 D50 D11 D10 D21 D20 gt D51 D50 Binary Floating Binary Floating Binary Floating The floating point values stored in the source devices S1 and S2 are algebraically added and the result stored in the destination device D Ifa constant K or H used as source data the value is converted to floating point before the addition operation X1 m EADD D100 K1234 D110 K1234 D101 D100 DI11 D110 Binary converts to Floating Binary Floating Binary Floating The same device may be used as a source and as the destination If this is the case then on continuous operation of the EADD instruction the result of the previous operation will be used as a new source value and a new result calculated This will happen every program scan unless the pulse modifier or an interlock program is used 4 applied instructions 4 9 47 Float Sub E SUB 1 Summary Float Sub ESUB w de Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Software er a oe 2 Operands D reses OOOO BIN 3 Suitable soft components o O amp Description ESUB D10 D20 D50 D11 D10 L D21 D20 gt D51 D50 Binary Floating Binary Floating Binary Floating The floating point value of S2 is subtracted from the floating poin
220. uency is lower than 200Hz output 200Hz Pulse can only be output at YOOO or YOO With the changing of setting frequency in DO the output pulse frequency changes at YO Accumulate pulse number in register D8170 DWord Output M ode Sequential pulse output Sequential output pulse with the set frequency till stop outputvia the instruction 6 2 3 M ulti segment pulse control at relative position PL SR PLSR DPLSR instruction has two control modes Below we will instroduce one by one y Model segment uni directional pulse output PL SR IL Instruction Summary Generate certain pulse quantity segmented with the specified frequency and acceleration deceleration time Segmented uni directional pulse output PLSR 16 bits PLSR 32 bits DPLSR Instruction Instruction Execution Normally ON OFF coil Suitable XC2 XC3 XCS5 XCM Hardware Software 2 Operands S1 Specify the soft component s start ID of the segmented 16 bit 32 bit BIN pulse parameters Specify acceleration deceleration time or soft component s 16 bit 32 bit BIN ID Specify the pulse output port Bit 3L suitable soft components gt lm gt m lo ow fm ano o operands system S ystem FunctionsAnd A 16 bit instruction form 2 PLSR SY DO D100 YO RST MO
221. uitable XC2 XC3 XC5 XCM Hardware Software a a 2 Operands Soft element address need compare so Upper limit of compare data Ss Lower limit of compare data Do The compare result soft element address bit 3 Suitable soft components ppppEONEMALCHOC a e e tt s O E ian ee s tttttt Description 4 applied instructions Compare a float range with a float value E e X0 EZCP D10 D20 DO M3 M3 pa D1 D0 lt D11 D10 ON Binary Floating Binary Floating ME a D11 D10 lt D1 D0 D21 D20 ON Binary Floating Binary Floating Binary Floating LA 2 D1 D0 gt D21 D20 ON i Binary Floating Binary Floating The status of the destination device will be kept even if the EZCP instruction is deactivated The data of S1 is compared to the data of S2 The result is indicated by 3 bit devices specified with the head address entered as D Ifa constant K or H used as source data the value is converted to floating point before the addition operation XO H EZCP K10 K2800 D5 MO O K100 D6 D5 O K2800 gt MOU MI M2 Binary converts Binary Floating Binary converts to Floating to Floating Please set S1 lt S2 when S2 gt S1 see S2 as the same with S1 and compare them 4 applied instructions 4 9 3 Float Add EADD 1 Summary Float Add EADD ww id Execution Normally ON OFF Suitable XC2 XC3 XC5 XCM Hardware Sof
222. ulse number is 24000 3 rotates Low frequency pulse maximum frequency is 1OKHz total pulse number is 8000 1 rotates Ladder Program M8002 M10 l DMOV K100000 D200 DMOV K24000 D210 Kio Dea DMOV K10000 D200 DMOV K8000 D210 MI1 TO K20 M10 TO M8170 ALT M10 MO DPLSR D200 D210 D220 Instruction List LD M8002 initial positive pulse coil SET MO set MO ON LDF M10 M10 falling edge activate condition OR M8002 nitial data DMOV K100000 D200 move decimal data 100000 into DWORD D200 DMOV K24000 D210 move decimal data 24000 into DWORD D210 MOV K100 D220 move decimal data 100 into DWORD D220 LDP M10 M10 rising edge activate condition DMOV K10000 D200 move decimal data 10000 into DWORD D200 DMOV LD OUT LD RST SET LDF RST SET ALT LD DPLSR Explanation K8000 D210 M1 TO K20 TO M1 MO M8170 MO M1 M10 MO D200 D210 D220 YO number value is D220 is acceleration deceleration time send pulse via YO move decimal data 8000 into DWORD D210 M1 status activate condition 100ms timer TO time 2 seconds TO status activate condition reset M1 set MO M8170 falling edge activate condition reset MO set M1 M10 status NOT MO status activate condition value in D200 is frequency value in D210 is pulse When PLC changes from STOP to be RUN M8002 gets a scan cycle set the high frequency pulse parameters into D200 D210 set the accelerat
223. umbers H10 means hex number 10 It is used to set operand value of applied instruction 2 11 PROGRAM PRINCIPLE TagPl I Tag P I are used in branch division and interruption Tag for branch P is used in condition jump or subroutine s jump target Tag for interruption 1 is used to specify the e input interruption time interruption The tags P I are both in decimal form each coding principle is listed below SERIES NAME RANGE XC10 XC20 XC30 xcs XCM P P0 P9999 RANGE FOR EXTERNAL INTERRUPTION SERIES NAME Falling For time interruption 10000 10001 There are 10 channels time interruption XC2 I 10100 10101 the represent method is 40 49 represents interruption time the unit 10200 10201 is mm RAN P RANGE ss FOR EXTERNAL INTERRUPTI SERIESINAME I O 3 URMON l Falling For time interruption Input terminals a xr 1000 10001 Hee There are 10 channels time interruption the represent method is 140 49 r aes represents interruption time the ae oes be RANGE FOR EXTERNAL SERIESINAME I O ERRU ON Falling For time interruption Input terminals x2 10000 10001 a 5 000 10101 39 10200 10201 There are 10 channels time interruption X11 10300 10301 the represent method is 40 I49 xcs Xu 10300 10301 te rep represents interruption time the unit is mm i Falling For time interruption Input terminals RANGE FOR EXTERNAL
224. user can check the relative registers to judge the error 7 3 FREE FORMAT COMMUNICATION i Free format communication transfer data in the form of data block each block can transfer 128 bytes at most Meanwhile each block can set a start symbol and stop symbol or not set Communication M ode Start Symbol 1 byte Data Block max 128 bytes End Symbol 1 byte Port1 Port2 or Port3 can realize free format communication Under free format form FD8220 or FD8230 should set to be 255 FF Baud Rate 300bps 115 2Kbps Data Format Data Bit 7bits 8bits Parity Odd Even No Check Stop bit 1 bit 2 bits Start Symbol 1 bit Stop Symbol 1 bit User can set a start stop symbol after set the start stop symbol PLC will automatically add this start stop symbol when sending data remove this start stop symbol when receiving data Communication Format 8 bits 16 bits If choose 8 bits buffer format to communicate in the communication process the high bytes are invalid PLC only use the low bytes to send and receive data If choose 16 bits buffer format to communicate when PLC is sending data PLC will send low bytes before sending higher bytes E y Send data SEND IL Summary 7 3 2 Instruction form Write the local specified data to the specified station s specified ID Send data SEND 16 bits SEND 32 bits instruction instruction Execution Normally ON OFF rising Suitable XC2 XC3 XC5
225. ut M ode continuous or limited pulse number Limited pulse output Set pulse number When finish sending the set pulse number stop outputting automatically Items to Note If the control object is stepping servo motor we recommend users not use this instruction to avoid the motor losing synchronism PLSR is available 6 2 2 Variable Pulse Output PL SF IL Instruction Summary Instruction to generate continuous pulse in the form of variable frequency Variable Pulse Output PLSF 16 bits PLSF 32 bits DPLSF Execution Normally ON OFF coil Suitable XC2 XC3 XCS XCM condition ae oe a Hardware Software 2 Operands Specify the frequency or register ID 16 bits 32 bits BIN Do o Specify pulse output port bit 3 suitable soft components gt r ep m ox o m bs a p sot ff operands system S ystem Functions And Actions 16 bit instruction form al PLSF DO YO Frequency range 6Hz 400KHz when the set frequency is lower than 200Hz output 200Hz Pulse can only be output at YOOO or YOO With the changing of setting frequency in DO the output pulse frequency changes at YO Accumulate pulse number in register D8170 DWord 32 bit instruction form MO ae DO DPLSF YO Frequency range 6Hz 400KHz when the set freq
226. vision o Sw w y e y INC Increment VE y e y Data DEC decrement VE yy y Operation MEAN mean Syw VT WAND Wodan VE y WoR Wordor VV WXOR Wordexclusiveor CV VE YT VV CML Complement VT y NEG Negative VE y Data shift SHL Arithmeticshiftleft VE YT VV SHR Arithmetic shift right TV Appendix 2 instructions list LSL Logic shiftlet TT y LSR Logic shiftright TT VT vy ROL Rotation shiftlift VT VT y ROR Rotation shift right o VT VT vy SFTL Bitshiftleft VT y SETR Bitshiftright TV a me ee a i a ee il T Single word integer convert to double word integer 16 bits integer convert to float D FLTD 64 bits integer convert to float XI D L LJ m INT Float convert to integer Data BIN BCDconverttobinary convert BCD BinaryconverttoBCD ASCI HexconverttoASC HEX ASCIl_converttoHex DECO Coding o o o ENCO Highbitcoding LENCOL Low bit coding o v i a a va va Jaa yaa va vy va va TT Suit M odel eee allinnesan es lenirenae SuitModed _ __ _ Sort Mnemonic ea a XCM oe Ne Nd pe i EADD Floataddition TV ESUB Float subtraction So VT VV EMUL Float multiplication o VV Float ERIV Floatdivision VT VT Operation LESQR Floatsquareroot dT Vv VT OV SN Sine S S Ny Sw y COS Cosine o S wy w y TAN tangent Ct ww y ASIN
227. w interruption input between EI DI If interruption forbidden is not required please program only with EI program with DI is not required Every input interruption is equipped with special relay M8050 M8052 to disable interruption In the left program if use MO to set M8050 ON then disable the interruption input at channel 0 11 4 2 Time Interruption E FUNCTIONS AND ACTIONS In the condition of main program s execution cycle long if you need to handle a special program or during the sequential scanning a special program needs to be executed at every certain time time interruption function is required This function is not affected by PLC s scan cycle every Nm execute time interruption subroutine FEND 14010 M8000 INC DO IRET Time interruption is default in open status time interruption subroutine is similar with other interruption subroutine it should be written behind the main program starts with 140xx ends with IRET There are 10CH time interruptions The represent method is I40 49 means time interruption s time unit is ms For example 14010 means run one channel time interruption every 10ms Interruption Nr Interruption Interruption Description Forbidden Instruction M8057 M8058 wss o Je o 66s 399 interruption s time range me ooo from 1 to 99 unit is ms Ee Ce we pooo C mw ooo
228. y division is K2 the range no less than 300Hz precision range 300 400KHz In frequency testing if choose frequency division as K2 the frequency testing precision is higher than frequency division K1 When X000 is ON FRQM will test 20 pulse cycles from X003 every scan cycle Calculate the frequency s value and save into D100 Test repeatedly If the tested frequency s value is smaller than the test bound then return the test value as 0 T he pulse output to X number 14 16 24 32 48 60 T O X10 X60 X7 XC3 series 24 32 I O X1 X11 X12 48 60 VOL XC3 19AR E X4 X5 XC5 series 48 60 I O X1 X11 X12 11 3 Precise Time 1 Instruction List Read and stop precise time when execute precise time precise time STR 16 bits 32 bits STR execution edge activation suitable XCI XC2 XC3 XCS5 XCM hardware software 5 read precise time STRR 16 bits 3 bits STRR execution edge activation suitable XCI XC2 XC3 XCS5 XCM hardware V3 0e and above software stop precise time STRS 16 bits 32 bits STRS instruction E instruction execution edge activation suitable XCI XC2 XC3 XC5 XCM condition models hardware V3 0e and above software requirement requirements 2 Operands Operands Function Type Timer s Number bit Timer s Number b N it specify timer s value or soft component s ID 16 bits BIN number 3 Suitable Soft Components
229. ype of optical relays to connect PLC inside and input terminals The input relays have countless normally ON OFF contactors they can be used freely The input relays which are not connected with external devices can be used as fast internal relays Output Relay Y PLC s output terminals can be used to send signals to external loads Inside PLC output relay s external output contactors including relay contactors transistor s contactors connect with output terminals The output relays have countless normally ON OFF contactors they can be used freely The output relays which are not connected with external devices can be used as fast internal relays Execution Order XC series PLC CPU unit Program Dispose Area X puw ndu gary ogeu mduj gary ogeu mdmo A PUW mdmo yndyno eusis eux ea Sd jae p YN p 0 ge ja p go e Input Disposal Y Before PLC executing the program read every input terminal s ON OFF status of PLC to the image area Inthe 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 Y 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 ex

Download Pdf Manuals

image

Related Search

Related Contents

  Hitachi L100 User's Manual  Accéder à la documentation sur l`AFS    FederCIES Paris-Ile de France      User Manual – Preliminary Edition  Installation & Commissioning Handbook, User Guide  大和市グリーン購入推進指針  

Copyright © All rights reserved.
Failed to retrieve file