Home
X8 Instruction Manual
Contents
1. Math Instructions 10 13 DEG Radians to Degrees Instruction Type Output The DEG instruction converts the Source in radians to degrees and store the result in the Destination The formula applies Degree Source 180 Tt Parameter Data Table Address Mode Address Level S SIz gt BEC 5 eglzle g g g 9 E E RIS ss 35 t S la E E E E 38 2 EIE E 8 la sja 8 8S 8 5 a 8 S Sle Source Y Vi vi viv YY Vv Vv Y Destination y iy J N y RAD Degrees to Radians N4 19 OUT F5 0 54 gt 0 08726646 Instruction Type Output The RAD instruction converts the Source in degrees to radians and stores the result in the Destination The formula applies Radian Source X 11 180 Parameter Data Table Address Mode Address Level F sa 2 gt B EE ec z elle gee T d E 5158 8355 3g 2 gt Slal 213 2 2 2 2 OR E E 6 a3 5la s s 8 8 m 5 3 Source Y Viv viv viv Vv y Y Destination y ly JIN y X8 Instruction Set Reference Manual 10 14 Math Instructions LN Natural Log Instruction Type output Use the LN instruction to take the natural log of the value in the source and store the result in the destination Address Paramete
2. X8 Instruction Set Reference Manual 21 16 ASCII Instructions X8 Instruction Set Reference Manual Chapter 22 Communications Instructions Introduction This chapter describes the X8 Series PLC communications instructions This chapter organized as follows Topic Page Introduction 22 1 SVC Service Communication 22 2 MSG Message Communication 22 3 X8 Instruction Set Reference Manual 22 2 Communications Instructions SVC Service Communication X8 Instruction Set Reference Manual The following table shows communication instructions of the X8 Series PLC Instruction Description Interrupt the program scan to execute the service SVC communications part of the operating cycle The scan then resumes at the instruction following the SVC instruction MSG Transfer data from one device to another 0002h 4 Channel Select Instruction Type output Under normal PLC ladder program operation the controller processes communications once every time it scans the control program if the ladder scan is long it can cause problems in the overall system performance under the situation that communication is done in the shortest time The relatively time consuming serial communication also can cause problems in the PLC performance since the timer interrupt service routine will need a lot of time on communications To solve theses problems you can use t
3. Word Bit Description 120 DLL Diagnostic Counters Category Identifier Code always 2 121 Length 110 55 words to follow including format code 122 Counters Format Code Ethernet always 0 123 Low word RMON Rx Octets 124 High word RMON_R_OCTETS 125 Low word RMON Tx Octets 126 High word RMON_T_OCTETS 127 Low word RMON Rx Packets 128 High word RMON_R_PACKETS 129 Low word RMON Tx Packets 130 High word RMON_T_PACKETS 131 Low word Frames Transmitted with Excessive Collisions 132 High word IEEE T EXCOL 133 Low word Frames Received with CRC Error 134 High word IEEE R CRC 135 Low word Frames Received with Alignment Error 136 High word IEEE R ALIGN 137 Low word Count of frames not counted correctly 138 High word RMON T DROP 139 Low word Receive FIFO Overflow Count 140 High word IEEE_R_MACERR 141 Low word Frames transmitted with Tx FIFO Under run 142 High word IEEE_T_MACERR 143 Low word Frames Transmitted with Single Collision 144 High word IEEE_T_1COL 145 Low word Frames Transmitted with Multiple Collisions 146 High word IEEE T MCOL 147 Low word Frames Transmitted with Deferral Delay 148 High word IEEE T DEF 149 Low word Frames Transmitted with Late Collisions 150 High word IEEE T LCOL 151 Low word Frames Transmitted with Carrier Sense Errors 152 High word IEEE T CSERR X8 Instruction Set Reference Manual 3 26 SFR Speci
4. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 0000 No Filter 1 0001 1KHz 2 0010 500Hz 3 0011 100Hz 4 0100 60Hz 5 0101 50Hz 6 0110 10Hz Enable Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO 0 Disable 1 Enable X8 Instruction Set Reference Manual 1 20 1 0 Configuration X8 Instruction Set Reference Manual Temperature Unit Bit Position 15 14 13 12 11 10 9 0 1 0 F ene Open Circuit Bit Position 15 14 13 12 11 10 9 0 0 0 1 1 10 0 00 Up Scale 1 01 Down Scale 2 10 Last State 3 11 Zero 1 0 Configuration 1 21 Data Input Type Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 00 0 0 0 1 10 0 0 1 01 0 0 0 1 0 01 1 0 01 1 0 0 0 0 0 0 1 0 110 0 110 1 1 1 J0 0 0000 K Type 1 0001 J Type 2 0010 T Type 3 0011 B Type 4 0100 R Type 5 0101 S Type 6 0110 E Type 7 0111 N Type 8 1000 L Type 9 1001 U Type 10 1010 C Type 11 1011 D Type 12 1100 78 0 78 0mV 13 1101 32 7 32 7mV 14 1110 65 5 65 5mV X8 Instruction Set Reference Manual 1 22 1 0 Configuration 1 0 Addressing Addressing Detail Slot Word Bit pias
5. Chapter 10 Math Instructions Introduction In this chapter the X8 Series PLC math Instructions are described This chapter organized as follows Topic Page Introduction 10 1 Using the Math Instructions 0 2 Floating Point 0 4 ADD Add SUB Subtract 10 5 MUL Multiply DIV Divide 0 5 NEG Negate 0 6 CLR Clear 0 6 ABS Absolute Value 0 7 SCAL Scale with Slope 0 8 SCAP Scale with Parameters 10 8 SIN Sine 0 9 TAN Tangent 0 10 ASIN Arc Sine 10 11 ACOS Arc Cosine 0 11 ATAN Arc Tangent 0 12 RAD Degrees to Radians 10 13 LOG Base 10 Logarithm 0 14 POW X Power Y 0 15 CALC Calculate 0 15 X8 Instruction Set Reference Manual 10 2 Math Instructions Using the Math Instructions X8 Instruction Set Reference Manual The following table shows various math instructions and a specific arithmetic instructions supported from the X8 Series PLC use these output instructions to perform computations using an expression or a specific arithmetic instruction Instructions Descriptions ADD Add two values SUB Subtract two values MUL Multiply two values DIV Divide one value by another NEG Change the sign CLR Set all bits of a word to zero clearer ABS Find the absolute value of the source value SORT Find the square root of a value Root SCAL Scale a value SCAP Scale a
6. CALC EN ABS N4 0 N4 1 4 Expression N4 0 N4 1 SQRT 4 Instruction Type output The CALC instruction is function for user s convenience and performs arithmetic operations by a instruction through this when you use X8 Series PLC The following table shows the expressions Instructions Sybol Description AO dition SUB Subtraction MUL Multiplication X8 Instruction Set Reference Manual 10 16 Math Instructions X8 Instruction Set Reference Manual Instructions Sumbol Description DIV Division SORT SORT SquadoRoot SIN SIN Sine COS COS Cosine TAN TAN Tangent ASIN ASIN Arc Sine ACOS ACOS Arc Cosine ATAN ATAN Arc Tangent AND AND Logical And OR OR Logical Inclusive Or XOR XOR Logical Exclusive Or NOT NOT Logical Not NEG NEG Negative LN LN Natual Log LOG LOG Base 10 Log ABS ABS Absolute Value DEG DEG Radians to Degrees RAD RAD Degrees to Radians POW POW X to the Power Y BCD BCD BIN to BCD BIN BIN BCD to BIN If the expressions are input to the system the parenthesis are input automatically Math Instructions 10 17 X8 Instruction Set Reference Manual 10 18 Math Instructions X8 Instruction Set Reference Manual Instruction X8 Instruction Set Reference Manual Chapter 1 1 Converion Instructions In this chapter the X8 Series PLC conversion Instructions ar
7. HO 19 WL 8 MIERDA Source 1 Mask Destination X8 Instruction Set Reference Manual Chapter 14 Data Table Instructions Introduction This chapter describes data table Instructions of X8 Series PLC The chapter is organized as follows Topic Page Introduction 14 1 FILT Fill Table 14 2 COPT Copy Table 14 4 SWAP Swap Word 14 4 COPW Copy Word 14 5 X8 Instruction Set Reference Manual 14 2 Data Table Instructions The following table shows data table instructions Instructions Description FILT Fill Table un Move Source data to Destination data table COPT Copy Table After mask Source data copy to Destination data table SWAP Swap Word COPW Copy Word FILT Fill Table EN N12 0 4 IN OUT N12 1 255 4 Length Instruction Type output The FILT instruction fills Source 1 to Destination data table for a given length The above example shows that the instruction fills the N12 0 date with five soutce values from N12 1 N12 Integer 1 1 Destination 1 N12 2 Integer 1 Destination 2 N12 3 Integer 1 Destination 3 NI2 4 Integer 1 Destination 4 NI25 Integer 1 Destination 5 0 N12 6 Integer The data range for the source is Word 32 768 32 767 LONG WORD 2 147 483 648 2 147 483 647 EEE 754 32 bit The data length can range from Word 1 128 LONG WORD 1 64 3 Words 1 42 X8 Instruct
8. X8 Instruction Set Reference Manual 15 8 Shift and FIFO LIFO Instructions X8 Instruction Set Reference Manual Chapter 16 Sequencing Instructions Introduction This chapter describes sequencer instructions of the X8 Series PLC The chapter is organized as follows Topic Page Introduction 16 1 SEOIC Sequencer Input Compare 16 2 SEDO Sequencer Ouqput 16 4 SEOL Sequencer Load 16 5 X8 Instruction Set Reference Manual 16 2 Sequencing Instructions SEQIC Sequencer Input Compare X8 Instruction Set Reference Manual The following table shows Sequencer instructions of internal data Instruction Description Sequencer Input Compare SEOIC If rung state is true compare IN data and masked source at the data table If the data are equal it sets Found flag in the CR data table specified as CTRL Sequencer Output If rung state is true data table value in the POS and SEQO masked value are logically ANDed then copy the data to the destination data table If copy is done Done flag in the data table specified CTRL is set Sequencer Load If rung state is true load data table values specified IN to SEOL the data table specified by POS sequentially If copy is done for a givek length it sets DONE flag in the CR data table specified as CTRL SEQIC 3N19 10 Data Table N19 0 N19 20 CR17 0 4 10 4 Enable Done round Instruction Type output If rung state is true the SEQIC
9. Error 00h CR17 4 4 CTRL 04 POS Babe Done Error Instruction Type output The ARNL instruction gets number of characters include End Of Line in the buffer The result data gets from buffer is stored to POS or Position in the Control Data Table CR The parametets are CH serial port number 0 COM1 1 COM2 2 USB CTRL CR Control data table X8 Instruction Set Reference Manual 21 8 ASCII Instructions ARNC Number of Characters in Buffer X8 Instruction Set Reference Manual Driver configuration in the Channel Configuration Settings should be IMPORTANT set to ASCII BIN Following figure shows the Channel 1 configuration part If ARNL instruction is executed without Driver configuration Error 3 is generated Channel Configuration a como COM1 USB Ethemet General Channel SD Ca jection Not Protect l cing Selection 1 Enable gt s ervicing Selection 1 Enable z Edit Resource Ownership Timeout 60 AWA Append Char 1 13 AWA Append Char 2 10 la Line Control No Handshaking Protocol Control Echo dele xe 54 aa See Following ladder example reflects the CH 1 configuration B3 10 6 ERROR 00h Boo PP Done Ero Enable J Done Error Instruction Type output The ARNC instruction gets the number of the characters in butter ASCII Instructions 21 9 The result data gets from buffer is stored to POS or Positio
10. 4 6 Programming Instruction Overview TIP Do not allocate 4 096 or more in the Indirect Addressing method X8 Instruction Set Reference Manual Introduction X8 Instruction Set Reference Manual Chapter 5 Using the High Speed Counter and Programmable Limit Switch This chapter describes high speed counter and programmable limit switch This chapter organized as follows Topic 7 7 Page Introduction A High Speed Counter Overview 5 2 Programmable Limit Switch 5 2 High Speed Counter HSC Function Register 5 2 High Speed Counter SFR Elements 5 3 HSC SFR Sub Elements 5 5 HSCS Set High Speed Counter Value 5 28 HSCC Clear High Speed Counter Value 5 29 High Speed Counter HSC Data Table 5 30 5 2 Using the High Speed Counter and Programmable Limit Switch High Speed Counter Overview Programmable Limit Switch High Speed Counter HSC Function Register X8 Instruction Set Reference Manual All X8 Series PLC have six 100kHz high speed counters There are three main high Speed counters counter 0 1 2 and three sub high speed counters counter 3 4 5 Each main high speed counter has four dedicated inputs and each sub high speed counter has two dedicated inputs Depending on the high speed usage mode the sub high speed counter may not be able to use High speed counter specifications are as below 100 kHz operation High speed direct control of outputs 32 bit
11. X8 Instruction Set Reference Manual X8 Series PLC Memory and Data Table 2 6 Data Table Operand Binary B Timer TM Counter CT Contorl CR Integer N Floating Point F String ST ASCII A Long Word Message MG Programmable PS Limit Switch PID PD Routing Path RP Protecting Data Table During Download X8 Instruction Set Reference Manual Data Table No Words per Description Element 1 Binary typed Data Table for bit logic 3 Data Tablefor timer operation 3 Data Table for counter operation 3 The contorl data table is used for various purposes Error Length Position etc in the Ladder Program 1 The Integer typed Data Table for integer 2 Floating point typed Data Table for floating point logic processing 3 1535 42 String typed Data Table for string logic 1 ASCII typed Data Table for ASCII character logic 2 LONG INTEGER typed Data Table for 32 bit LONG INTEGER logic 25 Data Table for Message transmission The Programmable Limit Switch PLS File allows you to configure 6 the High Speed Counter to operate as a PLS or rotary cam switch See Programmable Limit Switch PLS File for information 23 Data Table for PID control Loop and instruction 20 Data Table contains communication data used to MSG insturction Data Table Download Protection When PLC ladder program and a user configured data must not change is stored in the
12. PTO 0 EnableStatus Data Format User Program Access B3 0 0 0 PTO Address The PTO 0 EnableStatus flag is basic condition that can be operate the PTO instruction in the rung program As the example above the PTO instruction is enabed when the rung preceding the EN the PTO input terminial is false X8 Instruction Set Reference Manual 6 10 Using High Speed Outputs Address PTO 0 OutputFrequency Address PTO 0 OperatingFrequency Status Address PTO 0 TotalOutputPulses Address PTO 0 OutputPulsesProduced X8 Instruction Set Reference Manual PTO 0 OutputFrequency Data Format User Program Access Long Word 0 100 000 Read Write The PTO 0 OutputFrequency variable defines the frequency of the PTO output during the run phase The maximum range is from 0 to 100 000Hz 100K H2 If the frequency is less than zero or greater than 100 000 generates a PTO error PTO 0 OperatingFrequencyStatus Data Format User Program Access Long Word 0 100 000 Read Only The PTO 0 OperatingFrequencyStatus has the pulse frequency data generated by the PTO The maximum range is from 0 to 100 000Hz 100K Hz This flag is used to check the current PTO operation frequency PTO 0 TotalOutputPulses Data Format User Program Access Long Word 0 2 147 483 647 Read Write The PTO 0 TotalOutputPulses flag defines the total number of pulses to be generated for the pulse profile accel run decel inclusive
13. Math Instructions 10 11 ASIN Arc Sine F5 0 OUT F5 1 0 08726646 4 gt 0 0873776 Instruction Type Output Use the ASN instruction to take the arc sine of a number and store the result in radians in the destination Address Levels for the operands involved in the ASIN can be ALL word ALL Long word ALL float or a combination These operands shall undergo a conversion to float The calculation of the source in float 1s then performed and the result is then cast to the data type of Destination Source is always greater than or equal to 1 and less than or equal to 1 Destination is always greater than or equal to TU 2 and less than or equal to TU 2 Address Parameter Data Table Address Mode Level C4 co S Sz gt a Eep o 2 o ojojo 5 z FERRPHHERHE 5 E SI9 g E S 2 9 2 3 o DAISIES EJE E lt clo s E E Sjal ja E E E amp E Su lu Source y IRRRRR v 5 Destination y iy y y ACOS Arc Cosine F5 0 OUT F5 1 gt 1 570796 Instruction Type Output Use the ACOS instruction to take the Arc Cosine of a number source in radians and store the result in radians in the destination Address Levels for the operands involved in the ACOS can be ALL word ALL Long word ALL float or a combination These operands shall undergo a conversion to float The calculation of the source in float is then per
14. PTO 0 OutputPulsesProduced Data Format User Program Access Long Word 0 2 147 483 647 Read Only Address PT0 0 AccelDecelPulsesIndependent Using High Speed Outputs 6 11 The PTO 0 OutputPulsesProduced monitors how many pulses have been generated by the PTO PT0 0 AccelDecelPulsesIndependent Data Format User Program Access The PTO 0 AccelDecelPulsesIndependent bit is used to define whether the acceleration and deceleration intervals will be the same or if each will have a unique value When this bit is set separate profiles are used and the LongInteger typed data table number should be entered instead that specify the number of pulse to the PTO 0 AccelDecelPulses However if the table number and element number are entered in the XGPC it is converted and entered automatically For example L12 0 L12 5 etc The element of the Long Integer data table to be used acceleration and deceleration profiles must be set to 4 In the figure below L12 data table is created and element is set to 4 There must be four long elements available in this data table Element 1 112 0 Acceleration Pulse Number Element 2 L12 1 Deceleration Pulse Number Elements 3 112 2 and 4 L12 3 System Reserved X8 Instruction Set Reference Manual 6 12 Using High Speed Outputs Address Ba XGPC Beta UNTITLED MLD e 5 Q9 Data Tables YR Cross Reference B vo Ba GJ Da Logging Gy Recipe C
15. o ooooooommmo o Memory Card Information Data Table ooooooomoo o o Functionality Type 7 MemoryCardPresent 7 WriteProtected 7 FaultOverride 7 LoadProgramCompare 7 LoadOnError 7 LoadAlways 7 ModeBehavior 8 Communications Status Data Table oooooooooo ooo General Communication Status Block 9 Diagnostic Counter Block of Communications Status Data Table 10 Active Node Table Block 20 Ethernet Communications Status Data Table Diagnostic Counter Block of Communications Status 24 Chapter 4 Programmin Instruction Overview A E 1 X8 SUICIDIO iio lado ed e 2 Instruction Descriptions ox series stars oi ren 3 Addressing Modest retia wens eyre NU aes 3 Immediate Addressing 3 Direct Addressing 4 Indirect Addregsinm daras eana A ewe ees 4 Specifies the data table through Indirect Addressing 5 Indirect Addressing of a File 5 sso unuunu 5 Chapter 5 Using the High Speed Counter and Programmable Limit Siwtch HEEOG CHO mio too a ss ad oda 1 High Speed Counter Ovetvetw esa ce 3r e ee s 2 Programmable Limit Wicho aaa 2 High Speed Counter HSC Function Register ooooooooo o 2 High Speed Counter SFR Blsments elec o o e 3 FISC SER S b Elements evo aa ey De E oer Rate Ed olet 5 LadderProgramNumbet ecetaie dti De Seb redis 5 UseritienaorEna blend do oeste He Apte M db cen eon 5 EuncaoaEnabled t in A As 5 OSA E Seius OA ii 6 Counting Enabled os atrio REP Re a PT
16. HSC Mode 3 Counter with External Direction Reset and Hold HSC Mode 3 Counter with External Direction Reset and Hold Example Input X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO CE Comments Terminals Bit Function Count Direction Reset Hold on off off on HSC Accumulator 1 Example 1 t 0 0 0 1 count on on off off on HSC Accumulator 1 Example 2 t 1 1 0 0 1 count on off on Hold accumulator Example 3 1 0 1 value on off off Hold accumulator Example 4 1 0 0 value on off on off Hold accumulator Example 5 milo 0 0 value Example 6 t ED accumulator Blank cells don t care f rising edge falling edge X8 Instruction Set Reference Manual 5 14 Using the High Speed Counter and Programmable Limit Switch HSC Mode 4 Two Input Counter up and down HSC Mode 4 Examples Input X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO CE Comments Terminals Bit Function Count Up Count Down Not Used Not Used on off on HSC Accumulator 1 Example1 f 1 y 0 1 count on off on HSC Accumulator 1 Example 2 1 y 0 1 count Example 3 al ea Blank cells don t care f rising edge falling edge Mode 5 Two Input Counter up and down wit
17. S Wo rd Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 Channel 5 Reserved J Ce Of A amp N Reserved Display Format Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO o jo 0 0 0 JO 0 1 o po 1 0 0 0000 Raw Data 1 0001 Left Align 2 0010 Voltage Value X8 Instruction Set Reference Manual 1 16 1 0 Configuration X8 Instruction Set Reference Manual Filter Frequency Format Bit Position 15 14 13 12 11 10 9 oj o Gl oj o o ojl O eic 0 0000 No Filter 1 0001 1 KHz 20010 500 Hz 3 0011 100 Hz 4 0100 60 Hz 5 0101 50 Hz 6 0110 10 Hz Enable Bit Position 15 14 13 12 11 10 9 oj O O O O ojl O 0 Disable 1 Enable Temperature Unit Bit Position 15 14 13 12 11 10 eo o_o Cm 1 0 Configuration 1 17 Open Circuit Bit Position 15 14 13 12 11 109 8 7 6 5 4 3 2 1 JO 0 0 0 1 1 0 1 1 0 00 Up Scale 1 01 Down Scale 2 10 Last State 3 11 Zero Data Input Type Bit Position 15 14 13 12 11 10 9 8 7 6 55 4 3 2 1 JO 0 0 0 0 o 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 J0 01 1 0 011 1 o jo 0 0 0 0 1 0 1 0 70 1 10 1 1 1 7
18. RTS Reserved Reserved Reserved Total Message Packets Sent Total Message Packets Received Undelivered Message Packets ENQuiry Packets Sent NAK Packets Received ENQuiry Packets Received Bad Message Packets Received and NAKed No Buffer Space Duplicate Message Packets Received gt co co Sm oy gt N 22 Reserved Channel Status NX Plus Master Counters Block COM 0 COM 1 USB Ethernet Xnet TCP Modbus TCP Ethernet IP SPC Master Address CS0 11 CS0 12 CS0 13 CS0 9 0 CS0 9 1 CS0 9 3 CS0 55 CS0 55 CS0 5 CS0 58 CS0 59 CS0 60 CS0 61 CS0 62 CS0 63 CS0 68 CS0 69 INTEGER INTEGER INTEGER INTEGER BIT BIT BIT INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER Total Message Packets Sent Total Message Packets Received Link Layer Error Count CTS RTS DCD Error Code 1 Counter Error Code 2 Counter Error Code 3 Counter Error Code 4 Counter Error Code 5 Counter Error Code 6 Counter Error Code Counter Error Code 8 Counter Non Standard Response Counter Last Error Code Last Device Reporting Error Clear SFR Special Function Register 3 13 Word Bit Description 6 Diagnostic Counters Category Identifier 7 Length always 30 8 Format Code always 1 9 0 CTS 1 RTS 2 Reserved
19. 1 41 count off off off on HSC Accumulator 1 Example 2 2 J T 0 0 0 1 count off off on Hold accumulator Example 3 i p 0 1 value on Hold accumulator Example 4 1 value on Hold accumulator Example 5 1 valid off on Hold accumulator Example 6 0 1 value Example 7 1 0 1 Count input A leads count input B 2 Count input B leads count input A Blank cells don t care f rising edge falling edge HSC Mode 8 Quadrature X4 Counter HSC Mode 8 Quadrature X4 Counter X1 0 0 1 HSCO A X1 0 0 1 HSCO B Value of CE Bit Accumulator and Counter Action A OFF TRUE Count Up Acc Value A ON TRUE Count Down Acc Value v OFF TRUE Count Down Acc Value v ON TRUE Count Up Acc Value OFF A TRUE Count Down Acc Value ON A TRUE Count Up Acc Value OFF v TRUE Count Up Acc Value ON v TRUE Count Down Acc Value OFF or ON OFF or ON X Hold Acc Value X X FALSE Hold Acc Value X8 Instruction Set Reference Manual Using the High Speed Counter and Programmable Limit Switch 5 17 HSC Mode 9 Quadrature X4 Counter with External Reset and Hold HSC Mode 9 Quadrature X4 Counter with External Reset and Hold Example X1 0 0 1 HSCO A X1 0 0 HSCO B X1 0 0 2 HSCO X1 0 0 3 HSCO Value of CE Bit Accumulator and Counter reset Hold Action A OFF X TRUE Count Up Acc Value A ON X TRUE Count Down Acc Value v OFF X TRUE Count Down Acc
20. MGn 0 Start Address MGn 0 ErrorCode Address MGn 0 ElapsedTlme X8 Instruction Set Reference Manual Done Data Format User Program Access The Done bit is set when the message is transmitted successfully The Done bit is cleared the next time the associated rung goes from false to true Start Data Format User Program Access The Start bit is set when the processor receives acknowledgment from the target device The Start bit is cleared when the Done and ErrorTimeout bit is set ErrorCode Data Format User Program Access When this bit is set the error code is displayed to check ElapsedTIme User Program Data Format Access This bit ise cleared when the message is enabled Address MGn 0 ErrorCount Address MGn 0 RoutiongPathDataTbINumber Address MGn 0 RoutiongPathDataTable Communications Instructions 22 11 ErrorCounter Data Format User Program Access This bit is used to calculate the number of errors If the error count exceeds the error count configuration value this message is not triggered Low Byte Error Counter Configuration High Byte Error Counter Status This feature also applied to the Countinuous Operation bit RoutiongPathDataTblNumber Data Format User Program Access This word displays the Routing Path Data Table Number specified by the MSG configuration RoutiongPathDataTable Data Format User Program Access This word displays
21. Master Password New no LES Sag operties peo General Passwords Ladder Passwords C Protection Enable Password Confirm Password Status go Ha se Even the X8 Series PLC password system supports more powerful threefold protection system that is consist of up to 12 characters include special characters if a password is lost or forgotten there is no way to bypass the password to recover the program The only option is to clear the PLC s memory When the password protected ladder is transferred to the SD card if each password does not match SD card cannot be backed up If password mismatch error occurred the SR2 5 9 register status is ON X8 Series PLC Memory and Data Table 2 11 Clearing the Controller Memory Allow Access Data Table through Internet Web Bl Data Table 82 STATUS Address Type Value SA258 Bool Main Processor Scan Times Math Debug Errors Protection Mem Card Descrip Meaning OFF Memory Card Data File Overwrite Protect Radix Structured If the system is locked out and lost password user should have to clear the internal PLC memoty and download a new ladder program To clear the momory 1 Enter 65257636 on XGPC PLC Property Dialog Box 2 When the Programming Software detects this number has been entered it asks if you want to clear the memory in the controller 3 If you reply yes to this pr
22. PITS Programmable Interrupt Timer Start N21 04 Time Instruction Type output You can set the XGPC internal configration of the Programmable Interrupt through the PTI section of the SER Address Address Parameter Data Table Mode Level PTO PWM CS Comms DLS DataLog Immediate Indirect LongWord Element 2_ Direct 2 Word SLOT 2 a INTD Interrupt Disable INTD EN Interrupt Bits Select X8 Instruction Set Reference Manual 19 14 Using Interrupts Instruction Type output The INTD instruction disables the user interrupts The following table shows Interrupt Bits Select value for disable each interrupts EIL1 interrupt is disabled in the above example Interrupt Bit hexadecimal Ho o o d Ell 1 1 2H Ell 2 2 4H EII 3 3 8H Ell 4 4 10H Ell 5 5 20H Ell 6 6 40H Ell 7 7 80H HSC 0 16 10000H HSC 1 17 20000H HSC 2 18 40000H HSC 3 19 80000H HSC 4 20 100000H HSC 5 21 200000H PIT Timer 31 80000000H If you need to control 2 or more interrupts at the same time add above values and input them to the Interrupt Bits Select value X8 Instruction Set Reference Manual INTE Interrupt Enable INTF Interrupt Flush Instruction Type output 1H 4 Interrupt Bits Select Using Interrupts 19 15 The INTE instruction enables the user interrupts The follo
23. SERENA SET CT 348 2 ALA Hi 451 862 T 82 31 685 9300 F 82 31 685 9500 RSD SERA ASEH Copyright 2012 RS Automation Co Ltd All rights reserved rsagbs rsautomation biz
24. tds z ote o a a o lsg D 2 29 e o SIATE S 5i g2 5 HSC Number y Source v M X8 Instruction Set Reference Manual 5 30 Using the High Speed Counter and Programmable Limit Switch High Speed Counter HSC Data Table X8 Instruction Set Reference Manual The Programmable Limit Switch function allows you to configure the HSC to operate as a rotary cam switch When the Programmable Limit Switch PS operation is enabled through the PlsTableNumber of HSC in the SFR the PS data table can be used for Limit Position and CAM position The HSC must be configured before the Programmable Limit Switch function operating PS Data Table Data files 91535 can be used for PS operations Each PS data table can be up to 1535 elements long Each element within a PS data table consumes 6 words of memoty Following is the PS data table internal configuration information screen and an example with 270 elements y Data Table Properties I General E Data Table Settings Data Table Type PS P mable Limit Swit Name Data Table Number T Description Scopes a Usage Scope Global Use Options Skip When Deleting Unused Memories No Protections Static Disable SD Card Restore Download Disable Data View via Web Site Disable S LL Elements Elemets of Data Table Number aa a cae Using
25. Description Following descriptions for elements related to Interrupt of SFR Itis described based on PIT and ach elemets are used in EII and HSC similarly LadderProgramNumber Description Data Format HSC Mode Function User Program Access PIT 0 LadderProgramNumber Word 6 1 535 Control Read Write The LadderProgramNumber control flag defines PIT interrupt service routine UserlnterruptEnabled Description Data Format HSC Mode Function User Program Access PIT O UserlnterruptEnabled Bit 00r 1 Control Read Write The UserInterruptEnabled bit is used to perform whether the LadderProgramNumber service routine allocated to PIT event X8 Instruction Set Reference Manual Using Interrupts 19 11 EventinterruptEnabled Description Data Format HSC Mode Function User Program Access PIT O EventInterruptEnabled Bit 00r 1 Control Read Write The EventInterruptEnabled control bit is used to execute whether the PIT function performs AutoStart Description Data Format HSC Mode Function User Program Access PIT 0 AutoStart Bit Dor1 Control Read Write The AutoStart control bit automatically sets the intterupt when the X8 Series PLC enters any exeruting mode SetPointMsec Description Data Format HSC Mode Function User Program Access PIT 0 SetPointMsec Word 0 65 535 Control Read Write The SetPointMsec control flag is set to PIT time section and control the timer interrupt interval
26. RS OEMax X8 Instruction Manual Reference Manual Catalog Number s X8 M14DDT X8 M16DDR X8 M32DDT 95 Automation Important User Information Solid state equipment has operational characteristics differing from those of electromechanical equipment Because of this difference and also because of the wide variety of uses for solid state equipment all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable In no event will RS Automation Co Ltd be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment The examples and diagrams in this manual are included solely for illustrative purposes Because of the many variables and requirements associated with any particular installation RS Automation Co Ltd cannot assume responsibility or liability for actual use based on the examples and diagrams No patent liability is assumed by RS Automation Co Ltd with respect to use of information circuits equipment or software described in this manual Reproduction of the contents of this manual in whole or in part without written permission of RS Automation Co Ltd is prohibited Throughout this manual when necessary we use notes to make you aware of safety considerations Identifies information about practices or circumstances that can cause an explosion in a hazardous environment wh
27. Write HSC 0 SetParameters Bit 0 9 Control Read Write X8 Instruction Set Reference Manual 5 4 Using the High Speed Counter and Programmable Limit Switch Address Data Format HSC Modes 1 Function User Program Access HSC 0 LowPresetMask Bit 2 9 Control Read Write HSC 0 HighPresetMask Bit 0 9 Control Read Write HSC 0 UnderflowMask Bit 2 9 Control Read Write HSC 0 OverflowMask Bit 0 9 Control Read Write HSC 0 Mode Word INT 0 9 Control Read Only HSC 0 PlsTableNumber Word INT 0 9 Control Read Write HSC 0 Accumulator long word 32 bit INT 0 9 Control Read Write HSC 0 HighPreset long word 32 bit INT 0 9 Control Read Write HSC 0 LowPreset long word 32 bit INT 2 9 Control Read Write HSC 0 Overflow long word 32 bit INT 0 9 Control Read Write HSC 0 Underflow long word 32 bit INT 2 9 Control Read Write HSC 0 OutputMaskBits Word 16 bit Binary 0 9 Control Read Only HSC 0 HighPresetOutput Word 16 bit Binary 0 9 Control Read Write HSC 0 LowPresetOutput Word 16 bit Binary 2 9 Control Read Write HSC 0 ErrorCode Word INT 0 9 Status Read Only HSC 0 UserlnterruptExecuting Bit 0 9 Status Read Only HSC 0 UserlnterruptLost Bit 0 9 Status Read Write HSC 0 UserlnterruptPending Bit 0 9 Status Read Only HSC 0 ErrorDetected Bit 0 9 Status Read Only HSC 0 LowPresetlnterrupt
28. exists the Control Variable output remains at its last value and the CVP CV term and integral term are both cleared when the rung is false When you click the Config in the PID instruction following screen is shown PID Setup a Address Type Value Meanin Description TimedOrPIT Bool 0 PIT AutoOrManual Bool 0 Auto Mode ForwardfieverseActing Bool 0 Reverse Acting OutputLimitingEnabled Bool 0 Output Limit Disable Output Limiting Enabled CV GainRangeSelection Bool 0 Value 0 1 SetpointScalingEnabled Bool 0 Scale Disabled LoopUpdates TooFast Bool 0 Slow update ComputeRateErrorTerm Bool 0 Disabled ProcessValuelnDeadband Bool 0 Deadband Disabled Process Value PV In Deadband UpperOutputLimit Bool 0 Output gt Upper Output Limit LowerOutputLimit Bool 0 Output lt Lower Output Limit SetpointOutOfRange Bool 0 ProcessOutOfange Bool 0 PidCompletedThisScan Bool 0 PidinstrucionEnabled Bool 0 Disabled Kc Integer 0 00 Ti integer 0 00 Td Integer 0 0 00 FeedForwardBias Integer 0 ZeroCrossingDeadband Integer 0 LoopUpdate Time Imeger 0 00 IntegralSum Log 0 OldSetpointValue Integer 0 SetpointScaled Integer 0 MaximumSetpointLimit Integer 0 Max value MinimumSetpointLima Integer 0 Min value ProcessVariableScaled Integer 0 y ControlVariablePercent Integer 0 X ControlVariableHighLimit Integer 0 X ControlVariableLowtimit Integer 0 X ScaledError Integer 0 EnorCode Integer 0 OK Help The following table sh
29. i 90 Degree CCW Phase A Phase B al l I i 90 Degree Counting every falling edge in phase A and check signal level in phase B to check direction of rotation X4 High Speed Counter Performance Phase A Phase B E I 90 Degree CCW Phase A 4 Phase B A P 90 Degree Count at falling edge and rising edge in Phase A and Phase B Check Phase B level at rising falling edge in Phase A and check Phase A in the rising edge and falling edge in Phase B to know the direction of rotation External Reset and Hold mode 4b 2 Using the High Speed Counter and Programmable Limit Switch 5 11 1 0 0 0 1 0 0 1 1 0 0 2 1 0 0 3 1 0 0 4 1 0 0 5 1 0 0 6 1 0 0 7 1 0 0 8 1 0 0 9 1 0 0 10 1 0 0 11 HSC 0 A C B D Reset HSC 1 A C B D Reset Hold HSC 2 A C B D Reset Hold HSC 3 A C B D HSC 4 A C B D HSC 5 A C B D HSC Function Operating Modes amp Input Assignments Modes of Operation Input0 HSC 0 Input 1 HSC 0 Input 2 HSC 0 Input 3 HSC 0 Mode Value in Input4 HSC 1 Input 5 HSC 1 Input 6 HSC 1 Input 7 HSC 1 User Program Input 8 HSC 2 Input 9 HSC 2 Input 10 HSC 2 Input 11 HSC 2 Input 2 HSC 3 Input 3 HSC 3 Input 6 HSC 4 Input 7 HSC 4 Input 10 HSC 5 Input 11 HSC 5 Counter with Internal Count Not Used Not Used Not Used 0 Direction mode 1aJ 1 Counter with Intern
30. 3 Reserved 4 15 Reserved 10 Total Message Packets Sent 11 Total Message Packets Received 12 Undelivered Message Packets 13 ENQuiry Packets Sent 14 NAK Packets Received 15 ENQuiry Packets Received 16 Bad Message Packets Received and NAKed 17 No Buffer Space 18 Duplicate Message Packets Received 19 22 Reserved DF1 Full duplex slave Diagnostic Counters Block Bit Description Diagnostic Counters Category Identifier Length always 30 Format Code always 0 CTS RTC Reserved Reserved 4 15 Reserved Total Message Packets Sent Total Message Packets Received Undelivered Message Packets ENQuiry Packets Sent NAK Packets Received ENQuiry Packets Received gt gt gt gt gt o a A w N Bad Message Packets Received and NAKed X8 Instruction Set Reference Manual 3 14 X8 Instruction Set Reference Manual SFR Special Function Register Word Bit Description 17 No Buffer Space 18 Duplicate Message Packets Received 19 22 Reserved COM0 com 1 USB Ethemet Xnet TCP Modbus TCP Ethernet PP DF1 Full Duplex INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER BIT BIT BIT Description Total Message Packets Sent Total Message Packets Received Undelivered Message Packets ENOs Sent Received NAK ENOs Received Bad Packet Sent NAK Lack of Mem
31. Access This bit is set when the accumulator value is greater than 2 147 483 647 CT 10 0 Done Data Format User Program Access This bit is set when the accumulator value is reach to Preset value CT 10 0 CountDown Data Format User Program Access This bit is set when counter is down by the CTD instruction Address CT 10 0 CountUp Address CT 10 0 Preset Address CT 10 0 Accumulator Timer and Counter Instructions 8 11 CT 10 0 CountUp Data Format User Program Access This bit is set when counter is down by the CTD instruction CT 10 0 Preset Data Format User Program Access LongWord 32768 32767 Read Write This is a counter preset Done flag is set when the accumulator value is reach to Preset value This bit is set when counter is down by the CTD instruction CT 10 0 Accumulator Data Format User Program Access LongWord 32768 32767 Read Write This flag contains currrent counter value when the rung conditions go false to true the accumulator value is increasd in the CTU instruction and decreased in the CTD instruction The accumulator is retentive when the rung conditions is false and on power cycles Accumulator value can be reset only by the RSTA instruction X8 Instruction Set Reference Manual 8 12 Timer and Counter Instructions Address Address Parameter Data Table Mode Level S tr gt ela 2 E o e a S oOlIsg i
32. BHI MMI CS DLS EGR Edge Risng B3 0 0 EGR Instruction Type input The EGR instruction is a retentive input instruction that triggers an event to occur one time After the false to true rung transition when the processor scans the rung the EGR instruction remains true for one program scan and stores the TRUE value to the parameter Following table shows change of the data table of storage bit according to change of the rung state Rung Transition Storage Bit Rung State after Execution FALSE to TRUE i p ur U Storage bit is SET 1 TRUE TRUE to TRUE Storage bit remains SET 1 FALSE TRUE to TRUE s FALSE to FALSE Storage bit is CLEARD 0 FALSE TIP The EGR instruction of the X8 Series PLC is functionally the same as the ONSR ONe Shot Rising instruction X8 Instruction Set Reference Manual 1 6 Relay Type Bit Instructions Parameter Data Table Address Address Mode Level Ss S eg 82 E to zem mm O o Z 5S la 8 lell alalel2ls 5 8 85 E E ja la lt lao S u i JA fal Ty ONSR One Shot Rising ONSF One Shot Falling EN Storage Bit EN ENO Output Bit Y0 0 0 3 ENO B3 0 9 Storage Bit Output Bit Y0 0 0 4 Instruction Type input Use the ONSR and ONSF instructions to trigger an event to occur one time These instructions trigger an event based on a chan
33. CSO Status for Channel 8 Ladder Program 8 2 Base Hardware Ladder Program BHI Information 9 511 9 511 Communications CSO Status for Channel 0 Communications CS2 Status for Channel 2 DLS Data Log Status ES Ethernet Status For Channel 1 User Memory User memory is the amount of storage of X8 Series PLC available to store user defiend data such as ladder program data tables and I O configuration User Memory consist of the system status data I O image files and all other user creatable data tables A word is defined as a unit of memory in the PLC and its size is 16 words X8 Instruction Set Reference Manual 2 4 X8 Series PLC Memory and Data Table Memory consumption is allocated as follows e INTEGER N 1 Word e LONG INTEGER L 2 Words e TIMER TM 3 Words Each input and output memory consumes 3 words due to the overhead TIP associated with 1 0 forcing e For example memory consumption in Ladder Program is allocated as follows NOCC instruction which has 1 operand consumes 1 word EQU instruction which has 2 operands consumes 2 words ADD instruction which has 3 operands consumes 3 words e SER Special Function Register does not comsume user memory TIP Although the PLC allows up to 256 elements in the Data Table it may not actually be possible to create data table 0 1535 with 256 elements due to 64KW limited user memory size in the PLC X8 Series PLC User Memory The X
34. Compare for Greater Than or Equal EOM Masked Compare for Equal Compare two input values after Mask and AND Compare whether one value is within the range of two LIM Limit Test ather valies Parameter Data Table Address Aadress Mode Level S 5 la 2 2 5 8 2 se El le 3 8 z S AISZIlElLZ s BE E G6la a lt S S a Source A y y y y UE IRE Source B y y UE UE E Only use the High Speed Counter Accumulator for Source A in GT LT GE and LE instructions Using the Compare Most of the compare instructions use two parameters Source A and Source B EQM and LIM have an additional parameter Both sources cannot be Instructions constant values But only one source of two can be constant value The valid data ranges for these instructions are Word 16Bit 0 32 767 Long Word 32Bit 0 2 147 483 647 When at least one of the operands is a Floating Data Point value For EQ GE GT LE and LT If Source is not a number then rung state changes to false X8 Instruction Set Reference Manual Compare Instructions 9 3 For NE Even the Source A and B is number rung state remains true EQ Compare for Equal NE Compare for Not Equal N4 0 14 N4 1 2 J N4 2 34 N4 3 44 Instruction Type input The EQ instruction is used to compare whether one value is equal to a second value The NE
35. High preset reached Overflow condition Underflow condition FunctionEnabled Address Data Format HSC Mode Function User Program Access HSC 0 FunctionEnabled Bit 0 9 Control Read Write X8 Instruction Set Reference Manual 5 6 Using the High Speed Counter and Programmable Limit Switch The FunctionEnabled is a status control bit that defines when the HSC interrupt is enabled and that interrupts generated by the HSC are processed based on their priority This bit can be controlled by the user ladder program or is automatically set by the AutoStart bit is enabled AutoStart Address Data Format HSC Mode Function User Program Access HSC D AutoStart Bit 0 9 Control Read Only The AutoStart is stored as part of the user program and is used when the HSC function is automatically started if the X8 Series PLC is in run or test mode The CountingEnabled bit must also be set to enable the HSC functions CountingEnabled Address Data Format HSC Mode Function User Program Access HSC 0 CountingEnabled Bit 0 9 Control Read Write The Counting Enabled control bit is used to enable or disable the High Speed Counter When this bit is changed from set 1 to clear 0 counting is If this bit is disabled while the counter is running the accumulated value is held if the bit is then set counting resumes This bit can be controlled by the user program and retains its value through a power cycle SetParamters Descript
36. PWM function complete execution 4 The PWM instruction is IDLE Because the PTO PWM and HSC instructions are actually being executed by a parallel system the status bits and other information are updated each time the PWM instruction is scanned while it is running If the scan time is longer it can be problem of the PTO and PWM data update it can be controlled by the STI Selectable Timed Interrupt that can be set in SFR PTO PWM HSC El Address LadderProgramNumber Integer UserinterruptEnable Bool TimedinterruptEnabled Bool AutoStart Bool SetPointMsec Integer Set Point Msec between interrupts ErrorCode Integer UserinterruptExecuting Bool UserinterruptLost Bool UserlnterruptPending Boo ErrorDetected Bool The PWM output ports supported by the X8 Series PLC is allocated to have Y0 0 2 Y0 0 3 and Y0 0 4 The element is shown below EE Special Function Registers faena PTO PWM Hsc sm JEI RTC MCI BH cso CS CS2 ES3 Address Type Value Meaning Description SPEM E Output Integer ProfileParameterSelect Bool Duty Cycle EnableHardStop Bool OFF OutputFrequency Long Output Frequency Hz F DutyCycle Integer Duty Cycle e 9 123 12 3 l AccelDecelDelay Integer Accel Decel Delay 10ms l ErrorCode Integer DeceleratingStatus Bool RunStatus Bool AcceleratingStatus Bool IdleStatus Bool ErrorDetectedStatus Bool NormalOperationS
37. The following figure shows HSC interrupts in the box among the SFR of the high speed counter The usage of the HSC interrupts are similar with EII E Special Function Registers 3 50 PTO PWM HSC piT jen ATC MCI BH cso CS CS2 ES3 T z Address HSC y 1 0 0 4 CountingEnabled Bool 0 OFF SetParameters Bool 0 OFF LowPresetMask Bool 1 ON HighPresetMask Bool 1 ON UnderflowMask Bool 1 ON OverfiowMask Bool 1 ON Mode Integer 0 Up Counter PisTableNumber Integer 0 Accumulator Long 0 HighPreset Long 2147483647 LowPreset Long 2147483648 Overflow Long 2147483647 E Underflow Long 2147483548 OutputMaskBits Integer 0 HighPresetOutput Integer 0 LowPresetOutput Integer 0 TOE D UserinterruptExecuting 0 UserinterruptLost 0 UserinterruptPending 0 ErrorDetected 0 LowPresetnterrupt Bool 0 HighPresetinterrupt Bool 0 OFF Underflowinterrupt Boot 0 OFF Overtiowinterrupt Bool 0 OFF LowPreseteached Bool 0 OFF HighPresetReached Bool 0 OFF CountDirection Bool 0 Count Down Underflow Bool 72147483648 Overflow Bool 2147483647 ModeDone Bool 0 OFF CountDown Bool 0 OFF CountUp Boot 0 OFF Each elements are used to EI HSC and PTI similary Please refer to EI and PIT elements X8 Instruction Set Reference Manual 19 10 Using Interrupts Programmable Interrupt Timer PIT Interrupt 6B Special Function Registers Leo E PTO PWM HSC PIT Jem ATC MCI BHI cso CS CS2 ES3 Value Meaning
38. Using the Compare Instructions 4 oveud bes piove Rae dos 2 EQ Compare for Equal NE Compare for Not Equal arcoiris 3 GT Compare for Greater Than LT Compare fot Less Than dd oe De ek ed 4 GE Compare for Greater Than or Equal to LE COmpare for Less than or Equal to iii es 5 BOM Mask Compare for Equal ion ee cete don 6 LIM AE Testees is A A E 7 Chapter 10 Math Instructions a A op Ed da ees er ES Ue PD dad 1 Using the Math SICA sooo erus aa REPLIES ROC V RIPE E 2 Math Arithmetic Flag eom oo e ett tated wd oO tera ett Na Caen Dos 3 A Dr er eed ce nea E A stes tA a 4 ADD Add SUB SUDO dl ede ot d Ande s ma oras 5 MUL Multiply DIY Dinide DT 5 NEG NeBAMES a pires AER IEEE ARAS 6 CERS Glet IA IS ARA ASS 6 ABS sAbsol te Valle ot ou e DAA REOR ACE C 6 SC ATL cale With Slope os td tt os Plo ke pibe i 7 SCAP Seale with Parameters ds UC RE RR e 8 O paradis eM oov on LM Mert ug 9 TAN Tangent epr na E A A 10 ASINEATE Sic rica Seales iir oro inte aS 11 ACOS S Are CONE dada eed Ps e ER pet 11 ATAN E Are Tangent octo t DA RO Re O DIS A EA 12 DEG Radians t Detecta 13 RAD Degrees to Radisson 13 EN Natt ra EOD cM A M 14 LOG Base 10 Lost e ROME e e ca 14 POW X Power Yoc Leste dizi aia io oio ETA gioges 15 CALC Calculator pL beo Cu aee qe as 15 AS A E que PARU Me ed p ds 17 Chapter 11 Conversion Instructions itu UMP RU E 1 DECD Decode 4 to T 0 10 ti Crux ob ROIG e De e ee ERA 2 BNGO Encode 1 0 NG WOM st ii
39. enabled This bit indicates the duplex mode of the Ethernet port 4 Auto Negotiate Status This bit is set 1 when the Auto Negotiation function is enabled 5 Forced Speed Mode Status This bit set 1 when the Auto Negotiation function is disabled and the Ethernet port speed is 100Mbps SFR Special Function Register 3 23 General Channel Status Blcok Word Bit Description 5 6 Forced Duplex Mode Status This bit set 1 when the Auto Negotiation function is disabled and the Ethernet port s duplex mode is Full Duplex 6 Forced Duplex Mode Status This bit set 1 when the Auto Negotiation function is disabled and the Ethernet port s duplex mode is Full Duplex 7 System Reserved Always 0 8 BOOTP Valid Flag Default 0 False This bit is set 1 when the appropriate BOOTP response has been received 9 DHCP Valid Flag Default 0 False This bit is set 1 when the appropriate DHCP response has been received 10 BOOTP Status Flag This bit is set 1 if BOOTP is selected as IP Address configuration method 11 DHCP Status Flag This bit is set 1 if DHCP is selected as IP Address configuration method 6 8 Ethernet Hardware Address 6 byte string A unique Ethernet Hardware Address information 9 10 IP Address in network byte order Specified IP Address information is stored 1 12 Subnet Mask in network byte order Specified Subnet mask information is entered 3 14 Gateway Address in netw
40. occurred interrupt type For example in the following figures when an interrupt occurs in the LadderProgramNumber if you input the subroutine number to perform it performs following defied subroutines Using Interrupts 19 3 Example 1 PIT interrupt service routine configuration window a ola Ta PTO PWM HSC PIT Jen ATC MCI BH cso CS CS2 ES3 Value Meaning 1 p Set Point Msec between UserinterruptE xecuting UserinterruptLost UserinterruptPending ErrorDetected Example 2 EIT External Input Interrupt interrupt service routine configuration window ATC MC em cso CS CS2 ES3 Value Meaning p EventinterruptEnabled ori E AutoStart OFF EdgeSelect Rising Edge InputSelect 3 EmorCode UserinterruptExecuting UserinteruptLost UserinterruptPending L ErrorDetected Bent mesa Example 3 HSC interrupt service routine configuration window Bl Special Function Registers eloa PTO PWM HSC piT Jen ATC MCI BM cso CS cs2 Es3 Function nabled Bool 0 OFF y AutoStart Bool 0 OFF CountingEnabled Bool 0 OFF SetParameters Bool 0 OFF LowPresetMask Bool 1 ON HighProseMagk Bool 1 ON UnderflowMashk Bool 1 ON OverfiowMask Bool 1 ON Mode Integer 0 Up Counter Pls TableNumber Integer 0 Accumulator Long 0 HighPreset Long 2147483647 gt LowPreset Long 2147483548 Overflow Long 2141483847
41. otherwise it remains in last state If Sources are constants values the data range is Word 32 768 32 767 Long Word 2 147 483 648 2 147 483 647 Move Instructions 13 3 Add Add Parameter Data Table Mic Iove Ss E JEI Ele E CN 8 ls S g 5 E E la s5i aj s S Source 1 y NI JININ ly Destination y A vw JAN MOVM Masked Move N4 41 255 4 5555h 21845 4 Instruction Type output The MOVM instruction is used to move data from the source to the destination allowing portions of the destination to be masked The Source 1 and 2 and destination data format should be same Source 1 OOFFH 0000 0000 1111 1111 MASK 5555H 20101 0101 0101 0101 Destination 0000 0000 0101 0101 0055H 85 With this Bit The Controller SR2 0 0 Carry Flag always resets SR2 0 1 Overflow Flag always resets SR2 0 2 Zero Flag sets if result it zero otherwise resets SR2 0 3 Sign Flag sets if result is negative otherwise resets The data range is Word 32 768 32 767 Long Word 2 147 483 648 2 147 483 647 X8 Instruction Set Reference Manual Move Instructions 13 4 Address Level Juaua pobuo7 PION ig 398Jpu yang 9Je1pauuu So7e1e0 510 Data Table Parameter SUlUl02 S 113 ILS WMd Old OSH OLY
42. selected for that input 1 0 Configuration 1 31 Controller X8 Series PLC OV 0 11 Enable this feature using XGPC 1 Open the Controller folder on the left and click the Embedded I O configuration folder 2 Double click the base module in the Slot 0 3 If screen appears as shown in the figure below selects the corresponding bit to activation and then select rising Rising Edge or falling Falling Edge Module 0 X8 BASE X8 Modular Series A 5 us Embedded General Configuration Embedded IO Configuration Input Filter Input Latch Enable Inputs 0 1 default r T eS Inputs 2 3 default T r Bt2 Asma z Inputs 4 5 default r Bt3 Rising Inputs 6 default Bit 4 Rising y Bi Rising Y Inputs 8 9 default E Bk 5 r Bit6 amp Fisng z Inputs 10 11 defaut r Bit 7 Rising z Inputs 12 13 default C Bk8 hising I r er9 sns z Inputs 14 15 default v r Bitio Rising z Inputs 16 to xxxx default Bhn Rising zj m Biti2 Rising z m Bti3 Rising z m ent4 Aim m Btis Wiss gt za as 4 B A sev When an external signal is detected at Rising Edge the PLC stores this event In general at the next input scan this signal is turned on and remains on for the next controller scan X8 Instruction Set Reference
43. since the TOF timer is timing B3 0 14 If the rung condition is false the TOF timer is timing After the timer is stop the Enable and Done bits are all cleared B3 0 14 TM9 2 4 Timer 10 L Enable Done L Enable Bl Done X8 Instruction Set Reference Manual Timer and Counter Instructions 8 7 TOR Retentive Timer On Delay CLKR Read High Speed Clock Time used in a TOF instruction If the TOF accumulated value and status bits are reset unpredictable machine operation may occur Because the RSTA instruction resets the accumulated value and ATTENTION internal flags do not use the RES instruction to reset a timer address TM9 3 Timer ACC po 1 0 4 BASE L Enable _ Done Instruction Type output Use the TOR instruction to delay turning on an output The TOR begins to count time base intervals when the rung conditions become true As long as the rung conditions remain true the timer increments its accumulator until the preset value is reached The TOR retains the accumulated value when the following occur rung conditions become false you change the PLC mode from run or test to program a fault occurs When you return the PLC to the RUN or TEST mode or the rung conditions go true timing continues from the retained accumulated value TOR timers are retained through power cycles and mode changes Instruction Type output The CLER instruction is provides a high performance times
44. x not used always at a 0 or OFF state User Scale Data type can be specified using the SCALE instruction X8 Instruction Set Reference Manual 1 0 Configuration 1 11 Data Configuration of Control Area Display Format Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO o jo 0 0 o jo 0 o po 1 0 010 0 1 0 0 o 1 0 0 0000 Raw Data 1 0001 Left Align 2 0010 Voltage Value 3 0011 Percent Value 4 0100 Scaled for PID 5 0101 User Scale Filter Frequency Format Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 JO 0 o JO JO 0 JO J1 J0 0 0 1 0 1 JO J0 0 1 0 0 0000 No Filter 1 0001 1 KHz 2 0010 500 Hz 3 0011 100 Hz 4 0100 50 Hz 5 0101 10 Hz Reserved Bit Position 15 14 13 12 11 109 8 7 6 5 4 3 2 1 JO Reserved X8 Instruction Set Reference Manual 1 12 1 0 Configuration Reserved for future use Input Data Type Selection Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 JO JO 0 0 0 0 0 1 0 0 0 1 0 1 JO 0 0 1 0 0 0000 Voltage Input 0 5V 1 0001 Voltage Input 0 10V 2 0010 Voltage Input 5 5V 3 0011 Voltage Input 10 10V 4 0100 Current Input 0 20mA 5 0101 Current Input 4 20mA X8 A04 Input Image X8 AO4 module is the high end expantion
45. 0000 0000 0111 0S7 Id Data Table N20 17 0000 0000 0000 1000 POS8 a Data Table N20 0000 0000 0000 1001 POSE Data Table N20 19 0000 0000 0000 1010 0S1 0 8 Parameter Data Table Address Address Mode Level gt 5 eg 2 E 2 clc PE 6 z S 82 g E g amp B T e i c E 8HIEI amp SI S Ss Data Table JIN JIN MASK IRERE CTRL 4 y 4 LENGTH y POS y OUT JIN X8 Instruction Set Reference Manual Sequencing Instructions 16 5 SEQL Sequencer Load SEQL EN N20 20 Data Table N20 31 4 IN CR17 24 CTRL Length POS C Enable Done Instruction Type output If the rung state is true the SEQL instruction copies the data table values specified IN to the data table specified by POS sequentially When copy is done for a given length the DONE flag in the CR data table specified CTRL is set Data table and Masked source data type must be same That is IMPORTANT IMPORTANT if the data table is an integer N Mask and IN must be integer N IN N20 31 0000 0000 0000 0011 Data Table N20 20 0000 0000 0000 0001 POSI r D 4 Data Table N20 21 0000 0000 0000 0010 POS2 a Fi Data Table N20 22 0000 0000 0000 0011 POS3 K Data Table N20 23 POS4 Data Table N20 24 POS5 9 Data Table N20 25 POS6 Data Table N20 26 POS7 Data Table N20 27 POS8 Data TableN2028 POS9 Data Ta
46. Bit 4 y X8 Instruction Set Reference Manual 1 8 Relay Type Bit Instructions X8 Instruction Set Reference Manual Introduction X8 Instruction Set Reference Manual Timer and Counter Instructions Chapter 8 In this chapter the X8 Series PLC Timer and Counter Instructions are described This chapter organized as follows Topic Page Introduction 8 1 Timer Instructions Overview 8 2 TON Timer On Delay 8 5 TOF Timer Off Delay 8 5 TOR Retentive Timer On Delay 8 7 CLKR Read High Speed Clock Time 8 7 CLKC Compute Time Difference 8 8 How Counters Work 8 9 CTU Count Up CTD Count Down 8 12 RSTA Reset Accumulator 8 13 8 2 Timer and Counter Instructions Timers and counters are output instructions that let you control operations based on time The following Timer and Counter Instructions are described in this chapter Instruction Description TON Timer ON TOF Timer OFF TONR Retentive Timer CTU Count up CTD Count down RSTA Accumulator Initialization Reset Timer Instructions To use timer the TM instruction for timer data table must be used and is used to configure and monitoring Overview i3 8 Timer data table has three sub elements for timer controlling These sub elements ate Timer Control and Status Preset This is the value that the timer must reach before the timer tim
47. Boot OFF JogContinvous Boot OFF EnableHardStop Bool Jog Frequency P BPTO I BPTO2 m Integer 0 Boot 0 DeceleratngStatus Boot 0 RunStatus Boot 0 OFF AcceleratingStatus Bool 0 OFF IdieStahus Boot 1 ON ErroeDetectegStatus Boot 0 OFF NormalOperationStatus Boot 0 OFF JogPulseStatus Boot 0 OFF JogCorfinvousStatus Bool 0 OFF EnableStatus Boo 0 OFF Enable Status do OperationFrequencyStah Long 0 Operating Freque OutputPulsesProduced Long 0 1 1 The figure above is four parameters of the SFR B3 0 0 0 4 PTO Address The figure above shows simple PTO operating program based on the SFR configuration When B3 0 0 is set the PTO operates based on the SFR value This is an example that when the acceleration and deceleration pulse is set to 500 total 10 000 of pulse is produced at a rate of 500 Hz When B3 0 0 bit is set the AcceleratingStatsu flag shows the PTO status is set and current frequency is displayed in the OperationFrequencyStatus Currently generated pulse numbers are displayed in the OutpulPulsesProduced During the pulse is output based on the pulse number defined in the AccelDecelPulses the OperationFrequencyStatus frequency reaches to the OutputFrequency When the RunStatus is set after acceleration phase completes pulse is produced as 100Hz frequency When the total number of pulse becomes 9500 the RunStatus is cleared And go to deceleration phase when the Decelerrati
48. EnableUnload Bool Enable Bool Length Integer Position Integer EICRI31 Control l Found Bool Inhibit Bool Unload Bool Error Bool Empty Bool Done Bool EnableUnload Bool Enable Bool Length Integer Position Integer Parameter Data Table SFR Address Address Mode Level S 5 ple Y gt Q Elol s E Sle o a E IS8 9 2 s o o g e olalelsl_l l lZ3io 2 9 3 s 2 gt x 5 a Elzlu bli lt 5 2 amp e z 2 amp b als s a la lsja 8S s E 8 G Data Table JIN Viv v y 4 ly Jl y X8 Instruction Set Reference Manual 15 4 Shift and FIFO LIFO Instructions Parameter Data Table por pon CTRL y y LENGTH 4 BIT FIFOL FIFO QUEUE LOAD FIFOU FIFO QUEUE UNLOAD L EnableUnload Done Instruction Type output When the rung state is true FIFOL load the specified data to data table specified as Queue Push FIFOU Unload the data from the specified Queue POP The FIFOL instruction can use following data type IN Specify the data to load to Queue FIFO data table specified as QUEUE CTRL CR data table If the FIFOL and FIFOU instructions are in run state they are used to control the internal flag LENGTH data table size specified as QUEUE POS data location that is loaded first Pointer The FIF
49. ErrorCode Description Data Format HSC Mode Function User Program Access PIT O ErrorCode Word Control Read Write The following table shows the error codes of PIT X8 Instruction Set Reference Manual 19 12 Using Interrupts Error Code Descriptions Invalid Program File Number The program file number is not 6 1535 or not exist UserlnterruptExecuting Description Data Format HSC Mode Function User Program Access PIT O UserlnterruptExecuting Bit Status Read Only The UserInterruptExecuting status bitis set when the interrupt service routine of PIT is in execution mode UserlnterruptLost Description Data Format HSC Mode Function User Program Access PIT 0 UserInterruptLost Bit Status Read Only The UserInterruptLost bit can process 1 active and maintain up to 2 pending user interrupt conditions before it sets the lost bit You can check the interrupt lost by this bit UserlnterruptPending Description Data Format HSC Mode Function User Program Access PIT O UserlnterruptPending Bit Status Read Only The UserInterruptPending is a status bit that represents an PIT interrupt is pending X8 Instruction Set Reference Manual Using Interrupts 19 13 ErrorDetected Description Data Format HSC Mode Function User Program Access PIT O ErrorDetected Bit Status Read Only The ErrorDetected flag is a status bit that can be used by the control program to detect if an error 1s present in the PIT configuration
50. KK Channel Configuration HE Channel Status amp 3g VO Configuration Wl VO Configuration EU Ladder Programs B srso 4 EJ LAD 5 MAIN 1 Special Function Registers B Special Function Registers B crio B cru y Data Logging Recipe Configurations amp 3g User Data Monitors 3 Select PS Programmable Limit Switch in the Data Table Type menu X8 Instruction Set Reference Manual 5 34 Using the High Speed Counter and Programmable Limit Switch Create Data Table Data Table Settings EI rs Programmable Limit switch y Name B Binary Data Table Number N Integer Elements F Float Description L Long Scope A ASCI L Usage Scope ST String Options TM iman Skip When Deleting Unused Memories CT Counter Protections CR Control assis th j ng Pa SD Card Restore Download PD PID A Data Table Type Data Table Type OK Cancel Help 4 Enter the number of the Data Table Number Max 1535 and Elements Max 1535 Description is optional Create Data Table Usage Scope Global Use Options Skip When Deleting Unused Memories No m Protections Static Disable DS SD Card Restore Download Disable E Data Table Number Data Table Number OK Cancel Help 5 Then enter the number of Elements The number of Elements means the numbet of steps of the P
51. Module Configuration X8 YN16 X8 YR16 Output Image 16 point output module has a total area of the 16 bit from bit 0 to 15 with one wotd Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 J0 Wo W IW WW yw W W W W W W W IW W W W w write only x not used always at a 0 or OFF state X8 YN32 Input Image 32 point output module has a total area of the 32 bit from bit 0 to 15 with two wotds Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO 0 1 w write only x not used always at a 0 or OFF state X8 YN64 Input Image 64 point output module has a total area of the 64 bit from bit O to 15 with four words Bit Position 2 15 14 13 12 11 10 9 8 17 6 5 4 3 2 1 0 0 W IW W Ww W W IW iw W W W W IW IW W W 1 W IW W W W W IW iw iw W W W IW iw W W 2 W IW W W W W IW iw W W W W IW iw W W 3 W IW W W W W IW iw W W W W IW iw W W w write only x not used always at a 0 or OFF state It will be released on 2013 1 0 Configuration 1 9 X8 YR6C Output Image YR6C output module has a total area of the 6 bit from bit 0 to 5 with one wotd Bit Position 3 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO w write only x not used always at a 0 or OFF state Analog 1 0 Module Configuration Analog module has different memory c
52. NotmalOperationStatus lessen 23 PWANLU EnableSttus cupido ta E ed 23 PWM 0 OperatingFrequencyStatus oooooocooccmmmmmm 24 PWM 0 DutyCycleStatus iii re t teg 24 Chapter 7 Relay Type Bit Instructions TALLO lof coro eret LER UE De eb ca dade deed 1 NOC Normal Open Contact NCC Normal Closed Contact 2 CU Output tolus P ROLE oce tarte at cepe Ec een 3 SET Set Coil RST UR SSE Ot di acre deberi obse cited Ws puedo aseo teet DX LA 4 pGREdbe Rho ii 255 006 ESO Ru d RES SP ds 5 ONSR One Shot Rising CONSE One Shot Palit vas emer PER 6 Chapter 8 Timer and Counter Instructions Ett Od O O 1 Timer Instructions Overview ai A rn Gare 2 TON Timer On Delays 4 qoe ac s etel pedro i eee Min 5 TOFS Timer DIED a aee enc OR cad ien 5 TOR Retentive Timer On Delay ae eoi D De bee ang toic 7 CLER Read High Speed Glock Time x rip 7 CLKC Compute Time Difference s cota vx wv EHE AREE Rue x 8 How Counters WO a IEA 9 Using the CTU and CTD Instructions rhon en 9 COE TOU EURO io cte AAA e RI ER CS 10 CE TOO LOVE OW da tee Cede arenes OMe pk ke ee al 10 CUADO DO os thd ias ate ape Sve os betel ees tee 10 CA LOMA OED ats hat a cage pe OO RAE Ad 10 CTADO Contra ii E 11 A Qa poste t O 11 CETOO Accumulator o3 s dtu needed steer MEE Mass 11 CTU Count Up CLD Gom DON son eer tad II wk ete 12 RSTA Reset Accumulatot eee 13 Chapter 9 Compare Instructions o A masnega a aan a a oct Mach d hac dodo 1
53. Number of Characters in Buffer o ooooomomooo m o 8 MOB Cleat Buiter sida A OS eee t E 9 AHS Handshake oue pa dur park oe Rt vid ad e VEA Fare we S 10 ARC Read Characters run aaa re etn qa Led Se M e RR ARS 11 AWA Write String with Append 5i aes ecce ere A 12 DOCS a A ox Yeast el P Bia aa O 14 Chapter 22 Communication Instructions Titroduction s Soh obese ida 1 SVC Service Communication 5i sl vds Boers oli esas 2 MSG Message Communication ir e very wes sare guns 3 ville CETT T 5 COMINO y TA aped a dotes AA eg t Sele 5 sSuppbElemeatinto g lr A as 6 Chaise NUM Det ia da ia 6 MTC o gc puc id 6 Number Bites d tate uec aed t e bata eade Pb acid 6 TargetDataTableInfo 0 aus dock dert tert rris 7 BreakConnection tas ars ai at 7 UnContiected Messages a A T FBSA we 7 A EN 7 ContinuousOperation ec o seo A tes bebe ed ra os 8 Epable uei use aei ACHAIA IR eq LA ROM M gc Ga 8 O LEE 9 EnabledWal ng iesu ad te ptores Sac EY OF CEP 9 IE NL TM b A M D d p ELE Aog 9 DIM Idus im pte Ede Ax M a 10 A coppia p TAS ARANA DRAE 10 ERICO se aces pbs Seana a los ttn ad 10 Elipsed I Winter ES EA AAA 10 PAOLO ARAS 11 Ro utiongPathDataEIblNu mbet ia Corr e 11 Routione Pata Data able V psd SA 11 Appendix A System Efrot Code cop doe eo eU dme Pee oe sao Le pute Da 1 1 Appedix B MSG Instruction Error Code iis ove Po SA oe eo RE 1 1 Appendix C ASCI Character Set ace Leer iui d pe Lacoste bn acci eie el ten ey 1 Introduction X8 I
54. P Gain P Gain 100 SetPointScalingEnabled Description Data Format HSC Mode Function User Program Access PD 10 SetPointScalingEnabled Bit 0 or 1 Control Read Write 0 disable the Scale X8 Instruction Set Reference Manual PID Control 20 7 1 enable the Scale LoopUpdateTooFast Description Data Format HSC Mode Function User Program Access PD 10 LoopUpdate TooFast Bit 0 or 1 Status Read Write The LoopUpdateTooFast flag is set by the PID algorithm when the PID update is not executed cause of the PLC scan time limitation To solve this speed down the PID loop control or use PIT interrupt ProcessValuelnDeadBand Description Data Format HSC Mode Function User Program Access PD 10 ProcessValuelnDeadBand Bit Dor1 Status Read Write The ProcessValuelnDeadBand bit is set when the PV Process Value is within the Zero Crossing Deadband range ZeroCrossingDeadband Description Data Format HSC Mode Function User Program Access PD 10 ZeroCrossingDeadband Word 0 32 767 Control Read Write The deadband extends above and below the setpoint by the value entered and is entered at the zero crossing of the process variable and the setpoint This means that the deadband is in effect only after the process variable enters the deadband and passes through the setpoint The valid range is 0 to the scaled maximum or 0 to 16 383 when no scaling exists X8 Instruction Set Reference Manual 20 8 PID Control K
55. PLC if there may be a need to change update without destroying the data able to data protection configuration on the XGPC Setting Data Table Protection Data Table Protection can be applied to the following data types Output Y e Input X e Binary B e Timer TM e Counter CT e Control CR e Integer N e Floating Point F e String ST e ASCII A e Long Word L e Proportional Integral Derivative PD X8 Series PLC Memory and Data Table 2 7 Message MG Programmable Limit Switch PS Routing Path RP e Recipe TIP The SFR Special Function Register cannot be protected r Data Table Properties m General Data Table Settings 1l Data Table Type Name INTEGER Data Table Number Elements Ed Description Scopes Usage Scope Global Use Options Skip When Deleting Unused Memories _ Ni Protections Static SD Card Restore Download Data View via Web Site Protect a this data table in Webserver Page ue Hz csv After selecting the desired data table select Property by clicking right mouse to set protection of the selected data table Data Table Protection Requirements Following are conditions for data table protection e The PLC contains protected data table e The ladder program being downloaded to the PLC has the same number of protected data tables as the ladder program to be updated stored in the internal PLC e All protected data
56. PWM Pulse Width Modulation 6 17 PWM Function 6 17 PWM Data Table 6 17 PWM Data Table Elements Summary 6 19 X8 Instruction Set Reference Manual 6 2 Using High Speed Outputs PTO Pulse Train Output Pulse Train Output Function X8 Instruction Set Reference Manual High speed output PTO and PWM functions of X8 Series PLC support up to 100KHz and it would be applied to simple motion control and High speed pulse output The PTO function is only available for Embedded I O in the base module CPU and cannot be used as an External expansion I O 0 4 PTO Address Instruction Type output The X8 Series PLC supports four high speed output ports These output ports can be used as standard output ports or individually configured for PTO or PWM operation The PTO functionality allows a simple motion control or pulse output The pulse profile has four primary components Output port number Total number of pulses to be generated Accelerate decelerate intervals Run interval Using High Speed Outputs 6 3 Users can input only three items above to set PTO set in SFR and create example for simple pulse output by using the PTO instruction in the ladder program 7 Special Function Registers eo 2s PTO pwm HSC sm En RTC MCI BM cso cst Cs2 ES3 Address Type Value Meaning Description z Imi RampProfle Trapezoid ControlStop OFF AccelDecelPulsesindep Boot Same Profle JogPulse
57. RR AG RN RENE RENE eue ey ENDT Temporary End oi besos las ador eh do sedan END End of Ladder Prol eoe bere Ete es MCR Master Contorl Reply v eyes A A QR EE Rn Chapter 18 Input Output Instructions Ihntroduclofb e d eodd ante e ede ed re t dede wh ee ee REFI Embedded Input Retenes REFO Embedded Output Rele b HT E eh EOS End Ol Sisi na geni E e ba rid Chapter 19 Using Interrupts EOI ag dee eee cae by ee eae PER es Priority of User Interrupts s opes erro RES oed bee Rt Interrupt Type and EIernents v uvae de eade e oer eae d User Fault Routine UFR Interrupt iret e ero xta External Input Interrupt Bild aia LadderProgramNumbet o A ca ade ID ser tatesnmptEnabled erosi o do EventInterruptEnabled cad Bs tek are ward ncn De d reed PUTO SIAL scares heated ln eri hac ned eat hear dona Eds A ien 7 O O 7 EXOrCO dt sa 7 UserlnterruptExecuting EIA AA 8 ear 055 A E 8 Userinteruprr end ir PENNE 8 Por elected te O esc ed 9 High Speed Counter HSC Interrupt isa reb etre 9 Programmable Interrupt Timer PIT Interrupt 10 LadderProgramNumbet ss deseo ae eed en 10 UserInterruptEnabled s oce OE ET EST X ped vn 10 Evento iptables Co eT 11 A a E E E E EET 11 id A A VEA E ACRI 11 PROC ROA A ES vati d deno 11 JseelatertuptEsecutiie s es oor ds oi bes ee oe eed ES 12 Ms AAA A NEAN 12 UserInterruptPending n a ios ds 12 ErorDelecicdin ire ojal wis Ini daa e is 13 PITS Programmable Interrupt Timer Stat
58. RTS signal handshake control signal The parameters are CH serial port number 0 COM1 1 COM2 2 USB AND Mask reset the RTS control signal Bit 1 corresponds to the RTS a value of 2 in the AND Mask resets the RTS a value of 0 remains the RTS signal The following examples shows that the value of 2 in the AND Mask resets the RTS OR Mask sets the RTS control signal Bit 1 corresponds to the RTS a value of 2 in the OR Mask sets the RTS a value of 0 remains the RTS signal CTRL CR Control data table B3 11 5 HS Bits Status 000h Error 00h 0002h AND Mask CR17 8 CTRL B Done J Error ARC Read Characters ASCII Instructions 21 11 If 2 USB is set to CH Error 3 is generated since the USB is not TP support Handshake Handshake control is only possible in ASCII BIN communications Other protocols are controlled in PLC autonomously Error Code Descriptions 0 Success 2 Illegal parameter 3 Not supported 4 Channel is shutdown 5 Protocol contention 6 Transmit is in progress 1 CTS Signal lost 10 Source Control Data Table invalid 11 Source String Length invalid 12 Request String Length invalid 13 Unload bit in Control Data Table is set 14 ACB Instruction deletion 15 Channel Configuration was changed Instruction Type output The ARC instruction is used to read characters from the buffer and store them in the Str
59. Sequencer instructions are used to control repeatable equipments or prcess Program Control JUMP LBL CALL SBR RET SUSP ENDT MCR END The Program Control instructions allow you to control the ladder program execution REH REFO EOS Input and Output The Input and Output insturctions calculate input and output values regardless of input and output scan Interrupt PITS INT INTD INTE INTF p The user interrupt instructions allow you to interrupt your program based on defined events PID PID The process control instruction provides closed loop control ACSCII ARNL ARNC ATOI ACB ACN AEX AHS ITOA ARC ARL ASCH ACMP AWA AW ACSCII insturction convert and write ASCII strings deed MSG SVC Communication The Communication instructions read or write data to another equipment RCP Recipe The Recipe insturction allows you to transfer data between the recipe database and a set of user data table element Data Logging X8 Instruction Set Reference Manual DLOG The Data Logging instruction allow you to log time and data Instruction Descriptions Programming Instruction Overview 4 3 Throughout this manual descriptions for all instructions have a similar table below and show applicable input condition and output condition of each insturction For example applicable addressing mode and data table Parameter Data Fil SFR Address Address Level ata Files Mode S ge Z IHURE i
60. Undertlow Long 2147463548 D OutputMaskBits integer 0 HighPresetOutput integer 0 LowPreset utput din 0 L ErrorCode integer o UserinterruptExecuting Bool 0 OFF Userinterrup ost Bool 0 OFF UserinterrupPending Bool 0 OFF ErrorDetected Bool 0 OFF LowPresetinterrupt Bool 0 OFF HighPresetinterupt Bool 0 OFF Undertlowinterrupt Bool 0 OFF Overfiowinterrupt Bool 0 OFF LowPresetfieached Bool 0 OFF HighPresefeached Bool 0 OFF CountDirection Bool 0 Count Down Undertow Bool 2147483548 Overflow Bool 2141483547 ModeDone Bool 0 OFF CountDown Bool 0 OFF Count p Bool 0 OFF EJHSC 1 4 Example 4 UFR User Fault Routine interrupt service routine configuration window X8 Instruction Set Reference Manual 19 4 Using Interrupts Priority of User Interrupts X8 Instruction Set Reference Manual i Data Table SRZ Colo ea Main Processor Scan Times Math Debug Errors Protection Mem Card Forces Expansion 1 0 Address Type Value Meaning Description 0 OFF Fault Override at Power Up Over Tap Control Register Error OFF Major Err Detected Executing User Fault Routine OF Embedded Input Filter Modified ASCH String Manipulation Error Major Fault Code Radix Structured y User Fault Routine URE configuration part is located in Error of SR2 different with other interrupt configuration But the interrupt service routine execution c
61. Value v ON X TRUE Count Up Acc Value OFF A X TRUE Count Down Acc Value ON A X TRUE Count Up Acc Value OFF v X TRUE Count Up Acc Value ON v X TRUE Count Down Acc Value OFF or ON OFF or ON OFF X X Hold Acc Value OFF OFF ON X X Reset Acc to Zero X X OFF ON X Hold Acc Value X X OFF X FALSE Hold Acc Value Accumulator Description Data Format HSC Mode Function User Program Access HSC 0 Accumulator ANTI Control Read Write The Accumulator contains the measuring results of the HSC If the HSC mode 0 1 is configured or a high preset is reached or an overflow condition is detected the value of the accumulator is cleared 0 HighPreset Description Data Format HSC Mode Function User Program Access HSC 0 HighPreset PLIN Control Read Write X8 Instruction Set Reference Manual 5 18 Using the High Speed Counter and Programmable Limit Switch The HighPreset is the high preset configuration value of the counter that is used in the HSC When the SetParameter bit is changed from 0 to 1 the HighPreset value is loaded into the HSC so that can be operated from the HSC The HighPreset value must be less than or equal to the data resident in the Ovetflow parameter or an HSC error is generated Set various HSC parameters using the HSCS instruction except SetParamter LowPreset Description Data Format HSC Mode Function User Program Access HSC 0 LowPreset iy Control Read Write The LowPreset is the low preset configuration val
62. Word Structure 2 TM CT CR 2 Direct 2_ Element X8 Instruction Set Reference Manual 8 14 Timer and Counter Instructions X8 Instruction Set Reference Manual Chapter 9 Compare Instructions Introduction In this chapter the X8 Series PLC compare Instructions are described This chapter organized as follows Topic Page Introduction 9 1 Using the Compare Instructions 9 2 EQ Compare for Equal NE Compare for Not Equal 9 3 GT Compare for Greater Than LT Compare for Less Than 9 4 GE Compare for Greater Than or Equal to LE COmpare for Less than or Equal to 9 5 EOM Mask Compare for Equal 9 6 LIM Limit Test 9 7 X8 Instruction Set Reference Manual 9 2 Compare Instructions The following table shows the compare instructions Instructions Description EQ Compare for equal Compare whether two values are equal l lt gt NE Compare for not equal Compare whether one value is not equal to a second value LT Compare for Less Than Compare whether one value is less than a second value lt Compare whether one value is less than or equal to a second value LE Compare for Less Than or Equal gt GT Compare for Greater Than Compare whether one value is greater than a second value gt Compare whether one value is greater than or equal to a second value GE
63. always at a 0 or OFF state Digital 1 0 Input Module Configuration X8 XU16 X8 XA16 Input Image 16 point input module has a total area of the 16 bit from bit 0 to 15 with one wotd r read only x not used always at a 0 or OFF state X8 XU32 Input Image 32 points input module has a total area of the 32 bit from bit 0 to 15 with two wotds Bit Position 1 0 Configuration 1 7 E 15 14 13 12 11 10 9 8 5 4 3 2 1 0 0 r fr fr ir jr jr jr fr E HE fr p dr r 1 ro pro Jr fr ofr jr jr fr ppm e der r read only x not used always at a 0 or OFF state it will be released in 2013 X8 XU64 Input Image 64 point input module has a total area of the 64 bit from bit 0 to 15 with four words Bit Position E 15 14 13 12 11 10 9 8 5 4 3 2 1 0 O fr fr fr fr jr jr jr fr Pees for ote et 1 ro pro fr fr ofr jr jr fr r pro jr fr fro fr r read only x not used always at a 0 or OFF state X8 TPOT8 Input Image TPOT8 input module has a total area of the 8 bit from bit 0 to 7with one wotd Bit Position 15 14 13 12 11 10 9 8 0 x x x x X X x x r read only x not used always at a 0 or OFF state it will be released in 2013 X8 Instruction Set Reference Manual 1 8 1 0 Configuration X8 Instruction Set Reference Manual Digital 1 0 Output
64. amp Q3 User Data Monitors Output Window For Help press F1 did 4 4 as H Me Ab dS dn onsr onsa eon mon TOM TOF TOR NSG PIO PTO PUM File Edt View Search Online Tools Window Help A D E ae ad Communication Ethernet 10 121 29 90 ON 0OF k a O F AccelDecelPulsesindependent Poo Eoo JogContinuous Bool EnableHardStop Bool Outpuffrequency JogFrequency TotalOutputPulses PTO PwM HSC ST JE RATC MCI BH CSO CS CS2 ES3 Address Type Value Meaning J Descr PT0 0 id RampProfile Bool Trapezoid ControlStop Bool BB interrupt a M Mecellaneno Blow Table gt 112 Address Type Value Meaniny Description This cannot be changed like other SFR once the program is downloaded into the controller If this flag is set PTO error 3 is generated when the data combinations of data file number and element number is not entered or invalid data is entered PTO 0 AccelDecelPulses Data Format HSC Mode Function User Program Access When the PTO 0 AccelDecelPulses Long Word AccelDecelPulsesIndep endent 0 0 1 073 741 824 When the AccelDecelPulsesIndep endent 1 Control Read Write 0 to 2 147 483 647 X8 Instruction Set Reference Manual The PTO 0 AccelDecelPulses defines how many of the total pulses will be generate to each of the acceleration and deceleratio
65. analog input module with 4 channel voltage and current input A total of 6 words are assigned to the area that shows the state and the input of data and the control area is allocated for each set of channel x wotd Data Address Mapping Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 Input Channel 0 1 Input Channel 1 2 Input Channel 2 3 Input Channel 3 w write only x not used always at a 0 or OFF state X8 Instruction Set Reference Manual 1 0 Configuration 1 13 Status Output Mapping by Channel Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO 0 Reserved S3 2 S1 S0 1 Reserved F3 F2 F1 FO 2 Reserved 3 Firmware Rev major Firmware Rev minor S0 S4 Ready Status Normal 0 Reset Error 0 FO F3 Fault Status Fault 1 Normal 0 Control Area Address Mapping Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO 0 Configuration Channel O Data 1 Configuration Channel 1 Data 2 Configuration Channel 2 Data 3 Configuration Channel 3 Data 4 Reserved 5 Reserved 6 Reserved 7 Reserved w write only x not used always at a 0 or OFF state User Scale Data type can be specified using the SCALE instruction Display Format Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO o jo 0 0 0 JO 0 1 o po 1 0 0 JO 1 1 0 1 0 0 0 1 0 1 X8
66. can attach I O modules using serial techniques X8 Series PLC have I O expandability X8 Series PLC Expansion 1 0 For the X8 Series PLC expansion I O is used to provide special module such as digital I O analog module position module and communication module You can attach up to max 80 expansion I O modules with power supply for each 12 I O modules in any combination Addressing Expansion 1 0 Slots The figure below shows the addressing for the base and expantion I O module of X8 Series PLC The expansion I O is addressed as slots 1 to 80 Modules are counted from left to tight as shown below X8 Series Embedded 1 0 Memory Mapping 1 0 Configuration 1 3 Slot1 Slot2 Embedded I O Expansion O TIP In most cases you can use the following address format X s b X Table type letter s slot number b bit number For example 13 0 0 Digital 1 0 Configuration of X8 Series PLC base module X8 M14DDT X8 M16DDR Input Image For X8 M14DDT and X8 M16DDR base module the Bit positions 0 to 7 correspond to input terminals 0 to 7 Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO 0 x xs RS A A ex pem O PESE E fr fe E r read only x not used always at a 0 or OFF state X8 M32DDT Input Image For X8 M32DDT base module the Bit positions 0 to 15 together with word 0 1 correspond to input terminals 0 to 15 X8 Instruction Set Reference Manual 1 4 1 0 Configuration X8 Instruction Se
67. converts the values as shown in the table below X8 Instruction Set Reference Manual 11 4 Converion Instructions Encode 1 of 16 to 4 Source Bits Destination Bits 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 15 to 04 03 02 01 00 X x X kX x we XR KY YK we LXX YL OK YO YT 0 0 0 1 0 X X x we e PK Re we YK PR we oe PK O 0 0 0 0 1 1 X X Xx X xX Pw KR Xxx YK YK YK 4 0 0 0 0 G0 9 X K x Xe xX x Ye TATAIA 0 0 0 0 8 0 y 1 X X X X X X X X X X X 1 0 0 0 0 0 0 1 1 0 X X X X X X X X X X 1 00 0 00 0 0 1 1 1 X X X X X XX X X 1 0101010100 0 0 1 0 0 X X X X X X 7X X 4 0 0 0 0 04 0 4 0 0 0 1 0 X X x x e Ke Me 8 9 O amp amp 9 0 d 0 0 1 0 X X XX X X x 4 O O A A O O O j 0 0 1 X x x X XJ 8 0 0 9 0G d J d 0 0 0 X KIX NARA 8U 8 j ro G d J 0 0 0 X X X 1 0 0 0 0 0 0 0 0 0 0 40 4 0 0 1 1 0 X X 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 X 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0 0 1 0 2 X determines the state of the flag BIN Convert form Binary Coded Decimal BCD X8 Instruction Set Reference Manual Instruction Type Output The BIN instruction is used to convert t
68. data count range of 2 147 483 647 Programmable High and Low presets and Overflow and Underflow Set points Automatic Interrupt processing based on accumulated count Run time editable parameters from the user control program Overflow Max 2 147 483 647 High Preset 0 Low Preset Underflow Min 2 147 483 648 IMPORTANT The HSC function can only be used with the controller s embedded l O It cannot be used with expansion 1 0 modules X8 Series PLC supports the Programmable Limit Switch function and it allows you to configure the High Speed Counter to operate as a programmable limit switch or rotary cam switch SER Special Function Register of internal XGPC data table allows you to access to HSC configuration data and control program If the PLC is in the run mode the sub elements of internal HSC SFR may be changing Using the High Speed Counter and Programmable Limit Switch 5 3 High Speed Counter SFR Function Files PTO PWM HSC sn En RTC MCI BHI eso cs cs2 ES3 10s INTEGER BIT BIT BIT BIT BIT BIT BIT BIT BIT INTEGER INTEGER LONG LONG LONG LONG LONG INTEGER INTEGER INTEGER INTEGER BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT 2147483647 2147483648 2147483647 2147483648 Description Program File Number User Interrupt Enable Function Enabled Auto Start Counting Enabled Set Parameters Low
69. filtered data will be written to defined data table through the HSC mask At that point the next preset defined in the PS file becomes active When the HSC counts to that new preset the new output data is written through the HSC mask This process continues until the last element within the PS file is loaded At that point the active element within the PLS file is reset to zero This behavior is referred to as circular operation If invalid data is loaded during operation an HSC error is generated within the HSC function file If an invalid parameter is detected it will be skipped and the next parameter will be loaded for execution provided it is valid You can use the PS in both directions If your application only counts in one direction simply ignore the other parameters Addressing PS Data Table Format Explanation PSn e PS Programmable Limit Switch Data Table ee n Data Table Number Em Element delimiter e Element number Element is 6 word size Sub Element delimiter se Sub Element Symbol delimiter sym Symbol Not a number Denotes the number Bit delimiter b Bit Number PS Data Table Example 1 Using XGPC create a new project Using the High Speed Counter and Programmable Limit Switch 5 33 PLC Type Project Name Ps Test o Cancel Help 2 Right click on Data Table of XGPC and select New menu E Q3 Project B Controller Properties amp 3 Comms Config
70. in the N19 12 When the instruction detects them the FOUND flag in the CR data table will be set Parameter Data Table juu i gone nc z 5 g 8 S e E a ojajEefal e S u Data Table 4 4 ly MASK V N VIN X V N VIN CTRL y d y LENGTH y POS y SEO Sequencer Ouqut N20 10 Data Table N20 0 4 MASK CR17 1 lt 10 lt Length 10 4 POS OUT N20 0 Enable Done X8 Instruction Set Reference Manual 16 4 Sequencing Instructions Instruction Type output If the rung state is true the data table value of POS and masked value are logically ANDed then copies the value to destination data table When the copy is done for a given length the DONE flag in the CR data table specified CTRL is set Data table and Masked source data type must be same That is IMPORTANT MA f if the data table is an integer N Mask and IN must be integer N Mask 0000 0000 1111 1110 AND OUT N20 1 0000 0000 0000 0010 renta 0000 0000 0000 001 fa iy Data Table N20 10 0000 0000 0000 000 Posi Data Table N20 11 0000 0000 0000 0010 POS2 Data Table N20 12 0000 0000 0000 001 T 2053 Data Table N20 13 0000 0000 0000 0100 OS4 4 Data Table N20 14 0000 0000 0000 010 20S5 KS Data Table N20 15 0000 0000 0000 0110 X s 6 Data Table N20 16 0000
71. is reaches to the High Preset This bit is controlled by the user program and retains its value through a power cycle X8 Instruction Set Reference Manual 5 8 Description Using the High Speed Counter and Programmable Limit Switch HSC 0 OverflowMask Description HSC 0 Mode HSC Input Assignments OverflowMask Data Format User Program Access The OverflowMask control bit is used to control the overflow interrupt If this bit is clear 0 he HSC user interrupt is not executed when the HSC condition is reaches to the High Preset This bit is controlled by the user program and retains its value through a power cycle HSC Mode Data Format User Program Access The Mode variable sets the High Speed Counter to one of 10 types of operation This integer value is configured through the XGPC and is accessible in the X8 Series PLC as a read only variable HSCO s sub counter is HSC3 HSC1 s sub counter is HSC4 and HSC2 s sub counter is HSC5 Each set of counters share the input port The following table shows the dedicated inputs for the HSCs depending on the mode 1 0 0 0 1 0 0 1 1 0 02 1 0 0 3 1 0 0 4 1005 100 6 1007 1 0 0 8 10 09 10 0 10 1 0 0 11 HSC 0 A C B D Reset HSC 1 A C B D Reset Hold HSC 2 A C B D Reset Hold HSC 3 A C B D HSC 4 A C B D HSC 5 A C B D X8 Instruction Set Reference Manual Using the Hig h Speed Counter and Programmabl
72. table numbers types and sizes number of elements currently in the controller exactly match If all of these conditions are met the X8 Series PLC will not write over any data table in the PLC that is configured as Protected If any of these conditions are not met the entire data table in the internal PLC i is updated with the contents from being sent XGPC X8 Instruction Set Reference Manual 2 8 X8 Series PLC Memory and Data Table Static X8 Instruction Set Reference Manual i Data Table SR2 STATUS Coos Main Processor Scan Times Math Debug Errors Protection Mem Card Forces Expansion IO Address Type Value Meanin Description m Radix Structured z After transmit the ladder and data table form XGPC if the protected data table stored in the internal PLC is changed SR2 36 10 register status in the screen is changed to ON status TIP The X8 Series PLC will not reset the SR2 36 10 register automatically Static part of Properties in the Data Table defines whether it can change its value through communication Static can be applied to the following data types Output Y e Input X e Status S e Binary B e Timer IC e Counter CT e Control CR e Integer N e Floating Point F e String ST e ASCII A e Long Word L e Proportional Integral Derivative PD e Message MG X8 Series PLC Memory and Data Table 2 9 Password e Programmable Limit Swi
73. the Routing Path Data Table Elements specified by the MSG configuration The MSG instruction configuration process Configure the port and protocol to use Configure nod address of the target device and Local or Remote communication method Enter data table addresses of both sides X8 Instruction Set Reference Manual 22 12 Communications Instructions General This Device Channel OCON Command Xnet XBCPU Read et Mogius Read Col suus 0 Modbus Head Holding Registers 03 Message ogous Fead Input Fagisters 08 bus Write Single Coll 05 DatiModbus Write Single latas I d Data Table Address 27 Modbus Write Moltole oils OF SModbus Write Multiple Registers 10 e ecce ae Read Error Error Code Hex 0 No Error X8 Instruction Set Reference Manual System Error Code System Error Code Appendix A Controller Fault Code Description Level Hex 00 1 1 1 No Error 1 1 2 Recoverable 1 1 3 System Hard Faults 01 System Error Unexpected Reset or System Watchdog Error Non User 02 System Error Controller ASIC Error Non User 03 System Error NVRAM Memory corrupted Non User 04 System Error Hardware Error Non User 05 System Error Firmware Error Non User 07 System Soft Faults 08 System Error Background User Program Integrity failed Non User 09 0A 0B 0C 0D DE OF Ladder Program
74. the SD memory card LoadAlways The LoadAlways flag shows the status of the LoadAlways of the user ladder program stored in the SD memory card X8 Instruction Set Reference Manual 3 8 SFR Special Function Register Communications Status Data Table X8 Instruction Set Reference Manual ModeBehavior The ModeBehavior flag shows the status of the ModeBehavior of the user ladder program stored in the SD memory card BHI Base Hardware Information data table is read only that contains hardware information of the X8 Series PLC The BHI elements ate as follow Address Descriptions BHI 0 CN CN Catalog Number BHI 0 SRS SRS Series BHI 0 REV REV Revision BHI 0 FT FT Functionality Type The Communications Status Data Table is a read only data table that contains status information on how the X8 Series PLC internal communication ports configuration and various registers and located on CSO CS1 CS2 and ES3 in the SFR Communications Status Data Table Size Register Elements Size CSO USB 71 Word CS1 COMO 71 Word CS2 COM1 71 Word ES3 EtherNet 171 Word TIP You can use the Communications Status Data Table as a troubleshooting tool for X8 Series PLC communications issues The Communications Status Data Table is structured as shown below Word Descriptions 0 5 General Communication Status Block 6 22 Diagnostic Counters Block 23 42 Data Link Layer Active Node Table Blo
75. the input signal must be on If it is used in electrically noisy environments data can be entered through this function If it is set to short time similarly high speed or short pulse signal operation can be set through the filtering function 1 0 Configuration 1 25 This function is used to process high speed counters latching inputs and input interrupts Note that the maximum filtered value is 16mS and minimum is 5p S Input filtering is configured using XGPC programming software which RS Automation is supply freely 1 Select Project Tab 2 Select I O Configuration Branch and double click A XGPC INST TEST XLD Ele Edt View Search Comms Tools Window Help Dd di 4 23 9 amp Find HO JE Nor few Pag gt E Propet E Controter Propertes ES Communcaros Contiguraton WG casno Contqueatcn MI Ouen Sut EY vo Contigursten El uo s uin EY ova fies B recen fies IR Cross Reterence B 00 ourruT B n nar B s2 status DB aonar ES m nreo CJ Doa Logong EY RCP Contguraton Fies EJ Custom Data tlontors E Custom Graphics Montera 3 Select I O Module Ta IN 4 OUT2 128 Analog Voltage Current IN 4 OUT 2 12 Bit Convert Expansion Bus to Expansion Bus w Convert Expansion Bus to RJE Convert RIIS to Expansion Bus Omer Requires 1 0 Card Type 10 Hide All Cards For example if the X8 AI4AO2 is selected user can config IO setting value by XGPC Module 5
76. value to a range determined by creating a linear relationship SIN SIN COS CONI TAN TAN ASIN ARC SIN ACOS ARC COS ATAN ARC TAN DEG Convert Radian to Degrees RAD Convert Degrees to Radian LN Natural log LOG Log POW Raise a value to a power CALC ee expression and store the result in the The range of constants Word 32 768 32 767 Long Word 2 147 483648 2 147 483 647 Sources can be constants but both sources cannot be constants Sources can be different data sizes but output is stored to fit in the output data format If the overflow bit is set the overflow shall be handled as follows by using Math SR2 14 bit of the SR2 elements Math Instructions 10 3 Set 1 If the source is positive number 32 767 word or 2 147 483 647 Long Word is stored as output value If the source is negative number 32 767 WORD or 2 147 483 647 Long Word is stored e Clear 0 According to each data type the unsigned truncated value of the Source is stored Math Arithmetic Flag The SR flag shows Math and Arithmetic instruction state places Math category in the SR data table Following shows the descriptions of the each items e n 900 OFF Math Overflow SR2 5 0 Bool OFF Overflow Trap SR2 0 0 Bool 0 OFF Math Carry Flag SR2 0 1 Bool 0 OFF Math Underflow Overflow Flag SR2 0 2 Bool 0 OFF Math Zero Flag SR2 0 3 Bool 0 OFF Math Sign Flag E SA2 13 14 Long 0 Math Register Low S
77. viv Destination y 4 ACN ASCII String Concatenate X8 Instruction Set Reference Manual Instruction Type output The ACN instruction combines two strings For example OUT ST23 4 ASCII Instructions 21 5 if Source 1 AB Source 2 CD ABCD is stored in Destination Address Address Parameter Data Table Mode Level Sg pc e mur o z EEE Ele E SSB le El lell f la alel5 S g1 5 E a Sla eja lt S Source 1 y y Source 2 y y Destination y y AHX ASCII String Extract ST23 4 N25 2 N25 34 N OUT ST23 5 Instruction Type output The AHX instruction extracts N characters from the Index position in a string For example If Source 1 NEW X8 PLC INDEX 5 and N 6 X8 PLC is stored to destination Address Address Parameter Data Table Mode Level S 5 z g lg ae 5 3 S8 8 s E g amp E O 5uols s s si215 E E alsa s S ou Source 1 y y INDEX N Destination 4 X8 Instruction Set Reference Manual 21 6 ASCII Instructions ASCH Searching String EN 123 44 IN N25 44 Index ST23 3 String Search Instruction Type output The ASCH instruction is an instruction to search a string you want from th
78. www rsautomation biz X8 Series PLC Installataion Instuructions Publication X8 Series PLC installation X8 IN001A X8 10 module X8 Base CPU module X8 Series PLC User Manual X8 UMOD1A Description X8 Instruction Set Reference Manual Safety Instructions X8 Instruction Set Reference Manual Please read this manual and the related documentation thoroughly and familiarize yourself with the directions before installing operating performing inspection and preventive maintenance Make sure to follow the directions correctly to ensure normal operation of the product and your safety Environment and Enclosure ATTENTION A This equipment is intended for use in a Pollution Degree 2 industrial environment in overvoltage Category ll applications as defined in IEC 60664 1 at altitudes up to 2000 m 6562 ft without derating This equipment is considered Group 1 Class A industrial equipment according to IEC CISPR 11 Without appropriate precautions there may be difficulties with electromagnetic compatibility in residential and other environments due to conducted and radiated disturbances It must be mounted within an enclosure that is suitably designed for those specific environmental conditions that will be present and appropriately designed to prevent personal injury resulting from accessibility to live parts The enclosure must have suitable flame retardant properties to prevent or minimize the spread of flame comply
79. 0 0 0000 100 Q2 Pt385 1 0001 200 2 Pt385 2 0010 500 2 Pt385 3 0011 1000 2 Pt385 4 0100 100 2 Pt3916 5 0101 200 92 Pt3916 6 0110 500 92 Pt3916 7 0111 1000 2 Pt3916 8 1000 10 82 Cu 426 X8 Instruction Set Reference Manual 1 18 1 0 Configuration 9 1001 120 2 Ni 618 11 1011 120 62 Ni 672 12 1100 1 2000 2 13 1101 1 327 Q 14 1110 1 1200 Q2 X8 TC6 Input Image X8 TC6 module is the high end expantion TC input module with 6 channel TC input A total of 6 words are assigned to the area that shows the state and the input of data and 8 wotds are allocated to the control area to set each channel Data Address Mapping Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO 0 Channel 0 1 Channel 1 2 Channel 2 3 Channel 3 4 Channel 4 5 Channel 5 Control Area Address Mapping Bit Position rd 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 gt Wo Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 Channel 5 Reserved J Ce C1 A N Reserved X8 Instruction Set Reference Manual 1 0 Configuration 1 19 Display Format Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 JO 0 0 0 JO 1 0 0 1 0 0 0000 Raw Data 1 0001 Percent Value 2 0010 Scaled for PID Filter Frequency Format Bit Position
80. 111 Destination 1111 1111 0000 0000 256 X8 Instruction Set Reference Manual 12 6 Logical Instructions X8 Instruction Set Reference Manual Chapter 13 Move Instructions Introduction This chapter describes move Instructions of X8 Series PLC The chapter is organized as follows Topic Page Introduction 13 1 MOV Move 13 2 MOVM Masked Move 13 3 X8 Instruction Set Reference Manual 13 2 Move Instructions MOV Move X8 Instruction Set Reference Manual The following table shows two move instructions Application Specific Instrrcitons Instruction Move MOV Move the source value to the destination Masked Move MOVM Move data from a source location to a selected portion of the destination F5 4 OUT F5 6 379560 0 4 gt 379560 0 Instruction Type output The MOV instruction is used to move data from the source to the destination If source data and destination data size is not equal the source is converted to the destination size when the instruction executes With this Bit The Controller SR2 0 0 Carry Flag always resets SR2 0 1 Overflow sets when an overflow infinity or NAN not a number e Hag condition is detected otherwise resets SR2 0 2 Zero Flag sets if result is zero otherwise resets SR2 0 3 Sign Flag sets if result is negative MSB is set otherwise resets SR25 0 Overflow sets Math Overflow Trap minor error if the Overflow bit is on Trap set
81. 2 that supports 2 channels 12 bit resolution and X8 AO4 that supports 4 channels 16 bit resolution X8 AI4AO2 has 0 10V DC or 4 20mA output range X8 AO4 as high functional product supports 0 5V 0 10V 5 5V and 10 10V voltage output and 0 20mA and 4 20mA current output depending on the setting Converting Analog Data to Actual Output Voltage X8 AI4AO2 is an analog combo I O module and supports 2 channels 12 bit resolution and have 0 10V voltage output range X8 Instruction Set Reference Manual 1 30 1 0 Configuration X8 Instruction Set Reference Manual X8 AO4 is an analog output module and supports voltage output 0 5V 0 10V and 5 5V and 10 10V and current output 0 20mA and 4 20mA depending on the setting Word 4 and 5 contain the value of output image Word 4 channel 0 Word 5 channel 1 The followings show equations for converting Analog Data to Actual Output Voltage 12 Bits 10V 2095 O tPutValuez OutputValue V 16 Bits 10V 65535 OutputValue OutputValue V Por example if 3000 is send to the analog voltage output port the calculated value is as follows 12 Bits 10V 2095 3000 7 326 V 16 Bits 10V 55535X3000 0 457 V The X8 Series PLC provides the ability to configure latching input ports A latching input is an input that captures a high speed pulse signal and holds it for a single PLC scan The pulse width that can be captured is dependent upon the input filtering
82. 6 6 Using High Speed Outputs SFR PTO Sub Element PTO 0 Address and sub element Data Format Range User Program Access Status PTO 0 ErrorCode Word INT 2 1 Read Only PTO 0 Done Bit 0 or 1 Read Only PTO 0 DeceleratingStatus Bit 0 or 1 Read Only PTO 0 RunStatus Bit 0 or 1 Read Only PTO 0 AcceleratingStatus Bit Dor1 Read Only PTO 0 IdleStatus Bit Dor 1 Read Only PTO 0 ErrorDetectedStatus Bit 0 or 1 Read Only PTO 0 NormalOperationStatus Bit 0 or 1 Read Only PTO 0 JogPulseStatus Bit 0 or 1 Read Only PTO 0 JogContinuousStatus Bit 0 or 1 Read Only PTO 0 EnableStatus Bit Dor1 Read Only PTO 0 OperationFrequencyStatus long word 0 100 000 Read Only PTO 0 OutputPulsesProduced long word 0 2 147 483 647 Read Only Long Word 32 bit integer PTO 0 Output User Program Access Read Only The PTO 0 Output variable defines the output port that the PTO instruction conttols The PTO output port is assigned as below Output Value Internal Output Port 1 PTO 0 Output 2 Y0 0 2 2 PTO 0 Output 3 Y0 0 3 3 PTO 0 Output 4 Y0 0 4 This setting can be set only in offline and cannot be changed in online status Forcing an output controlled by the PTO while it is running stops all output pulses and causes a PTO error X8 Instruction Set Reference Manual Address PTO 0 Done Address PTO 0 DeceleratingStatus Address PTO 0 RunStatus Address PT0 0 AcceleratingSt
83. 8 Series PLC supports64KW of memory for data and programs And X8 Series PLC suuports seperate 4GB SD memory for data logging recipe ladder backup Viewing X8 Series PLC Memory Usage 1 Select Controller Properties and double click X8 Instruction Set Reference Manual X8 Series PLC Memory and Data Table 2 5 e Project 5 1 Communication Configuration KK Channel Configuration KK Channel Status 3 3 VO Configuration BB vo Configuration Ladder Programs B syso 4 EJ LAD 5 MAIN amp gg Special Registers Special Registers amp gg Data Tables XR Cross Reference B 00 OUTPUT E 11 INPUT E S52 STATUS 83 BINARY Ej N4 INTEGER G Data Logging 3 RCP Configuration Files w Custom Data Monitors Controller Properties d 2 The amount of Memory Used will appear in the Controller Properties window Controller Properties General Passwords X8 Modular Series A z Processor Type Drvier of Channel goa Ha A L Data Table Data Table Operand Data Table No Words per Description Element The output image data table stores the actual output value of the Output Y 0 FIX embedded output port The input image data table stores the actual input value entered Input X 1 FIX into the embedded input port SFR Special S 2 FIX 1 SFR Special Function Register contains internal status information Function Register of X8 Series PLC
84. Active This bit is set whenever Channel 0 2 are in the default communications mode The bit is cleared when Channels are in user configured communications mode X8 Instruction Set Reference Manual 3 10 SFR Special Function Register X8 Instruction Set Reference Manual Word Bit Description 0 7 Node Address This byte value contains the node address of X8 Series PLC on the network 8 15 Baud Rate This byte value contains the baud rate of the X8 Series PLC on the network Diagnostic Counter Block of Communications Status Data Table With XGPC displays of the diagnostic counters for PLCs are available TIP Select each communication port and protocol in the Channel Status screen on the XGPC then click Clear button at the bottom of the screen to initialize counter value EX Channel Status koloja COM 0 COM 1 USB Ethernet Xnet TCP Modbus TCP Ethernet IP Xnet Slave BL sent Messages Rece 4i CS2 12 Integer 0 Undelivered Mes CS2 16 Integer 0 Bad Packets Rec cS2 17 Integer 0 Lack of memory CS2 18 Integer 0 Duplicate Messa Diagnostic Counter Blocks are shown for Xnet Master Xnet Slave NXPlus Master DF1 Full Duplex DF1 Half Duplex Slave DF1 Half Duplex Master Modbus RTU Slave Modbus RTU Master ASCII User Defined Protocol SFR Special Function Register 3 11 Xnet Master Communication Port Counters Block Word Bit Descript
85. Bit 2 9 Status Read Write HSC 0 HighPresetInterrupt Bit 0 9 Status Read Write HSC 0 Underflowlnterrupt Bit 2 9 Status Read Write HSC 0 Overflowlnterrupt Bit 0 9 Status Read Write HSC 0 LowPresetReached Bit 2 9 Status Read Only HSC 0 HighPresetReached Bit 2 9 Status Read Only HSC 0 Count Direction Bit 0 9 Status Read Only HSC 0 Underflow Bit 0 9 Status Read Write HSC 0 Overflow Bit 0 9 Status Read Write HSC 0 Mode Done Bit 0 or1 Status Read Write HSC 0 CountDown Bit 2 9 Status Read Only HSC 0 CountUp Bit 0 9 Status Read Only X8 Instruction Set Reference Manual HSC SFR Sub Elements Using the High Speed Counter and Programmable Limit Switch 5 5 37 sub elements of the HSC SER of X8 Series PLC is described All examples illustrate based on HSCO LadderProgramNumber Address Data Format HSC Mode Function User Program Access HSC 0 LadderProgramNumber Word INT 0 9 Control Read Write Address HSC 0 UserlnterruptEnable The LadderProgramNumber is subroutine number that is executed when HSC count data value is to High Preset Low Preset Overflow or Underflow value A valid subroutine range is 6511 UserlnterruptEnable Data Format User Program Access The UserInterruptEnable is used to enable or disable HSC sub routine processing when the HSC accumulator value is reaches to the condition of High Low Preset Overflow or Underflow Conditions are as below Low pteset reached
86. CAL instruction Address Address Mode Level Parameter Data Table Ss a e i co d RE Ela l3 Bl 5 5 Sl lg El e 8l8 Sg SIZES ls S 2 5 E a 8a ls5 a8 s ziSju Input 1 y 4 y Rate y 4 N Y Offset y Jl y y Output y 4 y SCAP Scale with Parameters Instruction Type Output The SCAP instruction produces a scaled output value that has a linear relationship between the input and scaled values The following example shows that if the left ladder number range is 4 20 and scaled output values are 10 10 when the value is 10 scaled value becomes 3 Convert 4 20mA input to 10V 10V output X8 Instruction Set Reference Manual Math Instructions 10 9 10 4 lu 10 This instruction solves the following equation listed below to determine scaled output 1 yO Scaled Value M X x x0 yO x1 x0 Address Address Parameter Data Table Mode Level S oc elZ2le B E a JCHME JE o o e oO S ala EEES Sg E E Glalela s z S Input y y Vv v V N V N Input Min JIN Viv Input Max JIN AIN Scaled Min J ly Scaled Max 4 ly Output Jl y JIN SIN Sine Instruction Type Output X8 Instruction Set Reference Manual 10 10 Math Instructions The SIN instruction places the sine of the Source in radia
87. CARDPRESENT Binary Status Read Only WriteProtected MCI 0 FAULTOVERRIDE Binary Control Read Only FaultOverride MCI 0 FAULTOVERRIDE Binary Control Read Only X8 Instruction Set Reference Manual SFR Special Function Register 3 7 MCI Data Table Parameters Parameters Address Data Format Type User Program Access LoadProgramCompare MCI 0 LOADPROGRAMCOMPARE Binary Control Read Only LoadOnError MCI 0 LOADONERROR Binary Control Read Only LoadAlways MCI 0 LOADALWAYS Binary Control Read Only Functionality Type The flag is used to check the compatibility of the user program stored in the memory card MemoryCardPresent The MemoryCardPresent flag can be used in the user program to determine when the SD memory card is present on the PLC This bit is updated once per scan Ifa recognized memory module is removed during an executing mode this bit updated to OFF at the end of the next ladder scan WriteProtected When the WriteProtected flag is ON the SD memory card is write protected and the user ladder program and system cannot be overwtitten FaultOverride The FaultOverride flag shows the status of the FaultOverride of the user ladder program stored in the SD memory catd LoadProgramCompare The LoadProgramCompare flag shows the status of the ladder program stored in the SD memory card LoadOnError The LoadOnError flag shows the status of the LoadOnError of the user ladder program stored in
88. CPU module immediately EOS End of Scan Update 1 0 read write akd communications REFI Embedded Input Refresh X1 0 1 N20 0 Instruction Type output The REFI instruction updates the input port embedded in CPU module and the I O port is updated when the ladder program scan automatically To update input port state immediately use the REFI instruction This instruction works on the input port embedded in the CPU module only This instruction uses the following operands Slot defines the slot location of input port For above example If slot X1 0 1 word 1 of slot 0 in input is used Mask the masked value of the input data or data table contains constants or masked data Length This is the number of words to input Parameter Data Table Address Address Mode Level Sg z ejg lg E 5 Z s S 8 s 8 e 5 E e e Eos SES amp 6lalsia s S u SLOT Vi J MASK JIN y LENGTH y X8 Instruction Set Reference Manual REFO Embedded Output Refresh Input and Output Instructions 18 3 Y0 0 0 4 Slot N20 0 Mask Instruction Type output The REFO instruction updates output port embedded in CPU module and the I O port is updated when the ladder program scan automatically To update output port immediately use the REFO instruction This instruction wotks on the input port embedded in the CPU mo
89. Configuration Generic Extra Data Config Input Filter Input Latch Enable Inputs 0 1 x BRUT Inputs 2 3 x mE Inputs 4 5 z Bit 2 Inputs 6 7 Bit 3 Bit 4 Bit 5 Bit 6 Bit 1 Bit 8 Bit 9 Bit 10 Bit 11 Bit 12 Bit 13 Bit 14 Bit 15 Inputs 8 9 zi Inputs 10 11 Inputs 12 13 z Inputs 14 15 Inputs 16 to xxxx Ia NNNM NNNNUUEEUMI A Aa Analog Input Filter and Update times The X8 Series PLC s expansion analog input module can be configurable If the analog inputs have less tolerance to electrical noise more accurate data can be input by the slower filter setting In order to increase the tolerance to external electrical noise set the filtering speed to slow and increase the speed of the filtering when the fast update time is required However if the filtering speed is increased the tolerance to external electrical noise will be decreased 1 0 Configuration Module 5 X8 Al4A02 Analog Voltage Current IN 4 OUT 2 12 Bit Expansion General Configuration Analog Configuration Generic Extra Data Config a Filter Disply Format Input Type Selection a Disply Format Filter Input Type Selection a Disply Format ilter Input Type Selection urrent Input to 20mA Disply Format Input Type Selection Raw Value Fiter Voltage Input
90. Counter orr HSC Mode 6 Quadrature Counter phased inputs A and B HSC Mode 6 Quadrature Counter phased inputs A and B Example Input X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO CE Comments Terminals Bit Function Count A Count B Not Used Not Used off on HSC Accumulator 1 Example 1 t 0 1 count off on HSC Accumulator 1 Example 2 ft 0 1 count off Hold accumulator Example 3 0 value on Hold accumulator Example 4 1 value on Hold accumulator Example 5 i 1 value off Hold accumulator Example 6 0 value 1 Count input A leads count input B 2 Count input B leads count input A Blank cells don t care f rising edge falling edge X8 Instruction Set Reference Manual 5 16 Using the High Speed Counter and Programmable Limit Switch HSC Mode 7 Quadrature Counter phased inputs A and B With External Reset and Hold HSC Mode 7 Quadrature Counter phased inputs A and B With External Reset and Hold Example Input X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO CE Comments Terminals Bit Function Count A Count B Z reset Hold off off on HSC Accumulator Example 1 1 f 0 0
91. Data Format HSC Mode Function User Program Access HSC 0 LowPresetlnterrupt Bit 2 9 Status Read Write The LowPresetInterrupt status bit is set when the HSC accumulator reaches the low preset value and the HSC interrupt has been triggered This bit can be used in the control program to identify that the low preset condition caused the HSC interrupt and this flag would be applied by the control program This bit can be cleared by the control program and is also be cleared by the HSC whenever these conditions are detected High Preset Interrupt executes Underflow Interrupt executes Overflow Interrupt executes X8 Instruction Set Reference Manual Using the High Speed Counter and Programmable Limit Switch 5 23 PLC enters an executing mode HighPresetinterrupt Description Data Format HSC Mode Function User Program Access HSC 0 HighPresetinterrupt Bit 2 9 Status Read Write The HighPresetInterrupt status bit is set when the HSC accumulator reaches the high preset value and the HSC interrupt has been triggered This bit can be used in the control program to identify that the low preset condition caused the HSC interrupt and this flag would be applied by the control program This bit can be cleated by the control program and is also be cleared by the HSC whenever these conditions are detected High Preset Interrupt executes Underflow Interrupt executes Overflow Interrupt executes PLC enters an execut
92. Data Format HSC Mode Function User Program Access PD 10 AutoOrManual Bit 0 or 1 Control Read Write The AutoOrManual bit determines how control the CV value of the PID 0 Auto Mode The PID instruction controls the CV value 1 Manual Mode The user air program controls the CV value ForwardReverseActing Description Data Format HSC Mode Function User Program Access PD 10 ForwardReverseActing Bit 00r 1 Control Read Write X8 Instruction Set Reference Manual 20 6 PID Control The ForwardReverseActing bit define the how run the CV value of the PID O Reverse Acting The control variable reduced when the SP is greater than the PV 1 Forward Acting The control variable increased when the PV is greater than the SV OutputLimitingEnabled Description Data Format HSC Mode Function User Program Access PD 10 OutputLimitingEnabled Bit Dor1 Control Read Write The OutputLimitingEnabled bit sets the enable or disable of the CV output limitation of PID 0 disable the output limitation e 1 enable the output limitation The Control Variable HighLimit and Control VariableLowLimit values are used for output limiting GainRangeSelection Description Data Format HSC Mode Function User Program Access PD 10 GainRangeSelection Bit 0 or 1 Control Read Write The GainRangeSelection bit sets the scale of the gain range value 0 Value 0 1 gt P Gain P Gain 10 D Gain D Gain 10 1 Value 0 01 gt
93. Error Code Appendix B 3 MSG Error Code Mapping Internal Fail Code Hex High byte Low byte Description Identifier Code Error Code group XX 23 for Modbus Modbus TCP specific error codes EtherNet IP specific error codes 24 for EtherNet IP XX 25 for CIP Response CIP status code returned by CIP reply 01 No socket 02 No buffer available 03 Max connection 04 Illegal sequence 05 Connection broken 06 Address in use 07 DNS error 08 Force buffer return 10 Invalid parameter send data size 11 Invalid parameter service code 12 26 for Socket MSG Invalid parameter socket type 13 Invalid parameter server type 14 Invalid parameter type code 15 Invalid parameter family 16 Invalid parameter port 17 Invalid parameter address 18 Invalid parameter address length 19 Invalid parameter data length 1A Invalid parameter timeout 20 Socket error create 21 Socket error listen 22 Socket error bind 23 Socket error accept 24 Socket error connect N O1 Socket error send Appendix B 4 MSG Instruction Error Code MSG Error Cod
94. F 73 FF F1 0C Ethernet Status Address Type Value Meanin Description E ES3 83 84 Long 553374 Counter In Octets E ES3 85 85 Long 284018 Counter Out Octets H ES3 87 88 Long 5612 Counter In Packets H ES3 89 90 Long 3360 Counter Out Packets E ES3 91 92 Long 0 Counter Excessive Collisions H ES3 93 94 Long 0 Counter CRC Errors H ES3 95 96 Long 0 Counter Alignment Errors H ES3 97 98 Long 0 Counter Frame Drop Counter E ES3 99 100 Long 0 Counter MAC Receive Errors H ES3 101 102 Long 0 Counter MAC Transmit Errors H ES3 103 104 Long 0 Counter Single Collisions H ES3 105 106 Long 0 Counter Multiple Collisions El ES3 107 108 Long 0 Counter Deferred Transmission EH ES3 109 110 Long 0 Counter Late Collisions E ES3 111 112 Long 0 Counter Carrier Sense Errors E ES3 113 114 Long 0 Counter Tx Collision Counter E53 5 4 Bool 1 Enabled ES3 5 3 Bool 1 Full Duplex ES351 Bool 1 100 Mbps ES3 5 0 Bool 1 Online ES3 53 14 Bool 1 Enabled Xnet over IP Enabled ES3 53 13 Bool 0 Disabled Modbus TCP Enabled ES3 53 11 Bool 0 Disabled EtherNet IP Enabled ES3 53 9 Bool 1 Enabled SNMP Server Enabled ES3 53 8 Bool 1 Enabled HTTP Server Enabled Clear X8 Instruction Set Reference Manual SFR Special Function Register 3 25
95. Faults 10 Ladder Program Error Integrity check at start executing Non User 11 Ladder Program Error Ladder Memory currupted Non User 12 e Error User Program Functional Type is Non User 13 Ladder Program Error Online Edit failed Non User 14 15 16 17 Appendix A 2 System Error Code Controller Fault Code Description Level Hex 18 Ladder Program Error Duplicated Label detected Non Recoverable 19 Ladder Program Error Start Up Protection faulted Recoverable 1A 1B 1C 1D TE 1F ud Program Error Minor Error Bit detected at the end of Barcuetable 20 oe aan Error User Fault Routine program number is Non Recoverable 22 23 24 25 26 27 28 ELE Error Address Range Check failed during ladder Retoverable 29 2A Ladder Program Error Invalid Bit Address detected Non User 2B Ladder Program Error Invalid Word Address detected Non User 2C 2D 2E dud See PIT Special Function Register for specific error Fett eril OF Ell Error See Ell Special Function Register for specific error R coverable code Instruction Specific Faults 30 Instruction Error Unsupported Instruction detected Non User 31 Instruction Error Unsupported Operand Type detected Non User 32 Instruction Error Negative Timer Value entered Recoverable 33 Instruction Error Invalid Parameter detected in PID instruction Recoverable 34 35 Instructi
96. GE Compare for Greater Than or Equal to LE COmpare for Less than or Equal to 14 Instruction Type input The GE instruction is used to compare whether Source A value is greater than or equal to Source B value The LE instruction is used to compare whether Source B value is greater than or equal to Soutce A value X8 Instruction Set Reference Manual 9 6 Compare Instructions GE and LE Instruction Operation Instruction Relationship of Source Resulting Rung State Values GEO A gt B true A lt B false LEO A gt B false A lt B true For example If the GE instruction is IN1 1 and IN2 1 it compares whether IN lis greater than or equal to IN 2 Since the two sources are equal output B3 1 9 bit state remains ON If the LE instruction is IN1 3 and IN2 4 it test whether IN 2 is greater than or equal to IN 1 Since the IN 2 is greater than the IN1 output B3 1 10 bit is remains ON EOM Mask Compare for Equal Instruction Type input X8 Instruction Set Reference Manual Compare Instructions 9 7 The MEQ instruction is used to compare whether Source and result of Mask data value through ANDed is equal to Source B and result of Mask data through ANDed For example If the EQM instruction is IN1 240 OFOH and IN2 4080 FFOH compare whether the two values are equal to FOH through ANDes Then these results are compared to each other IN1 240 0F0H AND MASK 0F0
97. H FOH IN1 240 FF0H AND MASK 0F0H FOH Because the Mask value of the two sources are equal output B3 1 11 bit state remains ON Address Address Parameter Data Table Mode Level 8 oc gt ela Y E E S Sl g 15 o 8 S s s s 312 e dale Eis 259 E a Sl a ja lt S S la Source y y 3 a a 4 y Mask y y IE IE E Compare y y IE EE E LIM Limit Test Instruction Type input X8 Instruction Set Reference Manual 9 8 Compare Instructions The LIM instruction is used to compare to values between Low Limit and High Limit LIM Instruction Operation Based on Low Limit Test and High Limit Values And Rung State Low Limit lt Input x High Limit true Test Low Limit or Input High Limit false High Limit Input Low Limit false Test gt High Limit or Input lt Low Limit For Example true If the LIM instruction is IN 4080 Low Limit 240 High Limit 4080 since the source is between Low Limit and High Limit output B3 1 12 bit state remains ON Address Address Parameter Data Table Mode leva g S e s 8 T 5 z sial lelgl e l amp l s c SIA els is s 2 5 E E Sla eja lt S u Low Limit y y JiviviIJyIy JIN Test y y ya y y a 4 y High Limit y NI JA NI INININ MET X8 Instruction Set Reference Manual
98. HSC 0 Underflow Long Word 32 bit X8 Instruction Set Reference Manual INT Status Read Write The Underflow flag specifies the Low Preset of the HSC When the accumulator value of HSC is less than the value defined in the Underflow the Underflow interrupt is triggered HSC is set the Overflow value as accumulator to keep the count The data range for the accumulator value is 2 147 483 648 2 147 483 647 Using the High Speed Counter and Programmable Limit Switch 5 27 To set the Underflow value toggles the SetParameter bit from OFF to ON and the Underflow value stored in the SFR is transferred to the HSC The value stored in the Underflow must be less than or equal to the Low Preset or an HSC error is generated X8 Instruction Set Reference Manual 5 28 Using the High Speed Counter and Programmable Limit Switch HSCS Set High Speed Counter Value HSCS EN HSCO HSC Number N4 0 4High Preset N4 1 4Low Preset N4 3 Output High Source N4 4 4 Output Low Source Instruction Type output Data Size Word Long Word The HSCS instruction allows the high and low presets and high and low output source to be applied to a high speed counter These parameters are described below HSC Number Specifies which HSC is being used HSCO HSC1 HSC2 HSC3 HSC4 and HSC5 High Preset Specifies the value in the High Preset Word 32768 32767 Long Word 2 147 483 648 2 147 483 647 Low Preset Specifi
99. I O LI LO AI O O O O l1 0 X8 Instruction Set Reference Manual Converion Instructions 11 3 Decode 4 to 1 of 16 Source Bits Destination Bits X 0 0 1 ypopoJpoJpoJpopopoJpoJpopoJpopoJpoJ 1 0 0 X 0 0 1 o mu o lol sso O 1 8 0 y X 0 1 0 0 0 00 0 0 0 0 0 0 0 0 1 0 0 0 0 X 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0101010710 X 0 1 1 0101 1010101 0 0 0 0 7 0 1 01010101100 X 0 1 1 01010101010100 1 0 0 0 0 0 40 4 0 X 9 0 ro ro 0 wv 1 0 0 6 0 X 0 0 8 0 o 1 0 8 d o X 0 1 Oo L0 0 o 1 8 0 mo oo u o X 0 1 0 000 1 0 0 d o j 0 j m X 1 00 0 00 1 0 0 0 0 0 0 0 0 0 0 40 4 0 X 1 0 0 0 1 0 0 0 00 0 0 0 0 0 0 0 0 X 1 1 0 0 1 0 0 0 0 0101010101010100 X 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0 X not used ENCO Encode 1 of 16 to 4 N4 32 4 IN 0000000000000100 4 Instruction Type Output The ENCO instruction uses the lower four bits of the source wotd to set multiplex 16 bit of the destination word The following table shows math status bits SR Address Flag Description SR2 0 0 Carry Flag always resets sets if more than one bit in the source is set SR2 0 1 Overflow Flag Giheriecancets SR2 0 2 Zero Flag sets if result is zero otherwise resets SR2 0 3 Sign Flag always resets The ENCO instruction
100. Instruction Set Reference Manual 1 14 1 0 Configuration 0 0000 Raw Data 1 0001 Left Align 2 0010 Voltage Value 3 0011 Percent Value 4 0100 Scaled for PID 5 0101 User Scale Reserved Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO Reserved Reserved for future use Reserved Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Reserved e Reserved for future use Input Data Type Selection Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 10 JO 0 0 0 0 0 0 1 0 0 0 1 0 1 JO JO 0 1 0 0 0000 Voltage Input 0 5V 1 0001 Voltage Input 0 10V 2 0010 Voltage Input 5 5V 3 0011 Voltage Input 10 10V 4 0100 Current Input 0 20mA 5 0101 Current Input 4 20mA X8 RT6 Input Image X8 RT6 module is the high end expantion RTD input module with 6 channel RTD input A total of 6 words are assigned to the area that shows the state and X8 Instruction Set Reference Manual 1 0 Configuration 1 15 the input of data and 8 words are allocated to the control area to set each channel Data Address Mapping Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 S Wo rd Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 Channel 5 or A N Control Area Address Mapping Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 J0
101. Logical Instructions Introduction This chapter describes Logical Instructions of X8 Series PLC The chapter is organized as follows Topic Page Introduction 12 1 AND Bit Wise AND 12 3 OR Logical OR 12 3 XOR Exclusive OR 12 4 NOT Logical NOT 12 4 X8 Instruction Set Reference Manual 12 2 Logical Instructions The follwing table shows 4 logical instructions of the X8 Series PLC Application Specific Insturcitons Instruction Used To Bit Wise AND AND Perform an AND operation OR Logical OR Perform an inclusive OR operation XOR Exclusive OR Perform an Exclusive Or operation NOT Logical NOT Perform a NOT operation When using logical instructions data range is as follow Word 32 768 32 767 Long Wotd 2 147 483 648 2 147 483 647 Math Status Bits With this Bit The Controller SR2 0 0 Carry Flag always resets SR2 0 1 pM always resets SR2 0 2 Zero Flag sets if result it zero otherwise resets SR2 0 3 Sign Flag sets if result is negative MSB is set otherwise resets Parameter Data Table Address Address Mode Level Sg E EJE AR E a S loclsg izi s gt o Z e AA el ls S EIS E amp Glal a S u Source 1 y y NN iy y RE Source 2 y y IRERE HE Destination 4 y JIN PIN X8 Instruction Set Reference Manual Logical Instructions 12 3 AND Bit Wi
102. Low Limit Error 0x12 CV High Limit Error 0x13 CV Low Limit greater than High Limit 0x21 Set Point Minimum greater than Maximum 0x31 Set Point out of range 0x41 Deadband Error X8 Instruction Set Reference Manual 20 12 PID Control X8 Instruction Set Reference Manual Chapter 2 1 ASCII Instructions Introduction This chapter describes the X8 Series PLC ASCII instructions This chapter organized as follows Topic U a o gt S e Introduction ATOI Convert ASCII String to Integer ITOA Convert ASCII String to Integer ACN ASCII String Concatenate AHX ASCII String Extract ASCH Searching String ACMP Compare String ARNL Number of Characters for Line ARNC Number of Characters in Buffer co alal a do am A amp c ACB Clear Buffer AHS Handshake EN e ARC Read Characters 1 AWA Write String with Append 2 N N N N N N N N NO N N N N N N gt gt gt gt gt gt gt AW Write String as D X8 Instruction Set Reference Manual 21 2 ASCII Instructions X8 Instruction Set Reference Manual The X8 Series PLC supports ASCII typed data and contains instructions for processing characters string and ASCII communications The following table shows the ASCII instructions Instructions for ASCII character string Instructions Descriptions ATOI Convert ASCII String to Integer ITOA Con
103. Manual 1 32 1 0 Configuration X8 Instruction Set Reference Manual Rising Edge Time Chart Example 1 External Input Latched Status Input File Value Rising Edge Time Chart Example 2 External Input Latched Status Input File Value TIP Scan Number X Scan Number X 1 Scan Number X 2 Input Ladder Output Input Ladder Output Input Ladder Output Scan Scan Scan Scan Scan Scan Scan Scan Scan Scan Number X Scan Number X 1 Scan Number X 2 Input Ladder Output Input Ladder Output Input Ladder Output Scan Scan Scan Scan Scan Scan Scan Scan Scan The gray area of the time chart is the input filter delay 1 0 Configuration 1 33 IMPORTANT The external input signal does not displayed in the input data area when the input port is configured for latching behavior When the input port configuration is raising Edge in input data area the data value is normally off and on when a rising edge is detected The previous examples demonstrate rising edge behavior Falling edge behavior operates exactly the same way Falling Edge Time Chart Example 1 Scan Number X Scan Number X 1 Scan Number X2 Scan Number X 3 Input Ladder Output Input LadderOutput Input Ladder Output Input Ladder Outpu Scan Scan Scan Scan Sca
104. OU instruction use the following data type X8 Instruction Set Reference Manual FIFO data table specified as QUEUE CTRL CR data table It the BSL instruction is in run state and used to control the internal flogs LENGTH bit length of the data table POS data location that is stored first when extracting data Pointer OUT data table to store after unload the data from the QUEUE Shift and FIFO LIFO Instructions 15 5 You can check the result of the above example to the figure below Integer Integer Integer Integer Integer Integer Integer Integer Integer When the N14 0 is specified as IN N14 10 N14 19 are as QUEUE area and N14 2 is OUT if the FIFOL instruction is in tun state the N14 0 is stored to the POS in the QUEUE If the FIFOU instruction is in run state unload data from the POS in the QUEUE and stores the data to N4 12 Parameter Data Table pim pom nc z El ale Y B Z ls El e3 2lE s 2 8 8 y y Ya a aly PER Y y vi vf CTRL 4 y y LENGTH y POS y OUT JB X8 Instruction Set Reference Manual 15 6 Shift and FIFO LIFO Instructions LIFOL LIFO QUEUE LOAD LIFOU LIFO QUEUE UNLOAD L EnableUnload Done Instruction type output If the rung state is true LIFOL load the specified data to the data table specified as Stack Push LIFOU unload the data fro
105. OuputLowData BPsi22 HighPreset LowPreset OutputHighData LE OuputLowData BPsi23 HighPreset LowPreset L E OutputHighData L Bl OuputLowData Programmable Limit Switch Long Long Integer Integer Type Valve Meanng Descrip Address EIPSI20 Programmable Limit Swit LowPreset E OutputHighData E OuputLowData BPsi2 1 utHighData E OutputHighData LE OuputLowData LE OutputHighData El OuputLowData imit Switch m teger Integer Programmable Limit Switch Integer Integer g Integer Integer 9 Specifies the SFR Special Function Register for inter working with HSC and double click the Special Function Register in the Project window fa Project Controller Properties Comms Config KK Channel Configuration KK Channel Status amp Gy VO Configuration Wl vo Configuration amp 3 Ladder Programs B svso 4 EJ 05 MAIN amp Qg Special Function Registers amp 3 Data Tables XR Cross Reference E vo Bx B sr2 B 83 10 Specifies the HSC in the HSC of the Special Function Table Set the HSC Mode 0 and PlsTableNumber 12 PS table number that is set before Using the High Speed Counter and Programmable Limit Switch 5 37 PTO Pwm HSC sm jen RATC MCI BH cso CS cs2 ES3 Address Type Value Meaning p EJHSC 0 m LadderProgramNumber Integer UserinterruptEnable Bool FunctionEnabled Boot AutoStart Boot Counfi
106. Parameter Data Table Mode Level S 5 z ple T E E E 3 3 Ole o S GiS s e9 v 389 S ae Ls S 2 5 E E c5 ajejaj lt S Source 1 y Vv Vv y Length Destination y FFL and FFU Instruction Pair X8 Instruction Set Reference Manual Introduction X8 Instruction Set Reference Manual Chapter 15 Shift and FIFO LIFO Instructions This chapter describes Shift and FIFO LIFO instructions of the X8 Series PLC The chapter is organized as follows Topic Page Introduction 15 1 BSL Bit Shift Left BSR Bit Shift Righter 15 2 FIFOL FIFO QUEUE LOAD FIFOU FIFO QUEUE UNLOAD 15 4 LIFOL LIFO QUEUE LOAD LIFOU LIFO QUEUE UNLOAD 15 6 15 2 Shift and FIFO LIFO Instructions The following table shows bit shift instructions of internal data Instruction BSL Description Bit Shift Left Load the spkrified BIT to LSB and shift left a bit array one bit at a time when the rung status is true BSR Bit Shift Right Load the splxified BIT to MSB and shift right a bit array one bit at a time when the rung state is true FIFOL FIFO Queue Load Load the specified data to Queue when the rung state is true PUSH FIFOU FIFO Queue Unload Unload the data from the data table specified as Queue when the rung state is true POP LOFOL LIFO Queue Load Like Stack storage load the specified data to the data table
107. Preset Mask High Preset Mask Underflow Mask Overflow Mask HSC Mode PLS File Number Accumulator High Preset Low Preset Overflow Underflow Output Mask Bits High Preset Output Low Preset Output Error Code User Interrupt Executing User Interrupt Lost User Interrupt Pending Error Detected Low Preset Interrupt High Preset Interrupt Underflow Interrupt Overflow Interrupt Low Preset Reached High Preset Reached Count Direction Underflow Overflow Mode Done Count Down Count Up The HSC function along with the PTO and PWM instructions are different than most other controller instructions Their operation is performed by custom circuitry that runs in parallel with the main system processor This is necessary because of the high performance requirements of these functions The HSC is extremely versatile the user can select or configure the master HSC for any one of ten modes and the sub HSC for any one of five modes of operation The HSC SFR of X8 Series PLC is comprised of 37 sub elements for control Elements and status output All examples illustrate based on HSC O Address Data Format HSC Modes 1 Function User Program Access HSC 0 LadderProgramNumber Word INT 0 9 Control Read Only HSC 0 UserlnterruptEnable Bit 0 9 Control Read Write HSC 0 FunctionEnabled Bit 0 9 Control Read Write HSC 0 AutoStart Bit 0 9 Control Read Only HSC 0 CountingEnabled Bit 0 9 Control Read
108. R2 13 Integer 0 Math Register Low SR2 14 Integer 0 Math Register High Radix Structured y SR2 2 14 Math Overflow Selection If Overflow bit is set output value can be different according to this bit SR2 5 0 Overflow Trap This bit is set when the Overflow flag is set Because the Overflow flag can effect to the system this bit can be cleared forcedly on the ladder by the RST instruction SR2 0 0 Carry Flag This bit is set when the Carry flag is set SR2 0 1 Underflow Overflow Flag This bit is set when the result of a math instruction does not fit into the output target range SR2 0 2 Zero Flag This bit is set when the result is Zero SR2 0 3 Sign Flag This bit is set when the output result is negative If negative value the MSB Most Significant Bit is set SR2 13 Register Low The remainder is stored in SR2 13 when the division operation SR2 14 Register High The quotient is stored in SR2 14 when the division operation The data types of X8 Series PLC operations and atithmetic instructions are determined according to table below X8 Instruction Set Reference Manual 10 4 Math Instructions Floating Point Input 1 Input 2 Output necr integer iege Gt tS Integer Long Long Integer Float Float Long Integer Long Long Long Long Long Float Float Float Integer Float Float Long Float Float Float Float The X8 Series PLC supports Floa
109. SC 0 LowPresetOutput Word 16 bit Control Read Write binary The LowPresetOutput shows the state 1 ON or 0 OFF of the outputs on the controller when the accumulator value is reaches to the low preset However actual output value is defined by OutputMaskBits ErrorCode Description Data Format HSC Mode Function User Program Access HSC 0 ErrorCode Word INT 0 9 Status Read Only The ErrorCode stores the error codes when a HSC error is generated The table below explains the error codes Error Code Description Interrupt program data table identified in HSC 0 PFN is less than 3 Invalid Data Table Number None greater than 255 or does not exist 2 Invalid HSC Mode None This error is generated when invalid HSC mode is configured X8 Instruction Set Reference Manual Using the High Speed Counter and Programmable Limit Switch 5 21 Error Code Error Name Mode Description 3 Invail ed High Preset 0 1 If the high preset value is less than 0 sais This error is generated when the high preset value is less than or 4 Invalid High Preset 2 9 equal to the low preset 5 In va il ed Underflow Value 2 9 This error is generated when the low preset value is less than Configuration Underflow ErrorDetected Description Data Format HSC Mode Function User Program Access HSC 0 ErrorDetected Bit 0 9 Status Read Only The ErrorDetected flag is ON when a HSC error is generated When this bit is set the user should look at the erro
110. Table is set ACB Instruction deletion gt gt gt gt a 99 N Channel Configuration was changed 123 01 Time OUT N25 0 Instruction Type output The ATOI instruction converts data in the STRING data table to an integer Only 0 9 characters supported For example ST23 0 if there is 12 character 12 is output e ST23 0 if there is ABCDEF12FFFF character 12 is output To support second example the ATOI instruction allows number converting only Therefore If you enter ST23 0 AA this instruction does not output any data since there is no numbers The data range is WORD 32 768 32 767 LONG OWRD 2 147 483 648 2 147 483 647 X8 Instruction Set Reference Manual 21 4 ASCII Instructions Address Address Parameter Data Table Mode Level 5 g E gt m O de 5 Z 5 8 ls f T S 2 a l2 JEI j ljg s E a jal la lt oa S u Source y y Destination viv ITOA Convert ASCII String to Integer N25 1 OUT T23 1 255 q Instruction Type output The ITOA instruction converts an ASCII integer data to string Only 0 9 characters ate supported The input data range is LONG OWRD 2 147 483 648 2 147 483 647 Address Address Parameter Data Table Mode Level S E g E 5 3 S SIslS8 2 B 2 a 2 E 3 92 8 9 E amp S6la la lt S u Source y viv
111. Te Tm X d O S e W Data Type Data Slot Word Bit X Input Table Number Number Number Y Output Number B Binary N Integer I O Addressing schema Format Explanation Input X Output Y Status ST Binary B Integer N X Data ee Timer TM Counter CT Control CR ASCII A Float F yp STRING ST Long L Message MG PID PD Pulse Limited Switch PS Routing Path RP 0 output 1 input to Fixed i Date Table Number Available to users from No 3 Slot Delimiter nil Embedded 1 0 Slot Number 0 Id sw b S Slot Number Expansion 1 0 Slot Number 1 to 40 Word Delimiter Required to read write words or if the discrete bit number is W World Number above 15 Bit Delimiter b Bit Number 0 to 15 X8 Instruction Set Reference Manual Addressing Level Bit Addressing Addressing Level Word Addressing Addressing Example 1 0 Configuration 1 23 Explanation Data Table No Word Bit X1 0 0 0 1 Word 0 Input bit 0 Y0 0 0 1 0 Word 0 Output bit 1 ST8 0 3 8 Word 0 Status bit 3 B3 0 15 3 Word 0 Binary bit 15 N20 0 4 20 Word 0 Integer bit 4 Explanation Data Table No Word X1 0 1 1 Word 1 Y0 3 3 0 Word 3 sT 8 7 8 Word 7 B13 2 13 Word 2 N20 1 20 Word 1 X8 Instruction Set Reference Manual 1 24 1 0 Configuration 1 0 Forcing Input Filtering X8 Instruction Set Reference Manual I O forcing is the ability to On Off the sp
112. Total Message Packets Received Link Layer Error Count Link Layer Error Code CTS RTS DCD Modbus RTU Master Diagnostic Counters Block Data Link Layer Word Bit Description 6 Diagnostic Always 2 7 Length Always 30 8 Format Code Always 9 X8 Instruction Set Reference Manual 3 18 SFR Special Function Register X8 Instruction Set Reference Manual Word Bit Description 9 0 CTS 1 RTS 2 Reserved 3 Reserved 4 15 Reserved 10 Total Message Packets Sent 11 Reserved 12 Total Message packets Received Modbus RTU Master Diagnostic Counters Block Data Link Layer Word Bit Description 13 Link Layer Error Count 14 Link Layer Error Code 15 22 Reserved Modbus RTU Master Diagnostic Counters Block Presentation Layer Word Bit Description 52 Diagnostic Counters Category Identifier Always 6 53 Length Always 32 54 Format Code Always 0 55 ERR 1 Illegal Function 56 Last Device Reporting ERR 1 57 ERR 2 Illegal Data Address 58 Last Device Reporting ERR 2 59 ERR 3 Illegal Data Value 60 Last Device Reporting ERR 3 61 ERR 4 Slave Device Failure 62 ERR 5 Acknowledge 63 ERR 6 Slave Device Busy 64 ERR 7 Negative Acknowledgement 65 ERR 8 Memory Parity Error 66 Non Standard Response 67 Last Device Reporting ERR 4 to ERR 8 or Non Standard Response 68and69 Rese
113. Using Interrupts Error Code Descriptions 1 Invalid Program File Number The program file number is not 6 1535 or not exist 2 Invalid Input Selection The input port range is 0 1 2 3 4 5 6 7 3 Input Selection Overlap Each Ell uses a different input since the Ell cannot share the input UserlnterruptExecuting Description Data Format HSC Mode Function User Program Access ElI 0 UserlnterruptExecuting Bit Status Read Only The UserInterruptExecuting status bitis set when the interrupt serivce routine of EII is executed UserlnterruptLost Description Data Format HSC Mode Function User Program Access ElI O UserlnterruptLost Bit Status Read Only The UserInterruptLost bit can process 1 active and maintain up to 2 pending user interrupt conditions before it sets the lost bit You can check the interrupt lost by this bit UserlnterruptPending Description Data Format HSC Mode Function User Program Access EIl 0 UserlnterruptPending Bit Status Read Only The UserInterruptPending is a status bit that represents an EII interrupt is pending X8 Instruction Set Reference Manual Using Interrupts 19 9 ErrorDetected Description Data Format HSC Mode Function User Program Access EIl 0 ErrorDetected Bit Status Read Only The ErrorDetected flag is a status bit that can be used by the control program to detect if an error is present in the EIT configuration High Speed Counter HSC Interrupt
114. X8 A14A02 Analog Voltage Current IN 4 OUT 2 12 Bit Expansion General Configuration Analog Configuration Generic Extra Data Config 8 Input Channel 0 Disply Format Filter Input Type Selection Ig Input Channel 1 Disply Format Filter Input Type Selection p Input Channel Z Disply Format Filter Input Type Selection a Input Channel 3 Disply Format Filter Input Type Selection Voltage Input 0 to 10 VDC Raw Value Raw Data Voltage Input O to 10 VOC Raw Value Raw Data Voltage Input to 10 VDC Raw Value Raw Data Voltage Input 0 to 10 VOC Raw Value Raw Data IE Output Channel 0 Disply Format Output Type Selection E Output Channel T Disply Format Output Type Selection Raw Value X Voltage Input 0 to 10 VOC X Raw Value X Voltage Input 0 to 10 VDC X X8 Instruction Set Reference Manual 1 26 1 0 Configuration Analog Input X8 Instruction Set Reference Manual Almost the X8 series PLC Analog modules such as X8 AI4AO2 X8 AI8 X8 AO4 X8 RT6 and X8 TC6 are able to config internal setting value To use this function the functions of analog modules X8 AI4AO2 and X8 AI8 will be changed voltage Input or Current Input When select a default base module instead of above expanstion modules user can config input settings such as input filtering and input ratching Module 0 X8 X8 Modular Series A Embedded General Configuration Embedded IO
115. a 4a and 5a only 2 Only valid for HSC 0 HSC 1 and HSC 2 HSC Mode 0 Up Counter HSC Mode 0 Up Counter Examples Input X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO Counting Comments Terminals Enabled Bit Function Count Not Used Not Used Not Used Example 1 t on 1 AO Example 2 1 i al off 0 Pa pacema Input X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO CE Comments Terminals Bit Function Count Not Used Reset Hold on off off on HSC Accumulator 1 Example 1 f 0 fo 0 1 count on off on Hold accumulator Example 2 1 y 0 1 value on off Hold accumulator Example 3 1 y 0 value on off Hold accumulator Example 4 1 0 value Example 5 t ED accumulator X8 Instruction Set Reference Manual Using the High Speed Counter and Programmable Limit Switch Blank cells don t care rising edge falling edge HSC Mode 2 Counter with External Direction HSC Mode 2 Counter with External Direction Example 5 13 Input X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO X1 0 0 0 HSCO CE Comments Terminals Bit Function Count Direction Not Used Not Used off on HSC Accumulator 1 Example 1 t 0 1 count on on Hold accumulator Example 2 t 1 1 value Example 3 US Blank cells don t care f rising edge falling edge
116. al Count Not Used Reset Hold 1 Direction External Reset and Hold mode 1b 2 Counter with External Count Direction Not Used Not Used 2 Direction mode 2a 1 Counter with External Count Direction Reset Hold 3 Direction Reset and Hold mode 2b 2 Two Input Counter Count Up Count Down Not Used Not Used 4 mode 3a 1 Two Input Counter with Count Up Count Down Reset Hold 5 External Reset and Hold mode 3b 2 Quadrature Counter A Type Input B Type Input Not Used Not Used 6 mode 4a 1 Quadrature Counter with A Type Input B Type Input Z Type Input Hold 7 X8 Instruction Set Reference Manual 5 12 Using the High Speed Counter and Programmable Limit Switch Blank cells don t care f rising edge falling edge HSC Mode 1 Up Counter with External Reset and Hold HSC Mode 1 Up Counter with External Reset and Hold Examples Modes of Operation Input0 HSC 0 Input 1 HSC 0 Input 2 HSC 0 Input 3 HSC 0 Mode Value in Input4 HSC 1 Input 5 HSC 1 Input 6 HSC 1 Input 7 HSC 1 User Program Input 8 HSC 2 Input 9 HSC 2 Input 10 HSC 2 Input 11 HSC 2 Input 2 HSC 3 Input 3 HSC 3 Input 6 HSC 4 Input 7 HSC 4 Input 10 HSC 5 Input 11 HSC 5 Quadrature X4 Counter A Type Input B Type Input Not Used Not Used 8 mode 5a 1 Quadrature X4 Counter A Type Input B Type Input Z Type Input Hold 9 with External Reset and Hold 2 1 HSC 3 HSC 4 and HSC 5 support mode 1a 2a 3
117. al Function Register Word Bit Description 153 Low word RMON Tx Collision Count 154 High word RMON_T_COL 155 Low word Total Commands Sent 156 High word 157 Low word Total Commands Received 158 High word 159 Low word Total Replies Sent 160 High word 161 Low word Total Replies Received 162 High word 163 Low word Total Replies Sent with Error 164 High word 165 Low word Total Replies Received with Error 166 High word 167 Low word Total Replies Timed Out 168 High word 169 Low word Total Message Connections 170 High word 171 Low word Incoming Message Connections 172 High word 173 Low word Outgoing Message Connections 174 High word 175 Low word Maximum Connections Allowed 176 High word X8 Instruction Set Reference Manual Chapter 4 Programming Instruction Overview Introduction This chapter describes X8 Series PLC Programming Insturcution Overview The chapter is organized as follows Topic Pae Introduction A X8 Instruction Group 4 2 Instruction Descriptions 4 3 X8 Instruction Set Reference Manual 4 2 X8 Instruction Group Instruction Group High Speed Counter Input Programming Instruction Overview The following table shows the X8 Series PLC programming instructions listed within their functional group Descriptions HSCS HSCC The high speed counter instructions allow you to monitor an
118. an affect to PLC scan time directly interrupt processing must be completed in the shortest time It is applied to most devices using interrupt When multiple interrupts occur the interrupts are serviced based upon their individual priority The priotities from highest to lowest ate Priority Inerupts 1 UFR User Fault Routine Interrupt 2 External Input Interrupt 0 3 External Input Interrupt 1 4 HSC Interrupt 0 HSCO 5 External Input Interrupt 2 6 External Input Interrupt 3 7 HSC Interrupt 1 HSC1 8 External Input Interrupt 4 9 HSC Interrupt 2 HSC2 10 External Input Interrupt 5 11 HSC Interrupt 3 HSC3 12 Programmable Interrupt Timer 13 External Input Interrupt 6 14 HSC Interrupt 4 HSC4 15 External Input Interrupt 7 16 HSC Interrupt 5 HSC5 Using Interrupts 19 5 Interrupt Type and Elements User Fault Routine UFR Interrupt The UFR interrupt is an interrupt with the highest priority and recovers User Fault Errot The fault routine is executed when any recoverable or non recoverable user fault occurs The basic types of faults are described below Recoverable Fault Recoverable Faults are caused by the user and may be recovered from by the UFR interrupt To clear the errors set the SR2 1 13 flag as reset value in the UFR service routine Main Processor Scan Times Math Debug Errors Protection Mem Card Forces Expansio
119. arget Node conflict 61 DF1 FD Not applicable 05 DF1 HD target node equals channel s node number DH485 local packet and target node equals channel s node number or remote packet and local bridge node equals channel s node number 07 Source node is not valid not within the range 0 254 Current communications protocol does not support the MSG address type 08 DF1 FD amp DF1 HD remote MSG not supported DH485 remote broadcast MSG not supported 09 Amount of data is too large to be supported by link layer or expansion I O communications module 00 62 Unexpected link layer error Network Layer Qualification Bad network address 01 Internet to Internet Remote MSG remote bridge non zero and the targetNode is not valid not within the range 0 254 02 7 Internet to NonInternet Remote MSG remote bridge zero and the targetNode is not valid not within the range 0 254 03 Internet to NonInternet Remote MSG remote bridge zero and the remoteBridgeNode is not valid not within the range 0 254 00 72 Unexpected network error Application Layer Qualification MSG Reply Failures STS 81 Reply received with error STS not 0x00 nor OxFO EXT STS 82 Reply received with error STS 0xF0 EXT STS FNC 83 Function code unknown MSG Instruction Error Code Appendix B 7 MSG Error Code Mapping Internal Fail Code Hex High byte Low byte Description Identifier Code Error Code g
120. ategory Identifier Always 10 44 Length Always 14 45 Format Code Always 0 46 0 Pre Send Time Delay 47 0 7 Node Address 8 15 Reserved 48 3 Inter Character Timeout 49 4 15 RTS Send Delay 50 RTS Off Delay 51 0 7 BaudRate Communication Rate 12 8and9 Parity 13 10 15 Reserved 52 Diagnostic Counters Category Identifier Always 6 53 Length Always 32 54 Format Code Always 0 55 Presentation Layer Error Code 56 Resentation Layer Error Count SFR Special Function Register 3 17 Word Bit Description 57 Execution Function Error Code 58 Last Transmitted Exception Error Code 59 Data Table Number of Error Request 60 Element Number of Error Request Modbus RTU Slave Diagnostic Counters Block Presentation Layer Word Bit Description 61 Function Code 1 Message Counter 62 Function Code 2 Message Counter 63 Function Code 3 Message Counter 64 Function Code 4 Message Counter 65 Function Code 5 Message Counter 66 Function Code 6 Message Counter 67 Function Code 8 Message Counter 68 Function Code 15 Message Counter 69 Function Code 16 Message Counter A Channel Status COM 0 COM 1 USB Ethernet Xnet TCP Modbus TCP Ethernet IP CS0 10 CS0 1 CS0 12 CS0 13 CS0 14 CS0 9 0 CS0 9 1 CS0 9 3 INTEGER INTEGER INTEGER INTEGER BIT BIT BIT Modbus RTU Slave Total Message Packets Sent Message Received This Slave
121. atus Using High Speed Outputs 6 7 PT0 0 Done Data Format User Program Access The PTO 0 Done flag bit is set when the PTO pulse output has completed its operation When the EN signal of PTO instruction is false or if the PTO instruction is run the PTO 0 Done bit remains set until the PTO 0 Done bit is cleared PTO 0 DeceleratingStatus Data Format User Program Access This flag bit is set when the PTO run mode is within the deceleation phase This flag is cleard when it is within the acceleration phase or the run phase PTO 0 RunStatus Data Format User Program Access The PTO 0 RunStatus bit is set when the PTO instruction is within the run phase It is cleard when the PTO instruction is within the acceleration or deceleration phase PTO 0 AcceleratingStatus Data Format User Program Access X8 Instruction Set Reference Manual 6 8 Using High Speed Outputs Address PTO 0 RampProfile Address PTO 0 IdleStatus Address PTO 0 ErrorDetectedStatus X8 Instruction Set Reference Manual The PTO 0 AcceleratingStatus bit is set when the PTO instruction is within the acceleration phase It is cleared when the PTO instruction is within the run phase PTO 0 RampProfile Data Format User Program Access The PTO 0 RampProfile flag bit is determined how generate the frequency stored in the PTO 0 OutputFrequency when the PTO 0 RampProfile flag is within the accelerate or decelerate phase This fla
122. ble N20 29 POS10 Parameter Data Table Address Address Mode Level ac g C5 z e T 2 g 5 Ss amp s 318 15 e 2 2 g8 8 SIPs Z E Glal la lt z S Data Table ly 41A n Y y Viv CTRL y J LENGTH y POS X8 Instruction Set Reference Manual 16 6 Sequencing Instructions X8 Instruction Set Reference Manual Chapter 17 Program Control Instructions Introduction n this chapter the X8 Series PLC program congpl Instructions are described This chapter organized as follows Ml Page JMP Jump to Label 7 2 LBL Lable 7 3 CALL Call Subroutine 17 3 SBR Subroutine 7 3 RET Return from Subroutine 7 4 SUSP Suspend 7 4 ENDT Temporary End 7 4 END End of Ladder Program 7 5 MCR Master Contrl Rep VIII UII DUD 7 5 X8 Instruction Set Reference Manual 17 2 Program Control Instructions The following table shows the program control instructions of X8 Series PLC ladder program Instructions Descriptions Jump to Label JUMP Jump forward backward to a corresponding label instruction LBL Label Indicate the location for JUMP instruction CALL Call Subroutine Call the subroutine Subroutine Label SBR Indicate the beginning of a subroutine and should be paired with RET Return from Subroutine RET Used at the end of the subroutine and return to next instr
123. c Controller Gain Description Data Format HSC Mode Function User Program Access PD 10 Kc Word 0 32 767 Control Read Write The KC flag is used to enter the gain value of the X8 Series PLC Kc is proportional gain value of PID control and has the following values GainRangeSelection 0 0 3276 7 GainRangeSelection 1 0 327 67 Set to 50 of the value when the vibration occurs if the Ti and Td is O TIP Gain output input Input to output ratio Pb 1 Gain 100 Constant that determines the size of the control deviation e for the control output Pb Proportional Band Ti Integral Time Description Data Format HSC Mode Function User Program Access PD 10 Ti Word 0 32 767 Control Read Write The Ti is I that is integral time for I Action of the PID control That is p DE Kp e edt KL 1a In above formula Koro il dt This part is a major parameter that is divided accumulated error in the integral time Ti X8 Instruction Set Reference Manual PID Control 20 9 GainRangeSelection 0 0 3276 7 min GainRangeSelection 1 0 327 67 min Td Derivative Time Description Data Format HSC Mode Function User Program Access PD 10 Td Word 0 32 767 Control Read Write The Td is D that is derivative time for D Action of the PID control That is p Ko q z de K e led LETT e T 7 at In above formula de part is a major parameter t
124. ccurs after rounding 32767 or 2147836647 is output SR2 2 14 Math Overflow Selection bit is ignored e Carry flag is reset elf all of Destination is zero the Zero flag is set elf Overflow is set the Overflow Trap flag is set elt is set if the result is co NAN or overrange elf the MSB is set the Sign flag is set 32 767 or 2 147 836 647 is stored Input Output F N co N N N elf the SR2 2 14 Math Overflow Selection bit is clearbd 32 767 or 2 147 836 647 is output eThe Carry flag is set when the input is negative e f all of Destination is zero the Zero flag is set eThe Overflow Trap flag is set when the Overflow flag is set The following table shows data tables of the ABS instruction Parameter Data Table Address Address Mode Level S o zm a g 5 E EEE lu See o o D E e 92 E Lis s 2 8 amp E E Glal la zi8 ciu Input 1 y y X N N N N yy y Output y y IA N N N SCAL Scale with Slope Instruction Type Output The SCAL instruction causes the value at the Source address to be multiplied by the Rate slope value The resulting value is added to the Offset and the rounded result is placed in the Destination X8 Instruction Set Reference Manual 10 8 Math Instructions Input x Slope Scaled Value offset 10000 The following table shows data tables of S
125. cessor Noise signals coupled in at frequencies above the pass band are sharply rejected An area of particular concern is the 50 60 Hz region where pick up from power lines can occur Converting Analog Data The analog input circuits are able to monitor voltage signals and convert them to digital data The followings show sample Analog Signal and Data Word values using the nominal transfer function formula Analog to data word conversion 12 Bits N Vin ui x where Vin analog signal is in volts V Analog to data word conversion 16 Bits 65535 N Vin x x where Vin analog signal is in volts V Converting Analog Input Data Analog to data word conversion 12 Bits Analog Signal Data Word OV 0 5V 2048 10V 4095 1 0 Configuration 1 29 Analog Output Latching Inputs Analog inputs convert voltage signals into 12 bits or 16 bits values The followings show equations for input voltage 12 Bits 10V 2095 nputValue InputVoltage V 16 Bits 10V A 65535 InPutValue InputVoltage V For example if an input value of 4000 is in the memory the calculated value is as follows Example for 12 Bits 10V 2095 9000 9 768 V Example for 16 Bits 10V 555354000 0 610 V The X8 Series PLC have X8 AIA4AO2 that supports 2 channels 12 bit resolution and X8 AO4 that supports 4 channels 16 bit resolution X8 AI4AO2 has 0 10V DC or 4 20mA output range The X8 Series PLC have X8 AI4AO
126. ck 43 List Category Identifier Code Always 0 43 70 Reserved SFR Special Function Register 3 9 Word Descriptions 43 69 Modbus Slave Diagnostic Counters Block 70 End of List Category Identifier Code Always 0 The following tables show the details of each General Communication Status block allocated from 0 to 5 General Communication Status Block Word Bit Description Communications Channel Status Information Category Identifier Code Length Format Code Communications Configuration Error Code Bl wy N ICP Incoming Command Pending Bit This bit is set when the X8 Series PLC determines that another device has requested information from this PLC Once the request has been satisfied the bit is cleared MRP Incoming Message Reply Pending Bit This bit is set when the X8 Series PLC determines that another device has supplied the information requested by a MSG instruction executed by this controller When the appropriate MSG instruction is serviced this bit is cleared MCP Outgoing Message Command Pending Bit This bit is set when the X8 Series PLC has one or more MSG instructions enabled and in the communication queue This bit is cleared when the queue is empty SSB Selection Status Bit This bit indicates that the X8 Series PLC is in the System Mode It is always set 4 14 System Reserved Communications Toggle Push Button Communications Defaults
127. crated sit rs 8 PTO0 Normal Peron bus ui DI e o RC 9 PTO 0 EpableHardStop or qnu A reb d tete aat 9 PIO UBnableStEUS ois eoo oa 9 PECHNOUDOU Teque so Los teu es e ebenso eee ct e 10 PTO 0 OperatingFrequencyStatus sito ee e LOT RE EM 10 PTO 0 TotalQutputPulses au ee edere o heme eges 10 PTO 0 OutputPulsesProduced o4 be x vete Le A os 10 PTO 0 AccelDecelPulsesIndependent o oooommmmmmmm o o 11 FICOXceelDecelPulSes nr arta OS 12 PIOUEConaledotopia e rte vec t pr PANIER REA 14 PTOS Sr tek 4 43 aem oet A et Rad 15 PROVO Tos Pulso a d eae fab te tatis 15 PLIOO op Pulse enojan nodo 16 CBA A angie A cadet app ate SY 16 PTO 0 JogContinuousStatus s seii OLIO WI sete i RS 16 PPO Depot Ode us oit e hie tis e de RA act e tv Ra dest 17 PWM Pulse Width Modulation 0 0 00 cece ee eee 17 PWM Funcion a ASAS Blew Ss SOs 17 PAMDat Tar sana 17 PWM Data Table Elements Summaty oo ooocoooomommmo m o 19 PWM 0 O tput sensi T d e t ldes e Root Bee o wl AR AER 19 PWM 0 ProfileParameterSelect sius co ee eet 20 PWAM U EnableHardstOf toscas ayi isa 20 PWM 0 OutputFrequency O Rd 20 PW LO DutyCyeles iui o ee ER RC C ORG n 21 PWM 0 AccelDecelDelay v viet ie ke xa PH ee et 21 PIV MO ErrorCode cx ota oia b PRESA LAS 21 PWM 0 DeceleratingStatus eu voe epe o Ce a SO e PAS 4 22 PWM ORS tate mei eru en B WOES tati doe i 22 PWIM U IdleStatus iq ek opa eee ex RS ER USE 22 PW NLO ErtorDet ctedS itus ce x ee reb ce S 23 PWM 0
128. ction contains codes that is not used in the PLC and the first subroutine line on the XGPC X8 Instruction Set Reference Manual 17 4 Program Control Instructions RET Return from Subroutine RET EN ENO Instruction Type output The RET instruction marks the end of the subroutine execution and returns from subroutine to the next instruction which is call the subroutine SUSP Suspend Instruction Type output The SUSP instruction is used for program debugging and system troubleshooting This instruction causes the processor to enter the suspend IDLE mode causing all outputs to be de energized The NUM data range is from 32768 to 32767 ENDT Temporary End C ENDT gt Instruction Type output The ENDT instruction is used to end the ladder program execution temporary If this instruction enters RUN state mode during the ladder program execution the PLC aborts ladder scan This instruction can not be used for interrupt service routine and HSC related subroutine X8 Instruction Set Reference Manual END End of Ladder Program MCR Master Contrl Reply Program Control Instructions 17 5 CEND gt Instruction Type output The END instruction marks the end of the ladder program And the PLC displays the end of ladder program scan This instruction causes return from subroutine interrupt routine at the point whete it is called CMCR Instruction Type output The MCR instruction wot
129. d control the high speed counter Generally used with DC inputs PTO PWM PTP PWM Output The PTO and PWM instructions allow you to monitor and control the data Generally used with DC inputs Relay Type Bit NO NC OUT SET RST ONSR EGR ONSF Relay and Contact instructions allow you to monitor the input contact and control the status bit Timer and Counter TON TOF TONR CTU CTD RSTA Timer and Counter instructuions allow you to control operations based on time or the number of events EQ NE LT LE GT GE EOM LIM Compare The compare instructions compare values by using a specific compare operation ADD SUB MUL DIV NEG CLR ABS SORT SCAL SCAP SWAP CALC COS ATAN ASIN ACOS SIN Math TAN POW LN LOG DEG RAD The math instructions supports various arithmetic operations Application Specific CLKR CLKC This is instruction for perfomance diagonsis and read and compare clock data DECO ENCO BCD BIN GRAY Conversion The Conversion instruction allows you multiplex and de multiplex gray code and conversion between binary and decimal BCD values joies AND OR XOR NOT g The Logical instructions perform bit wise logical operations on words Move MOV MOVM The Move instructions modify and move words Data Table COPW COPT FILT BSL BSR FIFOL FIFOU LIFOL LIFOU SWAP The Data Table Instructions perform operations on data table Sequencer SEQIC SEOO SEOL The
130. d in each chart have nothing to do with controller scan time They simply illustrate a sequence of events In actuality the controller may have hundreds ot thousands of scans within each of the stages illustrated in the examples X8 Instruction Set Reference Manual SFR Special Function Register PTO Sub Elements PTO Function Using High Speed Outputs 6 5 Following is the SFR screen of the PTO instruction as mentioned above li Special Function Registers Address PTO PWM HSC Sm El RTC Enable Status follows rung lt Operating Frequency Status Elements for PTO control is described in this chapter examples illustrate PTO 0 SFR PTO Sub Element PTO 0 Contorl The variables within each PTO sub element are listed individually below All Address and sub element Data Format Range User Program Access PTO 0 Output Word INT 2 4 Read Only PTO 0 RampProfile Bit 00r 1 Read Write PTO 0 ControlStop Bit 0 or 1 Read Write PTO 0O AccelDecelPulsesIndependent Bit Dor 1 Read Write PTO 0 JogPulse Bit 0 or 1 Read Write PTO 0 JogContinuous Bit 0 or 1 Read Write PTO 0 EnableHardStop Bit 0 or 1 Read Write PTO 0 OutputFrequency long word 0 100 000 Read Write PTO 0 JogFrequency long word 0 100 000 Read Write PTO 0 TotalOutputPulses long word 0 2 147 483 847 Read Write PTO 0 AccelDecelPulses long word Read Write X8 Instruction Set Reference Manual
131. dress PTO 0 Error Code PWM Pulse Width Modulation PWM Function PWM Data Table Using High Speed Outputs 6 17 PTO 0 ErrorCode Data Format User Program Access PTO PTO 0 ErrorCode shows the error code The X8 Series PLC High Speed Output PTO and PWM function supports up to 100KHz and is applied to simple motion control and high speed pulse output The PWM function can only be used with the controller s embedded I O It cannot be used with expansion I O modules The PWM instruction should only be used with X8 Series PLC Relay outputs are not capable of performing very high speed operations 0 4 PWM Number Instruction Type output The PWM function allows a field device to be controlled by a PWM wave form The PWM profile has two primary components Frequency to be generated Duty Cycle interval The PWM instruction along with the HSC and PTO functions ate different than all other controller instructions Their operation is performed by custom circuitry that runs in parallel with the main system processor This is necessary because of the high performance requirements of these instructions A typical operating sequence of a PWM instruction is as follows 1 The rung that a PWM instruction is on is solved true the PWM is statted 2 PWM function execution Frequency is generated X8 Instruction Set Reference Manual 6 18 Using High Speed Outputs X8 Instruction Set Reference Manual 3
132. dule only This instruction uses the following operands Slot defines the slot location of output port For above example If slot Y0 0 1 word Oof slot 0 in output is used Mask the masked value of the output data or data table contains constants or masked data Length This is the number of words to output Parameter Data Table e d oc 2 S s E E elslelsls le 3l E E amp 3 5 8 E 3 d SLOT y y MASK NI y LENGTH EOS End of Scan lt EOS gt Instruction Type output The EOS instruction updates IO read write and communications The EOS instruction is not required separate the input data because it executes all of ports in the PLC at the same time When the rung condition is in true updated all of IO ports and communication status The scan then resumes at the instruction following the REF instruction This instruction updates relatively slow IO port and cannot be executed from time effected STI HSC routine EII routine or a user fault routine because the internal watchdog timer or scan timer is initialized after the EOS instruction execution X8 Instruction Set Reference Manual 18 4 Input and Output Instructions X8 Instruction Set Reference Manual Chapter 19 Using Interrupts Introduction This chapter the X8 Series PLC interrupts are described This chapter organized as fo
133. e source string data table IN Source String Index Start point to search The first character is 1 String To Search String to search The following ladder example shows that search the string in ST23 5 starting at the Index for the string found in ST23 4 the position result is stored in 1 B3 10 4 ST23 4 4 IN Result N25 5 N25 4 Index ST23 5 4 String Search Parameter Data Table Address Address Mode Level S 5 slg B E tls dui 6 2 z SISIg s E 5 8 2 ala jale s 2185 E E G6 a jal S u Source 1 J INDEX y 4 String Search 4 y Destination y ACMP Compare String ST234 ST23 5 Instruction Type output X8 Instruction Set Reference Manual ASCII Instructions 21 7 The ACMP instruction is used to compare two strings in Source 1 and 2 If the strings are identical the rung is true The following example shows that compare two string in the Source 1 and 2 If the strings are identical the rung is true and store the result to destination B3 10 5 ST23 44 IN1 Address Address Parameter Data Table Mode Level S 5 gla 2 g LE Els S E S 5 amp SSB s oles f AIRE 2 S g15 E S6la a lt S u Source 1 y y Source 2 y y Destination y y ARNL Number of Characters for Line
134. e Limit Switch 5 9 HSC Operating Modes Mode Number Type Up Counter 0 The accumulator is immediately cleared 0 when it reaches the high preset A low preset cannot be defined in the mode 0 Up Counter with external reset and hold 1 The accumulator is immediately cleared 0 when it reaches the high preset A low preset cannot be defined in the mode 0 2 Counter with external direction Mode for counter direction setting 3 Counter with external direction reset and hold Mode for counter direction reset and hold setting 4 Two input counter up and down 5 Two input counter up and down with external reset and hold 6 Quadrature counter phased inputs A and B 7 Quadrature counter phased inputs A and B with external reset and hold 8 Quadrature X4 counter phased inputs A and B g Quadrature X4 counter phased inputs A and B with external reset and hold The main high speed counters su pport 10 types of operation mode and the sub high speed counters support 5 types mode 0 2 4 6 8 If the ma in high speed counter is set to mode 1 3 5 7 or 9 then belong the sub high speed counter will be disabled X8 Instruction Set Reference Manual 5 10 Using the High Speed Counter and Programmable Limit Switch X8 Instruction Set Reference Manual Counting Method according to Multiplication and Phase Difference Phased input Description Phase A Phase B i al a
135. e Mapping Internal Fail Code Hex High byte Low byte Description Identifier Code Error Code group 26 Socket error receive 2 Socket error unlisten 28 Socket error unbind 29 Socket error unaccept 2A Socket error disconnect 2B Socket error delete 30 Open connection timeout 31 Accept connection timeout 32 Read timeout 33 Write timeout 22 HOD ONE Socket error bind 27 Socket error unlisten 28 Socket error unbind 29 Socket error unaccept 2A Socket error disconnect 2B Socket error delete 30 Open connection timeout 31 Accept connection timeout 32 Read timeout 33 Write timeout 01 SMTP mail server IP Address not configured 02 To destination Address not configured or invalid 03 From reply Address not configured or invalid 04 Unable to connect to SMTP mail server 05 Communication error with SMTP server 06 oe Authentication required 07 Authentication failed 10 SMTP Configuration does not exist XX 35 for Xbus MSG Xbus messaging failed MSG Instruction Error Code Appendix B 5 MSG Error Code Mapping Internal Fail Code Hex High byte Low byte Description Identifier Code Error Code group 01 RP CFG Invalid subtype 02 41 RP CFG Invalid IP Address 00 42 RP CFG No Data Table defined or Incorrect RP Data Table defined 00 4E Target node does not accept this type of MSG instruction 00 4F Local communication channel is shutdown Applicat
136. e Message Timeout word The value is 10m sec unit NumberOfByte Data Format User Program Access The NumberOfByte instruction stores the number of Data Byte to send When the subtype is Modbus Master of NX Plus it stores the number of Element Address MGn 0 TargetDataTablelnfo 0 4 Address MGn 0 BreakConnection Address MGn 0 UnConnectedMessage Address MGn 0 TimeOut Communications Instructions 22 7 TargetDataTablelnto 0 4 Data Format User Program Access The TargetDataTableInfor instructions is used to store the data table information of the Target node BreakConnection Data Format User Program Access When the BreakConnection bit is set the Ethernet TCP connection will be closed after the MSG instruction has completed UnConnectedMessage Data Format User Program Access When the UnConnectedMessage bit is set an unconnected type message will be generated whenever that EtherNet IP MSG instruction is triggered Timeout Data Format User Program Access X8 Instruction Set Reference Manual 22 8 Communications Instructions Address MGn 0 ContinuousOperation Address MGn 0 Enable X8 Instruction Set Reference Manual The Timeout instruction is set when it has not receive any response for Timeout If the Timeout is set by the user the MSG instruction is cleared during execution ContinuousOperation Data Format User Program Access When this bit is s
137. e PWM is within the run phase Set 1 Whenever the PWM is within the run phase Cleared 0 whenever the PWN is not in the run phase PWM 0 IdleStatus Data Format User Program Access The PWM 0 IdleStatus bit is set when the PWM is in the Idle state Set 1 Whenever the PWM is in the Idle state Cleared 0 Whenever the PWM is not in the Idle state Address PWM 0 ErrorDetectedStatus Address PWM 0 NormalOperationStatus Address PWM 0 EnableStatus Using High Speed Outputs 6 23 PWM 0 ErrorDetectedStatus Data Format User Program Access The PWM 0 ErrorDetectedStatus bit is set when the PWM error is detected Set 1 Whenever the PWM error is detected Cleared 0 Whenever the PWM error is not detected The detected error code is stored in the PWM 0 ErrorCode element PWM 0 NormalOperationStatus Data Format User Program Access The PWM 0 NormalOperationStatus bit is set when the PWM is in the Acceleration deceleration and run statue with no PWM errors Set 1 Whenever the PWM is in the Acceleration deceleration and run statue with no PWM errors e Cleared 0 Whenever the PWM is in its normal state PWM 0 EnableStatus Data Format User Program Access The PWM 0 EnableStatus bit is input signal that enables the PWM execution If this bit set rung with PWM instruction is executed X8 Instruction Set Reference Manual 6 24 Using High Speed Outputs Addre
138. e described This chapter organized as follows Topic Page Instruction 11 1 DECD Decode 4 to 1 of 16 11 2 BIN Convert form Binary Coded Decimal BCD 11 4 GRAY Gray Code 11 5 11 2 Converion Instructions The conversion instructions multiplex and de multiplex data and perform conversions between binary and decimal values Instruction Description Decodes 4 to 1 of 16 DECO Decodes a 4 bit value turning on the corresponding bit in the 16 bit destination Encode 1 of 16 to 4 ENCO Encodes a 16 bit source to a 4 bit value BIN Convert From Binary Coded Decimal Convert BCD source to decimal values TOD Convert to Binary Converts the integer source value to BCD format and Coded Decimal stores it in the destination GCD Gray Code Converts Gray code data Source to an integer value and stores it in the destination Address Address Parameter Data Table Mode Level g 5 z Ei Bl S RIE gt sis 15 E E ola ejaj lt S u Source y viv y Destination y iy y DECD Decode 4 to 1 of 16 gt 0000000000000100 Instruction Type output The DECD instruction uses the lower four bits of the source word to set multiplex 16 bit of the destination word The 4 bits of the source to destination shown in the table below Decode 4 to 1 of 16 Source Bits Destination Bits X 0 8 1 0 jw 0 C
139. e e ote 6 A Sr odore a ed noh ego AL dicc antes eu 6 LowPresetMask pico 7 HigbPresetMask ecu oe aor Melon dece Senna ei EAE 7 U derfl wMask ihe da ob dye da NY 7 Overtlow Mask qa E E E doi OS 8 HSC Mes ona du ear Pn Sc au Edades Deia 8 Counting Method according to Multiplication and Phase Difference 10 HSC Mode 0 Up Counter 12 HSC Mode 1 Up Counter with External Reset and Hold 12 HSC Mode 2 Counter with External Direction 13 HSC Mode 3 Counter with External Direction Reset and Hold 13 HSC Mode 4 Two Input Counter up and down 14 Mode 5 Two Input Counter up and down with External Reset and Hold 14 Using the Encoder 14 HSC Mode 6 Quadrature Counter phased inputs A and B 15 HSC Mode 7 Quadrature Counter phased inputs A and B With External Reset and Hold 16 HSC Mode 8 Quadrature X4 Counter 16 HSC Mode 9 Quadrature X4 Counter with External Reset and Hold 17 ACCU Ola COE uio oe ea rine dcs dei sii ecd a iic NFL 17 larum O 17 LOWE IESE oce ite sp ab ee Mb Rae esu le eo eum s 18 A casei ute vdd weave e a UP E a wan ede ee qu du 18 JU debE QW wa eee au ah RUPTURE a KF ROTA 19 OutputMask Bits i oe ER oe be esce eed Den 19 ir O node e re dore e e a pe e iO 20 Loswpteset Output oco a 20 Ettot Ode eer re Ar e Lotto eL te ates 21 Ertrotretecteds custo NR eed 21 Useeinterr ptEXecubtiWig puts torte dedo oU ehem ect Retos 21 UserInterruptPending iu eee ted abes eg ed us 22 Userlnterruptko
140. ead Write PD22 0 PidCompletedThisScan Binary Bit 0 or 1 Status Read Only PD22 0 PidInstructionEnabled Binary Bit 0 or 1 Status Read Only PD22 0 IntegralSum RN PUE B Status Read Write PD22 0 19 ae e a 7 Status Read Only Address Data Format Data Range Function User Program Access PD10 0 SetpointScaled Word INT 0 16 383 control Read Write PD10 0 MaximumSetpointLimit Word INT 32 768 32 767 control Read Write PD10 0 MinimumSetpointLimit Word INT 32 768 32 767 control Read Write PD10 0 ProcessVariableScaled Word INT 0 16 383 control Read Write PD10 0 0ldSetpointValue Word INT 32 768 32 767 Status Read Only X8 Instruction Set Reference Manual PID Control 20 5 Address Data Format Data Range Function User Program Access PD10 0 OutputLimitingEnabled Binary l n control Read Write PD10 0 ControlVariableHighLimit Word INT 1 10096 control Read Write PD22 0 ControlVariableLowLimit Word INT 1 100 control Read Write TimedOrPIT Description Data Format HSC Mode Function User Program Access PD 10 TimedOrPIT Bit 00r 1 Control Read Write The TimedO rPIT bit determines how update the CV value of the PID 0 PIT Mode Update the CV value when PID scan in the PIT interrupt service routine Therefore PIT interrupt interval and LoopUpdataTime must be same 1 Timed Mode update the CV value according to interval specified by the LoopUpdataTime AutoOrManual Description
141. ecific bit at the user s discretion Input Forcing When an input is forced to specified value the value in the input data file will be set to a user defined state For digital inputs you can force an input on or off When an input is forced it no longer reflects the state of the physical input For embedded input port in the base module the PLC reacts as if the force is applied to the physical input terminal TIP When an input is forced it has no effect on the input device connected to the controller Output Forcing When an output is forced the PLC overrides the status of the control program and output port will be set the output to the user defined state Digital I O can be forced on or off The value in the output port is unaffected by the force It maintains the state determined by the logic in the control program Howevet the state of the physical output will be set to the forced state TIP If you force an output controlled by an executing PTO or PWM function an instruction error is generated Configurable Input The X8 Series PLC allow users to configure embedded digital I O of DC inputs for high speed or normal operation Users can configure each input s response time That is it can be set the duration time that can recognize input signal form the PLC through a configurable input filter function If it is set to long time the most absolute element to recognize the signal by the PLC is how long to keep
142. elerate for both profiles X8 Instruction Set Reference Manual 6 14 Using High Speed Outputs For Trapezoid PTO 0 OutputFrequency 4 0 5 PTO 0 OutputFrequency X For S Curve Profiles PTO 0 OutputFrequency 0 999 X PTO 0 OutputFrequency X UU PTO 0 ControlledStop Address Data Format User Program Access The PTO 0 ControlledStop bit is used to stop an executing PTO instruction Following two graphs show that the PTO is stop forcedly by PTO 0 ControlledStop 1 within the run phase and within the acceleration phase If the PTO 0 ControlledStop bit is set during the run phase the run phase completes and the PTO immediately enters the deceleration phase ControlledStop 1 Acceleration Run Deceleration If the PTO 0 ControlledStop bit is set during the acceleration phase the acceleration phase completes and the PTO immediately enters the deceleration phase X8 Instruction Set Reference Manual Address PTO 0 JogFrequency Address PTO 0 JogPulse Using High Speed Outputs 6 15 Acceleration Run Decelera on OR PTO 0 JogFrequency Data Format User Program Access Long Word 0 100 000 Read Write The PTO 0 JogFrequency variable defines the frequency of the PTO output during all Jog phases The range of frequency is 0 100 000 Hz This value is typically determined by the type of device that is being driven the mechanics of the application or the device components being moved The data
143. er Integer 0 TargetNodeNumber Integer 0 MsgTimeout Integer 0 NumberOfBytes Integer 0 TargetDataTablelnfo 5 Integer 0000 0000 0000 0000 Bits BreakConnection Bool 0 OFF UnconnectedMessage Bool 0 OFF TimeOut Bool 0 OFF ContinuousOperation Bool 0 OFF Enable Bool 0 OFF Range Bool 0 OFF Enabled Waiting Bool 0 OFF Error Bool 0 OFF Done Bool 0 OFF Start Bool 0 OFF ErrorCode Integer 0 No Error ElapsedTime Integer 0 ErrorCounter Integer 0 RoutinePathData Table Integer 0 L RoutingPathElement Integer 0 Subtype Data Format User Program Access The Subtype instruction is used to set the Message type Communication method 0 Xnet Master 1 Modbus Master 2 PCCC 3 CIP Generic 4 NX Plus Master Command Data Format User Program Access The Command instruction is used to store the specified instruction code X8 Instruction Set Reference Manual 22 6 Communications Instructions Address MGn 0 SuppElementinfo 0 2 Address MGn 0 ChannelNumber Address MGn 0 MsgTimeout Address MGn 0 NumberOfByte X8 Instruction Set Reference Manual SuppElementinto 0 2 Data Format User Program Access The SuppElementInfo instruction is used to store the additional Element information ChannelNumber Data Format User Program Access The ChannelNumber instruction is used to store the channel number to send this message MsgTimeout Data Format User Program Access This is th
144. ernal interrupt handling structurally TM9 0 Accumulator Use an RSTA Reset Accumulator instruction to reset a timer s accumulator and status bits X8 Instruction Set Reference Manual 8 4 Timer and Counter Instructions TIP Timer accuracy refers to the length of time between the moment a timer instruction is enabled and the moment the timed interval is complete Timer Accuracy Time Base Accuracy 0 001 seconds 0 001 0 00 0 01 seconds 0 01 0 00 1 00 seconds 1 00 0 00 TIP Timing could be inaccurate if JUMP LBL CALL or SBR instructions skip over the rung containing a timer instruction while the timer is timing If the skip duration is within 2 5 seconds no time is lost if the skip duration exceeds 2 5 seconds an undetectable timing error occurs When using an instruction can effect to a timer such as subroutines a timer must be scanned at least every 2 5 seconds to prevent a timing error Address Address Parameter Data Table Mode Level Sg oc e f Es EI S S Sle o as 819 o s D v 2 E a lals i8 s Se rm E amp Slal la lt S u Timer y y y TimeBase y Preset y Accumulator y X8 Instruction Set Reference Manual Timer and Counter Instructions 85 TON Timer On Delay TOF Timer Off Delay L Enable _ Done Instruction Type output Use the TON instruction to delay turnin
145. es out When the accumulator reaches this value the DONE status bit is set Accumulator This is the timer value that currently accumulated It represents elapsed time The accumulator data range is from 0 to 32767 Timers can be set to any one of three time bases Timer Base Settings Time Base Timing Range Data Table Settings TimeBase1 TimeBase0 0 001 seconds 0 32 767 seconds 0 1 0 01 seconds 0 327 67 seconds 0 0 1 00 seconds 0 32 767 seconds 1 0 The TimeBase 0 and TimeBasel value in the table above is automatically set in the ladder program If the BASE value in the figure below is set to 0 001 the TimeBase 0 and TimeBasel value in the TM data table related with the BASE value is set automatically X8 Instruction Set Reference Manual Timer and Counter Instructions 8 3 L Enable C Done Following table shows the timer data table elements Element Data Type Access Description TimeBase0 Bit Read Write TER am F Read White Time setting based on timer Done Bit Read Only Timer operation is completed TimerTiming Bit Read Only Timer is timing Enable Bit Read Only Timer is enable Preset LongWord Read Write Preset Accumulator LongWord Read Write Accumulator ATTENTION Do not copy timer elements while the timer enable bit EN is set Timing could be inaccurate if the timer refers timer elements from outside since the timer uses an int
146. es the value in the Low Preset Word 32768 32767 Long Word 2 147 483 648 2 147 483 647 Output High Source Data table to store the HighPresetOutputdml output register The data range for the output high source is from 0 to 65 535 Output Low Source Data Table to store the LowPresetOoutputdml output The data range for the output low source is from 0 to 65 535 Valid Addressing Modes and File Types are shown below Parameter Data Table Address Address Mode Function Files o lt e TM CT CR ST MG PD PTO PWM CS Comms DLS DataLog Immediate Indirect LongWord Element Word HSC Number High Preset viv vViviv Low Preset e lt a lt lt lt lt Output High Source viv viv y Output Low Source viv viv y X8 Instruction Set Reference Manual Using the High Speed Counter and Programmable Limit Switch 5 29 HSCC Clear High Speed Counter Value Instruction Type output The HSCC instruction resets the HSC and allows a specific value to be written to the HSC accumulator Counter Specifies which the HSC is being used HSCO HSC1 HSC2 HSC3 HSC4 HSC5 Source Setting value Input the value directly or input data table The data range is from 2 147 483 648 to 2 147 483 647 Parameter Data Table Function Files Address Address Mode Level e E g 2 p ca
147. et the message is triggered after the message transmission Enable Data Format User Program Access When this bit is set the message is triggered The Enable bit is set when rung conditions go true and the MSG is enabled The enable conditions are when the command packet is built and put into one of the MSG buffers the request is put in the MSG queue You may clear this bit in order to re trigger a MSG instruction or set the ContinuousOperation to automatic execution There are two method to clear this bit Set the Done or Error bit in the MSG data table or use RST instruction to clear the Enable bit IMPORTANT Do not set this bit from the ladder program Address MGn 0 Range Address MGn 0 EnabledWaiting Address MGn 0 Error Communications Instructions 22 9 MG26 0 Done MG26 0 Enable CR MG26 0 Error Range Data Format User Program Access When this bit is cleared the MSG instruction is used for Local communication When this is set the MSG instruction is used for Remote communication This is used only in the PCCC protocol EnabledWaiting Data Format User Program Access When this bit is set the message is enabled and waiting for message transmission Error Data Format User Program Access The Error bit is set when message transmission has failed X8 Instruction Set Reference Manual 22 10 Communications Instructions Address MGn 0 Eone Address
148. et Reference Manual RTCA Real Time Clock Adjust Instruction SFR Special Function Register 3 5 Ambient Temperature Accuracy 1 0 C 329F 13 121 seconds month 25 C 77 F 54 54 seconds month 40 C 104 F 29 78 seconds month 55 C 131 F 43 150 seconds month 1 These numbers are worst case values RTCA Instruction Type output The RTCA instruction is used to synchronize the PLC Real Time Clock RTC with an external soutce The RTCA instruction will adjust the RTC to the nearest minute The RTCA instruction adjusts the RTC based on the value of the RTC Seconds as described below IMPORTANT The RTCA instruction will only change the RTC when the RTA rung is evaluated true after it was previously false false to true transition The RTCA instruction will have no effect if the rung is always true or false RTCA is set If RTC Seconds are less than 30 then RTC Seconds is reset to 0 If RTC Seconds are greater than or equal to 30 then the RTC Minutes are increment by 1 and RTC Seconds are reset to 0 The following conditions cause the RTCA instruction to have no effect on the RTC data RTC is disabled An external via communications message to the RTC is in progress when the RTA instruction is executed External communications to the RTC takes precedence over the RTA instruction To normal operation of RTCA instruction the RTCA rung must become false a
149. formed and the result is then cast to the data type of Destination Soutce is always greater than or equal to 1 and less than or equal to 1 Destination is always greater than or equal to O and less than or equal to TT X8 Instruction Set Reference Manual 10 12 Math Instructions Parameter Data Table Address Mode dem FEES 8 x gt BIEJ E JRE EE E 5 SSP E S5 578 S z e 3 l2 8 8g 3 2 8 8 g S 2ls z E B8la 8 5 sss 5 amp E S3 d amp Input y TONADA Output y E JIN J ATAN Arc Tangent Instruction Type Output Use the ATAN instruction to take the arc tangent of a number source and store the result in radians in the destination Address Levels for the operands involved in the ATAN can be ALL word ALL Long word ALL float or a combination These operands shall undergo a conversion to float The calculation of the source in float is then performed and the result is then cast to the data type of Destination Destination data always greater than or equal to Tt 2 and less than or equal to Address Parameter Data Table Address Mode Level N co S 8 xz gt Ee ac gt e alo ojojo E E Els B 2 3 eae S laa El E 2 El IEEE 5 ojs o E elSlal8 a8 8 E 8 S amp S S e Source y aaa ala yla y Destination y JN JN y X8 Instruction Set Reference Manual
150. g cc Sla B 2 agii I z o e E E E 2 5 gt lx 6 la lza Bl lla l lt lec ZE ma l Sla l a lt clo Su Input A YAA a a IN N a pvp Ni a a a a Y a a y a Y yy Input B Aaa IN N IN a aa N a aa a Ya laa lay N yy Output YA aa a aaa N N N N N N YA y You cannot use indirect addressing with SR MG PD RTC HSC PTO IMPORTANT PWM STI Ell BHI MMI CS and DLS data file Addressing Modes The X8 Series PLC supports three types of data addressing Immediate Direct Indirect The X8 Series PLC do not support indexed addressing Indexed addressing can be duplicated with indirect addressing Each of the addressing modes are described below Immediate Addressing Immediate addressing is the most basic addressing mode and primarily used to assign numeric constants directly to X8 Series PLC data table 0001 X8 Instruction Set Reference Manual 4 4 Programming Instruction Overview X8 Instruction Set Reference Manual Direct Addressing When you use direct addressing you can input a specific data table elements of internal X8 Series PLC below is an example of N4 1 as shown in the example below 0002 Indirect Addressing Indirect addressing allows components within the address to be used as pointers to other data locations within the controller This functionality can be especially useful for certain
151. g is set when the PTO instruction produces an S Curve profile and is cleared when the PTO instruction to produce a Trapezoid profile PTO 0 IdleStatus Data Format User Program Access The PTO 0 IdleStatus is set when the PTO is in an Idle state The Idle state is defined as the PTO is not running and no errors are present The PTO instruction must be in an Idle state before it is running the PTO 0 IdleStatus is used to check the PTO status before running PTO 0 ErrorDetectedStatus Data Format User Program Access The PTO 0 ErrorDetectedStatus is set when the PTO is in an error state If an error state is detected the error is identified in the PTO 0 ErrorCode register This flag is used to check that the PTO is in an error state by the Control Program Address PTO 0 NormalOperationStatus Address PT0 0 EnableHardStop Address PTO 0 EnableStatus Using High Speed Outputs 6 9 PTO 0 NormalOperationStatus Data Format User Program Access The PTO 0 NormalOperationStatus flag is set when the PTO is in the nomal state A normal state is ACCEL RUN DECEL or DONE with no PTO errors PTO 0 EnableHardStop Data Format User Program Access The PTO 0 EnableHardStop flag is used to stop the PTO immediately Once the PTO starts operation the only way to stop the PTO operation Idel RUN Normal Jog Continuous and Jog Pulse etc and generates a PTO sub system error when the PTO is stop by using this flag
152. g on an output The TON instruction begins to count time base intervals when rung conditions become true As long as rung conditions remain true the timer increments its accumulator until the preset value is reached When the accumulator equals the preset timing stops The accumulator is reset 0 when rung conditions go false regardless of whether the timer has timed out TON timers are reset on power cycles and mode changes TM9 1 1 0 4 BASE L Enable _ Done Instruction Type output Use the TOF instruction to delay turning off an output The TOF instruction begins to count time base intervals when rung conditions become false As long as rung conditions remain false the timer increments its accumulator until the preset value is reached The accumulator is reset 0 when rung conditions go true regardless of whether the timer is timed out TOF timets are reset on power cycles and mode changes Note that all status such as status flags are opposed to the TON instruction Followoing figures shows the timer status from begin to done If the rung condition is true the TOF timer is not operate Enable and Done bits are configured different from the TON timer X8 Instruction Set Reference Manual 8 6 Timer and Counter Instructions E Enable il Done B3 0 14 If the rung condition is false the TOF timer is timing As long as rung conditions remain false the Enable bit is cleared The Done bit is configured
153. ge of rung state as follows Use the OSR instruction when an event must start based on the false to true rising edge change of state of the rung Use the OSF instruction when an event must start based on the true to false falling edge change of state of the rung These instructions use two parameters Storage Bit this is the bit address that store the rung state from the previous scan Output Bit this is the bit address which is set based on a false to true ONSR or true to false ONSF rung transition To re activate the ONSR or ONSF instructions the rung must become TRUE ot FALSE ONSR Instruction Table X8 Instruction Set Reference Manual Rung Transition Storage Bit Rung State after Execution FALSE to TRUE 1 Scan Bit Bit TRUE to TRUE Bit Bit TRUE to TRUE FALSE to FALSE en BE ONSF Instruction Table Relay Type Bit Instructions 1 1 Rung Transition Storage Bit Rung State after Execution FALSE to TRUE 1 Scan Bit Bit TRUE to TRUE Bit Bit TRUE to TRUE FALSE to FALSE i Bn TIP Since the output bit data is remains for 1 scan you can apply the SET instruction like below ONSR EN Storage Bit ONSF EN Storage Bit ENO Output Bit ENO Output Bit Address Address Parameter Data Table Mode Level Ss 5 gla g gt E gps z Sle d a S lcisgsisuis se zE S Ss alanlel2 s s 28 18 E E 6on l5lals a z sSiu Storage Bit y y Output
154. gram Access PTO 0 Output Word INT Read Only The PWM 0 Output variable specity the physical output port that the PWM instruction controls X8 Instruction Set Reference Manual 6 20 Using High Speed Outputs Address PWM 0 ProfileParameterSelect Address PWM 0 EnableHardStop Address PWM 0 OutputFrequency X8 Instruction Set Reference Manual Output Embedded Output Port 1 PTO 0 Output 2 Y0 0 2 2 PTO 0 Output 3 Y0 0 3 3 PTO 0 Output 4 Y0 0 4 PWM 0 ProfileParameterSelect Data Format User Program Access The PWM 0 ProfileParameterSelect flag is used to set which waveform is output Set 1 Whenever the frequency is output Cleared 0 Whenever the Duty Cycle is set This bit cannot be modified while the PWM output is running PWM 0 EnableHardStop Data Format User Program Access The PWM 0 EnableHardStop bit is used to stop the PWM instruction within the run phase immediately Stop the run phase Whenever the PWM 0 EnableHardStop is set Normal run state Whenever the PWM 0 EnableHardStop is cleared PWM 0 OutputFrequency Data Format User Program Access Long Word 0 100 000 Read Write Address PWM 0 DutyCycle Address PWM 0 AccelDecelDelay Address PWM 0 ErrorCode Using High Speed Outputs 6 21 The PWM 0 OutputFrequency bit is specify the frequency of the PWM This frequency can be changed at any time unlike the PTO PWM 0 DutyCycle Data Fo
155. h External Reset and Hold Input 11 0 0 0 HSCO 11 0 0 1 HSCO 11 0 0 2 HSCO 11 0 0 3 HSCO CE Comments Terminals Bit Function Count Direction Reset Hold on off on off off on HSC Accumulator 1 SEL ot Ho jo milo 0 J 1 count on off on off off on HSC Accumulator 1 Example 2 1 y 0 f 0 7 0 0 1 count on off on Hold accumulator Example 3 1 0 1 value on off off Hold accumulator Example 4 0 0 0 value on off on off Hold accumulator Example 5 1 l 0 miro sale Example 6 t d accumulator X8 Instruction Set Reference Manual Blank cells don t care f rising edge falling edge Using the Encoder The Encoder is used for determining direction of rotation and position for rotating The figure below shows a encoder connected to inputs 0 1 and 2 The count direction is determined by the phase angle between A and B If counter input A leads counter input B the counter increments If the counter input B leads the counter input A the counter decrements Using the High Speed Counter and Programmable Limit Switch 5 15 The High speed counter can be reset using the Z input The Z outputs from the encoders typically provide one pulse per revolution ARA O InputO m O Input1 l B Z ro Input2 Reset Input ONA K f A oF Y Y Y ON B OFF 1 2 3 2 1 ON r
156. hat is multiplied derivative value by derivative time Td The range is 0 327 67 min Generally Td is set to 1 2 of the Td LoopUpdateTime Description Data Format HSC Mode Function User Program Access PD 10 LoopUpdateTime Word 0 32 767 Control Read Write The LoopUpdateTime is PID operating cycle of the PID control The operating cycle is 0 01sec scaling X8 Instruction Set Reference Manual 20 10 PID Control Enter the LoopUpdateTime data up to 10 times faster than the actual cycle When the PID operating cycle is within the PIT mode enter the same data with timer interrupt occur cycle in PIT configuration part FeedForwardBias Description Data Format HSC Mode Function User Program Access 16 383 PD 10 FeedForwardBias Word 16 383 Control Read Write The FeedForwardBias is used to compensate for disturbances that may affect the CV ScaledError Description Data Format HSC Mode Function User Program Access PD 10 ScaledError Word ie 7 Status Read Only The ScaledError is the difference between the process variable and the setpoint ErrorCode Description Data Format HSC Mode Function User Program Access PD 10 ErrorCode Word e 7 Status Read Only X8 Instruction Set Reference Manual PID Control 20 11 The ErrorCode displays the PID Error Code Error Code Description 0x01 Kc Error 0x02 Ti Error 0x03 Td Error 0x04 Bias Error 0x05 Loop Update Error 0x11 CV
157. he Binary Coded Decimal BCD source value to an integer and place the result in the destination SR Address Flag Description SR2 0 0 Carry Flag always resets sets if more than one bit in the source is set SR2 0 1 Overflow Flag en tesets SR2 0 2 Zero Flag sets if result it zero otherwise resets SR2 0 3 Sign Hag always resets Converion Instructions 11 5 Address Address Parameter Data Table Mode Level S 5 z E lg Els S E siol8l4 8 5 o SClale lass E PlsE E Blajejajelais lt Source y JIN y Destination y Vv ly y GRAY Gray Code Instruction Type output The GRAY instruction converts GRAY code data Source to an Decimal SR Address Flag Description SR2 0 0 Carry Flag always resets SR2 0 1 Overflow Flag vna ips bit in the source is set SR2 0 2 Zero Hag sets if result it zero otherwise resets SR2 0 3 Sign Flag always resets SR2 5 0 Overflow Trap sets if Overflow flag is set otherwise resets Address Address Parameter Data Table Mode Level g 5 glal 2 2 els Sle o amp olalsSl 18 o Z S oe s NE 9s 5 85 E E GSla Eejal lt S l Source y Vv v y Output Y VW y X8 Instruction Set Reference Manual 11 6 Converion Instructions X8 Instruction Set Reference Manual Chapter 12
158. he SVC instruction That is The SVC instruction is used to imptove communications performance and throughput but also causes the ladder scan to be longer The input parameters ate Channel Select serial port number 0 COM1 1 COM2 2 USB If you execute the SVC instruction for 2 or more ports at the same time logically ORed 3 ports and then substitute them Channel Select Channel s Serviced 1h 0 bit Serial Channel 0 2h 1 bit Serial Channel 1 4h 2 bit Serial Channel 2 USB 8h 3 bit Ethernet Channel 3 The following is an example of the SVC instruction MSG Message Communication Communications Instructions 22 3 B3 10 7 svc EN 0002h Channel Select MG26 0 4 MSG Table Enable Done JError Instruction Type output The MSG instruction send the message to the specified protocol The supported protocols ate Xnet Xnet X8CPU Read Xnet X8CPU Write Modbus Modbus Read Coil Status 01 Modbus Input Status 02 Modbus Read Holding Registers 03 Modbus Read Input Registers 04 Modbus Write Single Coil 05 Modbus Write Single Register 06 Modbus Write Multiple Coils OF Modbus Write Multiple Registers 10 PCCC PCCC 500CPU Read PCCC 500CPU Write PCCC 485CIF Read e PCCC 485CIF Write PCCC PLC5 Read PCCC PLC5 Write NX Protocol NX Plus Read Bits 21 NX Plus Write Bits 22 X8 Instruction Set Reference Manual 22 4 Communicati
159. i pes O S Oey 3 BIN Convert form Binary Coded Decimal BCD 4 GRAY SL CO iacente ex DECR RADIO CN A de RU Sp eBay hfe dae 5 Chapter 12 Logical Instructions Tit fat BEI as 13 512 A oo tede Mat aed t wind de Pc onions 1 AND Bit Wie UND iesus t ee atera 3 ORS hoogical OR Seis agi ide ees oS Se Re SR a e d 3 XOR Exclus CB in saan TE P AED 4 NOT Lota UNE re eek ee ele ee 4 Chapter 13 Move Instructions A rd rgo endete dt delta ipw antes e eco webs MOVE Mover e ee ERA t ee E E LEO RO eg s MOVM Masked MOVYe 2 odes seda eO LE RADEON Chapter 14 Data Table Instructions AA A ke laa ean PILT FU Tabler whee ede Pr Ue BEE tre wate RS COPT Copr Table REA AR SWAP Swap Word A A A E COPW COPY WO add A E dl i dd Chapter 15 Shift and FIFO_LIFO Instructions AA ae Rothe eR IM BSL Bit Shift Left BSR Bit Shift Righter oss a Ee CEN AA FIFOL FIFO QUEUE LOAD FIFOU FIFO QUEUE UNLOAD 24 23 aeter a daw s LIFOL LIFO QUEUE LOAD LIPOU LIFO QUEUE UNLOAD votes siete a ect ades Chapter 16 Sequencer Instructions Introducti A A are Gud e ac A d SEQIC Sequencer Input Compite SEQU Sequencer Ouput i pes SBOLD Sequencer Load iio A sa Chapter 17 Program Control Instructions OCIO NESARA AAA JMP Jump to Labels cuates tope iie ne SN EBL Abla A E ay ESA E A CALL Call Sub ottfites sosia eaaa vos Ub DET eU SBR Subroutine 4 ru e A eS RET Return from Subroutine ce ene er XE Rr One 8 SUSP lt Suspenid ii ds
160. ich may lead to personal injury or death property damage or economic loss lE identifies information that is critical for successful application and understanding of the product ATTENTION Identifies information about practices or circumstances that can lead to personal injury or death property damage or economic loss Attentions help you identify a hazard avoid a hazard and recognize the consequence Preface Read this preface to familiarize yourself with the rest of the manual Who Should Use this This manual is intended for engineers or technicians directly involved in the M programming of the X8 series PLC and programmers directly involved in the anua operation field maintenance and integration of the system with the X8 series PLC If you do not have a basic understanding of the X8 series PLC contact your local RS Automation sales representative before using this product for information on available training courses How to Use This Manual Table for Instruction Setting This manual uses the following table for parameter description Table 0 1 Table for instruction Setting Symbol X1 3 0 0 Instruction Name No Description Examine if set Parameter Examine Bit 3 of word 0 in the Slot 3 ON True Off False Initial Value Applicable Mode Others Related Documents The following documents contain additional information concerning related X8 series PLC http
161. ing Data Table The parameters are CH serial port number 0 COM1 1 COM2 2 USB CTRL CR Control data table Length data length to read X8 Instruction Set Reference Manual 21 12 ASCII Instructions The following example shows that read data from a buffer through USB port and store them to ST23 6 B3 11 2 ig Data Table ST23 Length Integer B Data 41 0 ASCII u ASCII t2 ASCII 3 ASCII 4 ASCII 5 ASCII 6 ASCII in ASCII 8 ASCII 9 ASCII O10 ASCII AWA Write String with Append 43 ASCII 12 a 34 a 56 a 78 a 90 a ab a cd a ef a gh a ij a k a Enable fj Done Error Instruction Type output The AWA instruction adds two characters from the Channel Configuration and writes them to the port The default is CR ODH and LF 0AH X8 Instruction Set Reference Manual ASCII Instructions 21 13 E Channel Configutation Settings Driver Xnet Slave E Port Config Baudrate Lo Data Line Control No Handshaking B Protocol Control Node Address 1 Detect elelee General Channel General Channel Specific Category ga Ha zEW The input parameters are CH serial port number 0 COM1 1 COM2 2 USB IN STRING data table to wtite to destination CTRL CR Control data table Length data length to write to port The output parameter is POS number of data co
162. ing mode LowPresetReached Description Data Format HSC Mode Function User Program Access HSC 0 LowPresetReached Bit 2 9 Status Read Write The LowPresetReached flag is set when the HSC accumulator value is less than or equal to the low preset This flag is updated automatically when the PLC enters an executing mode HighPresetReached Description Data Format HSC Mode Function User Program Access HSC 0 HighPresetReached Bit 2 9 Status Read Only X8 Instruction Set Reference Manual 5 24 Using the High Speed Counter and Programmable Limit Switch The HowPresetReached flag is set when the HSC accumulator value is less than or equal to the high preset This bit is updated continuously by the HSC s whenever the PLC is in a run mode UnderFlowInterrupt Description Data Format HSC Mode Function User Program Access HSC 0 UnderFlowlnterrupt Bit 2 9 Status Read Only The UnderFlowInterrupt flag is set when the HSC accumulator reaches to the Underflow value and the HSC interrupt is triggered This bit can be used in the control program to identify that the underflow condition caused the HSC interrupt and applied to the logic of the control program This flag can be cleared by the control program and is also cleared by the HSC whenever these conditions are detected Low Preset Interrupt executes High Preset Interrupt executes Overflow Interrupt executes PLC enters an executing mode OverFlowinterrupt Description Data F
163. ing with a flame spread rating of 5VA V2 V1 VO or equivalent if non metallic The interior of the enclosure must be accessible only by the use of a tool Subsequent sections of this publication may contain additional information regarding specific enclosure type ratings that are required to comply with certain product safety certifications NEMA Standard 250 and IEC 60529 as applicable for explanations of the degrees of protection provided by different types of enclosure Preventing Electrostatic Discharge X8 Instruction Set Reference Manual This equipment is sensitive to electrostatic discharge which can cause internal damage and affect normal operation Follow these guidelines when you handle this equipment WORNING e f you connect or disconnect the serial cable with power applied to this module or the serial device on the other end of the cable an electrical arc can occur This could cause an explosion in A hazardous location installations Be sure that power is removed or the area is nonhazardous before proceeding e The local programming terminal port is intended for temporary use only and must not be connected or disconnected unless the area is assured to be nonhazardous e The USB port is intended for temporary local programming purpose only and not intended for permanent connection If you connect or disconnect the USB cable with power applied to this module or any device on the USB network an electrical a
164. instruction is used to compare IN data and masked source at the data table If the data is matched it sets Found flag in the CR data table specified as CTRL When the FOUND flag is set the FOUND flag indicator turned green on the ladder program Data table and Masked source data type must be same That is IMPORTANT IMPORTANT if the data table is an integer N Mask and IN must be integer N The following figure explains how the SEQIC instruction works Sequencing Instructions 16 3 IN 0000 0000 1010 1011 N19 20 AND Mask 0000 0000 1111 1110 N190 Result 0000 0000 1010 1010 e Data Table N19 10 0000 0000 0000 0000 POS1 j Data Table N19 11 0000 0000 0000 0000 POS2 E Data Table N19 12 0000 0000 1010 1010 POS3 Data Table N19 13 0000 0000 0000 0000 POS4 Data Table N19 14 0000 0000 0000 0000 POS5 Data Table N19 15 0000 0000 0000 0000 POS6 Data Table N19 16 0000 0000 0000 0000 POS7 Data Table N19 17 0000 0000 0000 0000 POS8 Data Table N19 18 0000 0000 0000 0000 POS9 Data Table N19 19 0000 0000 0000 0000 POS10 After the Source data in N19 20 and masked data in N19 0 are logically Anded then compare the result values with the data in the N19 10 N19 19 data table If the rung state goes true the POS value increments as 1 automatically to compare with the data in the N19 10 N19 19 data table On above figure same data is
165. instruction is used to compare whether one value is not equal to a second value EQ and NE Instruction Operations Instruction Relationship of Source Resulting Rung State Values EQ A B TRUE AB FALSE NE A B FALSE AB TRUE For example f the EQ instruction is IN1 1 and IN2 2 because the two sources are not equal output B3 1 5 bit state remains off If the EQ instruction is IN1 3 and INZ 4 because the two sources ate not equal output B3 1 6 bit state becomes ON X8 Instruction Set Reference Manual 9 4 Compare Instructions GT Compare for Greater Than LT Compare for Less Than Instruction Type input The GT instruction is used to compare whether Source A value is greater than Source B value The LT instruction is used to compare whether Source B value is greater than Source A value GRT and LES Instruction Operation Instruction Relationship of Source Resulting Rung State Values GT A gt B TRUE A lt B FALSE LT A B FALSE A lt B TRUE For example If the GT instruction is INT 1 and IN2 1 it compare whether IN 1 is greater than IN 2 Since the two sources are equal output B3 1 7 bit state remains OFF X8 Instruction Set Reference Manual Compare Instructions 9 5 If the LT instruction is INT 3 and IN2 4 it compare whether IN 1 is greater than IN 2 Since the IN 2 is greater than IN1 output B3 1 8 bit state remains ON
166. ion Diagnostic Counters Category Identifier Length always 30 Format Code always 1 co coo N c CTS RTS Reserved Reserved Reserved gt c Total Message Packets Sent gt Total Message Packets Received gt Undelivered Message Packets gt ENQuiry Packets Sent gt NAK Packets Received ENQuiry Packets Received gt Bad Message Packets Received and NAKed gt No Buffer Space gt Duplicate Message Packets Received gt gt co co NS om O1 AJ wy N 22 Reserved Xnet Slave Communication Port Counters Block Channel Status aag COM 0 COM 1 USB Ethernet Xnet TCP Modbus TCP Ethernet IP Xnet Slave En CS0 11 CS0 12 CS0 16 CS0 17 INTEGER i INTEGER INTEGER INTEGER INTEGER CS0 18 19 LONG CS 0 18 CS0 18 CS0 9 0 CS0 9 1 CS0 9 3 BYTE LOW BYTE HIGH BIT Disable BIT Disable BIT Disable Undelivered Message Packets Total Bad Packets Received No Buffer Space Duplicate Message Packets Received Duplicate Message Packets Received Duplicate Message Packets Received CTS RTS DCD X8 Instruction Set Reference Manual 3 12 X8 Instruction Set Reference Manual SFR Special Function Register Word Bit Description Diagnostic Counters Category Identifier Length always 30 Format Code always 1 cao co N CTS
167. ion Data Format HSC Mode Function User Program Access HSC 0 SetParameters Bit 0 9 Control Read Write The SetParamters control bit is used to load new variables to the HSC This bit is controlled by the user program and retains its value through a power cycle X8 Instruction Set Reference Manual Using the High Speed Counter and Programmable Limit Switch 5 7 LowPresetMask Description Data Format HSC Mode Function User Program Access HSC 0 LowPresetMask Bit 2 9 Control Read Write The LowPresetMask control bit is used to control the Low Preset Interrupt bit If this bit is clear 0 the HSC user interrupt is not executed when the HSC condition is reaches to the Low Preset This bit is controlled by the user program and retains its value through a power cycle HighPresetMask Description Data Format HSC Mode Function User Program Access HSC 0 HighPresetMask Bit 0 9 Control Read Write Description HSC 0 UnderflowMask The HighPresetMask control bit is used to control the High Preset Interrupt bit If this bit is clear 0 the HSC user interrupt is not executed when the HSC condition is reaches to the High Preset This bit is controlled by the user program and retains its value through a power cycle UnderflowMask Data Format User Program Access The UnderflowMask control bit is used to control the underflow interrupt If this bit is clear 0 he HSC user interrupt is not executed when the HSC condition
168. ion Layer Qualification Bad MG Data Table parameter for building MSG 01 Channel does not exist 02 rw byte cmd is invalid 03 targetDataTable type for PLC5 Read Write is invalid 04 rw byte fnc is invalid 05 localAddr is not within user data space 06 numBytesRW is invalid 07 targetDataTable subele is invalid 08 localAddr numBytesRW 2 is invalid 09 31 PLC type not supported 0A subtype is invalid 0B Improper number of elements specified to adequately fill a set of larger elements 0C Protocol not supported on channel 0D Source target mismatch DE Supplemental Routing Path Error OF Illegal service code Bit 7 must be clear 10 Slot is invalid Link Layer Qualification Bad parameter in command packet for current communications protocol Appendix B 6 MSG Instruction Error Code MSG Error Code Mapping Internal Fail Code Hex High byte Low byte Description Identifier Code Error Code group 01 Format Unsupported 02 Current communications protocol does not support MSG initiation 03 Channel is shutdown or reconfiguration in progress Current communications protocol does not support the packet type the MSG command is using 04 DF1 FD Not SDA or SDN Broadcast DF1 HD Not SDA DH485 Not SDA or SDN Broadcast Local T
169. ion Set Reference Manual Data Table Instructions 14 3 Parameter Data Table Address Address Mode Level S pc gt 2 o Uo e E is E 7 El 7 SiS S E E a sjla g a2 sid Source 1 d JININ JA Length y Destination y COPT Copy Table N12 0 Instruction Type output 54 OUT N12 6 The COPT instruction copies Source data to Destination data table for a given length The above example shows that the COPT instruction copies N12 0 N12 4 to N12 11 N12 15 i Data Table N12 kokoja Address Type Value Meanin Description N12 7 nteger 2 Input 2 N12 8 nteger 3 Input 3 N12 8 nteger 4 Input 4 N12 10 nteger 5 Input 5 N1211 nteger 1 Output 1 N12 12 nteger 2 Output 2 N12 13 nteger 3 Output 43 N12 14 nteger 4 Output 4 N12 15 nteger 5 Output 5 N12 16 nteger 0 Y The length limit is Word 1 128 LONG WORD 1 64 3 Word 1 42 String 1 3 X8 Instruction Set Reference Manual 14 4 Data Table Instructions Parameter Data Table Address Address Mode Level Sg S ale p E tS m o J e ce o s SIS B E a s aj s E si Source 1 d E y Length Destination y SWAP Swap Word X8 Instruction Set Reference Manual N12 16 3 Instruction Type output The SWAP instruction swaps the l
170. ix C ASCII Character Set ASCII Character Set Column 1 Column 2 Column 3 Column 4 Ctrl DEC DEC HEX OCT ASC Q 96 60 40 MN A A 97 61 41 la B B 98 62 42 b C C 99 63 43 jc D D 00 64 44 jd AB E 01 165 45 e F F 02 66 46 f G G 03 67 47 g AH 01 H 04 68 50 h 01 l 05 169 51 i J 01 J 06 6A 52 j K 01 K 07 6B 53 k L 01 L 08 6C 54 M 01 M 09 6D 55 Im AN 01 N O 6E 56 n 0 01 0 1 6F 157 o AP P 112 70 60 p AQ 1 Q 113 71 161 iq AR 12 2 R 114 172 162 r AS 13 3 S 115 73 163 Is AT 14 4 qi 116 74 164 t U 15 5 U 117 75 165 u V 16 6 V 118 76 166 v W 17 7 W 119 177 167 Iw AX 18 8 X 120 78 170 x Y 19 9 Y 21 79 71 y AZ 1A Z 22 7A 72 1B 23 78 73 Appendix C 2 Column 1 ASCII Character Set Column 2 Column 3 Column 4 HEX DEC HEX DEC HEX ASCII Character Set Appendix C 3 Publication number X8 RM001A EN September 2012 RS Automation Co Ltd www rsautomation biz RS Automation Building 348 2 Jinwi Industrial Complex Cheongho ri Jinwi myeon Pyeongtaek si Gyeonggi do Korea zip code 451 862 T 82 31 685 9300 F 82 31 685 9500 RS Automation Global Business Support rsagbs rsautomation biz EH
171. ks in pairs to control internal ladder program Rungs within the MCR zone are still scanned but scan time is reduced due to the false state of non retentive outputs The following example shows that when the start of an MCR rung YO 0 02 in the box is output however when the end of the MCR rung the Y0 0 02 is not output even the RTC 0 Second 0 state is TRUE B1 pps 1 RCT 0 Second 0 B3 0 8 Storage Bit Output Bit B3 0 10 CMCR X8 Instruction Set Reference Manual 17 6 Program Control Instructions IMPORTANT If you start with MCR instruction must end with the MCR instruction You cannot nest one MCR within another Do not jump into an MCR zone to control logic of the program to be working correctly X8 Instruction Set Reference Manual Chapter 18 Input and Output Instructions Introduction This chapter the X8 Series PLC input and output Instructions are described This chapter organized as follows Topic Page Introduction 18 1 REFI Embedded Input Refresh 18 2 REFO Embedded Output Refresh 18 3 EOS End of Scan 18 3 X8 Instruction Set Reference Manual 18 2 Input and Output Instructions The following table shows input and output instruction of X8 Series PLC Application Specific Instrrctfons Instruction Used To Embedded Input Refresh REH Update input port state embedded CPU module immediately Embedded Output Refresh REFO Update output port state embedded
172. le Function Files Address Address Mode Level S S la 2 p 3 t 2 p S P 5 z a 3 8 8 S e 3 2 3 ds o e E m a gt xl5lol lzluolbl lt lols s a Gla Els j s Bit Y Ya y y JIN y y UK You cannot use indirect addressing and SFR with SR MG PD RTC HSC PTO PWM STI Ell BHI MMI CS DLS SET Set Coil RST Reset Coil B3 0 0 B3 0 0 lt A Instruction Type output The SET and RST instructions are complementary instructions These instructions are usually used in pairs with both instructions addressing the same bit SET turns on a bit while RST turns off a bit Since these are outputs once set or reset they remain set or reset regardless of the rung condition WARNING In the event of the Power Cycle off gt on during operation data stored in the data table is output again If these bits were cleared under error conditions after restore data table value is output again X8 Instruction Set Reference Manual Relay Type Bit Instructions 7 5 Parameter Data Table Function Files Address Address Mode Level Sg 5 Eg Bl 5 z 5 818 E 2 58 e z Se a 4 E amp si s 2 s gt x a lzlulol lt _ l a la S u Bit VIIa JIN y yy You cannot use indirect addressing and SFR with SR MG PD RTC HSC PTO PWM STI Ell
173. less than zero or greater than 100 000 generates a PTO error Controlled PTO 0 JogPulse Data Format User Program Access The PTO 0 JogPulse bit is used to instruct the PTO to generate a single pulse The width is defined by the PTO 0 JogFrequency in the PTO The PTO 0 JogFrequency flag is only possible under the following conditions PTO is in idle PTO 0 JogContinuous is not active e PTO 0 EnableStatu is not active X8 Instruction Set Reference Manual 6 16 Using High Speed Outputs Address PTO 0 JogPulseStatus Address PTO 0 JogContinuous Address PTO 0 JogContinuousStatus X8 Instruction Set Reference Manual PTO 0 JogPulseStatus Data Format User Program Access The PTO 0 JogPulseStatus bit is set when the PTO instruction detects the PTO has generated a Jog Pulse PTO 0 JogContinuous Data Format User Program Access The PTO 0 JogContinuous bit is set when the PTO generates continuous pulses The frequency generated is defined by the PTO 0 JogFrequency parameter When the PTO 0 JogContinuous bit is cleared the current output pulse is truncated Jog Continuous operation is only possible under the following conditions PTO is in idle PTO 0 JogContinuous is O PTO 0 EnableStatus is 0 PT0 0 JogContinuousStatus Data Format User Program Access The PTO 0 JogContinuousStatus flag shows current state when the PTO 0 JogContinuous bit generates continuous Jog Pulses Ad
174. ll List Scan N N Channel Status Max Priority Poll List Scan COM 0 COM 1 USB Ethernet Xnet TCP Modbus TCP Ethernet IP DF1 Half Duplex Master Value CS0 10 INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER BIT Total Message Packets Received Undelivered Message Packets Message Retried Polls Sent Bad Packet Sent NAK Lack of Memory Sent NAK Duplicate Message Packets Received Last Normal Poll List Scan 100ms Max Normal Poll List Scan 100ms Last Priority Poll List Scan 100ms Max Priority Poll List Scan 100ms CTS y Clear X8 Instruction Set Reference Manual 3 16 SFR Special Function Register X8 Instruction Set Reference Manual Modbus RTU Slave Diagnostic Counters Block Data Link Layer Bit Description Diagnostic Counters Category Identifier Code always 2 Length always 30 Format Code always 4 CTS RTS Reserved Reserved Bl 0 N Reserved Total Message Packets Sent gt Total Message Packets Received for This Slave Total Message Packets Received Link Layer Error Count Link Layer Error Code gt gt gt gt C1 99 N 22 Reserved Modbus RTU Slave Diagnostic Counters Block Presentation Layer Word Bit Description 43 Diagnostic Counters C
175. ll be appeared in the manual setting In automatic setting all expansion modules currently connected will be displayed automatically Bi cre ruo He ESE Viw Search Onine Took Window Hep Qd d amp o57 05 amp n 5m Ee uus XGPC MS Communication Serial COM 1152000g NONE amp 1 For Melo pms F1 X8 Instruction Set Reference Manual 1 36 1 0 Configuration X8 Instruction Set Reference Manual For some modules usually with the default settings user defined setting is required The screen below shows setup screen of X8 AI4AO2 module ol Module 1 x3 AMACZ Analog votageCumet IN 4 OUT 2 Expansion Genera Contratos Analog Cor gursian For el prem r1 Chapter 2 X8 Series PLC Memory and Data Table Introduction This chapter describes Memory and Data Table used by the X8 Series PLC The chapter is organized as follows Ml Page Introduction S aa X8 Series PLC Memory 2 2 Data Table 2 5 Protecting Data Table During Download 2 6 Static 2 8 Password 2 9 Clearing the Controller Memory 2 11 Allow Access Data Table through Internet Web 2 11 X8 Instruction Set Reference Manual 2 2 X8 Series PLC Memory and Data Table X8 Series PLC Memory Data Table Structure The X8 Series PLC internal memory comprises Data Table Special Function Register and Ladder Program etc TIP PLC Internal Data Table S
176. llows Topic Page Introduction 19 1 What is an Interrupt 9 2 Priority of User Interrupts 9 4 Interrupt Type and Elements 19 5 PITS Programmable Interrupt Timer Start 9 13 INTD Interrupt Disable 9 13 INTE Interrupt Enable 19 15 INTF Interrupt Flush 9 15 X8 Instruction Set Reference Manual 19 2 Using Interrupts What is an Interrupt X8 Instruction Set Reference Manual The following table shows usage of the interrupt of the X8 Series PLC Instruction Description INT Interrupt Subroutine Label to indicate the start of the interrupt PITS PIT Programmable Interrupt Timer Start Execute interrupt timer Interrupt Disable INTD Disable the user interrupt Interrupt Enable INTE Enable the user interrupt INTE Interrupt Flush Remove the various wafting user interrupt from the system The following figure shows how an interrupt works Not only PLC most control devices like PC support interrupt function An interrupt is an event that causes the controller to suspend the task it is currently performing perform a different task and then return to the next task at the point where it suspended Ladder Program Interrupt Service Routine pa i STEP 6 STEP N 1 As you can see the above figure if an interrupt occurs at one point during the ladder program execution it suspends task it is currently performing then performs subroutines specified by SFR or ladder program according to the
177. ly MSG timed out waiting for target to reply command buffer 0 14 MSG waiting for reply MSG timed out waiting for target to reply command buffer 71 24 MSG waiting for reply MSG timed out waiting for target to reply command buffer 2 34 MSG waiting for reply MSG timed out waiting for target to reply command buffer 3 05 MSG waiting in transmit queue MSG timed out while waiting for transmission by link layer command buffer 0 15 MSG waiting in transmit queue MSG timed out while waiting for transmission by link layer command buffer 1 25 MSG waiting in transmit queue MSG timed out while waiting for transmission by link layer command buffer 2 35 MSG waiting in transmit queue MSG timed out while waiting for transmission by link layer command buffer 3 Application Layer Qualification Communications Protocol Reset Active MSGs flushed MSG Instruction Error Code Appendix B 9 MSG Error Code Mapping Internal Fail Code Hex High byte Low byte Description Identifier Code Error Code group 01 MSG was on confirmation queue 02 MSG was waiting for reply command buffer 0 12 MSG was waiting for reply command buffer 71 22 A1 MSG was waiting for reply command buffer 2 32 MSG was waiting for reply command buffer 73 03 MSG was on overflow queue 04 MSG was on transmit queue Appendix B 10 MSG Instruction Error Code Append
178. m the specified Stack POP The LIFOL instruction uses the following data types IN specify the data to load to Stack LIFO data table specified as Stack CTRL CR data table it the FIFOL and FIFOU instructions ate in run state are used to control the internal flag LENGTH data table length specified as Stack POS Pointer location to load data Stack Pointer The LIFOU instruction uses the following data types OUT data output location unloaded from Stack LIFO data table specified as Stack e CTRL CR data table if the FIFOL and FIFOU instructions are in run state are used to control the internal flags LENGTH data table length specified as Stack POS pointer location to unload data Stack Pointer You can check the result of above example to the figures below X8 Instruction Set Reference Manual Shift and FIFO LIFO Instructions 15 7 gl Data Table N15 N15 0 Integer When the N15 11 is specified to IN N15 0 N15 9 are Stack area and N15 12 is OUT if the LIFOL instruction is in run state N15 11 is stored to the POS in the Stack area If the LIFOU instruction is in run state unload the data from the POS in the Stack area and then stores the data to N15 12 iid rl ume 5 3 g T z BlBl el lig z JHHEHMHEE IN y lua Jal FIFO Jal Jv CTRL J y LENGTH F POS OUT 4A
179. most floating point devices given a invalid message and returns NaN value for operations about square root of negative ADD Add SUB Subtract Instruction Type Output ADD Use the ADD instruction to add one value to another value Source A t Source B and place the sum in the Destination SUB Use the SUB instruction to subtract one value from another value Source A Source B and place the result in the Destination MUL Multiply DIV Divide Instruction Type input X8 Instruction Set Reference Manual 10 6 Math Instructions MUL Use the MUL instruction to multiply one value by another value Source A x Source B and place the result in the Destination DIV Use the DIV instruction to divide one value by another value Source A Source B and place the result in the Destination NEG Negate Instruction Type Output Use the NEG instruction to change the sign of the Source and place the result in the Destination CLR Clear Instruction Type Output Use the CLR instruction to set the specified data table to zero ABS Absolute Value Instruction Type Output The ABS instruction takes the absolute value of the Source and places it in the Destination If the signed result does not fit in Destination the following will occur X8 Instruction Set Reference Manual Math Instructions 10 7 Considerations When Using Floating Point Data erounded data is output elf an overflow o
180. mplete write B3 11 3 It is set when the rung condition goes false to true If the rung IMPORTANT condition is changed true to false during the AWA instruction is in run state the instruction complete the communication output Set the writing interval to more 0 5 seconds X8 Instruction Set Reference Manual 21 14 ASCII Instructions Parameter Data Table Address Address Mode Level Ss E SIS B d S 2 E 8 215 e E e EN E z s 8 2 4 y IN y CTRL 4 AW Write String X8 Instruction Set Reference Manual Instruction Type output The AW instruction to write strings from a source string to the port The input parameters are CH serial port number 0 COM1 1 COM2 2 USB IN STRING data table to write to destination CTRL CR Control data table Length data length to write to port The output parameter is POS number of data completing writing ASCII Instructions 21 15 B3 11 4 tis set when the rung condition goes false to true If the rung IMPORTANT condition is changed true to false during the AW instruction is in run state the instruction complete the communication output Set the writing interval to more 0 5 seconds Parameter Data Table Address Address Mode Level S E S IS ls Bg z S 3 5 2 8 2 B E 23 E S a ii 4 y IN y CTRL 4
181. n Scan Scan Scan Scan Scan Scan Scan External Input Latched Status Input File Value X8 Instruction Set Reference Manual 1 34 1 0 Configuration Falling Edge Time Chart Example 2 Scan Number X Scan Number X 1 Scan Number X 2 Input Ladder Output Input Ladder Output Input Ladder Output Scan Scan Scan Scan Scan Scan Scan Scan Scan External Input Latched Status Input File Value TIP The gray area of the time chart is the input filter delay IMPORTANT The external input signal does not displayed in the input data area when the input port is configured for latching behavior When the input port configuration is falling Edge in input data area the data value is normally on and off when a rising edge is detected Configure Expansion 1 0 Configuring expansion I O can be done by using XGPC Using XGPC 1 Double click the I O Configuration in the project folder X8 Instruction Set Reference Manual 1 0 Configuration 1 35 BA UNO b Ha idt View Sanh Onine toch Wedow Hep Qaid 4425 9 au sa 9 44 sme uud s onm Communication Serial COMA 115290004 NONE amp 1 DEL For Malo gres Fl 2 From the below screen select empty slot number for manual setting and then double click For automatic setting click Read I O Config button w G Putten For Help pre F1 3 Expansion module selection screen wi
182. n 1 0 Value Meaning Description L 0 OFF Fault Override at Power Up y Ni Overflow Trap Bool OFF Control Register Error SR253 Bool OFF Major Err Detected Executing User Fault Routine Embedded Input Filter Modified ASCII String Manipulation Error Radix Stuctured x Non Recoverable Fault Non Recoverable Faults are covered after Power Cycle Power On Off External Input Interrupt Ell The EJI contains 8 of interrupts from EII 0 to 7 according to the priority It is supported X1 input port embedded on PLC CPU only PTO PWM HSC PIT Eu RTC MC BHI cso CS CS2 ES3 Address IT h Me LadderProgramNumber integer UserinterruptEnable Bool EventinterruptEnabled Bool AutoStart Bool EdgeSelect Bool InputSelect Integer ErrorCode Integer UserinterruptExecuting Bool UserinterruptLost Bool UserinterruptPending Bool ErrorDetected Bool Followings are descriptions elements related interrupt of SFR It is described based on the EII and each elements are used in HSC and PIT similarly X8 Instruction Set Reference Manual 19 6 Using Interrupts LadderProgramNumber Description Data Format HSC Mode Function User Program Access EII 0 LadderProgramNumber Word 6 1 535 Control Read Write The LadderProgramNumber control flag defines EI interrupt service routine UserlnterruptEnabled Description Data Format HSC Mode Function User Program Acce
183. n in the Control Data Table CR The parameters are CH serial port number 0 COM1 1 COM2 2 USB e CTRL CR Control data table Driver configuration in the Channel Configuration Settings should be IMPORTANT set to ASCII BIN Following figure shows the Channel 1 configuration part If ARNC instruction is executed without Driver configuration Error 3 is generated Channel Configuration mn como COM USB Ethemet e General Channel Write Protection Not Protect zj Comms Servicing Selection 1 Enable xi Message Servicing Selection 1 Enable gt Edit Resource Ownership Timeout 60 AWA Append Char 1 13 AWA Append Char 2 10 19 2K gt arity NON EM Stop Bi 1 Data Bits 8 Si Line Control No Handshaking El Protocol Control Echo O False vj XON XOFF O False zj goa Ha JSA cav ACB Clear Buffer Yes RX CLR Yes TX CLR Instruction Type output The ABC instruction clears sending and receiving communications buffer The parameters are CH serial port number 0 COM1 1 COM2 2 USB RX CLR Yes or No TX CLR Yes or No X8 Instruction Set Reference Manual 21 10 ASCII Instructions AHS Handshake X8 Instruction Set Reference Manual B3 11 0 24 CH Yes RXCLR Yes TX CLR AHS ENO 0 CH HS Bits Status 000h 0002h AND Mask CR17 8 CTRL BE f on Eror Instruction Type output The AHS instruction is used to on off the
184. n phase When the PTO 0 AccelDecelPulsesIndependent is cleared the same number of the entered acceleration and deceleration pulse is used When the PTO 0 AccelDecelPulsesIndependent is set data table number instead of pulse number is entered Using High Speed Outputs 6 13 For more descriptions refer to PTO 0 AccelDecelPulsesIndependent Followings are error conditions according to the PTO 0 AccelDecelPulses data e PTO 0 AccelDecelPulses is less than 0 The total pulses for the PTO 0 AccelDecelPulses acceleration and deceleration pulse is greater than the total output pulses PTO 0 TotalOutputPulses PTO 0 AccelDecelPulsesIndependent is 0 or 1 In the example below shows the PTO 0 AccelDecelPulsesIndependent is 0 In this example the maximum value that could be used for accelerate decelerate is 6000 because if both accelerate and decelerate are 6000 the total number of pulses 12 000 The run component would be zero This profile would consist of an acceleration phase from 0 6000 At 6000 the output frequency is generated and immediately enters the deceleration phase 6000 12 000 At 12 000 the PTO operation would stop output frequency 0 If you need to determine the ramp period accelerate decelerate ramp duration 2 X PTO 0 AccelDecelPulses PTO 0 OutputFrequency ADP Accelerate Decelerate Phase The following formulas can be used to calculate the maximum value that could be used for accelerate dec
185. nd then true X8 Instruction Set Reference Manual 3 6 SFR Special Function Register Memory Card Information Data Table There is only one internal storage bit allocated in the system for this instruction Do not use more than one RTCA instruction in your program You can also use a MSG instruction to write RTC data from X8 Series PLC to another to synchronize time The X8 Series PLC has a Memory Card Data Table which is stores SD memory cards information After power up and detection of the SD memory card various information SD memory card model number and revision information etc will be output If a SD memory card is not detected zero OFF is written to the MCI data MCI Data Table Parameters table The MCI data table of SFR screen is shown below A Function Files PTO PWM HSC ST Ell ez RTC McI BHI CSO cs cs2 ES3 10S Value INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER BIT Description Day of Week Year DD MM YYYY Month Date 0 0 U 1 Day HH MM SS Hour Time 0 0 0 Minute Second gt Day Of The Week Set Date amp Time Disabled Disable Clock The MCI parameters and their valid ranges are shown in the table below Parameters Address Data Format Type User Program Access Functionality Type MCI 0 FUNCTIONALITYTYPE Word Status Read Only Error Code MCI 0 ERRORCODE Word Status Read Only MemoryCardPresent MCI 0 MEMORY
186. nel Status COM 0 COM 1 USB Ethernet Xnet TCP Modbus TCP Ethernet IP Generic ASCII pe Description INTEGER 10 Eco Character Count INTEGER Character Count Received INTEGER Bad Character Count BIT Transmitter BIT CTS BIT RTS BIT DCD Clear Active Node Table Block Word Description 23 Active Node Category Identifier Code Always 3 Length 24 e Always 18 for DF1 Half Duplex Master Communication e Always 0 for DF1 Full Duplex Master DF1 Half Duplex Slave Modbus RTU Slave Modbus RTU Master ASCII Communication 25 Format Code Always 0 Number of Nodes 26 e Always 255 for DF1 Half Duplex Master e Always 0 for DF1 Full Duplex Master DF1 Half Duplex Slave Modbus RTU Slave Modbus RTU Master ASCII Communication Active Node Table DH 485 and DF1 Half Duplex Master Nodes 0 to 15 2 This is a bit mapped register that displays the status of each node on the network If a bit is set 1 the corresponding node is active on the network If a bit is clear 0 the corresponding node is inactive 28 Active Node Table DH 485 and DF1 Half Duplex Master Nodes 16 to 31 29 Active Node Table DF1 Half Duplex Master Nodes 32 to 47 42 Active Node Table DF1 Half Duplex Master Nodes 240 to 255 Ethernet Communications Status Data Table SFR Special Function Register 3 21 The Ethernet Communications Status Data Table is a read only data table that contains information about Ethe
187. ngEnabled Boot Searameters Bool LowPresetMask Bool HighPresetMask Bool UnderfiowMask Bool OverflowMask Bool F Accumulator Long 0 HighPreset Long 2147483647 LowPreset Long 2147483648 Overflow Long 2147483647 Undertow Long 2147483549 Outpu MasiBits Integer 0 HighPresetOutput LowPresetOutput EnorCode UserinterruptExecuting UserinterruptLost UserinterruptPending ErrorDetected LowPresetinterrupt HighPresetinterrupt Underflowinterrupt Overflowinterrupt LowPresetfleached HighPreseffieached CountDirection Count Down Undertiow Overflow ModeDone 0 OFF CountDown OFF Countjp OFF BI HSC 1 Busc 2 Busc 3 EJHSC 4 usc s 11 When the HSC accumulator value reaches to 500 specified to the HighPrest of the first PS If you use OutputHighData value and HighPresetMask it outputs the result value that masked value and logical ANDed value This behavior is repeated every 500 1000 1500 and 20004 intervals X8 Instruction Set Reference Manual 5 38 Using the High Speed Counter and Programmable Limit Switch X8 Instruction Set Reference Manual Chapter 6 Using High Speed Outputs Introduction This chapter explains about using high speed outputs of the X8 Series PLC This chapter organized as follows Topic 7 Page Introduction 6 1 PTO Pulse Train Output 6 2 Pulse Train Output Function 6 2 SFR Special Function Register PTO Sub Elements 6 5
188. ngStatus is set When the 500 pulses are out the OperationFrequencyStatusrk gradually decreases from 100 to zero After pulse output Done is set and PTO operation is completed X8 Instruction Set Reference Manual 6 4 Using High Speed Outputs When B3 0 0 is cleared the IdleStatus is set and PTO is in a Idle state Acceleration RUN Deceleration The graph above shows the graph according to the set value of the above behavior Each Status Bit is updated for every scan during the execution of the PTO IMPORTANT When the invalid AccelDecelPulses and OutputFrequency data is input PTO error will be generated The maximum value of the AccelDecelPulses is determined by the following formulas maxAccelValue uint32 outputFrequency uint32 outputFrequency gt gt 2 outputFrequency uint32 outputFrequency 96 4 gt gt 2 Followings are conditions for the PTO execution The above example can be executed as satisfy the following basic conditions The PTO instruction must be in an idle state The EnableStatus must be toggled from OFF to ON For idle state behavior all of the following conditions must be met Output cannot be change in Online The EnableHardStop bit must be off The JogPulse bit must be off The NormalOperationStatus bit must be off The charts in the following examples illustrate the typical timing sequence behavior of a PTO instruction The stages liste
189. ns in the Destination Address Levels for the operands involved in the SIN can be ALL word ALL Long wotd ALL float or a combination These operands shall undergo a convetsion to float The calculation of the source in float is then performed and the result is then cast to the data type of Destination Address Parameter Data Table Address Mode Level N co SS gt 5 z JFE 2 2 8 E 5 EEP E slols 15 o E 3i 2 e s olojo al 2 Fe 9 A IZ Eg E EJE o lc ols E a Sla a E E E ziSiuic Source y aa aa Y ya y Destination y JI y AL y TAN Tangent 166 Instruction Type Output The TAN instruction places the sine of the Source in radians in the Destination Address Levels for the operands involved in the TAN can be ALL word ALL Long word ALL float or a combination These operands shall undergo a conversion to float The calculation of the source in float is then performed and the result is then cast to the data type of Destination Address Parameter Data Table Address Mode Level N co a 2 E 2 5 z JRE BEE Ble E 8 S 5 ell le 8 38 18 18 ol3la ans s 8E R8 E s gEERS E E Sja E a lt ziSiuizc Source y aaa Ya Ya yal fay Destination y JIN V y X8 Instruction Set Reference Manual
190. nstruction Set Reference Manual 1 0 Configuration Chapter 1 This chapter describes the general matters of Input and Output features of the X8 Series PLC Each controller comes with a certain amount of embedded 1 0 which is physically located on the controller The controller also allows for adding expansion 0 Topic Page Introduction 1 Embedded 1 0 1 2 Expantion 1 0 2 X8 Series Embedded I O Memory Mapping 1 3 X8 Series Expansion I O Memory Mapping 1 6 1 0 Addressing 22 1 0 Forcing 24 Input Filtering 24 Analog Input 26 Analog Output 29 Latching Inputs 29 Configure Expansion I O Using XGPC 1 34 1 2 1 0 Configuration Embedded 1 0 The X8 Series PLC provide basic I O that is built into the controller as listed in the following table These I O points are referred to as Embedded I O Catalog No Description Input Power Type Embedded Digital 1 0 Comm Ports X8 M14DDT 24VDC Modular 8 In 6 Sink out 2x RS 232 RS 485 X8 M16DDR 24VDC Modular Bin 8RelyouL HSC2CH USE X8 M32DDT 24VDC Modular 16 In 16 Sink out X8 B48DDX 24VDC Brick 28 In 20 Sink out X8 B24ADR 110 220V AC Brick 14 In 10 Relay out X8 B24DDT 24VDC Brick 14 In 10 Sink out X8 B24AAR 110 220V AC Brick 14 AC In 10 Relay out 1 It will be released in 2013 Expantion 1 0 X8 Instruction Set Reference Manual If the application requires more I O than the controller provides you
191. o 7 Bit Position rd 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO 0 X X X X X X X X WwW WwW WwW W W IW W WwW w write only x not used always at a 0 or OFF state X8 M32DDT Output Image For X8 M32DDT base module the Bit positions 0 to15 together with word 0 1 correspond to output terminals O to 15 v Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO 0 1 w write only x not used always at a 0 or OFF state X8 B48DDX Output Image For X8 B48DDX base module the Bit positions O to 15 with word 0 correspond to output terminals O to 15 And the Bit position 0 to 3 with word 1 correspond to output terminals 0 to 3 X8 Instruction Set Reference Manual 1 6 1 0 Configuration X8 Series Expansion 1 0 Memory Mapping X8 Instruction Set Reference Manual Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 jw iw w w W Iw w iw w W lw fw 1 X X x X X X x X X X X X w write only x not used always at a 0 or OFF state X8 B24ADR X8 B24DDT and X8 B24AAR Output Image For X8 B24ADR X8 B24DDT and X8 B24AAR output module the Bit positions 0 to 13 correspond to output terminals 0 to 13 Bit Position rd 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Wo W W IW yw W W W W W W e x x z z z z w write only x not used
192. ock HSC High Speed Counter and PTO Pulse Trained Output etc SFR Name SFR Description Identifier High Speed Counter HSC This data table associated with the High Speed Counter Pulse Train Output PTO This data table associated with the Pulse Train Output Pulse Width Modulation PWM This data table associated with the Pulse Width Modulation Vega Timed STI This data table associated with the Selectable Timed Instruction nterrupt Event Input Interrupt Ell This data table associated with the Event Input Interrupt Real Time Clock RTC This data table associated with the Real Time Clock time of day eel MMI This data table contains information about the Memory Module rado BHI This data table contains information about the PLC s memory module Communications Status cso File for Channel 0 This contains information about the PLC s hardware Communications Status CS2 File for Channel 2 Ethernet Status File for ES1 This contains information about the Ethernet Communications with the PLCs Channel 1 X8 Instruction Set Reference Manual Real Time Clock Register SFR Special Function Register 3 3 The real time clock provides year month day of month day of week hour minute and second information to the Real Time Clock RTC data table in the PLC The Real Time Clock parameters and their valid ranges are shown in the table below Feature Address Data Range Ty
193. ompt the programming software instructs the controller to clear PLC memory This allows open to public X8 Series PLC s internal data table via Web Only offline setting is avaiable If it is online status it cannot be selected Data Table Properties uy General Data Table Settings Data Table Type Name OUTPUT Data Table Number Description Scopes Skip When Deleting Unused Memories Protections Static Disable SD Card Restore Download Disable RJR Data View via Web Site Protect a this data table in Webserver Page zEW X8 Instruction Set Reference Manual 2 12 X8 Series PLC Memory and Data Table X8 Instruction Set Reference Manual Chapter 3 SFR Special Function Register Introduction This chapter describes Special Function Registers include internal configuration and status data of X8 Series PLC The chapter is organized as follows Page Introduction 3 1 Overview 3 2 Real Time Clock Register 3 3 RTCA Real Time Clock Adjust Instruction 3 5 Memory Card Information Data Table 3 6 Communications Status Data Table 3 8 Ethernet Communications Status Data Table 3 21 X8 Instruction Set Reference Manual 3 2 SFR Special Function Register Overview SFR Special Function Register Type SFR Special Function Resister are embedded default resources within the X8 series PLC SFR provide useful features such as RTC Real Time Cl
194. on Error ENDT SVC EOS instructions detected in User Non Recoverable Fault Routine 36 System Error Code Appendix A 3 Controller Fault Code Description Level Hex 37 Reserved Not for Use 38 Instruction Error CALL instruction underflowed Non User 39 Instruction Error Subroutine nesting limit exceed Non User 3A Instruction Error Address Range Error in SEOx instrucitons Recoverable 3B Instruction Error Address Range Error in FIFO instructions Recoverable 3C Instruction Error Invalid sequence length in SEQx instrucitons Recoverable 3D Instruction Error Invalid length position in FIFO instructions Recoverable 3E d Address Range Error in COPT COPW FILT Recoverable 3F 40 Instruction Error Invalid Recipe number entered Recoverable 41 Instruction Error Invalid data write to RTC Recoverable 42 43 44 45 46 47 48 49 4A 4B 4C 4D in See HSC Special Function Register for specific error Hecov rabl 4E Ei See PTO Special Function Register for specific error Non User 4F O See PWM Special Function Register for specific Non User Embedded 1 0 Faults 50 Non User 51 Embedded IO Error Configuration error Non User 52 Embedded IO Error Bad checksum Non User 53 Embedded IO Error Incompatible base Non User Appendix A 4 System Error Code Appendix B MSG Instruction Error Code MSG Ins
195. onfiguration area with digital I O module It has separate parts that outputs data input from actual each channel shows the state of each channel and configuration area allows set the each channel s operation mode X8 Al8 Input Image X8 AI8 module is the high end expantion analog input module with 8 channel voltage and current input A total of 12 words are assigned to the area that shows the state and the input of data and the control area is allocated for each set of channel x wotd X8 Instruction Set Reference Manual 1 10 1 0 Configuration Data Address Mapping Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 0 Input Channel 0 Read Only 1 Input Channel 1 Read Only 2 Input Channel 2 Read Only 3 Input Channel 3 Read Only 4 Input Channel 4 Read Only 5 Input Channel 5 Read Only 6 Input Channel 6 Read Only 1 Input Channel 7 Read Only 8 S7 S6 S5 S4 S3 2 9 07 07 07 07 07 07 10 11 12 13 Firmware Rev Major Firmware Rev Minor we write only x not used always at a 0 or OFF state Contorl Area Address Mapping Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 0 Input Channel 0 Data 1 Input Channel 1 Data 2 Input Channel 2Data 3 Input Channel 3 Data 4 Input Channel 4 Data 5 Input Channel 5 Data 6 Input Channel 6 Data 7 Input Channel 7 Data w write only
196. ons Instructions NX Plus Read Words 23 NX Plus Write Words 24 CIP Generic Add when you choose EterNet Port as communications port This MSG instruction like other instructions is set when the rung state is true The following is an example of the MSG instruction B3 10 8 MG26 0 4 MSG Table Enable Done Emor How to use the MSG instruction The MSG instruction is input parameter and needs MG data table Therfore the MG data table should be created Right click on the Data Tables menu to create new data table and select MG Message for Data Table Type Though the Data Table Number is 26 in the following figure use an unallocated number And set the number of internal Element 1 in the figure Default setting Create Data Table I Data Table Settings m Data Table Type MG Message zl 3 Name Elements 1 Description Scope E E Usage Scope Global Use Options Skip When Deleting Unused Memories No Protections Static Disable e Recipe Data Table Protection for SD Ca Disable al Data Table Number Data Table Number OK Cancel Help The following figure shows elements of MG data table X8 Instruction Set Reference Manual Address MGn 0 Subtype Address MGn 0 Command Communications Instructions 22 5 EE Data Table MG26 N kolkola i Description Subtype Command Integer 0 Ch SuppElementinfo 3 Integer ChannelNumb
197. ork byte order Specified Gateway address is entered 5 16 Broadcast Address in network byte order The Broadcast Address to send multicast messages is stored 17 18 Primary Name Server in network byte order Specified Primary Name Server is stored 19 20 Secondary Name Server in network byte order Secondary Name Server information is entered 21 52 Default Domain Name Default domain name is entered X8 Instruction Set Reference Manual 3 24 SFR Special Function Register General Channel Status Blcok Word Bit Description 53 84 SNMP Contact SNMP Contact information is stored 85 116 SNMP Location SNMP Location information is stored 117 Message Connection Timeout The amount of Timeout of the MSG instruction is stored The MSG Connection Timeout has a range of 250 ms 65 500 ms 118 Message Reply Timeout The amount of Replay Timeout of hat MSG instruction is stored The MSG Reply Timeout has a range of 250 ms 65 500 ms 119 Inactivity Timeout The amount of remain time of the MSG instruction is displayed before it is terminated The Inactivity Timeout has a range of 1 65 500 minutes Diagnostic Counter Block of Communications Status The followings are the elements of the Diagnostic Counter Block for EtherNet Bi Channel Status Cole la com 0 COM 1 USB Ethernet Xnet over TCP Modbus TCP EtherNet IP IP Address 10 121 29 90 Ethernet Address 00 0
198. ormat HSC Mode Function User Program Access HSC 0 OverFlowInterrupt Bit 2 9 Status Read Only X8 Instruction Set Reference Manual The OverflowInterrupt flag is set when the HSC accumulator reaches to the Overflow value and the HSC interrupt is triggered This bit can be used in the control program to identity that the Overflow condition caused the HSC interrupt and applied to the logic of the control program This flag can be cleared by the control program and is also cleared by the HSC whenever these conditions ate detected Low Preset Interrupt executes High Preset Interrupt executes Using the High Speed Counter and Programmable Limit Switch 5 25 Overflow Interrupt executes PLC enters an executing mode CountDirection Description Data Format HSC Mode Function User Program Access HSC 0 CountDirection Bit 2 9 Status Read Only The CountDirection flag represents the HSC directions When the HSC accumulator counts up the direction flag is set Whenever the HSC accumulator counts down the direction flag is cleared If the accumulated value stops the direction bit retains its value The only time the direction flag changes is when the accumulated count reverses This bit is updated continuously by the HSC s whenever the PLC is in a run mode ModeDone Description Data Format HSC Mode Function User Program Access HSC 0 ModeDone Bit 0 or 1 Status Read Write The ModeDone flag is set by the HSC when the HSC i
199. ory Sent NAK Duplicate Message Packets Received CTS RTS DCD DF1 Half Duplex Slave Diagnostic Counters Block Word Bit Description 6 Diagnostic Counters Category Identifier 7 Length always 30 8 Format Code always 1 9 0 CTS 1 RTS 2 Reserved 3 Reserved 4 15 Reserved 10 Total Message Packets Sent 11 Total Message Packets Received 12 Undelivered Message Packets 13 ENQuiry Packets Sent 14 NAK Packets Received 15 ENQuiry Packets Received 16 Bad Message Packets Received and NAKed 17 No Buffer Space 18 Duplicate Message Packets Received 19 22 Reserved SFR Special Function Register 3 15 DF1 Half Duplex Master Diagnostic Counters Block Word Bit Description Diagnostic Counters Category Identifier Code always 2 Length always 30 Format Code always 3 cO co O CTS RTS Reserved Reserved Reserved gt c Total Message Packets Sent gt zx Total Message Packets Received gt Undelivered Message Packets gt Message Packets Retried gt Reserved Polls Sent gt Bad Message Packets Received gt No Buffer Space Received Packet Dropped gt Duplicate Message Packets Received gt gt co o J Om om 0 N Last Normal Poll List Scan N c Max Normal Poll List Scan N Last Priority Po
200. ow and high bytes of a specified number of wotds for a given length You can check the result of above example to the figures below lt Before gt Integer Intonor lt After gt Intonor Data Table Instructions 14 5 Address Address Parameter Data Table Mode Level S 5 aie E Lr to 2 3 2 E o QGI9 5 8 215 2 e e eolg amp isis ole E al Elajela S 5 Source 1 y y Destination y COPW Copy Word N12 16 3 4 Length OUT 1412 19 Instruction Type output The COPW instruction copies Source data to Destination for a given length Although similar to the COPT instruction the COPW instruction allows different source and destination parameters NTEGER to LONG WORD LONG WORD to FLOATING POINT LONG WORD to INTEGER INTEGER to SFR PTO data table The length of data cannot exceed 128 words If the data exceed data table size or min or max value of each data table during execution the fault will be generated You can check the result of the above example to the figure below i Data Table N12 k do Address ing Description 7 d Input 1 Inp 3 Output 1 Integer 5678 h Output 2 N12 21 Integer SABC h Output 3 N12 22 Integer 0 M 4 m X8 Instruction Set Reference Manual 14 6 Data Table Instructions Address Address
201. ows the each elements Total elements are described based on the data table PD22 X8 Instruction Set Reference Manual 20 4 PID Control Address Data Format Data Range Function User Program Access PD22 0 TimedOrPit Binary 00r 1 control Read Write PD22 0 AutoOrManual Binary Bit 00r 1 control Read Write PD22 0 ForwardReverseActing Binary Bit 0 or 1 control Read Write PD22 0 Kc Word INT 0 32 767 control Read Write PD22 0 Ti Word INT 0 32 767 control Read Write PD22 0 Td Word INT 0 32 767 control Read Write PD22 0 LoopUpdateTime Word INT 1 1 024 control Read Write PD22 0 ZeroCrossingDeadband Word INT 0 32 767 control Read Write PD22 0 FeedForwardBias Word INT 16 383 16 383 control Read Write PD22 0 ScaledError Word INT 32 768 32 767 Status Read Only PD22 0 ProcessValuelnDeadband Binary Bit 0 or 1 Status Read Write PD22 0 GainRangeSelection Binary Bit 0 or 1 control Read Write PD22 0 SetpointScalingEnabled Binary Bit 0 or 1 control Read Write PD22 0 LoopUpdatesTooFast Binary Bit 0 or 1 Status Read Write PD22 0 ComputeRateErrorTerm Binary Bit 0 or 1 control Read Write PD22 0 UpperOutputLimit Binary Bit 0 or 1 Status Read Write PD22 0 LowerOutputLimit Binary Bit 0 or 1 Status Read Write PD22 0 SetpointOutOfRange Binary Bit 0 or 1 Status Read Write PD22 0 ProcessQutOfRange Binary Bit 0 or 1 Status R
202. pe User Program Access Format YR RTC Year RTC 0 YR word 1998 2097 Status read write MON RTC Month RTC 0 MON word 1 12 Status read write DAY RTC Day of Month RTC 0 DAY word 1 31 Status read write HR RTC Hours RTC 0 HR word 0 23 military time Status read write MIN RTC Minutes RTC 0 MIN word 0 59 Status read write SEC RTC Seconds RTC 0 SEC word 0 59 Status read write DOW RTC Day of Week RTC 0 DOW word 0 6 Sunday to Saturday Status read only DS Disabled RTC 0 DS binary 0 or 1 Status read only BL RTC Battery Low RTC 0 BL binary Dor1 Status read only Writing Time Data to the Real Time Clock There are two ways to change the RTC setting data The RTC settings may be changed by either the ladder program of XGPC programming softwate and a write MSG instruction from another PLCs connected with serial or Ethernet communication Use the CPW Copy Word instruction to adjust the RTC settings within the ladder logic as follows Following example shows data transmission method by using Copy Word instruction OUT RTC 0 Year An Error Code 44H is generated if any of the data being written to the RTC data table is invalid IMPORTANT For example setting the Seconds to 61 X8 Instruction Set Reference Manual 3 4 SFR Special Function Register An example write MSG from another X8 Series PLC to synchronize their RTCs is shown here B MSc Rung 5 0 elmelu Gene
203. pty 3 4 System Reserved Always 0 X8 Instruction Set Reference Manual 3 22 SFR Special Function Register General Channel Status Blcok X8 Instruction Set Reference Manual Word Bit Description 4 5 SNMP Server Status This bit is ON when the SNMP server is enabled The OFF means that the SNMP server is disabled 6 HTTP Server Status This bitis ON when the internal X8 Series PLC web server is enabled The OFF means that the internal web server is disabled 7 SMTP Client Status This bit is set 1 when the SMTP client is enabled The cleared bit 0 means that the SMTP client is disabled 8 11 System Reserved Always 0 12 Modbus TCP Status This bit is set 1 when the Modbus TCP Server Client feature is enabled The cleared bit 0 means that the Modbus TCP Server Client is disabled 13 14 System Reserved Always 0 15 Ethernet IP Incoming Connection Status This bit is set 1 when the Ethernet IP Incoming connection is enabled The cleared bit 0 means that the Incoming connection is disabled 5 0 Ethernet Port Link Status This bit is set 1 when the Ethernet link is active 1 Ethernet Port Connection Speed This bit is valid when the Auto Negotiation function is enabled This bit indicates the speed of the EtherNet Port at Ethernet port e 0 10 Mbps e 1 100 Mbps 2 System Reserved Always 0 3 Duplex Mode This bit is valid when the Auto Negotiation function is
204. r Data Table Address Mode Level E co ti 2 gt S EIE 5 2 JPE BERE ae 5 amp 51813 s 933 2 S s g Ga 8 5 ElE El SIE 5 8 E E GSljal la E ElE amp a 2 S u c Source y Yala A Y aa fay Destination y VI y af ea y LOG Base 10 Logarithm Instruction Type output Use the LOG instruction to take the log base 10 of the value in the source and store the result in the destination The source must be greater than zero Parameter Data Table Address Mode visa piojo S Oz gt cl E E x JEE ARIE Bl ES amp Si8ls slols 2 3 2 9 g 8 8 8 e amp Sle E SEE E EE EE E S 8IS S E a la la E S3 u lo Source y 4X NININ N N N NOL fay Output y THER msg y X8 Instruction Set Reference Manual Math Instructions 10 15 POW X Power Y Instruction Type output Use the POW instruction to raise source 1 x to a power source 2 y and store the result in the destination Destination x Address Parameter Address Mode Level N co S9 5 gt Ee na Fe er feb o 5 z eall laal El o a Sia s s B 3 8 2 2 DAISIES EEE lt clo s E a Sla a E E E S u c Source y Ya a NL N vf y Destination y JIN y y CALC Calculate
205. r information in the ErrorCode flag This bit is automatically set and cleared by the controller UserlnterruptExecuting Description Data Format HSC Mode Function User Program Access HSC 0 UserlnterruptExecuting Bit 0 9 Status Read Only The UserInterruptExecuting flag is set when the internal processing is begin by the conditions below low preset reaches high preset reaches HSC value covers the Overflow condition HSC value covers the Underflow condition This flag is used to detect in the user control program if an HSC interrupt is executing and will be automatically cleared when the PLC completes its processing X8 Instruction Set Reference Manual 5 22 Using the High Speed Counter and Programmable Limit Switch UserlnterruptPending Description Data Format HSC Mode Function User Program Access HSC 0 UserlnterruptPending Bit 0 9 Status Read Only The UserInterruptPending status flag that represents an interrupt is pending by the specific conditions This flag is used to detect in the user control program if an HSC interrupt is executing and will be automatically cleared when the PLC completes its processing UserlnterruptLost Description Data Format HSC Mode Function User Program Access HSC 0 UserlnterruptLost Bit 0 9 Status Read Write The UserInterruptLost status flag that represents an interrupt has been lost This bit is set by the PLC and applied by the user program LowPresetinterrupt Description
206. r is removed Electrostatic discharge can damage semiconductor devices inside the module Do not touch the connector pins or other sensitive area To comply with the CE Low Voltage Directive LVD this equipment must be powered from a source compliant with the following Safety Extra Low Voltage SELV or Protected Extra Low Voltage PELV To comply with UL restrictions this equipment must be powered from a Class 2 source Do not remove the protective debris strips until after the controller and all other equipment in the panel near the module are mounted and wired Remove strips before operating the controller Failure to remove strips before operating can cause overheating Be careful when stripping wires Wire fragments that fall into the controller could cause damage Once wiring is complete make sure the controller is free of all metal fragments Preface Who Should Use this Manual esee 1 How to Use This Manual lees 1 Table for Instruction Setting is cuyo Ae RU VU E 1 Related DOCUMEN eroe oculus wet A RR PIERII 1 Safety Instructions 4 ieu eS bles ERU e aped s aoo qoaa 2 Environment and Enclosure 20 00 cece eee eee eee 2 Preventing Electrostatic Dischiarce ntti ds 3 Chapter 1 10 Configuration TrEEOGU CHOR 5 A su BAL oh ses ses A dat MN hee eed t A rd 1 Embedded 1 3 his Md ei Ro cun 2 Expattiott Oise nate ct decided ue blo ras edel 2 X8 Series PLC Expansion DC dcr juas sad dela dada a
207. ral This Device Target Device Channel Node Address dec 27 Local Remote Local Command inet XBCPU Write Message Timeout x10ms il Data Table Address Data Table Address ATCO Size in Elements T Control Bits Error 0 Enable 0 Timedout Error Code Hex 0 EnabledWaiting ContinuousOperation TENGT Start D Done 07 Error The RTC in SFR screen is shown below PTO PWM HSC ST Ell HTC MC BH CS0 CS cs2 ES3 Address Type Value Meanin Set Date amp Time Year Integer 0 Month Integer 0 Disable Clock Day Integer 0 Hour Integer 0 Minute Integer 0 Second Integer 0 DayOfWeek Integer 0 Sunday Disabled Bool 0 OFF When valid data is sent to the real time clock from the programming device or another PLCs the new values are stored to the RTC immediately In XGPC click Set Date amp Time button in the screen above to synchtonize PC time data to RTC of X8 Series PLC File screen to set the RTC time to the cutrent time on your PC The real time clock does not allow you to load or store invalid date or time data TIP Use the Disable Clock button in your programming device to disable the real time clock before storing a module X8 Real Time Clock Accuracy The following table indicates the expected accuracy of the real time clock for various temperatures X8 Instruction S
208. rc can occur This could cause an explosion in hazardous location installation Be sure that power is removed or the area in nonhazardous before proceeding e Exposure to some chemicals may degrade the sealing properties of materials used in the Relays It is recommended that the User periodically inspect these devices for any degradation of properties and replace the module if degradation is found e f you insert or remove the plug in module while main power is on an electrical arc can occur This could cause an explosion in hazardous location installation Be sure that power is removed or the area is nonhazardous before proceeding e When you connect or disconnect the Removable Terminal Block RTB with field side power applied an electrical arc can occur This could cause an explosion in hazardous location installations Be sure that power is removed or the area is nonhazardous before proceeding X8 Instruction Set Reference Manual ATTENTION Touch a grounded object to discharge potential static Wear an approved grounding wrist strap Do not touch connectors or pins on component boards Do not touch circuit components inside the equipment Use a static safe workstation if available Store the equipment in appropriate static safe packaging when not in use The USB is not to exceed 3 0 m 9 84 ft Do not wire more than 2 conductors on any single terminal Do not remove the Removable Terminal Block RTB until powe
209. rmat User Program Access The PWM 0 DutyCycle is used to define the Duty Cycle PWM 0 DutyCycle 1000 100 Output ON constant no waveform PWM 0 DutyCycle 750 75 Output ON 25 output OFF PWM 0 DutyCycle 500 50 Output ON 50 output OFF PWM 0 DutyCycle 250 25 Output ON 75 output OFF PWM 0 DutyCycle 0 0 Output OFF constant no waveform PWM 0 AccelDecelDelay Data Format User Program Access The PWM 0 AccelDecelDelay is set the delay time within 10mS range when the frequency is generated from 0Hz to 20KHz and the value can be modified at any time Actual application point of the modified value is when the Rung is executed during the ladder program scanning PWM 0 ErrorCode Data Format User Program Access The PWM 0 ErrorCode bit shows the error code when an error state is detected X8 Instruction Set Reference Manual 6 22 Using High Speed Outputs Address PWM 0 DeceleratingStatus Address PWM 0 RunStatus Address PWM 0 IdleStatus X8 Instruction Set Reference Manual PWM 0 DeceleratingStatus Data Format User Program Access The PWM 0 DeceleratingStatus bit is set when the PWM output is within deceleration phase Set 1 Whenever a PWM instruction is within the deceleration phase Cleared 0 Whenever a PWM instruction is not in the deceleration phase PWM 0 RunStatus Data Format User Program Access The PWM 0 RunStatus bit is set when th
210. rnet configuration data and Ethernet communication activity The Ethernet Communications Status Data Table uses 178 word elements TIP You can use the Ethernet Communications Status Data Table as a troubleshooting tool for Ethernet communications issues Ethernet Communication Status Data Table Word Description 0 119 General Channel Status Block 120 176 Diagnostic Counters Block 177 End of Table Identifier Always 0 The following tables show the details of each block in the Ethernet Communications Status Data Table General Channel Status Block Word Bit Description 0 Ethernet Communication Channel Information Category Identifier Always 1 1 Length 236 2 Format Code 3 Communications Configuration Error Code 4 0 ICP Incoming Command Pending Bit This bit is ON when the X8 Series PLC determines that another device has requested information from this PLC Once the request has been satisfied the bit is OFF 1 MRP Incoming Message Reply Pending Bit This bit is ON when the X8 Series PLC determines that another device has supplied the information requested by a MSG instruction executed by this PLC When the appropriate MSG instruction is serviced during end of scan SVC or REF this bit is OFF 2 MCP Outgoing Message Command Pending Bit This bit is ON when the X8 Series PLC has one or more MSG instructions enabled and in the communication queue This bit is OFF when the queue is em
211. rogrammable Limit Switch In this example No 4 is entered Click OK button after complete X8 Instruction Set Reference Manual Using the High Speed Counter and Programmable Limit Switch 5 35 Create Data Table Data Table Settings Data Table Type Name Usage Scope Options Skip When Deleting Unused Memories No Protections Static Disable Global Use K SD Card Restore Download Disable El Elements Elemets of Data Table Number OK Cancel Help 6 You can see the PS data table created before is assigned to 12 and added on the project window as below E Project amp Q3 Project E Controller Properties amp 3g Comms Config B Channel Configuration E Channel Status 8 4 VO Configuration BE vo Configuration BA Ladder Programs B syso 4 EJ LAD 5 MAIN EU Special Function Registers El Special Function Registers 5 63 Data Tables XR Cross Reference B vo Bx 3 Recipe Configurations 1 3 User Data Monitors 7 Double click the new PS data table and see the contents The Elements is set to 4 on the above step 4 elements from PS12 0 to PS12 3 are created in the scteen below X8 Instruction Set Reference Manual 5 36 Using the High Speed Counter and Programmable Limit Switch X8 Instruction Set Reference Manual HighPreset LowPreset L E OutputHighData LE OuputLowData EPSI21 HighPreset LowPreset El OutputHighData LE
212. roup 01 Insufficient data 02 Improper Amount of data 03 Command code mismatched 04 Packet type mismatched 05 Rejected SDN packet 06 Bad data type 07 Buffer format code mismatched 08 Service code mismatched 09 Modbus Write Reply bytes 2 5 don t match outgoing MSG 0A NX Plus Write with fail Application Layer Qualification MSG Timing Failures Appendix B 8 MSG Instruction Error Code MSG Error Code Mapping Internal Fail Code Hex High byte Low byte Description Identifier Code Error Code group 01 MSG waiting for buffer MSG timed out while on overflow queue after timeout 02 MSG waiting for buffer MSG timed out while on overflow queue before timeout MSG waiting for link layer MSG timed out while link layer transmitting 03 the command or waiting for target to acknowledge receipt command buffer 0 MSG waiting for link layer MSG timed out while link layer transmitting 13 the command or waiting for target to acknowledge receipt command buffer 1 MSG waiting for link layer MSG timed out while link layer transmitting 23 the command or waiting for target to acknowledge receipt command buffer 2 MSG waiting for link layer MSG timed out while link layer transmitting 33 the command or waiting for target to acknowledge receipt command buffer 3 04 91 MSG waiting for rep
213. rved Always 0 EE Channel Status SFR Special Function Register 3 19 COM 0 COM 1 USB Ethernet Xnet TCP Modbus TCP Ethemet IP Modbus RTU Master Address _ Type Value Description 0 CS0 10 INTEGER NN INTEGER INTEGER INTEGER INTEGER BIT BIT BIT NTEGER NTEGER NTEGER NTEGER NTEGER NTEGER NTEGER NTEGER NTEGER NTEGER NTEGER NTEGER NTEGER nt Message Retried Total Message Packets Received Link Layer Error Count Link Layer Error Code CTS RTS DCD ooo Error Code 1 Counter Last Device Reporting Error Code 1 Error Code 2 Counter Last Device Reporting Error Code 2 Error Code 3 Counter Last Device Reporting Error Code 3 Error Code 4 Counter Error Code 5 Counter Error Code 6 Counter Error Code 7 Counter Error Code 8 Counter Non Standard Response Counter Last Device Reporting Error Code 4 8 cococoooooooocoo ASCII Diagnostic Counters Block Word Bit Description 6 Diagnostic Counters Category Identifier Always 2 7 Length Always 30 8 Format Code Always 5 9 0 CTS 1 RTS 2 Reserved 3 Reserved 4 15 Reserved 10 0 Software Handshaking Status 1 15 Reserved 11 Echo Character Count 12 Received Character Count 13 18 Reserved 19 Bad Character Count 20 22 Reserved X8 Instruction Set Reference Manual 3 20 SFR Special Function Register X8 Instruction Set Reference Manual Chan
214. s configured for Mode 0 or Mode 1 behavior and the accumulator counts up CountDown Description Data Format HSC Mode Function User Program Access HSC 0 CountDown Bit 2 9 Status Read Only The CountDown flag is used to increment or decrement a counter of the HSC mode from 2 to 9 When the CountingEnabled Bit is set the CountDown flag 1s set X8 Instruction Set Reference Manual 5 26 Using the High Speed Counter and Programmable Limit Switch CountUp Description Data Format HSC Mode Function User Program Access HSC 0 CountUp Bit 0 9 Status Read Only The CountUp flag is used to the HSC mode from 0 to 9 When the CountingEnabled Bit is set the CountDown flag is set Overflow Description Data Format HSC Mode Function User Program Access HSC 0 Overflow T Word 32 bit Status Read Write The Overflow flag specifies the High Preset of the HSC When the accumulator value of HSC is greater than the value defined in the Overflow the Overflow interrupt is triggered HSC is set the Underflow value as accumulator to keep the count The data range for the accumulator value is 2 147 483 648 2 147 483 647 To set the Overflow value toggles the Setparameter bit from OFF to ON and the Overflow value stored in the SFR is transferred to the HSC The value stored in the Overflow must be greater than or equal to the High Preset or an HSC error is generated Underflow Description Data Format HSC Mode Function User Program Access
215. se AND Instruction Type output The AND instruction performs a bit wise logical AND of two sources and places the result in the destination Source Source The above example means Source 1 01C9H 0000 0001 1100 1001 Source 2 0171H 0000 0001 0111 0001 Destination 0000 0001 0100 0001 0141H OR Logical OR Instruction Type output The OR instruction performs a logical OR of two sources and places the result in the destination Source Source X8 Instruction Set Reference Manual 12 4 Logical Instructions The above example means Source 1 01C9H 0000 0001 1100 1001 Source 2 0171H 20000 0001 0111 0001 Destination 0000 0001 0100 0001 01F9H XOR Exclusive OR N4 36 OUT N4 40 01C9h 4 b 00B8h N4 37 4IN2 0171h 4 Instruction Type output The XOR instruction performs a logical exclusive OR of two sources and places the result in the destination Source Source The above example means Source 1 01C9H 0000 0001 1100 1001 Source 2 0171H 0000 0001 0111 0001 Destination 0000 0001 0100 0001 00B8H NOT Logical NOT Instruction Type output The NOT instruction is used to invert the source bit by bit one s complement and then place the result in the destination X8 Instruction Set Reference Manual Logical Instructions 12 5 So E The above example means Source 1 2555 00 FFH 0000 0000 1111 1
216. specified as Stack when the rung state is true PUSH LIFOU BSL Bit Shift Left BSR Bit Shift Righter Instruction Type Output LIFO Queue Unload Like Stack storage unload the data from the specified stack when the rung state is true POP Enable Done When the rung state is true BSL Load the specified BIT to LSB and shift left a bit array one bit at a time when the rung status is true BSR Load the sepcified BIT to MSB and shift right a bit array one bit at a time when the rung state is true X8 Instruction Set Reference Manual Shift and FIFO LIFO Instructions 15 3 This instruction uses the following data format Data Table data table to Shift CTRL CR data table When the BSL instruction is in run state this instruction is used to control the internal flags BIT data bit contains data to load LENGTH bit length of data table You can check the result of above example to the figures below To bit shift specify B3 3 as data table and specify bit data as B3 4 0 to load Then the B3 3 Bit shift left and the 3 5 Bit shift right Value ne e aa URL LLL En Integer SERE Integer TIT TIT TIT XD Bits Integer 0000 0000 0000 0000 Bits Integer 0000 0000 0000 0000 Bits n If the bit shift by the BSL or BSR instruction some values ate unloaded from the bit array You can check the unloaded bit on the Unload flag of the CR data table Bool Bool Bool
217. ss PWM 0 OperatingFrequency Status Address PWM 0 DutyCycleStatus X8 Instruction Set Reference Manual PWM 0 0peratingFrequencyStatus Data Format User Program Access Long Word 0 100 000 Read Only The PWM 0 OperatingPrequencyStatus bit shows the frequency that the PWM is executed PWM 0 DutyCycleStatus Data Format User Program Access The PWM 0 DutyCycleStatus bit shows the duty cycle feedback information that the PWM is executed Chapter Relay Type Bit Instructions Introduction This chapter describes the X8 Series PLC relay type bit instructions This chapter organized as follows Topic Page Introduction A NOC Normal Open Contact NCC Normal Closed Contact 1 2 OUT Output Coil 7 3 SET Set Coil RST Reset Coil 7 4 EGR Edge Rsing 7 5 ONSR One Shot Rising ONSF One Shot Falling 7 6 X8 Instruction Set Reference Manual 1 2 Relay Type Bit Instructions Use relay type bit instructions to control bits such as ON OFF input and output bits The following instructions are described in this chapter Instruction Description NOC Normally Open Contact NCC Normally Closed Contact OUT Output Coil SET Set Coil RST Reset Coil EGR Edge Rising ONSR One Short Rising ONSF One Shot Falling NOC Normal Open Contact NCC Normal Closed c Contact dm Instruction Type input This instruction is used to check TRUE or FALSE in various relay type bi
218. ss EIl 0 UserlnterruptEnable Bit Dor1 Control Read Write The UserInterruptEnabled bit is used to perform whether the LadderProgramNumber service routine allocated to EII event EventinterruptEnabled Description Data Format HSC Mode Function User Program Access Ell 0 EventinterruptEnabled Bit Dor1 Control Read Write The EventInterruptEnabled control bit is used to execute whether the EI performs AutoStart Description Data Format HSC Mode Function User Program Access Ell 0 AutoStart Bit Oor 1 Control Read Write The AutoStart control bit automatically sets the interrupt when the X8 Series PLC enters any executing mode X8 Instruction Set Reference Manual Using Interrupts 19 7 EdgeSelect Description Data Format HSC Mode Function User Program Access Ell 0 EdgeSelect Bit 0 or 1 Control Read Write The EdgeSelect control bit is used to select the trigger types when using EII 1 falling edge 0 rising edge InputSelect Description Data Format HSC Mode Function User Program Access ElI O InputSelect Word 0 7 Control Read Write The InputSelect control word is used to define which external input pott signal is used For example it uses 0 3 among X1 0 0 X1 0 3 In case of X8 M16DDR ErrorCode Description Data Format HSC Mode Function User Program Access EII 0 ErrorCode Word Control Read Write The following table shows the error codes of EII X8 Instruction Set Reference Manual 19 8
219. ss 2 Addressing Expansion I O Sot ia 2 X8 Series Embedded I O Memory Mapping ooooocccccccco 3 Digital I O Configuration of X8 Series PLC base module 3 X8 M14DDT X8 M16DDR Input Image 3 X8 M32DDT Input Image 3 X8 B48DDX Input Image 4 X8 B24ADR X8 B24DDT and X8 B24AAR Input Image 4 X8 M14DDT Output Image 4 X8 M16DDR Output Image 5 X8 M32DDT Output Image 5 X8 B48DDX Output Image 5 X8 B24ADR X8 B24DDT and X8 B24AAR Output Image 6 X8 Series Expansion I O Memory Mapping 05 6 Digital I O Input Module Configuration 00 6 X8 XU16 X8 XA16 Input Image 6 X8 XU32 Input Image 6 X8 XU64 Input Image 7 X8 TPOT8 Input Image 7 Digital I O Output Module Configuration 00 8 X8 YN16 X8 YR16 Output Image 8 X8 YN32 Input Image 8 X8 YN64 Input Image 8 X8 YR6C Output Image 9 Analog I O Module Configuration 1255 e Masa AO A 9 X8 Al8 Input Image 9 Data Configuration of Control Area 11 X8 A04 Input Image 12 X8 RT6 Input Image 14 X8 TC6 Input Image 18 I O Address eadera tec redeat tace mien nien tian dy ached vett 22 Addressing Detaile os duae leer dr ovr a RET Deed 22 I O Addressing schema 22 Addressing Example 23 A en ver GC Cop das ied a pid dads det 24 Tnput POSCIT eb o hbri pe rs eod Senior epp ERR add 24 Output POR Cines Ao se ee 24 LOURDES A AAA 24 ContipurableIanpul nar o 24 Analog Tpit A METTE Analog Input Filter and Update times 00 000 da Input Channel Altea tds st ss Con
220. sti Lue se ERES OE S ds REPE AA 22 LOW tese Inte KDE A FR ERIS FPE T eal 22 Pp P reset ote HUE oneee e E A 23 Low Preset Reached noe RARAS ape Ro A 23 BlighP reset Reached uoo es bee Val acea eoi eres 24 UrderPlosdintepedptus see dummies tesis 24 Sara Ine ao oe xp scd eot pla scd ap M et 25 COMUN vss io LET A e P E OQ SIS PR 25 IST iva P Fu Ta P ee xe e ETE a SA Sh rete 26 CountDowtlse viii EE RA EET C RR RE RULES ASSN LAS 26 Cont Do s fete a go Wa tired A CIE ha Nae RO NIE EME SG MR NR CER 26 CTCF OW asthe a AO 26 WICH OW ebrei A ER 27 HSCS Set High Speed Counter Value i2 ti a aa 28 HSCC Clear High Speed Counter Value o ooooooooooo o 29 High Speed Counter HSC Data Table ore ma 30 po Data Tables c pedea toe o NOE o Eo Mc n 30 Using Programmable Limit Switch 22e er xs 31 Addressing PS Data Table ia ERAS 32 PS Data Table Example s co rev ep a erri errer ensenis 32 Chapter 6 Using High Speed Outputs aia A O A 1 PTO Pulse Train Output i4 pices cee es es ne et eei 2 Pulse Train Output EOnelign iu a ee ers eva ADDS ERE RS d MR 2 PTO Funto c A Eu RE bi A 5 SFR Special Function Register PTO Sub Elements 5 PTO 0 Outpites ca sd a A is 6 EPO DON o cose S oC prp equae o eig 7 PXCX0 DeceletatingStatus odes E 7 POCO RUNSAS ea EA Ae ee wi dar EDS E EAS 7 PTO 0 AcceleratingStatus tdt debe bet gen gow etl Aled 7 PTO0 RampProtle 0 pa SOS 8 PTO OIdl Stat s ratito rss ebria 8 PTO 0 RrrorDetectedStatus 44 iota
221. t instrucions Addressed Bit NOC Instruction NCC Instruction OFF FALSE TRUE ON TRUE FALSE Example Check Input Ouput Port Status X1 0 0 0 Y0 0 0 0 Check Various flag status X8 Instruction Set Reference Manual Relay Type Bit Instructions 1 3 TM9 0 Done Check Binary typed data table Check Binary type data table value Parameter Data Table Address Address Mode Level Sg 5 Elle 2 o z E 518138 s B ms xl65 lm amp ziel5 isice E lja Sla lt la S u Bit AY Y Ya y y viv ay ly You cannot use indirect addressing and SFR with SR MG PD RTC HSC PTO PWM STI Ell BHI MMI CS DLS OUT Output Coil Y0 0 0 lt gt Instruction Type output This instruction outputs ON TRUE or OFF FALSE for relay type bit input result ON when the input rung condition become true OFF when the input rung condition become false OUT instructions are reset turned OFF when You enter to the program or remote program mode via XGPC X8 Instruction Set Reference Manual 7 4 Relay Type Bit Instructions Power Cycle Off gt ON The OUT is programmed within an inactive or false MCR Master Control Reset zone A bit that is set within a subroutine using an OUT instruction remains TIP j i set until the OUT is scanned again Parameter Data Tab
222. t o oooooommo o 13 INTD gt TiterapeDisable tt e pte 13 INTE 2 litermipt Enablerss ania xo ew AAA 15 INTF Intertupt Pisto Ta deer e reet v es 15 Chapter 20 PID Control TOMO deor ciet ETC aid hate ata ER pata tu alacant bene afiny 1 The PID Equal serios bre eoe ee o ERI Debs ed Yo ied 2 PID Proportional Integral Derivative 2 5 Reese RR ER Ss 3 TinedOEPPLI al A Fence e ds 5 POG Cot A a EY P ec aie WOR ea EA aa ted 5 ForwardReverse Acting cess obs p OS Eua p IE IO 6 OutputLimitingEnabled dai eret EAR eoe eR 6 GalnRanseselecHOR op eee eee te tox eg e d p DA 6 SerPointocaling Enabled 432 a ei dae eese doen 7 L pUpdat Lodo astucia dd i T Ne ci 3 ProcessValuelnDeadBand e si o RR ERE 7 Zero rossmpDeadband ie aras uidere aep He oi 8 Ke Controller Cialis iua s orate sere bp Eu bat s ede eii mut 9 Id TINE a ak etes DEO CR nance on s aed S e ted ca OA 9 Ar Bye 34 Deis Voie oe sar E 10 Loop pdate Ete cose Eo A tot bed ea en ELS 10 PeedForwardBiaS orte A OO 11 Scale dEEfok 1s Reo P EL Dass dd va eed Oy 11 Pro Code us Lade toda buda Added pta oti OE 11 Chapter 21 ASCII Instructions o s estes e b TUR CE SCOPE SA EE S SI Sd 1 ATOI Convert ASCII String to Integer sy piorum ee ca 3 ITOA Convert ASCII String to Integet 2 seed er 4 ACN ASCII String Contato tcn e lio 4 ARAS CESE ERA AOS 5 ASCH Searching Stine ce sop Et PLA SE RC ate eed ae ed 6 ACME C mpare IO a O 6 ARNL Number of Characters for Line 7 ARNC
223. t Reference Manual Bit Position E 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO Q fr fr fr ir jr jr jr ir jr fro jr pro ro fr jr yer 1 r ofr jr fro jr fr ir jr pro jr pro fr fro ro ro fr r read only x not used always at a 0 or OFF state X8 B48DDX Input Image For X8 B48DDX base module the Bit positions O to 15 with word O correspond to input terminals 0 to 15 And Bit position 0 to 11 with word 1 correspond to input terminal 0 to 11 Bit Position E 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO O jr jr fr jr ir jr Jr ro fre jr j r jr jr jr jr jr 1 x x x x r ir jr ir fro jr jr jr jr jr jr jr r read only x not used always at a 0 or OFF state it will be released in 2013 X8 B24ADR X8 B24DDT and X8 B24AAR Input Image For X8 B24ADR X8 B24DDT and X8 B24AAR base module the Bit positions O to 13 correspond to input terminals O to 13 r read only x not used always at a 0 or OFF state X8 M14DDT Output Image For X8 M14DDT base module the Bit positions 0 to 5 together with word 0 correspond to output terminals 0 to 5 1 0 Configuration 1 5 Bit Position 3 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 JO w write only x not used always at a 0 or OFF state X8 M16DDR Output Image For X8 M16DDR base module the Bit positions 0 to 7 correspond to output terminals 0 t
224. tamp This 32 bit value increments every 10 us after powet up X8 Instruction Set Reference Manual 8 8 Timer and Counter Instructions After the free running clock reaches OxFFFFFFFF 42949 67295 seconds value it wraps around to 0 and continues incrementing Address Parameter Data Table Address Mode Level N co co juri gt S E E oc 2 a o lolo o O E 2 3 gell 5l 5 a sala S jojo t 3 7 o k D o alelx S PUR E amp amp S 8 5 S E a ola E E la S lo Output y CLKC Compute Time Difference F5 4 Start OUT F5 6 246641 0 4 gt 5 0 F5 5 4 Stop 246646 0 4 Instruction Type output It calculates time difference between two times gets from the CLKR instruction That is this function is used to calculate time interval for each time difference when two events are generated Two input data should be same type Address Parameter Data Table Address Mode Level N co E e SE gt S E E ac 2o 3l wu lolo o E EI S S SEJE Sje o 212138 3 3138 38 3 2l e DAISIES EJE E 5 2 8 E E Sla l E EE z S ju c Input 1 y Input 2 y Output y X8 Instruction Set Reference Manual Timer and Counter Instructions 8 9 How Counters Work The figure below demonstrates how a co
225. tatus Bool EnableStatus Bool Enable Status follows rung state OperationFrequencyStatus Long Operating Frequency Status Hz L DutyCycleStatus Integer Duty Cycle Status e 9 123 12 3 Using High Speed Outputs 6 19 The variables within each PWM element along with what type of behavior and ata iaDie Elements S yp Summary access the control program has to those variables are listed individually below Address and Element Data Format Range User Program Access Contorl PTO 0 Output Word INT 2 4 Read Only PWM 0 ProfileParameterSelect Bit 0 or 1 Read Only PWM 0 EnableHardStop Bit Dor1 Read Write PWM 0 OutputFrequency long word 0 40 000 Read Write PWM 0 DutyCycle Word 0 1 000 Read Write PWM 0 AccelDecelDelay Word 0 32767 Read Write Status PTO 0 ErrorCode Word INT 2 7 Read Only PTO 0 Done Bit 0 or 1 Read Only PWM 0 ErrorCode Word INT 2 5 Read Only PWM 0 DeceleratingStatus Bit Dor1 Read Only PWM 0 RunStatus Bit 0 or 1 Read Only PWM D AcceleratingStatus Bit 0 or 1 Read Only PWM 0 IdleStatus Bit 0 or 1 Read Only PWM 0 ErrorDetectedStatus Bit 0 or 1 Read Only PWM 0 NormalOperationStatus Bit 0 or 1 Read Only PWM 0 EnableStatus Bit 0 or 1 Read Only PWM D OperationFrequencyStatus long word 0 40 000 Read Only PWM 0 DutyCycleStatus Word INT 1 1000 Read Only Long Word 32 bit integer PWM 0 Output Address Data Format User Pro
226. tch PS e Routing Path RP Data Table Properties General Data Table Settings Data Table Type Name OUTPUT Data Table Number Description Scopes Options Skip When Deleting Unused Memories Protections Static Disable SD Card Restore Download Disable Data View via Web Site Data View via Web Site Protect a this data table in Webserver Page Sse X8 Series PLC supports powerful threefold password protection system using characters include special characters never before seen in the existed small PLC PLC System Passwords consist of up to 12 characters include special characters Each PLC program may contain two passwords the Password and the Master Password Password Description Master Password System Password This is main password of system By using the master password and system password It can be set the password redundancy The Master Password takes precedence over the System Password In General to set more powerful password protection use a common master password in the environments that uses multiple X8 series PLCs and otherwise use different system password in each PLC Ladder Password program Separate password can be set for each ladder X8 Instruction Set Reference Manual 2 10 X8 Series PLC Memory and Data Table TIP TIP X8 Instruction Set Reference Manual General Passwords Ladder Passwords System Password New
227. tegral Derivative 20 3 X8 Instruction Set Reference Manual 20 2 PID Control The PID Equation X8 Instruction Set Reference Manual The PID instruction can be expressed like 1 or 2 formula The formula adds following three actions Proportional Action P Action calculate proportional values to current deviation e Integral Action I Action calculate proportional values to accumulated pas deviation Derivative Action D Action calculate proportional values to the size of deviation e y K e fedt T gt 1 K e Efedt K T 2 J Y P Action Action D Action y Detection e Deviation KP Proportional coefficient 0 01 327 67 TI Integral time 327 67 0 01 TD Derivative time 0 01 327 67 That is PID control is configured following three elements and the basic meaning of PID control is to find the optimal value considering past current and future data Integral Action I Action consider past data Proportional Action P Action consider current data Derivative Action D Action consider future data PID Control 20 3 PID Proportional Integral Derivative Instruction Type output The PID instruction is an instruction to control the PID IMPORTANT Analog module data and PID instruction parameter must e same It is recommended that you place the PID instruction on a rung without any conditional logic If conditional logic
228. the High Speed Counter and Programmable Limit Switch 5 31 LadderProgramNumber UserlnterruptEnable FunctionEnabled AutoStart F CountingEnabled SetParameters LowPresetMask HighPresetMask UnderflowMask OverflowMask Mode Accumulator HighPreset LowPreset Overflow Underflow E OutputMaskBits HighPresetOutput LowPresetOutput ErrorCode H UserinterruptExecuting UserinterruptLost UserlnterruptPending ErrorDetected LowPresetinterrupt E HighPresetinterrupt Underflowinterrupt Overflowinterrupt LowPresetReached HighPresetReached CountDirection Underflow Overflow ModeDone l CountDown CountUp E HSC 1 ElHSC 2 El HSC 3 Integer Bool Bool Bool Bool Bool Bool Bool Bool Bool Integer 0 2147483647 2147483648 2147483647 2147483648 Up Counter OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF Count Down OFF OFF OFF HighPreset l LowPreset HE OutputHighData H0 pl El OuputLowData Using Programmable Limit Switch The X8 Series PLC is in the run mode and when the PLS function is enabled the HSC will count incoming pulses When the HSC accumulator data reaches X8 Instruction Set Reference Manual 5 32 Using the High Speed Counter and Programmable Limit Switch X8 Instruction Set Reference Manual the High Preset or Low preset defined in the PS data table the
229. ting Point typed F 32 bit size data table and Floating Point observes IEEE 754 specifications Like other data tables it supports 1 536 of elements Floating Point Type Data Structure MSB LSB 31 30 29 23 22 21 20 19 ip 2 1 0 Sign Exponent Value Mantissa Bit 31 is MSB and means the sign bit Bits 30 23 are the exponent Bits 22 00 are the mantissa Address Address Parameter Data Table Mode Level 5 z e zlg Bulls 5 z 8158 slEl l E a a3 s 2854 Input 1 Y Y O IN VW Input 2 y Y O IN V v Output Y Y VIN V v X8 Instruction Set Reference Manual LSB Round to Even Rule Floating point operations are rounded If the bits to the right of the LSB represent a value of exactly one half LSB the result is rounded up or down so that the LSB is an even number Floating Point Exception Values Math Instructions 10 5 Zero represented by an exponent and a mantissa of zero Denormalized Since denormalized numbers have very small insignificant values they are treated as zero in order to increase the performance CO represented by an exponent of 255 and a mantissa part of zero Both positive and negative infinity are generated when operations overflow NaN Not a Number represents mathematically undefined input and especially itis used in floating point arithmetic For example
230. to TU YO Disply Format Output Type Selection Disply Format Output Type Selection Raw Value Voltage Inpunu to TU VU V Voltage Input to TU VU 1 27 amp X8 AI4AO2 Expastion Analog Module Filter Characteristics az asw Filter Setting Filter Bandwidth Setting Time Resolution Bits Value Hz 3dB Freq Hz mSec 10 19 100 00 12 50 50 20 00 12 60 60 16 67 12 250 250 4 12 X8 AI8 Expastion Analog Module Filter Characteristics Filter Setting Filter Bandwidth Setting Time Resolution Bits Value Hz 3dB Freq Hz mSec 10 19 100 00 16 50 50 20 00 16 60 60 16 67 16 250 250 4 16 TIP 10Hz is the default setting The total update time is one ladder scan time plus the setting time If a 250 Hz filter is selected the maximum update Time ladder scan time 4ms X8 Instruction Set Reference Manual 1 28 1 0 Configuration X8 Instruction Set Reference Manual Input Channel Filtering The analog input channels use on board signal conditioning to distinguish AC power line noise from normal variations in the input signal Frequency components of the input signal at the filter frequency are rejected Frequency components below the filter bandwidth 3 dB frequency are passed with under 3 dB of attenuation This pass band allows the normal variation of sensor inputs such as temperature pressure and flow transducers to be input data to the pro
231. truction Error Code Appendix B 2 MSG Instruction Error Code MSG Error Code Mapping Internal Fail Code Hex High byte Low byte Description Identifier Code Error Code group No Error 00 00 No Error Link Layer Qualification Error Confirmation from Link Layer 01 NAK No Memory retries by link layer exhausted 02 Target node cannot respond because message is too large 03 Target node cannot respond because it does not understand the command parameters 04 Network is not active or duplicate node detected 05 Target node cannot respond because requested function is not available 06 11 Target node does not respond 07 Message retries exhausted 08 Local modem communication has been lost 09 Received a Master Link reset 01 Invalid Local IP address configured 02 Multi Hop messaging cannot route request 03 Maximum connections used no connections available 04 Invalid Target IP address or host name 05 Cannot communicate with the name server 06 Connection not completed before user specified timeout 07 Connection timed out by the network 08 SEN NS Connection refused by destination host 09 Connection was broken 0A Reply not received before user specified timeout 0B No network buffer space available XX 22 for Xnet Xnet TCP specific error codes MSG Instruction
232. tructure and Type The data table number 0 2 sown in the table are reserved number for internal uses and cannot be changed 0 Internal Output Port 1 Assigned Internal Input module 2 Assigned to internal status register Various data tables from 3 1535 shown in the table below can be created in X8 Series PLC Data Table SFR Special Function Register Ladder Program Specialty Files No Description Identifier Description No Description No Description 0 a HSC eens 0 System File 0 0 Data Log Queue 0 1 lc PTO Pulse Train Output 1 System File 1 1 Data Log Queue 1 3 B Bit File STI n Timed 3 System File3 g Recipe File 0 4 dura Ell pe 4 System Filed 1 Recipe File 1 X8 Instruction Set Reference Manual X8 Series PLC Memory and Data Table 2 3 PLC Internal Data Table Structure and Type Data Table SFR Special Function Register Ladder Program Specialty Files B Bit Register 2 255 Recipe File 2 255 N Integer Register TM Timer Register CT Counter Register CR Control Register F Floating Point Register B Bi 5 1535 a RTC Real Time Clock 5 Ladder Program 5 CR Control N Integer F Floating Point ST String A ASCII L Long Word MG Message PD PID PS Programmable Switch RP Routing Path Memory Module MMI information 6 Ladder Program 6 Base Hardware BHI information 7 Ladder Program 7 Communications
233. types of applications recipemanagement batch processing and many others To define which components of an addtess are to be indirected a closed bracket is used 0002 The above example is the ladder program that adds 1221 to data table value that is expressed N4 N4 1 and stores it to N4 2 If the value of location N4 1 10 this instruction copies data value from data table specified by N4 10 and stores it to location N4 2 after adding 1221 to the data value In this example the range of N4 1 which is supported by X8 Series PLC is from 0 to 1534 and total is 1535 Programming Instruction Overview 4 5 TIP If you access to a number lager than the number of elements specified from the data table through Indrect Addressing method 28 H error runtime error and ladder progrm error will be occurred For the initial compiling any errors could not be founded because there is no grammatical errors Specifies the data table through Indirect Addressing Specify the data table through Indirect Addressing and can refer the data 0003 N N4 20 15 OUT N4 30 And like below you can detailed control like double pointer in the C language since the data table and the elements supports the Indirect Addressing 0004 N N4 20 N4 21 OUT N4 30 5 Indirect Addressing of a File It can be applied like above B3 0 N4 2 B3 0 2 0006 X8 Instruction Set Reference Manual
234. uction after call the subroutine Suspend SUSP Instruction for program debugging test and the PLC enters the IDLE state Temporary End ENDT Stop current program temporary The ENDT instruction enters run state mode during program execution the PLC aborts ladder scan End of a Ladder Program END Indicate the end of a ladder program The PLC display the End during ladder scan Master Control Relay MCR MCR instruction executed in pairs and contorl the intenal ladder program JMP Jump to Label 1st LBL5 1 lt JMP gt Instruction Type output The JMP instruction cause program execution to go to the rung marked label number The data range for the label is from 0 to 999 X8 Instruction Set Reference Manual LBL Labei CALL Call Subroutine SBR Subroutine Program Control Instructions 17 3 1st LBL5 1 C LBL gt Instruction Type output The LBL instruction is used to indicate the location for the JMP instruction to change the order of ladder execution The data range for the label is from 0 to 999 Instruction Type output The CALL instruction is used to call a separate subroutine The NUM of the subroutine is the number of the subroutine on the XGPC To return from the subroutine during the ladder program execution use the RET instruction or use END instruction to return from subroutine after the CALL instruction is executed SBR Instruction Type output The SBR instru
235. ue of the counter that is used in the HSC When the SetParameter bit is changed from 0 to 1 the HighPreset value is loaded into the HSC so that can be operated from the HSC The HighPreset value must be less than or equal to the data resident in the Underflow parameter or an HSC error 1s generated If negative number is input as the LowPreset or Underflow value it will be replaced by the absolute value without sign Set various HSC parameters using the HSCS instruction except SetParamtet Overflow Description Data Format HSC Mode Function User Program Access HSC 0 Overflow Bit 0 9 Status Read Write The Overflow flag is set when the accumulated value exceeds the high preset or Overflow value If this flag is set any PLC error does not generated X8 Instruction Set Reference Manual Using the High Speed Counter and Programmable Limit Switch 5 19 Underflow Description Data Format HSC Mode Function User Program Access HSC 0 Underflow Bit 0 9 Status Read Write The Underflow flag is set when the accumulated value decreases the lower setpoint or Underflow value If this flag is set any PLC error does not generated OutputMaskBits Description Data Format HSC Mode Function User Program Access HSC 0 OutputMaskBits Hn bit Status Read Only OutputMaskBis Output Example Output Example The OutputMaskBits define which outputs on the PLC can be directly controlled by the HSC The HSC sub system has the ability to directl
236. unter works The count value must remain in the range of Low Preset 2 147 483 647 High Preset 2 147 483 647 If the count value goes above 2 147 483 647 the counter status overflow bit is set 1 If the count goes below 2 147 483 647 the counter status underflow bit is set 1 The RSTA instruction is used to reset he counter 2 147 483 647 i r Counter Up 3 gt E Counter Down 2 147 483 647 UnderFlow Using the CTU and CTD Instructions To use counter instructions CTU and CTD the CT instruction in the data table is used Following shows the elements of the CT instruction i Data Table CT10 x ipti EX m 10 0 Counter t Underflow Bool 0 OFF h Overflow Bool 0 OFF Done Bool 0 OFF H CountDown Bool 0 OFF H CountUp Bool 0 OFF Preset Long 0 Accumulator Long 0 CT10 1 Counter bar CT10 2 Counter 4 CT10 3 Counter i CT10 4 Counter fah 4 TIP The counter continues to count when the accumulator is greater than the CTU preset and when the accumulator is less than the CTD preset X8 Instruction Set Reference Manual 8 10 Timer and Counter Instructions Address CT 10 0 Underflow Address CT 10 0 0verflow Address CT 10 0 Done Address CT 10 0 CountDown X8 Instruction Set Reference Manual CT 10 0 Underflow Data Format User Program Access This bit is set when the accumulator value is less than 2 147 483 647 CT 10 0 0verflow Data Format User Program
237. vert Integer to ASCII String ACN ASCII String Concatenate Concatenate two of characters strings AEX ASCII String Extract Extract part of the string data Search a string ASCH Search a specific string ACMP ASCII String Compare Compare two strings Instructions for ASCII communications Instructions ARNL Descriptions Number of Characters for Line Get the number of characters contains End of Line character in buffer ARNC Number of Characters in Buffer Get number of characters in buffer ACB ASCII Clear Buffer Clear sending and receiving communications buffer AHS Handshake On OFf the handshake control signal in the modem communications ARC Read Characters Read the received character in buffer and store the data to String Data Table AWA Write String with Append Add two characters specified in Channel Configuration and write the data to port AW Write a string Write a string to port The following table shows Error code of the ASCII instructions ATOI Convert ASCII String to Integer ASCII Instructions 21 3 Error Code Descriptions Success Illegal parameter Not supported Channel is shutdown Protocol contention Transmit is in progress Sl on A wl N O CTS Signal lost 10 Source Control Data Table invalid 11 Source String Length invalid Request String Length invalid Unload bit in Control Data
238. verting Analog Dat aio OS AAA A Converting Analog Input Data na rai Alo evando adeo sS ette iaa eet e Nd teu Latchung Inputs s nee LLLA o LAUD IE E TERES RT Converting Analog Data to Actual Output Voltage 29 Rising Edge Time ChattsEx mple Li 222 perras etr cia Rising Edge Time Chart Example Zo ai de Falling Edge Time Chart Example 1 5 di es Falling Edge Time Chart Example Zaapa oa Configure Expansion I O Using XGPG vient Soe obs t es ke ed Chapter 2 X8 Series PLC Memory and Data Type TAO ACORTAR ME RAE S RR RE d XO Sees PLE Memory ces xn o EI Lan oet LESER Dat Table Str ct te ye o dd oec sp e RA RO elei edt M e i he User Memotyis ii secte IL wed e tex e epe e tte X8 Series PLC User Memory 4 Viewing X8 Series PLC Memory Usage severe ws Data Tables cate LE LX yp haee NA RAD CE ENTRAR ed Protecting Data Table During Download o o ooooooommo o Data Table Download Protection y 1 etre Setting Data Table Protection 6 Data Table Protection Requirements 7 DLE 4 cir add dis a eulos Pas Ord A td DER e A Clearing the Controller Memory ii dd e Allow Access Data Table through Internet Web Chapter 3 SFR Special Function Register TEO UCA a e irte eR oet qe NT a E tdo sash Res OVERVIEW ere floes EP VNDE quete tete Ri aca pus Real Time Clock Registeta s ce os PES AO Writing Time Data to the Real Time Clock X8 Real Time Clock Accutane RTCA Real Time Clock Adjust Instructi0N
239. wing table shows Interrupt Bits Select value for enable each interrupts EILO interrupt is enabled in the above example Interrupt Bit hexadecimal EILO 0 1H Ell 1 1 2H Ell 2 2 4H ElI 3 3 8H Ell 4 4 10H Ell 5 5 20H Ell 6 6 40H Ell 7 7 80H HSC 0 16 10000H HSC 1 17 20000H HSC 2 18 40000H HSC 3 19 80000H HSC 4 20 100000H HSC 5 21 200000H PIT Timer 31 80000000H If you need to control 2 or more interrupts at the same time add above values and input them to the Interrupt Bits Select value Instruction Type output 4H 4 Interrupt Bits Select X8 Instruction Set Reference Manual 19 16 Using Interrupts The INTF instruction removes each pending user interrupts from the system Interrupt Bit hexadecimal ET aa Ell 1 1 2H Ell 2 2 4H Ell 3 3 8H Ell 4 4 10H Ell 5 5 20H Ell 6 6 40H Ell 7 7 80H HSC 0 16 10000H HSC 1 17 20000H HSC 2 18 40000H HSC 3 19 80000H HSC 4 20 100000H HSC 5 21 200000H PIT Timer 31 80000000H If you need to control 2 or more interrupts at the same time add above values and input them to the Interrupt Bits Select value X8 Instruction Set Reference Manual Chapter 20 PID Control Introduction This chapter describes the X8 Series PLC Proportional Integral Derivative PID instructions This chapter organized as follows Topic Page Introduction 20 1 The PID Equation 20 2 PID Proportional In
240. y without control program interaction turn outputs ON or OFF based on the HSC accumulator reaching the High or Low presets The bit pattern stored in the OMB variable defines which outputs are controlled by the HSC and which outputs are not controlled by the HSC The bit pattern of the OMB variable directly corresponds to the output bits on the controller Bits that are set 1 are enabled and can be turned on or off by the HSC sub system Bits that are clear 0 cannot be turned on or off by the HSC sub system The mask bit pattern can be configured only during initial setup This table illustrates this relationship Affect of HSC Output Mask on Base Unit Outputs 16 Bit Signed Integer Data Word HSC 0 HPO high preset output 15 14 13 12 11 10 39 8 7 6 5 4 3 2 1 0 0 0 1 1 0 0 0 1 1 0 0 1 HSC 0 OMB output mask Y0 0 0 X8 Instruction Set Reference Manual 5 20 Using the High Speed Counter and Programmable Limit Switch HighPresetOutput Description Data Format HSC Mode Function User Program Access HSC 0 HighPresetOutput s 16 bit Control Read Write inary The HighPresetOutput shows the state 1 ON or 0 OFF of the outputs on the controller when the accumulator value is reaches to the high preset However actual output value is defined by OutputMaskBits LowPresetOutput Description Data Format HSC Mode Function User Program Access H
241. zuis9 EMEN z AISlE Zlslels FZ 5 E E Gla la lt a S 5 Counter 4 y y Preset ACC CTU Count Up CTD Count Down EN CT10 0 4 Counter 1000 4 PRE CT10 1 1000 __ CountDown __ Done Instruction Type output The CTU and CTD instructions are used to increment or decrement a counter at each false to true rung transition TIP If the signal that makes rung conditions go false to true is coming from a field device this signal should be maintained to check rung status transition in case of that the width of ON OFF is less than the scan time X8 Instruction Set Reference Manual RSTA Reset Accumulator Parameter Instruction Type output Timer and Counter Instructions CT10 0 CRSTA 8 13 The RSTA instruction resets the Counters Timers and various contorl elements The follwong table shows the reset result by the RSTA instruction of each element Timer Element Accumulator gt 0 Done gt 0 TimerTiming gt 0 Enable gt 0 Data Table Couneter Element Accumulator gt 0 Overflow gt 0 Underflow gt 0 Done gt 0 CountUp gt 0 CountDown gt 0 PTO PWM CS Comms DLS DataLog Contorl Element Position gt 0 Enable gt 0 Enable Unload gt 0 Done gt 0 Empty gt 0 Error gt 0 Unload bit gt 0 Address Address Mode Level Immediate Indirect LongWord
Download Pdf Manuals
Related Search
Related Contents
User Manual A Iiquid fertilizer for the correction of iron Engrais liquide pour Aphelion 500AG / 505AG 36310 Notice Excellence Blond_V2 pdfDocs 4.2 - Advanced User Guide ÿþS o n y E r i c s s o n M o b i l e C o m m u n i c a t i o n s A B Barnes & Noble Nook GlowLight Quick Start Guide NEURODYN 10 CANAIS 11. Using the HIM as a Drive Recorder With the HDS Tablet Copyright © All rights reserved.
Failed to retrieve file