Table of Contents Chapter 1 Relays, Memory Areas and Constants 1.1 Table of Relays, Memory Areas and Constants . . . . . . . . . . . . . . . . . . . . . . . . 1 - 2 1.1.1 FP0/FP−e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 2 1.1.2 FP0R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 7 1.1.3 FPΣ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 1.4.4 1.4.5 1.5 BCD Type Real Numbers (H) (for FP2, FP2SH and FP10SH) . . . 1 - 79 Character Constants (M) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 80 Data Ranges Which can be Handled in the PLC . . . . . . . . . . . . . . . . . . . . . . 1 - 81 1.5.1 Data Ranges Which can be Handled in the PLC . . . . . . . . . . . . . . 1 - 81 1.5.2 Overflow and Underflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 4.4.2 4.4.3 4.4.4 Operation Mode when an Operation Error Occurs . . . . . . . . . . . . . 4 - 16 Dealing with Operation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 17 Points to Check in Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 18 4 - 19 4 - 19 4 - 20 4 - 21 4.5 Handling Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.1 Index Registers . . . . . . . . . . . . . . . . . .
Table of Contents 5.1.18 Special Data Registers for FP2/FP2SH/FP3/FP10SH . . . . . . . . . . 5−176 5.2 Table of Basic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−201 5.3 Table of High−level Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−209 5.4 Table of Error codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5−229 5.5 MEWTOCOL−COM Communication Commands . . . . .
Table of Contents Basic Instructions Sequence basic instructions TMX On−delay timer TMX . . . . 2 − 42 ST Start . . . . . . . . . . . . . . . . . . . 2 − 8 TMY On−delay timer TMY . . . . 2 − 42 ST/ Start Not . . . . . . . . . . . . . . . 2 − 8 CT Counter . . . . . . . . . . . . . . . 2 − 48 OT Out . . . . . . . . . . . . . . . . . . . . 2 − 8 SR Shift register . . . . . . . . . . . 2 − 54 / Not . . . . . . . . . . . . . . . . . . . 2 − 10 AN AND . . . . . . . . . . . . . . . . . .
Table of Contents Special setting instructions SYS1 Communication conditions setting . . . . . . . . . . . . . . . 2 − 119 Password setting . . . . . . 2 − 123 Interrupt setting . . . . . . . 2 − 125 PLC link time setting . . . 2 − 127 Change high−speed counter operation mode . . . . . . . 2 − 129 STF> Floating point real number data comparison: (Start) . . . . 2 − 140 STF>= Floating point real number data comparison: (Start) . . . . 2 − 140 STF< Floating point real number data comparison: (Start) . .
Table of Contents OR<> 16−bit data compare (OR) . . . . . . . . . . . . . . . . . 2 − 148 OR> 16−bit data compare (OR) . . . . . . . . . . . . . . . . . 2 − 148 OR>= 16−bit data compare (OR) . . . . . . . . . . . . . . . . . 2 − 148 OR< 16−bit data compare (OR) . . . . . . . . . . . . . . . . . 2 − 148 OR<= 16−bit data compare (OR) . . . . . . . . . . . . . . . . . 2 − 148 ORD= 32−bit data compare (OR) . . . . . . . . . . . . . . . . . 2 − 150 ORD<> 32−bit data compare (OR) . . . . . . . . . .
Table of Contents High−level Instructions Data transfer instructions F0 P0 MV PMV 16-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 8 F1 P1 DMV PDMV 32-bit data move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 10 F2 P2 MV/ PMV/ 16-bit data invert and move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 12 F3 P3 DMV/ PDMV/ 32-bit data invert and move . . . . . . . . . . . . . . . . . . .
Table of Contents Control instruction F19 LBL SJP Auxiliary jump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 57 Binary arithmetic instructions F20 P20 + P+ 16-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 59 F21 P21 D+ PD+ 32-bit data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 61 F22 P22 + P+ 16-bit data addition . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents F41 P41 DB+ PDB+ 8-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 97 F42 P42 B+ PB+ 4-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 99 F43 P43 DB+ PDB+ 8-digit BCD data addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 101 F45 P45 B− PB− 4-digit BCD data subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents F66 P66 WOR PWOR 16-bit data OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 145 F67 P67 XOR PXOR 16-bit data exclusive OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 147 F68 P68 XNR PXNR 16-bit data exclusive NOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 149 F69 P69 WUNI PWUNI 16-bit data unite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents F89 P89 EXT PEXT 16-bit data sign extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 200 F90 P90 DECO PDECO Decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 202 F91 P91 SEGT PSEGT 7-segment decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 206 F92 P92 ENCO PENCO Encode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents F113 P113 WBSL PWBSL Left shift of one hexadecimal digit (4-bit) of 16−bit data range 3 − 252 FIFO instructions F115 P115 FIFT PFIFT FIFO buffer definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 254 F116 P116 FIFR PFIFR Data read from FIFO buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 256 F117 P117 FIFW PFIFW Data write to FIFO buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents F136 P136 DBCU PDBCU Number of on (1) bits in 32-bit data . . . . . . . . . . . . . . . . . . . . . . . 3 − 300 Basic function instruction F137 STMR Auxiliary timer (16−bit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 302 Special instructions F138 P138 HMSS PHMSS Hours, minutes, and seconds data to seconds data . . . . . . . . . 3 − 305 F139 P139 SHMS PSHMS Seconds data to hours, minutes, and seconds data . . . . . . . . .
Table of Contents F157 P157 CADD PCADD Time addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 413 F158 P158 CSUB PCSUB Time substruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 416 F159 P159 MTRN PMTRN Serial data communication for FPΣ/FP−X/FP0R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 420 for FP2/FP2SH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents F175 SPSH Pulse output (Linear interpolation) . . . . . . . . . . . . . . . . . . . . . . . 3 − 542 F175 SPSH Pulse output (Linear interpolation) . . . . . . . . . . . . . . . . . . . . . . . 3 − 548 F176 SPCH Pulse output (Circular interpolation) . . . . . . . . . . . . . . . . . . . . . . 3 − 553 Screen display instructions F177 HOME Pulse output (Home return) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 557 F178 PLSM Input pulse measurement . . . . . . .
Table of Contents F238 P238 DGBIN PDGBIN 32−bit Gray code → 32−bit binary data . . . . . . . . . . . . . . . . . . . . 3 − 596 F240 P240 COLM PCOLM Bit line to bit column conversion . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 599 F241 P241 LINE PLINE Bit column to bit line conversion . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 601 F250 BTOA Binary → ASCII conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 603 F251 ATOB ASCII → Binary conversion . . .
Table of Contents F278 P278 DSORT PDSORT Sort data in 32-bit data table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 649 F282 P282 SCAL PSCAL Scaling of 16-bit data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 651 F283 P283 DSCAL PDSCAL Scaling of 32-bit data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 653 F284 RAMP Inclination output of 16−bit data . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents F313 P313 F% PF% Floating point data division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 689 F314 P314 SIN PSIN Floating point data Sine operation . . . . . . . . . . . . . . . . . . . . . . . . 3 − 691 F315 P315 COS PCOS Floating point data Cosine operation . . . . . . . . . . . . . . . . . . . . . 3 − 693 F316 P316 TAN PTAN Floating point data Tangent operation . . . . . . . . . . . . . . . . . . . . .
Table of Contents F336 P336 FABS PFABS Floating point real number data absolute . . . . . . . . . . . . . . . . . . 3 − 735 F337 P337 RAD PRAD Floating point real number data conversion of angle units (Degrees → Radians) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 − 737 F338 P338 DEG PDEG Floating point real number data conversion of angle units (Radians → Degrees) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents F412 P412 POPB PPOPB Restoring the index register bank number . . . . . . . . . . . . . . . . . 3 − 784 File register bank processing instructions F414 P414 SBFL PSBFL Setting the file register bank number . . . . . . . . . . . . . . . . . . . . . 3 − 785 F415 P415 CBFL PCBFL Changing the file register bank number . . . . . . . . . . . . . . . . . . . 3 − 786 F416 P416 PBFL PPBFL Restoring the file register bank number . . . . . . . . . . . . . . . . . . .
Chapter 1 Relays, Memory Areas and Constants
Relays, Memory Areas and Constants 1.1 1.1.1 Table of Relays, Memory Areas and Constants FP0/FP−e FP0 Numbering Item Function C10/C14 C32/SL1 T32C /C16 Relay External input relay (X) 208 points (X0 to X12F) Turns on/off based on external input. External output relay (Y) 208 points (Y0 to Y12F) Externally outputs on/off state. Internal relay (* Note 2) (R) 1,008 points (R0 to R62F) Relay which turns on/off only within program.
1.1 Item Table of Relays, Memory Areas and Constants Numbering Function C10/C14 C32/SL1 T32C /C16 ((K)) K−32768 to K32767 (for 16-bit operation) Constant Decimal constants t t K−2147483648 to K2147483647 (for 32-bit operation) Hexadecimal constants t t ((H)) H0 to HFFFF (for 16-bit operation) Floating gp point t pe type ((F)) F−1.175494×10−38 to F−3.402823×1038 H0 to HFFFFFFFF (for 32-bit operation) F1.175494×10−38 to F3.
Relays, Memory Areas and Constants FP−e Memor ory area (wo words) Relay Item 1-4 Number of points Memory area available for use Matsushita Function IEC External input relay (see note 3) 208 X0−X12F %IX0.0− %IX12.15 Turns on or off based on external input. External output relay (see note 3) 208 Y0−Y12F %QX0.0− %QX12.15 Outputs on or off state externally. Internal relay (see note 2) 1008 R0−R62F %MX0.0− %MX0.62.15 Turns on or off only within a program.
1.1 Memory area Me a (double w word) (see ee note 4) Item Table of Relays, Memory Areas and Constants Number of points Memory area available for use External input relay (see note 3) 6 double words DWX0−DWX11 %ID0− %ID11 Code for specifying 32 external input points as a double word (32 bits) of data. External output relay (see note 3) 6 double words DWY0−DWY11 %QD0− %QD11 Code for specifying 32 external output points as double word (32 bits) of data.
Relays, Memory Areas and Constants Notes 1) The points for the timer and counter can be changed by the setting of System register No. 5. The number given in the table above are the numbers when System register No. 5 is at its default setting. 2) There are two unit types; the hold type that saves the conditions that exist just before turning the power off or changing from the RUN mode to PROG. mode, and the non−hold type that resets them.
1.1 1.1.2 FP0R Number of points and range of memory area available for use Item C10, C14, C16 Relay Table of Relays, Memory Areas and Constants External input (X) Note1) External output (Y) Note1) Internal relay (R) Note2) Link relay (L) Note2) C32, T32, F32 1760 points (X0 to X109F) Turns on or off based on external input. 1760 points (Y0 to Y109F) Externally outputs on or off state 4096 points (R0 to R255F) Relay which turns on or off only within program.
Relays, Memory Areas and Constants Item Number of points and range of memory area available for use C10, C14, C16 Control instruction point C32, T32, F32 Master control 256 points relay points (MCR) Number of labels (JP and LOOP) 256 points Number of step ladders 1000 stages Number of subroutines 500 subroutines Number of interrupt programs C10: 11 programs (6 external input points, 1 periodical interrupt point, 4−pulse match points) Constant Decimal constants (K) Other than C10: 13 programs (
1.1 1.1.3 Table of Relays, Memory Areas and Constants FPΣ 12k type Mem mory area (wo words) Rel elay Item Number of points Memory area available for use Function Turns on or off based on external input.
Relays, Memory Areas and Constants Memory area M ea (words) Item Number of points Memory area available for use Data register (see note 2) 32765 words DT0−DT32764 Link data register (see note 2) 128 words LD0−LD127 A shared data memory which is used within the PLC link. Data is handled in 16-bit units (one word). Timer/counter set value area (see note 2) 1024 words SV0−SV1023 Data memory for storing a target value of a timer and an initial value of a counter. Stores by timer/counter number.
1.1 Table of Relays, Memory Areas and Constants 32k type Item Number of points and range of memory area available for use Function 32TH/C32THTM C32T2H/C32T2HTM C24R2H/C24R2HTM C28P2H/C28P2HTM Relay ay External input (see note 1) (X) External output (see note 1) (Y) 1184 points (X0 to X73F) Turns on or off based on external input. 1184 points (Y0 to Y73F) Externally outputs on or off state.
Relays, Memory Areas and Constants Item Number of points and range of memory area available for use Function Co stantt Const Controll Co instruc in point ction p 32TH/C32THTM C32T2H/C32T2HTM C24R2H/C24R2HTM C28P2H/C28P2HTM Master control relay points (MCR) 256 Number of labels (JP and LOOP) 256 Number of step ladders 1,000 stages Number of subroutines 100 subroutines Number of interrupt programs 9 programs (8 external input points “X0 to X7”, 1 periodical interrupt point “0.
1.1 1.1.4 FP−X Number of points and range of memory area available for use Item C14 Relay Table of Relays, Memory Areas and Constants External input (X) Note1) External output (Y) Note1) Internal relay (R) Note2) Link relay (L) Note2) C30, C60 1760 points (X0 to X109F) Turns on or off based on external input. 1760 points (Y0 to Y109F) Externally outputs on or off state 4096 points (R0 to R255F) Relay which turns on or off only within program.
Relays, Memory Areas and Constants Item Number of points and range of memory area available for use C14 Control instruc instruction i point C30, C60 Differential points Unlimited points Master control relay points (MCR) 256 points Number of labels (JP and LOOP) 256 points Number of step ladders 1000 stages Number of subroutines 500 subroutines Number of interrupt programs Input 14 programs, periodical interrupt 1 program Constant Decimal constants (K) K−32, 768 to K32, 767 (for 16−bit oper
1.1 1.1.5 FP2 Item Relay Numbering Function External input relay (X) 2,048 points (X0 to X127F) Turn on or off based on external input. External output relay (Y) 2,048 points (Y0 to Y127F) Externally outputs on or off state. Internal relay (R) 4,048 points (R0 to R252F) Relay which turns on or off only within program. (L) 2,048 points (L0 to L127F) This relay is a shared relay used for MEWNET link system.
Relays, Memory Areas and Constants Item Control instructi tion point Numbering 256 points Master control relay points (MCR) Number of labels (JP and Total: 256 points LOOP) Number of step ladder (* Note 4) 1,000 steps Number of subroutine 100 subroutines Number of interrupt program 1 program (periodical interrupt: allows setting of the time interval within the range from 0.5ms to 1.
1.1 1.1.6 FP2SH Item Relay Table of Relays, Memory Areas and Constants Numbering Function External input relay (X) 8,192 points (X0 to X511F) Turn on or off based on external input. External output relay (Y) 8,192 points (Y0 to Y511F) Externally outputs on or off state. Internal relay (R) 14.192 points (R0 to R886F) Relay which turns on or off only within program. (L) 10,240 points (L0 to L639F) This relay is a shared relay used for MEWNET link system.
Relays, Memory Areas and Constants Item Memory area Special data register (DT) Index register Control instrucinstruc tion point (I) Numbering Function 512 words (DT90000 to DT90511) Data memory for storing specific data. Various settings and error codes are stored. 14 words ×16 banks (I0 to ID) Register can be used as an address of memory area and constants modifier.
1.1 1.1.7 FP10SH Item Relay Table of Relays, Memory Areas and Constants Numbering Function External input relay (X) 8,192 points (X0 to X511F) Turn on or off based on external input. External output relay (Y) 8,192 points (Y0 to Y511F) Externally outputs on or off state. Internal relay (* Note 1) (R) 14,192 points (R0 to R886F) Relay which turns on or off only within program. Link relay (* Note 1) (L) 10,240 points (L0 to L639F) This relay is a shared relay used for MEWNET link system.
Relays, Memory Areas and Constants Item Memory area Special data register (DT) Index register Control instrucinstruc tion point (I) Numbering Function 512 words (DT90000 to DT90511) Data memory for storing specific data. Various settings and error codes are stored. 14 words ×16 banks (I0 to ID) Register can be used as an address of memory area and constants modifier.
1.1 1.1.8 Table of Relays, Memory Areas and Constants Relay Numbers External input relays (X), External output relays (Y), Internal relays (R), Link relays (L) and Pulse relays (P) Since these relays are handled in units of 16 points, they are expressed as a combination of decimal and hexadecimal numbers as shown below. Decimal number 1,2,3... Hexadecimal number 0,1,2...9,A,B...F The maximum value that can be selected varies with each relay. Example: External input relay (X) X0, X1 . . . . . . . .
Relays, Memory Areas and Constants External input relay (X) and External output relay (Y) Only relays with numbers actually allocated to input contacts can be used as external input relay (X). Only relays with numbers actually allocated to output contacts can output as external output relay (Y). The external output relays (Y) which are not allocated can be used as internal relays. Allocation of numbers is determined by the combination of units and boards used.
1.1 Table of Relays, Memory Areas and Constants Relation of WX, WY, WR and WL to X, Y, R and L WX, WY WR and WL correspond respectively to groups of 16 external input relay (X) points, 16 external output relay (Y) points, 16 internal relay (R) points and 16 link relay (L) points. Example: Word external input relay (WX) Each relay is composed of 16 external input relay (X) points as shown below. XFXE XDXCXBXA X9 X8 X7 X6 X5 X4 X3 X2 X1 X0 WX0 X1F X1E X1D X12 X11 X10 WX1 ... ...
Relays, Memory Areas and Constants 1.2 Explanation of Relays 1.2.1 External Input Relays (X) Function of external input relays (X) This relay feeds signals to the programmable controller from an external device such as a limit switch or a photoelectric sensor. Program X contact: on X Y CPU Input unit Input: on Input Usage restrictions The addresses for inputs which do not actually exist cannot be used.
1.2 1.2.2 Explanation of Relays External Output Relays (Y) Function of external output relays (Y) This relay outputs the program execution result of the programmable controller and activates an external device (load) such as a solenoid, operating panel or intelligent unit. The on or off status of the external output relay is output as a control signal.
Relays, Memory Areas and Constants 1.2.3 Internal Relays (R) Function of internal relays (R) This relay can be used only within program and on or off status does not provide an external output. When the coil of the relay is energized, its contacts turn on. Internal relay R R F0 MV Usage restrictions When used as contacts, there are no restrictions on the number of times that can be used.
1.2 Explanation of Relays Non−hold type relay and hold type relay There are two types of internal relays: hold type relays and non−hold type relays. When the power is turned off or the mode changed from RUN to PROG., − Hold type relays hold their on or off status and resume operation in that status when the system is restarted. − Non−hold type relays reset.
Relays, Memory Areas and Constants 1.2.4 Special Internal Relays Function of special internal relays The special internal relays turn on or off under specific conditions. The on or off state is not externally output and only functions within the program. The principal special internal relays are as follows: Operation status flags: Operation status is indicated by on or off.
1.2 1.2.5 Explanation of Relays Link Relays (L) for FPΣ, FP−X, FP0R Function of link relays (L) Link relays are relays used for the PC Link, that can be shared between multiple programmable controllers when they are connected using a PLC link. If calculation results are output to the link relay (coil) of a certain PLC, the results are also sent to other PLC connected with MEWNET, and will be reflected in link relay (contact) that have the same number.
Relays, Memory Areas and Constants Specifying hold type and non−hold type relays There are two types of link relays, which can be switched when the power is turned off and the mode is switched from RUN to PROG and operation is stopped.
1.2 1.2.6 Explanation of Relays Link Relays (L) for FP2/FP2SH/FP10SH Function of link relays (L) Link relays are relays used for the PC Link, that can be shared between multiple programmable controllers when they are connected using a MEWNET link. The following types of MEWNET links are available.
Relays, Memory Areas and Constants Available range of link relays The available range of link relays varies depending on the type of network and the combination of units. The available range and number of points must be specified separately for each network. For MEWNET−W and MEWNET−P: A maximum of 1,024 points are available with one link unit. The available range is from L0 to L63F for the first unit (PC Link 0), and from L640 to L127F to the second unit (PC Link 1).
1.2 Explanation of Relays Specifying hold type and non−hold type relays There are two types of link relays, which can be switched when the power is turned off and the mode is switched from RUN to PROG and operation is stopped.
Relays, Memory Areas and Constants Usage restrictions When used as contacts, there are no restrictions on the number of times that can be used. As a rule, when specified as the output destination for operation results of OT instruction and KP instruction, use is limited to once in a program (to inhibit double output). Notes System register 20 can be used to permit double output. Also, double output does not result if the SET and RST instructions are used.
1.2 1.2.7 Explanation of Relays Timer (T) Function of timers (T) When a timer is activated and the set time elapses, the timer contact with the same number as the timer turns on. When the timer is in the time−up state and the timer execution condition turns off, the timer contact turns off. TM n Timer number Time−up Tn: on Tn Timer contact: on n: Timer number Usage restrictions When used as contacts, there are no restrictions on the number of times that can be used.
Relays, Memory Areas and Constants 1.2.8 Counter (C) Function of counters (C) When the decrement−type preset counter is activated and the elapsed value reaches zero, the counter contact with the same number as the counter turns on. When the counter’s reset input is turned on, the counter contact turns off.
1.2 1.2.9 Explanation of Relays Items Shared by the Timer and Counter Timer and counter partitioning Timers and counters share the same area. The partitioning of the area can be changed to obtain the number of timers or counters needed. Partition the area by setting system register 5. If the initial number of the counter is specified, those prior to that point will be timers, and those subsequent to that point will be counters.
Relays, Memory Areas and Constants Even if specifying for the unit without batteries, the data will be indefinite.
1.2 Explanation of Relays 1.2.10 Pulse Relays (P) Note Pulse relays (P) can only be used with the FP2/FP2SH/FP10SH. Function of pulse relays (P) A pulse relay (P) goes on for one scan only. The on or off state is not externally output and only operates in the program. A pulse relay only goes on when a leading edge start instruction (OT↑) or a trailing edge start instruction (OT↓) is executed.
Relays, Memory Areas and Constants Usage restrictions Pulse relays are cleared when the power is turned off. A pulse relay can only be used once in a program as an output destination for an OT↑ or OT↓ instruction (double output is prohibited). There is no limitation to the number of times a pulse relay can used as a contact. A pulse relay cannot be specified as an output destination for an OT, KP, SET, RST or ALT instruction.
1.2 1.2.11 Explanation of Relays Error Alarm Relays (E) Note Error alarm relays can only be used with the FP2SH/FP10SH. Function of error alarm relays (E) Error alarm relays are used to feed back error conditions freely assigned by the user to internal relays, and to store them in memory. Error alarm relays are turned on and off using the SET and RST instructions in the user program.
Relays, Memory Areas and Constants Example: If X0 goes on when an error occurs E15 X0 S X0 : on +1 DT90400 K 3 DT90401 K21 K21 DT90402 K12 K12 DT90403 K 5 K 5 DT90404 K 0 K15 DT90405 K 0 K 0 K 4 Set E15 No. of error alarm relays which are on Relay numbers of error alarm relay which are on Data of calendar timer which the error alarm relay of relay number in DT90400.
1.2 Explanation of Relays Clearing buffer areas and initial data Of the areas in which relay numbers are stored, only DT90400 and DT90401 can be cleared by directly specifying the special data register with the RST instruction. If DT90400 is specified, all error information in the buffer is cleared, and if DT90401 is specified, the initial relay number in the buffer area is cleared. Buffers fill up as shown in the example below.
Relays, Memory Areas and Constants 1.3 1.3.1 Explanation of Memory Areas Data Register (DT) Function of data registers (DT) Data registers are memory areas which are handled in word (16−bit) units, and are used to store data such as numerical data configured of 16 bits. Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 DTn Example of a program which writes a numeric value to DTn.
1.3 Explanation of Memory Areas Non−hold type data and hold−type data There are two types of data registers which handle data differently when the power is turned off or the mode is changed from RUN to PROG.: − Hold type data registers hold their contents while operation stops and allow operation to be restarted with the contents still effective. − Non−hold type data registers reset when operation stops.
Relays, Memory Areas and Constants Note With the FP2SH/FP10SH, system register 4 can be set in such a way that the data registers are not cleared even if the Initialize/ Test switch is set to the upper side. 1.3.2 Special Data Registers (DT) Function of the special data registers These data registers have specific applications. Data cannot be written to most of them using instructions such as F0 (MV).
1.3 Explanation of Memory Areas Clock/calendar (can be used with all types of the FP0 T32C, FP0R, FP−e, FPΣ, FP−X, FP2, FP2SH and FP10SH) The year, month, day, hour, minute, second, and day of the week tracked by the calendar timer are stored here (DT9053 to DT9057/DT90053 to DT90057). Note The values stored for the clock/calendar can be overwritten (to calibrate the date and time).
Relays, Memory Areas and Constants 1.3.3 File Registers (FL) Function of file registers (FL) File registers are memory areas which are handled in word (16−bit) units, and are used to store data such as numerical data configured of 16 bits. They can be used in exactly the same way as data registers. Bit position 15 FLn · · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 Double−word specifications can also be used in the same way as with data registers. 32−bit data can be handled.
1.3 1.3.4 Explanation of Memory Areas WX, WY, WR and WL Function of WX, WY, WR and WL Relays (X, Y, R, L) can be handled as blocks of 16 points. These are one−word (16−bit) memory areas, thus they can be treated as data memory. The composition of the one−word memory areas is as follows. The numbers correspond to the words as shown.
Relays, Memory Areas and Constants 1.3.5 Link Data Registers (LD) for FPΣ/FP−X/FP0R Function of link data registers (LD) Link data registers are data memories for “PC links”, which are shared between multiple programmable controllers which are connected through the same network link. When data is written to a link data register of one PLC, the contents are stored in the link data registers that have the same numbers, in other PLCs connected through the network.
1.3 Explanation of Memory Areas Specifying hold type and non−hold type registers There are two types of link data registers, which can be switched when the power is turned off and the mode is switched from RUN to PROG and operation is stopped.
Relays, Memory Areas and Constants 1.3.6 Link Data Registers (LD) for FP2/FP2SH/FP10SH Function of link data registers (LD) Link data registers are data memories for “PC links”, which are shared between multiple programmable controllers which are connected through the same MEWNET link. The following types of MEWNET links are available.
1.3 Explanation of Memory Areas Available range of link data registers The available range of link data registers varies depending on the type of network and the combination of units. The available range and number of points must be specified separately for each network. For MEWNET−W and MEWNET−P: A maximum of 128 words can be used with one link unit. The available range is from LD0 to LD127 for the first unit (PC Link 0), and from LD128 to LD255 for the second unit (PC Link 1).
Relays, Memory Areas and Constants Specifying hold type and non−hold type registers There are two types of link data registers, which can be switched when the power is turned off and the mode is switched from RUN to PROG and operation is stopped.
1.3 Explanation of Memory Areas Example: Non−hold type Hold type System register 12 Non−hold type Hold type System register 13 Non−hold type Hold type System register 17 LD0 to LD127 LD128 to LD255 LD256 to LD8447 Note Link data registers must be allocated when the network is configured, before programming is done. The method by which allocations are made varies depending on the type of network. Refer to the manual for the pertinent link unit.
Relays, Memory Areas and Constants 1.3.7 Set Value Area for Timer/Counter (SV) Function of set value areas (SV) A set value for a timer or counter is stored in the set value area (SV) with the same number as the timer or counter. Set value TM n, K30 SVn K30 (Decimal number) A decimal number or SV area number is specified for the set value when the TM or CT instruction is entered in the program. An SV is a one−word, 16−bit memory area which stores a decimal number from K0 to K32767.
1.3 1.3.8 Explanation of Memory Areas Elapsed Value Area for Timer/Counter (EV) Function of elapsed value areas (EV) While a timer or counter is operating, the elapsed value is stored in the elapsed value area (EV) with the same number as the timer or counter. When the EV reaches zero, the timer or counter contact with the same number turns on. An EV is a one−word, 16−bit memory area which stores a decimal number from K0 to K32767.
Relays, Memory Areas and Constants 1.3.9 Index Registers (IX, IY) (for FP0, FP−e) Function of index registers (IX, IY) Index registers are used to indirectly specify constants and memory area addresses. Two 16−bit registers are available, IX and IY. Changing addresses and constants using a value in an index register is called “index modification”. With the FP0, FP−e, index modification is possible only with regard to operands of high−level instructions.
1.3 Explanation of Memory Areas Index modification method Example 1: Modifying a destination address X0 F0 MV, DT 0, IX F0 MV, K100, IXWR0 IX setting The value of DT0 determines the WR address where K100 is written. When the DT0 value is K10, K100 is written to WR10. IX WR0 → WR10 ↓ K10 ↓ 10 + 0 = 10 Example 2: Modifying a source address X0 F0 MV, DT 1, IX F0 MV, IXWR0, IX setting DT 0 The value of DT1 determines the WR address for transferring a value to DT0.
Relays, Memory Areas and Constants Cautions when using index registers An index register can not be modified with an index register. IXIX, IXIY If the result of address modification overflows the memory area, an operation error will result. When the address resulting from modification is negative or a large number. When modifying 32−bit constants, IX is specified. At this point, IX and IY in combination are handled as 32−bit data.
1.3 Explanation of Memory Areas 1.3.10 Index Registers (I0 to ID) (for FPΣ/FP−X/FP0R) Function of index registers (I0 to ID) Index registers are used for indirect specification of values to addresses and operands in relays and memory areas. There are a total of 14 index registers which can be used with the FPΣ, consisting of I0 to I9 and IA to ID. Cautions when using index registers An index register can not be modified with an index register.
Relays, Memory Areas and Constants 1.3.11 Index Registers (I0 to ID) (for FP2, FP2SH and FP10SH) Function of index registers (I0 to ID) Index registers are used for indirect specification of values to addresses and operands in relays and memory areas. Changing an address or a constant using an index register value is called “index modification”. There are a total of 14 index registers which can be used with the FP2, FP2SH and FP10SH, consisting of I0 to I9 and IA to ID.
1.
Relays, Memory Areas and Constants Modification of memory area numbers specified by high−level instructions Address = Base address + value in I0 through ID (K constant) Example: Modifying DT11 I0DT11 Base address 11 + 11 + 11 + I0 value K0 K10 K−10 = = = Target address DT11 DT21 DT1 Example 1: Modifying a destination address X0 F0 MV, DT 0, I0 F0 MV, K100, I0DT100 I0 setting The value of DT0 determines the DT address where K100 is written. When the DT0 value is K10, K100 is written to DT110.
1.
Relays, Memory Areas and Constants Modification of relay numbers specified by basic instructions Number = Base number + value in I0 through ID (K constant / H constant) Example: Modifying X10 IAX10 Base number 10 10 10 19 19 + + + + + IA value H0 HF H−10 K7 K−11 = = = = = Target number X10 X1F X0 X20 XE Example 1: Modifying a trigger R0 I0X0 F0 MV, DT 0, I0 setting I0 F35 +1, DT100 The trigger of the F35 (+1) instruction is determined by the DT0 value.
1.3 Explanation of Memory Areas Example 3: Modifying a destination address X0 F0 MV, DT 0, I0 F0 MV, K100, I0WR0 I0 setting The value of DT0 determines the address of WR where K100 is written. When the value of DT0 is K10, K100 is written to WR10. I0 ↓ K10 ↓ 10 WR0 → + = 0 WR10 10 Example 4: Modifying a source address X0 F0 MV, DT 1, IB IB setting F0 MV, IBWR0, DT 0 The value of DT1 determines the address of WR for transferring a value to DT0.
Relays, Memory Areas and Constants Items requiring particular attention For the external input relay (X), external output relay (Y), and internal relay (R), when using index modification on relay numbers, be aware that the last digit of the relay number is hexadecimal and the first digits are decimal. Example: For external input relay (X) × Decimal 1, 2, 3 ............12 Hexadecimal 0, 1, 2, 3 ........ 9 A,B ........ F X 0, X 1 . . . . . . . . . . . . . . . . . . . . . X F X 10, X 11 . . . . . . . . . . .
1.
Relays, Memory Areas and Constants Changing index register banks (for FP2SH/FP10SH only) The banks of the index registers of the FP2SH/FP10SH can be changed to allow use of up to 224 points (14 points × 16 banks) in a program.
1.3 Explanation of Memory Areas Example 1: Changing banks using a register bank setting instruction F410 (SETB) 0 I0 to ID of bank 0 R9010 F410 SETB, SETB, HH11 I0 to ID of bank 1 R9010 F410 SETB, H 2 I0 to ID of bank 2 R9010 F410 SETB, H 3 I0 to ID of bank 3 Different values can be set for I0 in bank 0, bank 1 and bank 2. The set values are only effective within their respective ranges.
Relays, Memory Areas and Constants 1.4 1.4.1 Explanation of Constants Integer Type Decimal Constants (K) Function of decimal constants (K) This is binary data that has been converted to the decimal format. When entering and reading a decimal constant, specify the value by entering a K at the beginning. Decimal constants are primarily used to specify data sizes and quantities such as set values for timer.
1.4 1.4.2 Explanation of Constants Hexadecimal Constants (H) Function of hexadecimal constants (H) Hexadecimal constants are values which have been converted from binary into hexadecimal. When entering and reading a hexadecimal constant, specify the value by entering an H at the beginning. Hexadecimal constants are primarily used to specify an ordering of 1’s and 0’s in 16−bit data, such as system register settings and specification of control data for high−level instructions.
Relays, Memory Areas and Constants 1.4.3 Floating Point Type Real Numbers (f) Available PLC FP0, FP0R, FP−e, FPΣ, FP−X, FP2, FP2SH and FP10SH Range of floating point type real numbers that can be used in operations The range of floating point type real numbers that can be stored in the memory area is as noted below. Range of negative numbers: −3.402823 x 1038 to −1.175494 x 10−38 Range of positive numbers: 1.175494 x 10−38 to 3.
1.4 Explanation of Constants Processing of floating point type real number operations 1) Processing by specifying an integer device Instructions can be used to store data in a specific location. Adding the symbol % or # to either S (source: the area from which the data is loaded) or D (destination: the area in which the result is stored) determines how the data is processed. If added to S (source), integer data is automatically converted to real−number data and the operation is carried out.
Relays, Memory Areas and Constants In processing involving an integer device specification and real numbers being converted to integers, the processing is the same as that of the F327 (INT) instruction. If the real−number data is a positive number, the number is rounded off, and any digits to the right of the decimal point are discarded. If the real−number data is a negative number, the value 0.4999 ... is subtracted from the target real−number data, and the value is rounded off to the decimal point.
1.4 Explanation of Constants Example 2: When conversion is carried out by rounding down the digits to the right of the decimal point F329 FIX, DT0, DT10 converted to 16−bit integer F330 DFIX, DT0, DT10 converted to 32−bit integer Digits to the right of the decimal point are rounded down. If the real−number data is 1.5, it is converted as integer data K1. If the real−number data is −1.5, it is converted as integer data K−1.
Relays, Memory Areas and Constants 3) Direct specification of the real−number constant data When operations are being carried out on real−number constants as real−number data, the values can be directly input by using a programming tool in which “f” is added either to the target data “S” or the destination “D” defined by the instruction. The range that can be specified by these instructions is 0.0000001 to 9999999 (the effective value consists of seven digits).
1.4 1.4.4 Explanation of Constants BCD Type Real Numbers (H) (for FP2, FP2SH and FP10SH) Range of BCD type real numbers that can be used in operations The range of real−number data that can be stored in the memory area is as noted below. −9999.9999 to +9999.9999 Data stored in the memory area in one−word units, with the positive/negative sign coming first, followed by the integer segment and then by the decimal point and any subsequent digits.
Relays, Memory Areas and Constants 1.4.5 Character Constants (M) Function of character constants (M) The character constant is used to express ASCII code in binary. The character constant is expressed by adding the prefix M to the data. There are only two instructions in which character constants can be specified, F95 (ASC) instruction, F257 to F265 (SYS1) instruction and F149 (MSG) instruction. The character constant M is stored in a specified memory area in the PLC as BIN data, as shown below.
1.5 1.5 1.5.
Relays, Memory Areas and Constants Expression of decimal numbers in PLC Decimal number is basically processed in 16-bit or 32-bit binary. The most significant bit (MSB) expresses negative or positive sign of the data. When the MSB is “0”, data is regarded as having a zero or positive value and when the MSB is “1”, data is regarded as having a negative value. In the case of positive numbers, the bits following the most significant bit express the size of the data.
1.5 Data Ranges Which can be Handled in the PLC Data ranges which can be handled in the PLC Binary data which can be handled by programmable controllers are: 16-bit binary data: K-32768 to K32767 32-bit binary data: K-2147483648 to K2147483647 BCD code which can be handled by programmable controllers are: 16-bit (4-digit BCD H code): H0 to H9999 32-bit (8-digit BCD H code): H0 to H99999999 If any of the above ranges are exceeded when processing the corresponding data, overflow or underflow will result.
Relays, Memory Areas and Constants 1.5.2 Overflow and Underflow Operation instructions occasionally produce a value which is outside of the allowed range. This is called overflow if the value exceeds the maximum value and underflow if the value falls short of the minimum value. When an overflow or underflow occurs, the carry flag R9009 turns on. Overflow and underflow during binary operation If any of the following values are exceeded, overflow or underflow will result.
1.5 Data Ranges Which can be Handled in the PLC Values when overflow or underflow occurs Numerical value handled by the FP series programmable controller all form a loop joined at the maximum value and the minimum value as shown below. 16−bit binary operation Overflow Max. value K 32767 ... 1 0 −1 H 0001 H 0000 H FFFF ... ... Min. value ... K K K H 7FFF K-32768 H 8000 The max. value links with the min. value.
Relays, Memory Areas and Constants 1 - 86
Chapter 2 Basic Instructions
Basic Instructions 2-2
2.1 2.1 2.1.1 Composition of Basic Instructions Composition of Basic Instructions Sequence Basic Instructions These basic instructions perform bit unit logic operations and are the basis of the relay sequence circuit. As shown in the illustration below, this is expressed by the combination of the relay coil and contact. There are several relay types which are explained in “Section 1.2”, and the relay which can be specified depends on the instruction. Refer to the explanation of each instruction.
Basic Instructions 2.1.2 Basic Function Instructions These are the timer, counter and shift register instructions. To specify set values, the instructions are composed of several steps. Example: Example of setting 3.0 seconds in the 0.1 second timer (timer 5) Timer 5 (0.1 s units timer) Set value TMX 5 X0 T5 Constant of timer 5 K 30 Y30 Timing begins when X0 turns on, and T5 turns on when 3.0 seconds elapses. 2.1.
2.1 Composition of Basic Instructions Interrupt program In addition to the normal program, enter an interrupt program (specified with INT or IRET) if you need a program which will execute immediately when a certain condition is met. When an interrupt is received, the normal program is interrupted and the interrupt program is executed. 2.1.4 Data Compare Instructions This is a group of instructions which compare two data. A contact is turned on or off based on the result of the comparison.
Basic Instructions 2.2 Number of Steps in the FP2, FP2SH and FP10SH Number of steps in basic instructions Of the basic instructions used with the FP2, FP2SH and FP10SH, the number of steps in the following instructions changes depending on the number specified. Sequence basic instructions With Start (ST), Out (OT), And (AN), Or (OR), and Keep (KP), the number of steps making up the instruction changes depending on the relay number which has been specified.
2.2 Number of Steps in the FP2, FP2SH and FP10SH Control and subroutine instructions Instructions Steps Normal specification With index modification JP 2 3 LOOP 4 5 CALL 2 3 FCAL 4 5 Note Index modification is possible only with the FP2, FP2SH and FP10SH.
Basic Instructions ST ST/ OT Outline Start Start Not Out ST, ST/: OT: Begins a logic operation. Outputs the operation result.
Basic Instructions Precautions during programming The ST and ST/ instructions start from the bus line. X0 Y10 The OT instruction cannot start directly from the bus line. Y10 The OT instruction can be used consecutively. X0 Y10 Y11 Y12 Some input devices, such as emergency stop switches, usually have a Form B (normally closed) contact. When an emergency stop switch with a Form B contact is programmed, be sure to use the ST instruction.
Basic Instructions / Outline Not Inverts the operation result up to this instruction. 2 Program example Boolean Ladder Diagram X0 Address Y10 0 Y11 Not Explanation of example Y10 goes on and Y11 goes off when X0 turns on. Y10 goes off and Y11 goes on when X0 turns off. X0 on off on Y10 off on Y11 off Description The / instruction inverts the operation result up to this instruction.
Basic Instructions AN AN/ AND AND Not AN: Connects Form A (normally open) contacts in series. AN/: Connects Form B (normally closed) contacts in series.
Basic Instructions OR OR/ OR OR Not OR: Connects Form A (normally open) contacts in parallel. OR/: Connects Form B (normally closed) contacts in parallel. Outline 4 Program example Boolean Ladder Diagram X0 Address Y10 0 X1 1 OR X2 2 Instruction 0 ST X 0 1 OR X 1 2 OR/ X 2 3 OT Y 10 OR Not Operands Timer/Counter Contact Relay Instruction OR, OR/ X Y R A A A L P E (*1) (*2) (*3) A A A Index modifier T C (*4) A A A (*1) This cannot be used with the FP0/FP−e.
Basic Instructions Precautions during programming Use the OR instruction when normally open contacts (Form A contacts) are connected in parallel. Use the OR/ instruction when normally closed contacts (Form B contacts) are connected in parallel. The OR instruction starts from the bus line. The OR and OR/ instructions can be used consecutively.
Basic Instructions ST ↑ ST ↓ AN ↑ AN ↓ OR ↑ OR ↓ Leading edge Start Trailing edge Start Leading edge AND Trailing edge AND Availability Leading edge OR FP2/FP2SH/FP10SH FP−X (V2.00 or more) FPΣ (V3.10 or more) FP0R Trailing edge OR Contact instructions for leading edge detection and trailing edge detection Logic processing is only carried out during the scan following detection of a leading edge or trailing edge in the signal.
Basic Instructions Explanation of example ST↑, AN↑ and OR↑ instructions Output to Y10 takes place for one scan only following a change in X0 from off to on. X0 on off Y10 on off One scan Leading edge One scan Leading edge Output to Y11 takes place for one scan only following a change in X2 from off to on when X1 is on. X1 on off X2 on off Y11 on off One scan Output to Y12 takes place for one scan only following a change in X3 or X4 from on to off.
Basic Instructions OT ↑ OT ↓ Leading edge Out Trailing edge Out Leading edge detection and trailing edge detection output The result of processing is output to the pulse relay for one scan only.
Basic Instructions Description OT↑ instructions Output to the pulse relay takes place for one scan only following a change in the immediately previous processing result from off to on. The pulse relay goes on for one scan only. OT↓ instructions Output to the pulse relay takes place for one scan only following a change in the immediately previous processing result from on to off. The pulse relay goes on for one scan only.
Basic Instructions ALT Alternative out Inverts the output condition each time the leading edge of the signal is detected.
Basic Instructions ANS Outline AND stack Multiple blocks are connected in series. Program example Boolean Ladder Diagram X0 X2 X1 X3 Address Y10 0 Block 2 Block 1 Instruction 0 ST X 0 1 OR X 1 2 ST X 2 3 OR X 3 4 ANS 5 OT Y 10 Explanation of example Y10 goes on when X0 or X1 and X2 or X3 turn on. (X0 OR X1) AND (X2 OR X3) → Y10 block 1 X0 on off X1 on off X2 on off X3 on off block 2 on Y10 off Description Blocks connected in parallel are connected in series.
Basic Instructions When blocks are consecutive When blocks are consecutive, a division of the blocks should be considered, such as that shown below. 1 2 block 4 block 5 X0 X2 X4 block 4 X1 X3 X5 block 1 block 2 block 3 Y10 block 5 block 1 block 2 ST X 0 OR X 1 ST X 2 OR X 3 ANS . . . . . . . . . . . block 3 ST X 4 OR X 5 ANS . . . . . . . . . . .
Basic Instructions ORS Outline OR stack Multiple blocks are connected in parallel. 5 Program example Boolean Ladder Diagram X0 X1 X2 X3 0 Block 1 Address Y10 Block 2 Instruction 0 ST X 0 1 AN X 1 2 ST X 2 3 AN X 3 4 ORS 5 OT Y 10 Explanation of example Y10 goes on when both X0 and X1 or both X2 and X3 turn on.
Basic Instructions When blocks are consecutive When blocks are consecutive, a division of the blocks should be considered, such as that shown below. block 1 block 4 block 4 block 1 X0 X1 block 2 X2 X3 1 block 3 X4 X5 2 Y10 block 5 block 2 ST X 0 AN X 1 ST X 2 AN X 3 ORS . . . . . . . . . block 3 X 4 AN X 5 ORS . . . . . . . . .
Basic Instructions PSHS RDS POPS Outline Push stack Read stack Pop stack PSHS: Stores the operation result up to this instruction. 6 RDS: Reads the operation result stored by the PSHS instruction. POPS: Reads and clears the operation result stored by the PSHS instruction.
Basic Instructions Description One operation result can be stored in memory and read, and multiple processes performed. PSHS (stores operation result): Stores the operation result up to this instruction and continues execution from the next step. RDS (reads operation result): Reads the operation result stored using the PSHS instruction and, using this result, continues operation from the next step.
Basic Instructions Caution regarding repeated use of a PSHS instruction The PSHS instruction is limited in the number of times that it can be used consecutively. The number of times that the instruction can be used consecutively before the next POPS instruction is as shown below. Type No.
Basic Instructions DF DF/ Outline Leading edge differential Trailing edge differential DF: Turns on the contact for only one scan when the leading edge of the trigger is detected. DF/: Turns on the contact for only one scan when the trailing edge of the trigger is detected.
Basic Instructions Description The DF instruction executes and turns on output for only one scan duration when the trigger changes from an off to an on state. The DF/ instruction executes and turns on output for only one scan duration when the trigger changes from an on to an off state. There is no limit on the number of times the DF and DF/ instructions can be used. With the DF and DF/ differential instructions, only a change in the on and off status of the contact is detected.
Basic Instructions Caution is required when using a differential instruction with instructions which change the order of instruction execution such as MC and MCE or JP and LBL (below instructions). − MC to MCE instructions − JP to LBL instructions − F19 (SJP) to LBL instructions − LOOP to LBL instructions − CNDE instruction − Step ladder instructions − Subroutine instructions When combining a differential instruction with an AND stack or pop stack instruction, take care that the syntax is correct.
Basic Instructions Application example for alternating circuit A differential instruction can also be applied to an alternating circuit to hold and release the circuit using a single signal.
Basic Instructions DFI Leading edge differential (initial execution type) When a leading edge of signal is detected, the contact goes on during that scan only. Leading edge detection is possible at the first scan. Outline Program example Boolean Ladder Diagram Y10 X0 0 Address DFI Leading edge differential (initial execution type) Instruction 0 ST 1 DFI 3 OT X 0 Y 10 Explanation of example Output to Y10 takes place for one scan only following a change in X0 from off to on.
Basic Instructions Precautions during programming When used with instructions which change the order of execution such as MC to MCE and JP to LBL (see below), caution must be exercised. − MC to MCE instructions − JP to LBL instructions − F19 (SJP) to LBL instructions − LOOP to LBL instructions − CNDE instruction − Step ladder instructions − Subroutine instructions Take care that the syntax is correct when combining a differential instruction with an ANS or POPS instruction.
Basic Instructions SET RST Set Reset SET: When the execution conditions have been satisfied, the output is turned on, and the on status is retained. RST: When the execution conditions have been satisfied, the output is turned off, and the off status is retained.
Basic Instructions When SET and RST instructions are used When the SET and RST instructions are used, the output changes with each step during processing of the operation. Example: When X0, X1, and X2 are turned on Y10 〈S 〈 X0 Y10 This portion of the program is processed as if Y10 were on. X1 Y10 X2 Y10 〈 〈R This portion is processed as if Y10 were off. 〈S 〈 This portion is processed as if Y10 were on.
Basic Instructions KP Keep This is output which is accompanied by set or reset input, and which is retained. 4 Outline Program example Boolean Ladder Diagram Address Set input X0 KP R 30 0 Reset input X1 1 Instruction 0 ST X 0 1 ST X 1 2 KP R 30 Output destination Operands Timer/Counter Contact Relay Instruction KP X Y R L (*1) N/A A A A P E N/A N/A Index modifier T C (*2) N/A N/A A (*1) This cannot be used with the FP0/FP−e.
Basic Instructions NOP Outline No operation No operation 5 Program example Boolean Ladder Diagram X0 X1 0 X2 Address Y10 ・ NOP Instruction 0 ST X 0 1 AN X 1 2 NOP 3 AN/ X 2 4 OT Y 10 Description This instruction has no effect on the operation result to that point. The same operation takes place without a NOP instruction. The NOP instruction can be used to make the program easier to read when checking or correcting.
Basic Instructions TML Timer (0.001s units) Sets the on-delay timer for 0.001s units Outline Program example Boolean Ladder Diagram Address Timer instruction number Timer unit 0 4 Set value TML X0 0 ST X 0 1 TM L 5 5, K 300 T5 Instruction K R0 300 4 ST T 5 5 OT R 0 Timer contact of timer No.
Basic Instructions Setting the time in the timer The time setting is equal to the time increment multiplied by the value set in the timer. The value set in the timer can be a decimal value within the range K1 to K32767. The time increment is 0.001 seconds, producing a time range of 0.001 to 32.767 seconds. Example: When the value K43 is set, the time will be 0.001 × 43 = 0.043 seconds. When the K500 is set, the set time will be 0.001 × 500 = 0.5 seconds.
Basic Instructions 4 When the value in the elapsed value area EV reaches zero, the timer contact T with the same number goes on. X0 T5 SV5 300 TML5, K300 EV5 0 4 Y10 Decrement operation ends Important points when specifying constant (K) The constant (K) can be changed during RUN. A specified constant (K) cannot be modified by index modification. This program cannot be executed. X0 TML5, I0K300 When the constant (K) is specified, the timer number cannot be modified by index modification.
Basic Instructions 3 With each scan, the value in the elapsed value area EV decrements if the trigger (execution condition) is on. 2 Transfer to EV area X0 F0 MV, K30, SV5 X1 TML5, DT0 T5 4 DT0 30 3 Decrement Y10 EV5 30 29 28 27 When the value in the elapsed value area EV reaches zero, the timer contact T with the same number goes on.
Basic Instructions Example: Modifying a timer number X1 TML I05, DT 0 T15 Y10 When I0 = K10, the timer operates as TML15. − Setting value area: DT0 − Elapsed value area: EV15 − Timer contact: T15 The timer contact can also be modified by index modification. Notes When a timer number is modified, the number of steps is 4 regardless of the value in the index register. When both the memory area address and timer number are modified, different index registers can be used for each.
Basic Instructions Changing set values based on specified conditions The set value is K50 when X0 is on and K30 when X1 is on. Ladder diagram X1 X0 F0 MV, K 500, DT 0 X0 X1 F0 MV, K 300, DT 0 TML 5, DT 0 X2 T5 Y30 Boolean Time chart ST/ AN F0 X0 on off X1 on off X2 on off T5 on off X X 1 0 (MV) K 500 DT 0 X 0 X 1 (MV) K 300 DT 0 X 2 5 DT 0 T 5 Y 30 ST/ AN F0 ST TML ST OT DT0 K0 0.5s K500 0.
Basic Instructions TMR TMX TMY Timer (0.01s units) Timer (0.1s units) Timer (1.0s units) TMR:Sets the on-delay timer for 0.01 s units TMX: Sets the on-delay timer for 0.1 s units TMY: Sets the on-delay timer for 1.0 s units 6 Outline Program example Boolean Ladder Diagram Trigger 0 Address Timer number Set value Unit of timer TMX 5 K 30 X0 0 ST 1 TMX X Y37 4 Timer contact of timer No.
Basic Instructions Timer set time The formula of the timer set time is [the time unit] × [set value] The timer setting [n] must be a decimal constant from K1 to K32767. − TMR is from 0.01 to 327.67 seconds in increments of 0.01 seconds. − TMX is from 0.1 to 3276.7 seconds in increments of 0.1 seconds. − TMY is from 1 to 32767 seconds in increments of 1 second. Example: When K43 is set in TMX, the set time is 0.1 × 43 = 4.3 seconds. When K500 is set in TMR, the set time is 0.01 × 500 = 5 seconds.
Basic Instructions 4 When the value in the elapsed value area (EV) reaches zero, the timer contact (T) with same number turns on.
Basic Instructions Directly specifying a set value area number as a timer setting value With FP0/FP−e/FPΣ/FP−X/FP2/FP2SH/FP10SH with a CPU Ver. 4.4 or later with a CPU Ver. 2.7 or later, the set value area number can be specified directly as the set value n. X0 X1 F0 MV, K30, SV5 ............. 1 TMX 5, SV5 ............. 2 T5 Y10 The above program operates as follows: 1 When trigger X0 is on the data transfer instruction F0 (MV) is executed, set the K30 in SV5.
Basic Instructions Timer operation when a set value area number is directly specified 1 When the trigger for a high−level instruction is on, the value is set in the set value area (SV). The following diagram shows an example of using the high−level instruction F0(MV).
Basic Instructions Examples of applying direct specification of set value area numbers Changing set values based on specified conditions The set value is K50 when X0 is on and K30 when X1 is on.
Basic Instructions CT Outline Counter Decrements a preset counter. 5 Program example Boolean Ladder Diagram Address Count number X0 0 1 X1 CT Count input K Reset input 100 10 C 100 0 ST X 1 ST X 2 CT 0 1 100 K Elapsed value Set value Y31 5 Instruction 10 5 ST C 100 6 OT Y 31 Counter contact for counter no.
Basic Instructions Description The counter is a decremental preset counter. At the fall time when the reset input goes from on to off, the value of the set value area (SV) is preset in the elapsed value area (EV). When the reset input is on, the elapsed value is reset to 0. When the count input changes from off to on, the set value begins to decrement, and when the elapsed value reaches 0, the counter contact Cn (n is the counter number) turns on.
Basic Instructions 4 When the value in the elapsed value area (EV) reaches zero, the counter contact (C) with the same number turns on. X0 CT 100 K X1 10 SV100 10 4 EV100 0 Decrement operation ends Y10 C100 Precaution during programming When combining a counter instruction with an AND stack instruction or pop stack instruction, take care that the syntax is correct.
Basic Instructions Directly specifying a set value area number as a counter set value With FP0/FP−e/FPΣ/FP−X/FP2/FP2SH/FP10SH with a CPU of Ver. 4.4 or later, the set value area number can be specified directly as the set value n. X0 F0 MV, K30, SV100 X1 CT 100 .......... 1 .......... 2 SV 100 X2 Y30 C100 The above program operates as follows: 1 When trigger X0 is on the data transfer instruction [F0 (MV)] is executed, set the K30 in SV100.
Basic Instructions Counter operation when a set value area number is directly specified 1 When the trigger for a high−level instruction is on, the value is set in the set value area (SV). The following diagram shows an example of using the high−level instruction F0 (MV). X0 X1 X2 F0 MV, K30, SV100 CT SV C100 2 SV100 30 100 100 1 Transfers to SV area Y30 When the reset input is off, the value in the set value area (SV) is preset in the elapsed value area (EV).
Basic Instructions Examples of applying direct specification of set value area numbers Changing set values based on specified conditions The set value is K50 when X0 is on and K30 when X1 is on.
Basic Instructions SR Outline Shift register One bit shift of 16-bit [word internal relay (WR)] data to the left.
Basic Instructions Description Shifts the specified data area (WR) one bit to the left. When the shift input turns on (rises), the contents of WR are shifted one bit to the left. During the shift, 1 is set in the empty bit (least significant bit) if the data input is on, or 0 if the data input is off. When shift input is turned on: WR3 3F . . . . . . . . . . . . . . . . 30 Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0 Binary data 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 Shifts one bit to the left.
Basic Instructions Cautions on shift input detection With SR instructions, shift operation takes place when the off−on rise of the shift input is detected. If the shift input remains continuously on, a shift will only take place at the rise. No further shifts will take place. In cases where the shift input is initially on such as when the mode is changed to RUN or when the power is turned on with the mode set to RUN, a shift operation will not take place at the first scan.
Basic Instructions MC MCE Master control relay Master control relay end Executes the program between the MC and MCE when the execution condition turns on. 6 When the execution condition is off, output between the MC and MCE is turned off.
Basic Instructions Description Executes program between the MC and MCE instructions when the execution condition turns on. When the execution condition is in the off state, the instructions operate as follows. Instruction Condition of input and output OT All off KP Holds the state. SET Holds the state. RST Holds the state. TM Reset CT Holds the value. SR Holds the value. Differential See next page.
Basic Instructions Operation of differential instructions between MC and MCE If a differential instruction is used between MC and MCE, the output will vary as follows depending on the timing of the MC execution condition and the input of differential instruction.
Basic Instructions Precautions during programming A second MC−MCE instruction pair can be entered (nested) between an initial MC−MCE instruction pair. (There is no limit to the number of nestings.) X0 MC X1 0 Y10 X2 MC X3 1 Y11 X4 MC X5 2 Y12 MCE 2 MCE 1 MCE 0 The program cannot be executed if: If either MC or MCE is missing The order of the MC and MCE instructions is reversed. MCE 0 X1 Y10 X0 MC 0 There are two or more master control instruction sets with the same number.
Basic Instructions JP LBL Jump Label Skips to the LBL instruction with the same number as the JP instruction. Outline Program example Ladder Diagram 10 X1 (JP 1) 10 ST 11 JP .... (LBL 1 ) 20 Instruction .... Label number Boolean Address 20 LBL X 1 1 1 Explanation of example When the execution condition X1 turns on, the program skips from JP1 to LBL1.
Basic Instructions You must be careful when using one of the instructions below, which are executed by detecting the rise of a execution condition such as the differential instruction.
Basic Instructions Differential instruction operation between JP and LBL instructions If a differential instruction is used in the area between a JP and LBL instruction, be aware that the output will differ as shown below depending on the execution condition of the JP and the input timing of differential instruction.
Basic Instructions LOOP LBL Loop Label Skips to the LBL instruction that has the same number as the LOOP instruction and executes what follows, repeatedly, until the data of a specified operand becomes “0”. 7 Outline Program example Boolean Ladder Diagram Address X0 F0 MV, K5, DT 0 10 Instruction 10 ST 11 F0 16 LBL 30 ST 31 LOOP 0 1 ....
Basic Instructions Description When the execution condition (trigger) turns on, 1 is subtracted from the contents of S and if the result is other than 0, the program jumps to the label (LBL instruction) that has the same number as the specified number. The program then continues with the instructions starting from the address of the label that is the loop destination. Set the number of times to execute the program with the LOOP instruction.
Basic Instructions TM, CT, and SR instruction operation between the LOOP and LBL instructions When the LBL instruction is located after the LOOP instruction: − TM instruction: The TM instruction is not executed. If it is not executed once during a single scan, the correct time cannot be guaranteed. X0 − CT instruction: Even if the count input is on, counting is not performed. The elapsed value is preserved. − SR instruction: Even if the shift input is on, no shift is performed.
Basic Instructions Precautions during programming When the label is written in an address before the LOOP instruction, be careful of the following points. Be sure to have the instruction that sets the number of loop cycles before the area between the LBL and LOOP instructions. Set the instructions that will be repeated between LBL and LOOP so that they have the same trigger as the LOOP instruction.
Basic Instructions BRK Break Stops execution in TEST/RUN mode. Outline 8 Program example Boolean Ladder Diagram X0 10 Address Y30 (BRK) X1 13 Y31 Instruction 10 ST X 0 11 OT Y 30 12 BRK 13 ST X 1 14 OT Y 31 Description The BRK instruction is effective only in the TEST/RUN mode. In the normal RUN condition, this instruction is not executed. In the TEST/RUN mode, program execution is temporarily stopped with the address containing this BRK instruction.
Basic Instructions 4. When X0 is in the on state, the BRK instruction is executed and program execution stops. 5. Press the “F3” key while holding down the “Shift” key in the MONITOR & TEST RUN window of the programming tool software to continue the program execution. If a BRK instruction is executed, program execution stops. X1 Y31 Starts from the address 13 13 35 X12 Execution (BRK) Stops at the address 35 6. Up to the end of the program, proceed according to the operation in steps 4 and 5 above.
Basic Instructions ED Outline End Indicates the end of the ordinary program. 9 Program example Boolean Ladder Diagram X0 X1 Address R0 0 R0 X2 Y30 ( ED ) 99 ST X 0 1 OR R 0 2 AN/ X 1 3 OT R 0 .... R0 0 .... 96 Instruction 96 ST R 0 97 AN X 2 98 OT Y 30 99 ED Description Indicates the end of the ordinary program.
Basic Instructions CNDE Outline Conditional end Ends one scan of the program when the execution condition (trigger) turns on. 10 Program example Boolean Ladder Diagram X0 X1 Address Y30 0 Y30 ( CNDE ) R0 98 X2 Y31 ST X 0 1 OR Y 30 2 AN/ X 1 3 OT Y 30 X 3 0 .... Execution condition (Trigger) 0 .... X3 96 Instruction 96 ST 97 CNDE 98 ST R 99 AN/ X 2 100 OT Y 31 Description The CNDE instruction enables you to end one scan of the program.
Basic Instructions Program execution when the CNDE instruction is executed (when X3 turns on). X0 X1 Y30 Y30 X3 CNDE This part of the program is not executed when the CNDE instruction is executed. ED 2 − 72 Program execution during normal scanning.
Basic Instructions EJECT Outline Eject Adds page break for use when printing. Program example Boolean Ladder Diagram R0 Address Y0 0 Instruction 0 ST R 0 Y 0 R 1 1 OT ( EJECT ) 2 EJECT R1 Y1 3 ST 4 OT Y 1 R2 Y2 5 ST R 2 6 OT Y 2 2 3 5 Explanation of example Insert the EJECT instruction in the address where you want the page to break when printing out the program you created. In the above, the page will break at address 2.
Basic Instructions 2 − 74
Basic Instructions SSTP NSTL NSTP CSTP STPE Outline Start step Next step (scan execution type) Next step (pulse execution type) Clear step Step end SSTP: Indicates the start of a step ladder process. 11 NSTL: Opens a step ladder process. NSTL is executed every scan if its trigger is on. NSTP: Opens a step ladder process. NSTP is executed when the leading edge of its trigger is detected. CSTP: Resets the specified process. STPE: Indicates the end of step ladder area.
Basic Instructions Description When the NSTL instruction or the NSTP instruction is executed, the process starting with the SSTP instruction of the specified number is started and executed. In a step ladder program, a process is identified as being from one SSTP instruction to the next SSTP or STPE instruction. Example: (SSTP X0 1) Y10 Process 1 X1 F0 MV, DT 0, DT 100 (SSTP 2) Operations such as the sequence control, selection branch control, parallel branch control are easily executed.
Basic Instructions Syntax of step ladder instruction SSTP (start step) instruction: This instruction indicates the start of a process n. Program Program Program SSTP 1 SSTP 2 SSTP 5 Process 1 Process 2 In a step ladder program, a process n is identified as being from one SSTPn instruction to the next SSTP or STPE instruction. No two processes can have the same process number. The OT instruction can be programmed at the address just after the SSTP instruction.
Basic Instructions NSTL (Next step, scan execution type) instruction: NSTP (Next step, differential (pulse) execution type) instruction: When an NSTPn or NSTLn instruction is executed, the process with the same process number “n” as the NSTP or NSTL instruction is opened. The execution condition (trigger) for the next step instruction means the execution condition (trigger) to start the process.
Basic Instructions CSTP (clear step) instruction: When a CSTP instruction is executed, the process “n” with the same process number “n” is cleared. This instruction can be used to clear the final process or to clear the processes when the parallel branch merge control is executed. X0 X1 NSTP 99 X1: on CSTP 99 Process 99: cleared SSTP 99 Process 99 STPE A process can also be cleared from the ordinary ladder area or from a process that is already started.
Basic Instructions When you need to clear an entire processes in step ladder program, use the master control (MC and MCE) instructions as shown below. Example: All processes are cleared when X0 becomes on. X0 MC 0 SSTP 1 SSTP 2 SSTP 3 Step ladder area Master control instructions STPE MCE 0 ED It is not necessary to execute processes in order of process numbers. You can execute two or more processes at the same time.
Basic Instructions The execution state (start/stop) for processes are stored in special data registers: Type Special data register FP0 C10, C14, C16, C32/ FP−e DT9060 to DT9067 FP0 T32/FP0R DT90060 to DT90067 FPΣ/FP−X/FP2/FP2SH/ FP10SH DT90060 to DT90122 Example: The start−up conditions for processes No. 16 through No. 31 15 . . 12 11 . . 8 7 . . 4 3 . Bit position Process number 31 . . 28 27 . . 24 23 . . 20 19 . DT9061/DT90061 0 0 0 0 0 0 0 1 0 0 0 0 0 0 . 0 .
Basic Instructions You must be careful when using one of the instructions below, which are executed by detecting the leading edge of execution condition (trigger) such as the differential instruction.
Basic Instructions 2 Selection branch control of a process This program selects and switches to the next process according to the actions and results of a particular process. Each process loops until its work is completed. Program two or more NSTL instructions to trigger the next process in a process. Depending on the execution conditions, the next process is selected, triggered and program execution is transferred. Program example Process flowchart 1) When X100 turns on, process 100 is executed.
Basic Instructions 3 Parallel branch merge control of a process This program triggers multiple processes simultaneously. After each of the branch processes has completed its work, they merge again before transferring execution to the next process. Program multiple NSTL instructions for one trigger in a process. To merge processes, include a flag indicating the state of the other processes in the transfer condition for the next process.
Basic Instructions SCLR Clear multiple processes Reset multiple processes specified by n1 and n2.
Basic Instructions CALL SUB RET Outline Subroutine call Subroutine entry Subroutine return CALL: Executes the specified subroutine program. 12 SUB: Indicates the start of the subroutine program. RET: Indicates the end of the subroutine program. Program example Boolean Ladder Diagram X0 10 (CALL (SUB 21 ) 1) CALL Subroutine 20 ED 21 SUB 30 X 0 1 1 .... ) ST 11 .... (RET 30 10 .... Subroutine program number (ED 1) Instruction ....
Basic Instructions Nesting of subroutines is possible until the 5th nesting. SUB 0 CALL1 RET (Stage 2) SUB 1 CALL2 RET (Stage 3) SUB 2 CALL3 RET (Stage 4) SUB 3 CALL4 RET (Stage 5) SUB 4 RET Called up from inside of the subroutine. 5th nesting example Flag conditions ・Error flag (R9007): Turns on and stays on when performing five nestings and executing the CALL instruction for the subroutine of the 5th nesting.
Basic Instructions For the FP2/FP2SH/FP10SH, subroutine programs may be constructed with multiple entrances and only one exit. 1 2 3 4 SUB 11 SUB 12 SUB 13 SUB 14 CALL11 CALL13 RET When “CALL 11” is executed, When “CALL 13” is executed, 1 3 to 4 are executed. and 4 are executed. You must be careful when you use, in a subroutine, one of the instructions below that is executed by detecting the leading of execution condition (trigger) such as the differential instruction.
Basic Instructions FCAL Output off type subroutine call Executes the specified subroutine. When returning to the main program, all outputs in the subroutine program are set to off.
Basic Instructions Precautions during programming Like a CALL instruction, up to five nesting levels are possible. However, it will not be possible to use certain MC numbers depending on the number of nesting levels as shown below.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X Availability INT IRET Outline Interrupt FP0/FP0R/FP−e/ FPΣ/FP−X Interrupt return Indicates the start of the interrupt program. Indicates the end of the interrupt program. INT: IRET: Program example Boolean Ladder Diagram Address 20 ED 0) 21 INT .... ....
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X Syntax of interrupt program An interrupt program n is the program between the INTn instruction and the IRET instruction. The interrupt program must always be placed after the ED instruction. The number of the interrupt program is decided by the type of the interrupt. Interrupt input FPΣ/FP0R FP−X Ry Interrupt p Program No.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X Before inputting an interrupt program 1 Declare the contact point to be used as the interrupt input (trigger). Select the contact point to be used as the interrupt input (trigger) and indicate it at system register 403. Notes If the high−speed counter/pulse catch is set, that contact cannot be used as the interrupt input (trigger).
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X When another interrupt program is being executed, an interrupt will occur after the current program is completed. Execution Main program Execution INT1 program Execution INT2 program INT2 input on off Precautions during programming for all types If either the INT instruction or IRET instruction is missing, a syntax error will result.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X Control when more than one interrupt occurs simultaneously. When more than one interrupt occurs simultaneously, the interrupt program with the smaller number is executed first. The other interrupt programs are then placed in the execution waiting state. After the first interrupt program is completed, the other programs will be executed in order from the smallest number to the greatest.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X Interrupt program execution waiting state and clearing When multiple interrupt programs occur simultaneously or new interrupt programs occur during the execution of another interrupt program, the interrupt programs of lower preference are placed in the execution waiting state. They are then executed in order of preference when the other interrupt programs are completed.
Basic Instructions FP2/FP2SH/FP10SH Availability INT IRET Outline Interrupt FP2/FP2SH/FP10SH Interrupt return Indicates the start of the interrupt program. Indicates the end of the interrupt program. INT: IRET: Program example Boolean Ladder Diagram Address 20 ED 0) 21 INT .... ....
Basic Instructions FP2/FP2SH/FP10SH Interrupt program execution There are three types of interrupt. 1 Interrupts from a interrupt unit (corresponding to INT0 to INT15) Interrupts are issued in response to the rise or fall of the interrupt unit input (whether rising or falling is specified on the unit side).
Basic Instructions FP2/FP2SH/FP10SH Precautions during programming for all types If either the INT instruction or IRET instruction is missing, a syntax error will result. When an interrupt is issued, the operation memory corresponding to the interrupt input contact does not undergo I/O refreshing. Therefore, contacts other than the interrupt input contact, such as the constantly−on relay R9010, should be specified by the input conditions in the interrupt program.
Basic Instructions FP2/FP2SH/FP10SH Control when more than one interrupt occurs simultaneously. When more than one interrupt occurs simultaneously, the interrupt program with the smaller number is executed first. The other interrupt programs are then placed in the execution waiting state. After the first interrupt program is completed, the other programs will be executed in order from the smallest number to the greatest.
Basic Instructions FP2/FP2SH/FP10SH Interrupt program execution waiting state and clearing When multiple interrupt programs occur simultaneously or new interrupt programs occur during the execution of another interrupt program, the interrupt programs of lower preference are placed in the execution waiting state. They are then executed in order of preference when the other interrupt programs are completed.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X Availability ICTL FP0/FP−e/FPΣ/FP−X/ FP0R Interrupt control Outline Performs the interrupt enable or disable and the interrupt clear.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X Precaution if rewriting during a RUN operation (for FP0/FP0R/FP−e/FPΣ) If rewriting is done during a RUN operation while the interrupt function is being used, execution of the interrupt function is inhibited. The ICTL instruction has to be used once again to enable the interrupt program to be executed. Example: A periodic interrupt is set every 10 ms when the operation is begun. (After rewriting during a RUN operation, interrupts are enabled again.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X Specifying control data S1: Specifying the control functions and interrupt types Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0 S1 Interrupt type selection H00: INT 0 to INT 7 H02: INT 24 (10ms units) H03: INT 24 (0.5ms units) Selection of control function H00: Interrupt “enabled/disabled” control H01: Interrupt trigger reset control Set S1 = H0 to specify enable or disable for the execution of INT0 through INT7.
FP0/FP0R/FP−e/FPΣ/FP−X Basic Instructions S2: Specifying the control of interrupts 1 Enabling or disabling interrupt programs (when S1 = H0 or S1 = H1). Set the control data in the bit corresponding to the number of the interrupt program that you want to control. Set the bit corresponding to the number of the program you want to enable to “1.” (INT program disabled.) Set the bit corresponding to the number of the program you want to disable to “0.” (INT program enabled.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X Example of enabling the execution of interrupt programs Example: DF ICTL, H0, H21 S1 S2 S1: H0000 Specifies enabling or disabling of interrupt programs that correspond to interrupts at specified input contact or to target value match interrupts. S2: H0021 Enable INT0 and INT5 (set bits 0 and 5 to “1”) and disable all others. Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0 S2 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 INT No.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X ICTL instruction Execution Main program Execution Execution INT0 program INT5 program INT0 input on off INT5 input on off Execution Disabled Condition Enabled How to start the interrupt program when executing the high−speed counter match ON/match OFF instruction. 1 Set the counter by the system register. (It is not necessary to set the external interrupt.) 2 Describe the interrupt program on the program.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X S2: HFE Clears interrupt INT0 (bit 0 is “0”) and does not clear the other interrupts. For the relationship between the set value and the interrupt input contact, refer to page 2 − 106. Even though the INT0 interrupt input occurred, when the interrupt program is disabled, the ICTL instruction can still be used to clear the INT0 interrupt.
Basic Instructions FP0/FP0R/FP−e/FPΣ/FP−X To stop the periodical interrupt program, execute the following program.
Basic Instructions FP2/FP2SH/FP10SH Availability ICTL Interrupt control FP2/FP2SH/FP10SH Outline Performs the interrupt enable or disable and the interrupt clear.
Basic Instructions FP2/FP2SH/FP10SH Input examples Example 1: Setting a periodical interrupt every 10ms from the start of operations R9013 ICTL, H2, Executes INT24 every 10ms K1 The R9013 (initial pulse relay) turns on only for the first scan after operations begin. Example 2: Enable INT0 through INT3 when X30 rises. X30 DF ICTL, H0, HF X30: Enables INT0 to INT3 when on Example 3: Clear interrupts other than INT0 after the INT0 program is completed.
Basic Instructions FP2/FP2SH/FP10SH If execution has been specified as enabled or disabled for INT0 to INT15, [S1] = H0. If an interrupt clear has been specified for INT0 to INT15, [S1] = H100. If execution has been specified as enabled or disabled for INT16 to INT23, [S1] = H1. If an interrupt clear has been specified for INT16 to INT23, [S1] = H101. Set [S1] = H2 to set the time intervals for INT24.
Basic Instructions FP2/FP2SH/FP10SH 4 Specifying periodical interrupt programs (when S1 = H3 or S1=H5) for FP0/FP2/FP2SH/FP10SH only Specify the setting with decimal number. The time interval = value of S2 × 0.5 (ms). Bit position 15 . .12 11 . . 8 7 . . 4 3 . . 0 S2 K0 to K3000 Time interval setting: K1 to K3000 (0.5ms to 1.5s) INT24 disabled: K0 Note For the difference in the operation of H3 and H5, refer to “Example 2 for setting periodical interrupt”.
Basic Instructions FP2/FP2SH/FP10SH Example of enabling the execution of interrupt programs Example: DF ICTL, H0, H101 S1 S2 [S1]: H0000 This specifies whether execution of the interrupt program corresponding to the interrupt from the interrupt unit (INT0 to INT15) is enabled or disabled. [S2]: H0101 Enable INT0 and INT8 (set bits 0 and 8 to “1”) and disable all others. Bit position 15 . . 12 11 . S2 . 8 7 . . 4 3 . .
Basic Instructions FP2/FP2SH/FP10SH When this ICTL instruction is executed, interrupt programs INT0 and INT8 will be executed when their corresponding interrupt inputs occur.
Basic Instructions FP2/FP2SH/FP10SH Example for clearing interrupt programs Example: DF ICTL, H100, HFFFE S1 S2 [S1]: H0100 Clears interrupts from the interrupt unit (INT 0 to INT15). [S2]: HFFFE Clears interrupt INT0 (bit 0 is “0”) and does not clear the other interrupts. For the relationship between the set value and the interrupt unit, refer to page 2 − 114 “Example of enabling the execution of interrupt programs.
Basic Instructions FP2/FP2SH/FP10SH Example 1 for setting periodical interrupt Example: DF ICTL, H2, K1500 S1 S2 [S1]: H0002 Specifies periodical interrupt (units: 10ms) [S2]: K1500 Specifies the time interval for the periodical interrupt. With K1500, the time interval is K1500 x 10ms = 15000ms (15s) After this ICTL instruction is executed, the periodical interrupt will occur every 15 seconds. At these times, the INT24 interrupt program will be executed.
Basic Instructions FP2/FP2SH/FP10SH Example 2 for setting periodical interrupt When H4 or H5 is designated, the periodical interrupt occurs at the specified interval regardless of interrupt processing time. Compatible−timer: (kind= H02,H03) Int Int Int [S2] [S2] After the periodical interrupt program completed, the next interrupt timing is counted. When the execution time of the periodical interrupt program is less than 500 µs, the interrupt is carried out at every interval specified by [S2].
Basic Instructions FPΣ/FP−X/FP0R SYS1 Availability Communication conditions setting FPΣ/FP−X/FP0R This changes the communication conditions for the COM port or Tool port based on the contents specified by the character constant. Program example Outline Boolean Non-ladder Ladder Diagram Address Trigger S R0 10 DF COM1, B8POS1 SYS1, M 10 ST R 11 DF 12 SYS1 M S SYS1, M Instruction 0 COM1, B8POS1 SYS1 25 COM1,19200 M COM1,19200 No. 1 No.
Basic Instructions FPΣ/FP−X/FP0R Keyword setting 1) Communication format (Shared by the Tool, COM. 1 and COM. 2 ports) SYS1, M TOOL,B7 PN S1 Port used TOOL: Tool port COM1: COM. 1 port COM2: COM. 2 port Character bit B7: 7bits B8: 8bits Parity PN: None Stop bit S1: 1 PO: Odd PE: Even S2: 2 2) Baud rate (Shared by the Tool, COM. 1 and COM. 2 ports) SYS1, M TOOL,19200 Port used TOOL: Tool port COM1: COM. 1 port COM2: COM.
Basic Instructions FPΣ/FP−X/FP0R 4) Header and Terminator (Shared by the TOOL, the COM. 1 and COM. 2 ports) SYS1, M COM1,STX Port used TOOL: Tool port (FPΣ 32k/FP−X/FP0R) COM1: COM. 1 port COM2: COM. 2 port Header STX: STX NOSTX: STX not exist Terminator ETX: ETX CR: CR CRLF: CR + LF NOTERM: None 5) RS (Request to Send) control (COM. 1 port only) SYS1, M COM1,RTS1 Port used COM1: COM.
Basic Instructions Flag conditions FPΣ/FP−X/FP0R ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − Any character other than a keyword is specified − There is no comma between No. 1 and No. 2 keywords − The small letter of the alphabet is used to specify the keyword (except for numbers used to specify unit No.) − No communication cassette has been installed when COM1 or COM2 has been set − The setting of the unit No.
Basic Instructions FPΣ/FP−X/FP0R SYS1 Availability Password setting FPΣ/FP−X/FP0R This changes the password specified by the controller, based on the contents specified by the character constant. Outline Program example Boolean Non-ladder Ladder Diagram Address Trigger S R0 DF 10 SYS1, M PASS,ABCD No. 1 keyword DF 100 SYS1, M PAS, abcdefgh No. 1 keyword 10 ST R 11 DF 12 SYS1 0 M PASS,ABCD 100 ST R 101 DF 102 SYS1 No. 2 keyword S R1 Instruction No.
Basic Instructions FPΣ/FP−X/FP0R Keyword setting For the 4−digit password SYS1, M PASS,ABCD PASS: Fixed Password (Example: To set the password to “ABCD”) For the 8−digit password (It is available for FPΣ 32k/FP−X/FP0R.) SYS1, M PAS, abcdefgh PAS: Fixed Password (Example: When “abcdefgh” is specified for the password.) If the specified characters are less than 8, spaces are added at the end of the characters to be 8−digit password.
Basic Instructions FPΣ/FP−X/FP0R SYS1 Availability Interrupt setting FPΣ/FP−X/FP0R This sets the interrupt input based on the contents specified by the character constant. Program example Outline Boolean Non-ladder Ladder Diagram Address Trigger S R0 DF 10 SYS1, M INT1,UP Instruction 10 ST R 11 DF 12 SYS1 M 0 INT1,UP No. 1 No.
Basic Instructions FPΣ/FP−X/FP0R Precautions during programming Executing this instruction does not rewrite the contents of the system ROM in the control unit. As a result, turning the power supply off and then on again rewrites the contents of the system registers specified by the tool software. We recommend using differential execution with this instruction.
Basic Instructions FPΣ/FP−X/FP0R SYS1 Availability PLC link time setting FPΣ/FP−X/FP0R This sets the system setting time when a PLC link is used, based on the contents specified by the character constant. Program example Outline Boolean Non-ladder Ladder Diagram Address S R9014 10 DF SYS1, M PCLK1T0,100 10 ST 11 DF 12 SYS1 S SYS1, M Instruction R M PCLK1T0,100 SYS1 25 PCLK1T1,100 M No. 1 keyword 90141 PCLK1T1,100 No.
Basic Instructions FPΣ/FP−X/FP0R 2) Error detection time for transmission assurance relay SYS1, M PCLK1T1,100 PCLK1T1: Fixed Specified range: 100 to 6400 (100ms to 6400ms) Precautions during programming The program should be placed at the beginning of all PLCs being linked, and the same values specified. This instruction should be specified in order to set special internal relay R9014 as the differential execution condition.
Basic Instructions FPΣ/FP−X/FP0R Availability SYS1 FPΣ 32k FP−X Ver 1.10 or more FP0R Change high−speed counter operation mode This changes the operation mode of the high−speed counter based on the contents specified by the character constant. Program example Outline Boolean Non-ladder Ladder Diagram Address Trigger S R0 DF 10 SYS1, M HSC1,UP Instruction 10 ST 11 DF R 12 SYS1 M 0 HSC1,UP No. 1 No.
Basic Instructions FPΣ/FP−X/FP0R Precautions during programming If the system register is not set to the addition input or subtraction input for this instruction, an operation error occurs. Set the system register to the addition or subtraction input in advance. When the addition/subtraction input setting is specified even if the setting has been already done, an operation error does not occur. Executing this instruction does not rewrite the contents of the system ROM in the control unit.
Basic Instructions FPΣ/FP−X/FP0R Availability SYS1 MEWTOCOL−COM response control FPΣ/FP−X/FP0R This specifies the response waiting time based on the MEWTOCOL−COM of the COM port or Tool port, in response to the contents specified by the character constant. Program example Outline Boolean Non-ladder Ladder Diagram Address Trigger S R0 10 SYS1, M DF COM1,WAIT2 Instruction 10 ST 11 DF 12 SYS1 M R 0 COM1,WAIT2 No. 1 No.
Basic Instructions FPΣ/FP−X/FP0R Keyword setting SYS1, M TOOL,WAITn Port used TOOL: Tool port COM1: COM. 1 port COM2: COM. 2 port Response time WAIT0 to WAIT999 (n: 0 to 999) If the communication mode or the MOD BUS RTV mode has been set to the computer link mode, the set time is the scan time x n (n: 0 to 999). If the communication mode has been set to the PLC link mode, the set time is n µs (n: 0 to 999). If n = 0, the delay time set by this instruction will be set to “None”.
Basic Instructions FPΣ/FP−X/FP0R Availability Change system registers (No. 40 to No. 47, No. 50 to No. 57) SYS2 FPΣ/FP−X/FP0R This changes the settings entered for the system registers of the PLC link function, in accordance with the specified data.
Basic Instructions FPΣ/FP−X/FP0R System registers No.
FPΣ/FP−X/FP0R Basic Instructions Precaution during programming Executing this instruction does not rewrite the contents of the system ROM in the control unit. As a result, turning the power supply off and then on again rewrites the contents of the system registers specified by the tool software. A value between K40 and K47 should be specified for “D1” or “D2”. Also, the values should always be specified in such a way that D1 D2.
Basic Instructions ST = ST <> ST > ST >= ST < ST <= 16−bit data comparison: Start equal 16−bit data comparison: Start equal not 16−bit data comparison: Start larger 16−bit data comparison: Start equal or larger 16−bit data comparison: Start smaller 16−bit data comparison: Start equal or smaller Performs start operation by comparing two word data items with the comparison condition. The contact goes on or off depending on the result of the comparison.
Basic Instructions Explanation of example Compares the contents of data register DT0 with the constant K50 and K60. If DT0 = K50, the external output relay Y30 goes on and if DT0 K60, the external output relay Y31 turns on. DT0 60 50 10 on Y30 off on Y31 off Description Compares the word data specified by S1 with the word data specified by S2 according to the comparison condition.
Basic Instructions STD = STD <> STD > STD >= STD < STD <= 32−bit data comparison: Start equal 32−bit data comparison: Start equal not 32−bit data comparison: Start larger 32−bit data comparison: Start equal or larger 32−bit data comparison: Start smaller 32−bit data comparison: Start equal or smaller Performs start operation by comparing two double word data items with the comparison condition. The contact goes on or off depending on the result of the comparison.
Basic Instructions Explanation of example Compares the contents of data registers (DT1, DT0) with the data registers (DT101, DT100). If (DT1, DT0) = (DT101, DT100), the external output relay Y30 goes on and if (DT1, DT0) > (DT101, DT100), the external output relay Y31 goes on. Description Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and S2+1 according to the comparison condition.
Basic Instructions STF = STF <> STF > STF >= STF < STF <= Floating point real number data comparison: Start equal Floating point real number data comparison: Start equal not Floating point real number data comparison: Start larger Floating point real number data comparison: Start equal or larger Floating point real number data comparison: Start smaller Floating point real number data comparison: Start equal or smaller Availability FP0R FP−X Ver 1.
Basic Instructions Explanation of example Compares the real number value of data registers (DT0, DT1) with the real number value of data registers (DT100, DT101). If (DT0, DT1) = (DT100, DT101), the external output relay Y30 goes on and if (DT0, DT1) > (DT100, DT101), the external output relay Y31 goes on. Description Compares the real number data specified by S1 and S1+1 with the real number data specified by S2 and S2+1 according to the comparison condition.
Basic Instructions AN = AN <> AN > AN >= AN < AN <= 5 16−bit data comparison: AND equal 16−bit data comparison: AND equal not 16−bit data comparison: AND larger 16−bit data comparison: AND equal or larger 16−bit data comparison: AND smaller 16−bit data comparison: AND equal or smaller Performs AND operation by comparing two word data items with the comparison condition. The contact goes on or off depending on the result of the comparison. The contacts are connected in series.
Basic Instructions Explanation of example Compares the contents of data register DT0 with the constant K60 when X0 turns on. If DT0 K60 in the X0 on state, external output relay Y30 goes on. If DT0 < K60 or if X0 is in the off state, external output relay Y30 goes off. DT0 60 10 X0 on off Y30 on off Description Compares the word data specified by S1 with the word data specified by S2 according to the comparison condition.
Basic Instructions AND = AND <> AND > AND >= AND < AND <= 32−bit data comparison: AND equal 32−bit data comparison: AND equal not 32−bit data comparison: AND larger 32−bit data comparison: AND equal or larger 32−bit data comparison: AND smaller 32−bit data comparison: AND equal or smaller Performs AND operation by comparing two double word data items with the comparison condition. The contact goes on or off depending on the result of the comparison. The contacts are connected in series.
Basic Instructions Explanation of example Compares the contents of data registers (DT1, DT0) with the data registers (DT101, DT100) when X0 turns on. If (DT1, DT0) (DT101, DT100) in the X0 on state, the external output relay Y30 goes on. If (DT1, DT0) < (DT101, DT100) or if X0 is in the off state, the external output relay Y30 goes off. Description Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and S2+1 according to the comparison condition.
Basic Instructions ANF = ANF <> ANF > ANF >= ANF < ANF <= Outline Floating point real number data comparison: AND equal Floating point real number data comparison: AND equal not Floating point real number data comparison: AND larger Floating point real number data comparison: AND equal or larger Floating point real number data comparison: AND smaller Floating point real number data comparison: AND equal or smaller Availability FP0R FP−X Ver 1.
Basic Instructions Explanation of example Compares the real number value of data registers (DT0, DT1) with the real number value of data registers (DT100, DT101) when X0 turns on. If (DT0, DT1) (DT100, DT101) in the X0 on state, the external output relay Y30 goes on. If (DT0, DT1) < (DT100, DT101) or if X0 is in the off state, the external output relay Y30 goes off.
Basic Instructions OR = OR <> OR > OR >= OR < OR <= 16−bit data comparison: OR equal 16−bit data comparison: OR equal not 16−bit data comparison: OR larger 16−bit data comparison: OR equal or larger 16−bit data comparison: OR smaller 16−bit data comparison: OR equal or smaller Performs OR operation by comparing two word data items with the comparison condition. The contact goes on or off depending on the result of the comparison. The contacts are connected in parallel.
Basic Instructions Explanation of example Y30 goes on when X0 is in the on state, or when DT0 goes off. K60. If DT0 < K60 and if X0 is in the off state, then Y30 DT0 60 10 X0 on off on Y30 off Description Compares the word data specified by S1 with the word data specified by S2 according to the comparison condition. The OR instruction results in parallel connection as the liaison contact when the comparison result is a specified status (=, <, >, etc.).
Basic Instructions ORD = ORD <> ORD > ORD >= ORD < ORD <= 32−bit data comparison: OR equal 32−bit data comparison: OR equal not 32−bit data comparison: OR larger 32−bit data comparison: OR equal or larger 32−bit data comparison: OR smaller 32−bit data comparison: OR equal or smaller Performs OR operation by comparing two double word data items with the comparison condition. The contact goes on or off depending on the result of the comparison. The contacts are connected in parallel.
Basic Instructions Explanation of example Compares the contents of data registers (DT1, DT0) with the data registers (DT101, DT100). When X0 turns on or if (DT1, DT0) (DT101, DT100), the external output relay Y30 goes on. If (DT1, DT0) < (DT101, DT100) and if X0 is in the off state, the external output relay Y30 goes off. Description Compares the double word data specified by S1 and S1+1 with the double word data specified by S2 and S2+1 according to the comparison condition.
Basic Instructions ORF = ORF <> ORF > ORF >= ORF < ORF <= Floating point real number data comparison: OR equal Floating point real number data comparison: OR equal not Floating point real number data comparison: OR larger Floating point real number data comparison: OR equal or larger Floating point real number data comparison: OR smaller Floating point real number data comparison: OR equal or smaller Availability FP0R FP−X Ver 1.
Basic Instructions Explanation of example When X0 turns on or if (DT0, DT1) (DT100, DT101) by comparing the real number value of data registers (DT0, DT1) with the real number value of data registers (DT100, DT101), the external output relay Y30 goes on. If (DT0, DT1) < (DT100, DT101) and if X0 is in the off state, the external output relay Y30 goes off.
Basic Instructions 2 − 154
Chapter 3 High−level Instructions
High−level Instructions 3-2
3.1 3.1 3.1.1 Composition of High-level Instructions Composition of High-level Instructions Composition Each high-level instruction is composed of a high-level instruction number, boolean and operands. Example: F0 (MV) instruction The K0 (S) is copied to DT0 (D) Execution condition (Trigger) Address X0 0 Operand F0 MV , K0 S , DT 0 D Boolean High−level instruction number High−level instruction number High−level instruction numbers are used for inputting the high-level instructions.
High−level Instructions 3.1.2 High-level Instruction Numbers and Program Input High-level instruction numbers are assigned to high-level instructions. For example, the number assigned to the MV instruction (16-bit data transfer instruction) is 0 (F0 or P0). A high−level instruction is entered by entering its high-level instruction number. A high−level instruction with the prefix “F” is executed in every scan while its execution condition (trigger) is in the on state.
3.1 3.1.3 Composition of High-level Instructions High-level Instruction and Execution Condition (Trigger) A high-level instruction is always used in a pair with its execution condition (trigger). When the operation result of the relay sequence circuit specified as the execution condition (trigger) is on, the high-level instruction is executed. Example: When the execution condition (trigger) X0 is on, the F0 (MV) instruction is executed and K0 is transferred to DT0.
High−level Instructions Example 2: The execution condition (trigger) is programmed once using the PSHS, RDS and POPS instructions. PSHS X0 F0 MV, WR 0 , DT 10 F0 MV, LD 1 , DT 11 RDS P115 PFIFT, DT 10 , DT 11 POPS 3.1.4 “F” and “P” Type High-level Instructions For more high−level instructions, “F” and “P” types are available. “F” type high-level instruction While the execution condition (trigger) is on, the instruction is executed at each scan repeatedly.
3.1 Composition of High-level Instructions When you use the “P” type instruction with one of the following instructions that changes the order of the execution of instructions, be aware that the operation of the instructions will differ depending on the timing of their execution and their execution conditions (triggers).
High−level Instructions F0 (MV) P0 (PMV) 16-bit data move Copies 16-bit data to the specified 16-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P0 (PMV)” is not available.
High−level Instructions Application example Example 1: Transfer K30 to timer set value area SV0 when R1 turns on. R1 F0 MV, K 30, SV 0 Example 2: Transfer the timer elapsed value EV0 to data register DT0 when R2 turns on. R2 Flag conditions F0 MV, EV 0, DT 0 ・Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit. ・Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit.
High−level Instructions F1 (DMV) P1 (PDMV) 32-bit data move Copies 32-bit data to the specified 32-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P1 (PDMV)” is not available.
High−level Instructions Description The 32-bit data or 32-bit equivalent constant specified by S is copied to the 32-bit area specified by D. When processing 32-bit data, the higher 16-bit areas (S+1, D+1) are automatically determined once the lower 16-bit areas (S, D) are specified. Flag conditions ・Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit.
High−level Instructions F2 (MV/) P2 (PMV/) 16-bit data invert and move Inverts 16-bit data and transfers it to the specified 16-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P2 (PMV/)” is not available.
High−level Instructions Description The 16-bit data or 16-bit equivalent constant specified by S is inverted and transferred to the 16-bit area specified by D.
High−level Instructions F3 (DMV/) P3 (PDMV/) 32-bit data invert and move Inverts 32-bit data and transfers it to the specified 32-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P3 (PDMV/)” is not available.
High−level Instructions Explanation of example The contents of data registers DT12 and DT11 are inverted and transferred to data registers DT21 and DT20 when trigger R0 turns on.
High−level Instructions F4 (GETS) P4 (PGETS) Reading of head word No. of the specified slot. The head word No. of the specified slot is read. Outline This function is available from FP2/FP2SH Ver. 1.50 or later.
High−level Instructions F5 (BTM) P5 (PBTM) Bit data move Copies bit data of one 16-bit area to the specified bit of another 16-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P5 (PBTM)” is not available.
High−level Instructions Explanation of example The data at bit position 4 in data register DT20 is copied to bit position 12 in data register DT10 when trigger R0 turns on.
High−level Instructions Transferring multiple bits [this can only be executed with FP0R, FPΣ, FP−X, FP2 (Ver. 1.03 and subsequent versions), FP2SH, and FP10SH] With the FP2, FP2SH and FP10SH, if the number of bits to be transferred is specified for n, the specified number of bits is transferred in sequential order, starting from the position specified by S, to destination, starting from the position specified by D. Up to 16 bits can be transferred.
High−level Instructions If “0” is specified as the number of bits to be transferred, the specified one bit is transferred. If the specified range extends beyond the area of S, the contents of the part extending beyond the area are transferred as “0”. Example: When four bits starting from bit position 14 of S are transferred to bit position 2 of D...
High−level Instructions F6 (DGT) P6 (PDGT) Hexadecimal digit data move Copies hexadecimal digits at one 16-bit area to the specified digit position in another 16-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P6 (PDGT)” is not available.
High−level Instructions Description The hexadecimal digits in the 16-bit data or in the 16-bit equivalent constant specified by S are copied to the 16-bit area specified by D, as specified by n. Digits Digits are units of 4 bits used when handling data. With this instruction, 16−bit data is separated into four digits.
High−level Instructions Examples of hexadecimal digit copy The following patterns of digit transfer are possible based on the specification of n.
High−level Instructions 3 − 24
High−level Instructions F7 (MV2) P7 (PMV2) Two 16-bit data move Copies two 16-bit data to the specified 32-bit area. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P7 (PMV2)” is not available.
High−level Instructions Description The two 16-bit data or two 16-bit equivalent constant specified by S1 and S2 is copied to the 32-bit area specified by D when the trigger turns on. Related instruction To copy three 16-bit data, use the F190 (MV3) instruction. Flag conditions ・Error flag (R9007): ・Error flag (R9008): 3 − 26 Turns on and stays on when the area specified using the index modifier exceeds the limit.
High−level Instructions F8 (DMV2) P8 (PDMV2) Two 32-bit data move Copies two 32-bit data to the specified 64-bit area. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P8 (PDMV2)” is not available.
High−level Instructions Description The two 32-bit data or two 32-bit equivalent constant specified by S1 and S2 is copied to the 64-bit area (D+3, D+2, D+1 and D) specified by D when the trigger turns on. Related instruction To copy three 32-bit data, use the F191 (DMV3) instruction. Flag conditions ・Error flag (R9007): ・Error flag (R9008): 3 − 28 Turns on and stays on when the area specified using the index modifier exceeds the limit.
High−level Instructions F10 (BKMV) P10 (PBKMV) Block move Copies block data to the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instructions are not available.
High−level Instructions Explanation of example The data of data register “DT0 to DT3” is copied to the data registers “DT10 to DT13” when trigger R0 turns on.
High−level Instructions F11 (COPY) P11 (PCOPY) Block copy Copies the specified 16-bit data to a block with one or more 16-bit areas. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instructions are not available.
High−level Instructions Explanation of example The contents of data register DT0 are copied to the block ranging from data register DT10 to DT14 when trigger R0 turns on.
High−level Instructions FP0/FP−e F12 (ICRD) Availability Data read from EEPROM FP0/FP−e Reads data from the EEPROM area.
High−level Instructions FP0/FP−e Description S2 blocks of data stored in the EEPROM starting from S1 are transferred into the data register specified by D. At this time, the transferred data is handled in units of 1 block/64 words.
High−level Instructions FPΣ/FP−X/FP0R Availability F12 (ICRD) Data read from F–ROM FPΣ/FP−X/FP0R Reads data from the F–ROM area.
High−level Instructions FPΣ/FP−X/FP0R Description S2 blocks of data stored in the F–ROM starting from S1 are transferred into the data register specified by D. At this time, the transferred data is handled in units of 1 block (2,048 words).
High−level Instructions FP2SH/FP10SH F12 (ICRD) P12 (PICRD) Data read from IC card Availability FP2SH/FP10SH Reads data from the expansion memory area of the IC card.
High−level Instructions FP2SH/FP10SH Description S2 words of data stored in the IC card expansion memory area starting from S1 are transferred into the CPU memory location specified by D. Precautions during programming The values available for S1 and S2 vary depending on the size of the IC card expansion memory area.
High−level Instructions FP0/FP−e P13 (PICWT) Step Data write to EEPROM Availability 11 FP0 V2.0 or more/FP−e Writes data to the EEPROM area. Outline Program example Boolean Non-ladder Ladder Diagram Address Trigger R0 10 P13 PICWT , DT 0 , K10 , S2 S1 Instruction 10 ST R 11 P 13 (PICWT) 0 DT K0 D 0 K 10 K 0 This instruction is a differential execution type (P type) of instruction, and should be specified with a “P” in front of the instruction number.
High−level Instructions FP0/FP−e Description S2 blocks of data stored in the data register starting from S1 are transferred into the EEPROM area specified by D. At this time, the transferred data is handled in units of 1 block/64 words.
High−level Instructions FPΣ/FP−X/FP0R P13 (PICWT) Availability Data write to F–ROM FPΣ/FP−X/FP0R Writes data to the F–ROM area. Outline Program example Boolean Non-ladder Ladder Diagram Address Trigger 10 R0 P13 PICWT , DT 0 , S1 K1 , 10 ST R 11 P 13 (PICWT) K0 S2 Instruction D 0 DT 0 K 1 K 0 This instruction is a differential execution type (P type) of instruction, and should be specified with a “P” in front of the instruction number.
High−level Instructions FPΣ/FP−X/FP0R Description S2 block of data stored in the data register starting from S1 is transferred into the F–ROM area specified by D. At this time, the transferred data is handled in units of 1 block (2,048 words).
High−level Instructions FP2SH/FP10SH F13 (ICWT) P13 (PICWT) Availability Data write to IC card FP2SH/FP10SH Outline Writes data to the expansion memory area in the IC card.
High−level Instructions FP2SH/FP10SH Description S2 words of data stored in the CPU starting from S1 are transferred into the expansion memory area in the IC card specified by D. The F13 (ICWT)/P13 (PICWT) instruction can be executed only in the expansion memory area of an SRAM−type IC card. Precautions during programming The values available for D vary depending on the size of expansion memory area in the IC card.
High−level Instructions F14 (PGRD) P14 (PPGRD) Program read from IC card Outline Reads a program from the IC card and executes it. Program example Boolean Non-ladder Ladder Diagram Address Trigger 10 R0 Instruction 10 ST 11 F 14 F14 PGRD , DT 100 R DT 0 (PGRD) 100 S Starting 16-bit area (max. 4 words of data) for storing file name (max. 8 letters) in the ASCII format.
High−level Instructions Description The program for the file name stored in the area specified by S is read from the IC memory card, and is substituted for the program currently being executed. Subsequent operation is carried out based on the program which was read. Precautions when changing programs Programs are changed when the ED instruction is executed. At that point, the mode changes automatically from the RUN mode to the PROG. mode. All output goes off.
High−level Instructions Specifying file names The program file name should be replaced with a character code, and written to the memory area that has S as the first address. ASCII codes can be used. No extension should be attached. A single−byte numerical value H00 is the final code. If ”H00” is written at the end of the file name (the MSB), the characters up to that point area treated as the file name. If all 8 characters are specified for the file name, no final code is necessary.
High−level Instructions Specifying a file name with the ASCII conversion instruction, and converting it The file name is converted to a character code using the ASCII conversion instruction “F95 (ASC)”, and is written to a specified memory area. − Programming can only be done with the programming tool software. − When the ASCII conversion instruction is executed, the results are stored in a 6−word (12−character) memory area. The specification should be made as follows.
High−level Instructions F15 (XCH) P15 (PXCH) 16-bit data exchange Exchanges two 16-bit data items. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P15 (PXCH)” is not available.
High−level Instructions Explanation of example The contents of data register DT10 and data register DT22 are exchanged when trigger R0 turns on. [D1] DT10 DT11 DT12 DT13 K 10 20 11 12 13 DT20 DT21 DT22 DT23 K K K K K K K 21 22 23 DT14 K 14 DT24 K 24 R0: on [D2] “F15 (XCH)” execution [D1] DT10 DT11 DT12 DT13 K K K K 22 11 12 13 DT20 DT21 DT22 DT23 K K K K 20 21 10 23 DT14 K 14 DT24 K 24 [D2] Description The contents in the 16-bit areas specified by D1 and D2 are exchanged.
High−level Instructions F16 (DXCH) P16 (PDXCH) 32-bit data exchange Exchanges two 32-bit data items. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instructions are not available.
High−level Instructions Explanation of example The contents of data registers DT11 and DT10 and data registers DT23 and DT22 are exchanged when trigger R0 turns on. [D1] DT10 DT11 DT12 DT13 H 0 H FFFD 25AC H H F23 R0: on [D1] DT10 DT11 DT12 DT13 H 9ABC H H DEF1 25AC H F23 DT20 DT21 DT22 DT23 H H H H 1234 5678 9ABC [D2] DEF1 “F16 (DXCH)” execution DT20 DT21 DT22 DT23 H H H H 1234 5678 0 [D2] FFFD Description The contents in the 32-bit areas specified by D1 and D2 are exchanged.
High−level Instructions F17 (SWAP) P17(PSWAP) Higher/lower byte in 16-bit data exchange Exchanges higher and lower order bytes of the specified 16-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instructions are not available.
High−level Instructions Description The higher order byte (higher 8-bit) and lower order byte (lower 8-bit) of the 16-bit area specified by D are exchanged. Flag conditions ・Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit. ・Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit.
High−level Instructions F18 (BXCH) P18(PBXCH) 16-bit blocked data exchange Exchanges the 16-bit blocked data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P18 (PBXCH)” is not available.
High−level Instructions Explanation of example The data block from data register DT10 to data register DT13 and the data block (DT31 to DT34) starting from data register DT31 are exchanged when trigger R0 turns on.
High−level Instructions F19 (SJP) LBL Auxiliary jump Label Skips to the LBL instruction with the same number as the data area specified by the F19 (SJP) instruction.
High−level Instructions Description The F19 (SJP) instruction skips the program between the F19 (SJP) and the LBL with the number specified by S when the trigger turns on. Program execution continues from the next instruction after the jump destination label. Up to 256 jump destinations can be specified (the range of values in which S can be stored is from K0 to K255). LBL instructions are specified as destinations of JP, LOOP and F19 (SJP) instructions.
High−level Instructions F20 (+) P20 (P+) 16-bit data addition [D+S → D] Adds two 16-bit data items. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P20 (P+)” is not available.
High−level Instructions Description The 16-bit equivalent constant or 16-bit area specified by S and the 16-bit area specified by D are added together. Augend data (D) Addend data + Trigger turns on (S) Result (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow or underflow will result. Under normal circumstances, do not allow an overflow or underflow to occur.
High−level Instructions F21(D+) P21(PD+) 32-bit data addition [(D+1, D) + (S+1, S) → (D+1, D)] Adds two 32-bit data items. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P21 (PD+)” is not available.
High−level Instructions Explanation of example The contents (32 bits) of data registers DT11 and DT10 and the contents (32 bits) of data registers DT1 and DT0 are added together when trigger R0 turns on. Higher 16 bits Lower 16 bits Contents of DT11 Contents of DT10 (Addition) Contents of DT1 Contents of DT0 The specified data area and the following data area are handled together as 32−bit data. (Result is stored.
High−level Instructions F22 (+) P22 (P+) 16-bit data addition [S1 + S2 → D] Adds two 16-bit data items and stores the result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P22 (P+)” is not available.
High−level Instructions Explanation of example The contents of data registers DT10 and DT20 are added when trigger R0 turns on. The added result is stored in data register DT30. when the decimal number 8 is in DT10 and the decimal number 4 is in DT20, as shown below.
High−level Instructions F23 (D+) P23 (PD+) 32-bit data addition [(S1+1, S1) + (S2+1, S2) → (D+1, D)] Adds two 32-bit data items and stores the result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P23 (PD+)” is not available.
High−level Instructions Explanation of example The contents of data registers DT11 and DT10 and the contents of data registers DT21 and DT20 are added when trigger R0 turns on. The added result is stored in data registers DT31 and DT30. Higher 16 bits Lower 16 bits Contents of DT10 Contents of DT11 (Addition) Contents of DT21 The specified data area and the following data area are handled together as 32−bit data. Contents of DT20 (Result is stored.
High−level Instructions F25 (−) P25 (P−) 16-bit data subtraction [D − S → D] Subtracts 16-bit data from the minuend. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P25 (P−)” is not available.
High−level Instructions Example 2: When the decimal number 3 is in DT20 and the decimal number 5 is in DT10. DT20 D: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 K3 (Subtraction) S: − DT10 K5 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 = D: DT20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 K−2 Description Subtracts the 16-bit equivalent constant or 16-bit area specified by S from the 16-bit area specified by D.
High−level Instructions F26 (D−) P26 (PD−) 32-bit data subtraction [(D+1, D) − (S+1, S) → (D+1, D)] Subtracts 32-bit data from the minuend. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P26 (PD−)” is not available.
High−level Instructions Explanation of example Subtracts the contents (32 bits) of data registers DT11 and DT10 from the contents (32 bits) of data registers DT21 and DT20 when trigger R0 turns on. Higher 16 bits Lower 16 bits Contents of DT20 Contents of DT21 (Subtraction) Contents of DT11 The specified data area and the following data area are handled together as 32−bit data. Contents of DT10 (Result is stored.
High−level Instructions F27 (−) P27 (P−) 16-bit data subtraction [S1 − S2 → D] Subtracts 16-bit data from the minuend and stores the result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P27 (P−)” is not available.
High−level Instructions Explanation of example Subtracts the contents of data register DT20 from the contents of data register DT10 when trigger R0 turns on. The subtracted result is stored in data register DT30. Example 1: When the decimal number 16 is in DT10 and the decimal number 4 is in DT20.
High−level Instructions F28 (D−) P28 (PD−) 32-bit data subtraction [(S1+1, S1) − (S2+1, S2) → (D+1, D)] Subtracts 32-bit data from the minuend and stores the result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P28 (PD−)” is not available.
High−level Instructions Explanation of example Subtracts the contents of data registers DT21 and DT20 from the contents of data registers DT11 and DT10 when trigger R0 turns on. The subtracted result is stored in data registers DT31 and DT30. Higher 16 bits Contents of DT11 Contents of DT21 Lower 16 bits Contents of DT10 (Subtraction) The specified data area and the following data area are handled together as 32−bit data. Contents of DT20 (Result is stored.
High−level Instructions F30 (*) P30 (P*) 16-bit data multiplication [S1 × S2 → (D+1, D)] Multiplies two 16-bit data items. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instructions are not available.
High−level Instructions Explanation of example Multiplies the contents of data register DT10 and DT20 when trigger R0 turns on. The result is stored in data registers DT 31 and DT 30. When the decimal number 8 is in DT10 and the decimal number 2 is in DT20.
High−level Instructions F31 (D*) P31 (PD*) 32-bit data multiplication [(S1+1, S1) × (S2+1, S2) → (D+3, D+2, D+1, D)] Multiplies two 32-bit data items. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instructions are not available.
High−level Instructions Description Multiplies the 32-bit data or 32-bit equivalent constant specified by S1 and the one specified by S2. The multiplied result is stored in D+3, D+2, D+1 and D. Multiplicand data (S1+1, S1) Multiplier data Result (S2+1, S2) (D+3, D+2, D+1, D) × The multiplied result is stored in the 64-bit area. When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the lower 16-bit areas (S1, S2) are specified.
High−level Instructions F32 (%) P32 (P%) 16-bit data division [S1/S2 → D… (DT9015/DT90015)] Divides 16-bit data by the divisor. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instructions are not available.
High−level Instructions Explanation of example Divides the contents of data register DT10 by decimal constant DT20 when trigger R0 turns on. The quotient is stored in data register DT30 and the remainder is stored in special data register DT9015/DT90015. When the decimal number 15 is in DT10 and the decimal number 4 is in DT20, as shown below.
High−level Instructions F33 (D%) P33 (PD%) 32-bit data division [(S1+1, S1)/(S2+1, S2) → (D+1, D)…(DT9016, DT9015)/ (DT90016, DT90015)] Divides 32-bit data by the divisor. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P33 (PD%)” is not available.
High−level Instructions Explanation of example Higher 16 bits Lower 16 bits Contents of DT11 Contents of DT10 ÷ (Division) Contents of DT21 Contents of DT20 ← Quotient is stored in DT31 and DT30. To DT31 To DT30 ← The lower 16 bits of the remainder is stored in DT9015/DT90015 and the higher 16 bits of the remainder is stored in DT9016/DT90016.
High−level Instructions F34 (*W) P34 (P*W) 16-bit data multiplication (result in 16 bits) Multiplies two 16-bit data items and stores the result in the specified 16-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P34 (P*W)” is not available.
High−level Instructions Description Multiplies the 16-bit data or 16-bit equivalent constant specified by S1 and the 16-bit data or 16-bit equivalent constant specified by S2 when the trigger turns on. The multiplied result is stored in D (16-bit area). Multiplicand data S1 Multiplier data × Trigger turns on S2 Result D The multiplied result is stored in the 16-bit area.
High−level Instructions F35 (+1) P35 (P+1) 16-bit data increment [D + 1 → D] Adds 1 to 16-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P35 (P+1)” is not available.
High−level Instructions Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If the operation result accidentally overflows, use of the F36 (D+1) instruction (32-bit data increment) is recommended. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.
High−level Instructions F36 (D+1) P36 (PD+1) 32-bit data increment [(D + 1, D) + 1 → (D + 1, D)] Adds 1 to 32-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P36 (PD+1)” is not available.
High−level Instructions Description Adds 1 to the 32-bit data specified by D. The result is stored in D+1 and D. Original data (D+1, D) Result + 1 (D+1, D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.
High−level Instructions F37 (−1) P37 (P−1) 16-bit data decrement [D − 1 → D] Subtracts 1 from 16-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instructions are not available.
High−level Instructions Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If the operation result accidentally underflows, use of the F38 (D−1) instruction (32-bit data decrement) is recommended. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.
High−level Instructions F38 (D−1) P38 (PD−1) 32-bit data decrement [(D+1, D) − 1 → (D+1, D)] Subtracts 1 from 32-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P38 (PD−1)” is not available.
High−level Instructions Description Subtracts 1 from the 32-bit data specified by D. The result is stored in D+1 and D. Original data (D+1, D) Result − 1 (D+1, D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.
High−level Instructions F39 (D*D) P39 (PD*D) 32-bit data multiplication (result in 32 bits) Multiplies two 32-bit data items and stores the result in the specified 32-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P39 (PD*D)” is not available.
High−level Instructions Description Multiplies the 32-bit data or 32-bit equivalent constant specified by S1 and the one specified by S2 when the trigger turns on. The multiplied result is stored in D+1 and D (32-bit area). Multiplicand data Multiplier data S1: lower 16-bit S1+1: higher 16-bit S2: lower 16-bit S2+1: higher 16-bit × Trigger turns on Result (32-bit) D D+1 The multiplied result is stored in the 32-bit area (2 words).
High−level Instructions F40 (B+) P40 (PB+) 4-digit BCD data addition [D + S → D] Adds two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P40 (PB+)” is not available.
High−level Instructions Explanation of example The contents of data register DT10 and data register DT1 are added together when trigger R0 turns on. When H4 (BCD)is in DT1 and H8 (BCD) is in DT10, as shown below.
High−level Instructions F41 (DB+) P41 (PDB+) 8-digit BCD data addition [(D+1, D) + (S+1, S) → (D+1, D)] Adds two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P41 (PDB+)” is not available.
High−level Instructions Explanation of example The contents of data registers DT11 and DT10 and the contents of data registers DT1 and DT0 are added together when trigger R0 turns on. Higher 16 bits Lower 16 bits Contents of DT11 Contents of DT10 (Addition) Contents of DT1 Contents of DT0 The specified data area and the following data area are handled together as 32−bit data. (Result is stored.
High−level Instructions F42 (B+) P42 (PB+) 4-digit BCD data addition [S1 + S2 → D] Adds two BCD data items that express 4-digit decimal numbers (4-digit BCD H codes) and stores the result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P42 (PB+)” is not available.
High−level Instructions Explanation of example The contents of data register DT10 and data register DT20 are added together when trigger R0 turns on. The added result is stored in data register DT30. When H (BCD) 8 is in DT10 and H (BCD) 4 is in DT20, as shown below.
High−level Instructions F43 (DB+) P43 (PDB+) 8-digit BCD data addition [(S1+1, S1) + (S2+1, S2) → (D+1, D)] Adds two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes) and stores the result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P43 (PDB+)” is not available.
High−level Instructions Explanation of example The contents of data registers DT11 and DT10 and the contents of data registers DT21 and DT20 are added together when trigger R0 turns on. The added result is stored in data registers DT31 and DT30. Higher 16 bits Contents of DT11 Lower 16 bits The specified data area and the following data area are handled together as 32−bit data. Contents of DT10 (Addition) Contents of DT21 Contents of DT20 (Result is stored.
High−level Instructions F45 (B−) P45 (PB−) 4-digit BCD data subtraction [D − S → D] Subtracts one BCD data item that expresses a 4-digit decimal number (4-digit BCD H codes) from another (minuend). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P45 (PB−)” is not available.
High−level Instructions Description Subtracts the 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by S from the 16-bit area for 4-digit BCD data specified by D. Minuend data (D) Subtrahend data − (S) Result (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur.
High−level Instructions F46 (DB−) P46 (PDB−) 8-digit BCD data subtraction [(D+1, D) − (S+1, S) → (D+1, D)] Subtracts one BCD data item that expresses an 8-digit decimal number (8-digit BCD H code) from another (minuend). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P46 (PDB−)” is not available.
High−level Instructions Explanation of example Subtracts the contents of data registers DT11 and DT10 from the contents of data registers DT21 and DT20 when trigger R0 turns on. Higher 16 bits Contents of DT21 Lower 16 bits The specified data area and the following data area are handled together as 32−bit data. Contents of DT20 (Subtraction) Contents of DT11 Contents of DT10 (Result is stored.
High−level Instructions F47 (B−) P47 (PB−) 4-digit BCD data subtraction [S1 − S2 → D] Subtracts one BCD data item that expresses a 4-digit decimal number (4-digit BCD H code) from another (minuend) and stores the result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P47 (PB−)” is not available.
High−level Instructions Explanation of example Subtracts the contents of data register DT20 from the contents of data register DT10 when trigger R0 turns on. The subtracted result is stored in data register DT30. When H (BCD) 16 is in DT10 and H (BCD) 4 is in DT20, as shown below.
High−level Instructions F48 (DB−) P48 (PDB−) 8-digit BCD data subtraction [(S1+1, S1) − (S2+1, S2) → (D+1, D)] Subtracts one BCD data item that expresses an 8-digit decimal number (8-digit BCD H code) from another (minuend) and stores the result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P48 (PDB−)” is not available.
High−level Instructions Explanation of example Subtracts the contents of data registers DT21 and DT20 from the contents of data registers DT11 and DT10 when trigger R0 turns on. The subtracted result is stored in data registers DT31 and DT30. Higher 16 bits Contents of DT11 Contents of DT21 Lower 16 bits The specified data area and the following data area are handled together as 32−bit data. Contents of DT10 (Subtraction) Contents of DT20 (Result is stored.
High−level Instructions F50 (B*) P50 (PB*) 4-digit BCD data multiplication [S1 × S2 → (D+1, D)] Multiplies two BCD data items that express 4-digit decimal numbers (4-digit BCD H codes). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P50 (PB*)” is not available.
High−level Instructions Explanation of example When H (BCD) 8 is in DT10 and H (BCD) 2 is in DT20, as shown below.
High−level Instructions F51 (DB*) P51 (PDB*) 8-digit BCD data multiplication [(S1+1, S1) × (S2+1, S2) → (D+3, D+2, D+1, D)] Multiplies two BCD data items that express 8-digit decimal numbers (8-digit BCD H codes). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P51 (PDB*)” is not available.
High−level Instructions Explanation of example 16 bits 16 bits Contents of DT11 Contents of DT10 16 bits 16 bits Contents of DT21 16 bits 16 bits 16 bits Store to DT33 Store to DT32 The specified data area and the following data area are handled together as 32−bit data. Contents of DT20 16 bits ← The 64 bits of multiplication result are stored in order in DT30 to DT33 beginning from the lowest Store to DT31 Store to DT30 16 bits.
High−level Instructions F52 (B%) P52 (PB%) 4-digit BCD data division [S1/S2 → D… (DT9015) or (DT90015)] Divides one BCD data item that expresses a 4-digit decimal number (4-digit BCD H code) by another (divisor). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P52 (PB%)” is not available.
High−level Instructions Explanation of example Divides the contents of data register DT10 by the contents of data register DT20 when trigger R0 turns on. The quotient is stored in data register DT30 and the remainder is stored in special data register DT9015 (DT90015 for FP2/FP2SH/FP10SH). When H (BCD) 15 is in DT10 and H (BCD) 4 is in DT20, as shown below.
High−level Instructions F53 (DB%) P53 (PDB%) 8-digit BCD data division [(S1+1, S1)/(S2+1, S2) → (D+1, D)… (DT9016, DT9015) or (DT90016, DT90015)] Divides one BCD data item that expresses an 8-digit decimal number (8-digit BCD H code) by another (divisor). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P53 (PDB%)” is not available.
High−level Instructions Explanation of example Higher 16 bits Lower 16 bits Contents of DT11 Contents of DT10 ÷ (Division) Contents of DT21 Contents of DT20 ← Quotient is stored in DT31 and DT30. To DT31 To DT30 ← The lower 16 bits of the remainder is stored in DT9015/DT90015 and the higher 16 bits of the remainder is stored in DT9016/DT90016.
High−level Instructions F55 (B+1) P55 (PB+1) 4-digit BCD data increment [D + 1 → D] Adds 1 to BCD data that expresses a 4-digit decimal number (4-digit BCD H code). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P55 (PB+1)” is not available.
High−level Instructions Description Adds 1 to the 4-digit BCD data specified by D. The result is stored in D. Original data (D) Result + 1 (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If the calculated result accidentally overflows, use of the F56 (DB+1) instruction (8-digit BCD data increment) is recommended.
High−level Instructions F56 (DB+1) P56 (PDB+1) 8-digit BCD data increment [(D+1, D) + 1 → (D+1, D)] Adds 1 to BCD data that expresses an 8-digit decimal number (8-digit BCD H code). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P56 (PDB+1)” is not available.
High−level Instructions Description Adds 1 to the 8-digit BCD data specified by D. The result is stored in D+1 and D. Original data (D+1, D) Result + 1 (D+1, D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an overflow will result. Under normal circumstances, do not allow an overflow to occur. If an overflow occurs, the carry flag (special internal relay R9009) will turn on.
High−level Instructions F57 (B−1) P57 (PB−1) Outline 4-digit BCD data decrement [D − 1 → D] Subtracts 1 from BCD data that expresses a 4-digit decimal number (4-digit BCD H code). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P57 (PB−1)” is not available.
High−level Instructions Description Subtracts 1 from the 4-digit BCD data specified by D. The result is stored in D. Original data (D) Result − 1 (D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur.
High−level Instructions F58 (DB−1) P58 (PDB−1) 8-digit BCD data decrement [(D+1, D) − 1 → (D+1, D)] Subtracts 1 from BCD data that expresses an 8-digit decimal number (8-digit BCD H code). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P58 (PDB−1)” is not available.
High−level Instructions Description Subtracts 1 from the 8-digit BCD data specified by D. The result is stored in D+1 and D. Original data (D+1, D) Result − 1 (D+1, D) Precautions during programming If the result of an arithmetic operation instruction does not fall within the range of values which can be handled, an underflow will result. Under normal circumstances, do not allow an underflow to occur. If an underflow occurs, the carry flag (special internal relay R9009) will turn on.
High−level Instructions F60 (CMP) P60 (PCMP) 16-bit data comparison The two specified 16−bit data are compared and the result is output to the special internal relay. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P60 (PCMP)” is not available.
High−level Instructions Explanation of example Compares decimal constant K100 with the contents of data register DT0 when trigger R0 turns on. When DT0 > K100, R900A turns on and external output relay Y10 turns on. When DT0 = K100, R900B turns on and external output relay Y11 turns on. When DT0 < K100, R900C turns on and external output relay Y12 turns on. Description Compares the 16-bit data specified by S1 with that specified by S2.
High−level Instructions Precautions when using two or more comparison instructions The comparison instruction flags R900A to R900C are updated with each execution of the comparison instruction. If you use two or more comparison instructions in your program, be sure to use the flags immediately after each comparison instruction, by employing output relays or internal relays. Example: Compares DT0 with K100, and DT1 with K200.
High−level Instructions Precautions when comparing BCD or external data When comparing special data, such as BCD or unsigned binary (0 to FFFF), construct your program as shown in the program example below, using special internal relays R900B and R9009. Example: Compares BCD data in DT0 and DT1. R0 R0 F60 CMP, DT 0, DT 1 R9009 R1 R0 R900B R2 R0 R900B R9009 R3 1 ....When DT0 < DT1, internal relay R1 turns on 2 ....When DT0 = DT1, internal relay R2 turns on 3 ....
High−level Instructions F61 (DCMP) P61 (PDCMP) 32-bit data comparison The two specified 32−bit data are compared and the result is output to the special internal relay. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P61 (PDCMP)” is not available.
High−level Instructions Explanation of example Compares the content (32−bit data) of data registers DT11 and DT10 with the content (32−bit data) of data registers DT1 and DT0 when trigger R0 turns on. When (DT1 and DT0) > (DT11 and DT10), R900A turns on and external output relay Y10 turns on. When (DT1 and DT0) = (DT11 and DT10), R900B turns on and external output relay Y11 turns on. When (DT1 and DT0) < (DT11 and DT10), R900C turns on and external output relay Y12 turns on.
High−level Instructions Precautions when using two or more comparison instructions The comparison instruction flags R900A to R900C are updated with each execution of the comparison instruction. If you use two or more comparison instructions in your program, be sure to use the flags immediately after each comparison instruction, by employing output relays or internal relays. Example: Compares DT1 and DT0 with DT11 and DT10, and DT3 and DT2 with DT21 and DT20.
High−level Instructions Precautions when comparing BCD or external data When comparing special data, such as BCD or unsigned binary (0 to FFFFFFFF), flags R9009, R900A, R900B, and R900C work as shown in the table below. In this case, construct your program as shown in the program example below, using special internal relays R900B and R9009. Example: Compares BCD data in (DT1, DT0) and (DT11, DT10). R0 R0 F61 DCMP, DT 0, DT 10 R9009 R1 R0 R900B R2 R0 R900B R9009 R3 e)....
High−level Instructions F62 (WIN) P62 (PWIN) 16-bit data band comparison Compares one 16-bit data item with the data band specified by two other 16-bit data items and the comparison result is output to the special internal relay. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P62 (PWIN)” is not available.
High−level Instructions Explanation of example Compares the contents of data register DT10 with the contents of data register DT20 (lower limit of the data band) and data register DT30 (upper limit of the data band) when trigger R0 turns on. Example: When K−500 is in DT20 and K500 is in DT30, as shown below. R900A : on +500 R900B : on R900C : on −500 When DT10 is K−680, R900C turns on and external output relay Y12 goes on. When DT10 is K−500, R900B turns on and external output relay Y11 goes on.
High−level Instructions F63 (DWIN) P63 (PDWIN) 32-bit data band comparison Compares one 32-bit data item with the data band specified by two other 32-bit data items and the comparison result is output to the special internal relay. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P63 (PDWIN)” is not available.
High−level Instructions Explanation of example Compares the contents of data registers DT11 and DT10 with the contents of data registers DT21 and DT20 (lower limit of the data band) and data registers DT31 and DT30 (upper limit of the data band), when trigger R0 turns on. Example: When K−50000 is in DT21 and DT20 and K50000 is in DT31 and DT30, as shown below. R900A : on +50000 R900B : on R900C : on −50000 When (DT11, DT10) is K−68000, R900C turns on and external output relay Y12 goes on.
High−level Instructions F64 (BCMP) P64 (PBCMP) Block data comparison Compares one specified data block with another in byte units. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P64 (PBCMP)” is not available.
High−level Instructions Explanation of example Compares the data block of data register DT10 (4 bytes from DT10 lower order byte) with data register DT20 (4 bytes from DT20 higher order byte) according to the comparison condition in data register DT0 when trigger R0 turns on. When the contents of the two data blocks are the same, internal relay R1 turns on. If H1004 is entered in DT0, the two blocks are as follows.
High−level Instructions Flag conditions ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − The data specified by S1 is not BCD data. − The specified data block area exceeds the limit. * For FP2SH and EP10SH, the error flag (R9007) turns on only when these operation errors occurs.
High−level Instructions 3 − 142
High−level Instructions F65 (WAN) P65 (PWAN) 16-bit data AND Performs bit-wise AND operation on two 16-bit data items. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P65 (PWAN)” is not available.
High−level Instructions Description Performs AND operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. The AND operation result is stored in the 16-bit area specified by D. (S1) (S2) → (D) You can use this instruction to turn off certain bits of the 16-bit data. AND operation The AND operation is shown below.
High−level Instructions F66 (WOR) P66 (PWOR) 16-bit data OR Performs bit-wise OR operation on two 16-bit data items. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P66 (PWOR)” is not available.
High−level Instructions Description Performs OR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. The OR operation result is stored in the 16-bit area specified by D. (S1) (S2) → (D) You can use this instruction to turn on certain bits of the 16-bit data. OR operation The OR operation is shown below.
High−level Instructions F67 (XOR) P67 (PXOR) 16-bit data exclusive OR Performs bit-wise exclusive OR operation on two 16-bit data items. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P67 (PXOR)” is not available.
High−level Instructions Description Performs exclusive OR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. The exclusive OR operation result is stored in the 16-bit area specified by D. {(S1) (S2)} {(S1) (S2)} → (D) Detects the bits whose on and off states do not match. If the values of S1 and S2 are equal, all the bits of the data specified by D become 0. Exclusive OR operation The exclusive OR operation is shown below.
High−level Instructions F68 (XNR) P68 (PXNR) 16-bit data exclusive NOR Performs bit-wise exclusive NOR operation on two 16-bit data items. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P68 (PXNR)” is not available.
High−level Instructions Description Performs exclusive NOR operation on each bit in the 16-bit equivalent constant or 16-bit data specified by S1 and S2. The exclusive NOR operation result is stored in the 16-bit area specified by D. {(S1) (S2)} {(S1) (S2)} → (D) Detects the bits whose on and off states match. If the values of S1 and S2 are equal, all the bits of the data specified by D become 1. Exclusive NOR operation The exclusive NOR operation is shown below.
High−level Instructions F69 (WUNI) P69 (PWUNI) 16-bit data unite Unites two 16-bit data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P69 (PWUNI)” is not available.
High−level Instructions Description The two groups of word data specified by S1 and S2 are combined by bit unit processing using the mask data specified by S3 and stored in the area specified by D. (S1 S3) (S2 S3) → (D) When S3 is H0, the contents of S2 stored in the D. When S3 is HFFFF, the contents of S1 stored in the D. Flag conditions ・Error flag (R9007): ・Error flag (R9008): ・= flag (R900B): 3 − 152 Turns on and stays on when the area specified using the index modifier exceeds the limit.
High−level Instructions F70 (BCC) P70 (PBCC) Block check code calculation Calculates Block Check Code (BCC). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P70 (PBCC)” is not available.
High−level Instructions Description Creates Block Check Code (BCC) from the starting position for the calculation specified by “S1” and “S2” using the calculation method specified by “S1”, and stores the result at the position specified by “D” and “S1” according to the conversion method specified by “S1”. H BCC calculation method 0: Addition 1: Subtraction 2: Exclusive OR operation A: CRC−16 Note 2) Starting byte position for calculation (No.
High−level Instructions Application example 1 In this example, the block check code of the message being sent, ”%01#RCSX0000”, is calculated and is added after the message. Transmission is done using ASCII codes. BCC is calculated as an exclusive logical OR. The message should be stored in the memory area as shown below.
High−level Instructions How to calculate the Block Check Code (BCC) Exclusive ORing calculates the Block Check Code (BCC) with each ASCII character.
High−level Instructions Application example 2 In this example, the block check code of the message being sent, ”%01#RCSX0000”, is calculated and is added at the end of the message.
High−level Instructions F71 (HEXA) P71 (PHEXA) Hexadecimal data → ASCII code Converts 16-bit data to ASCII code that expresses the equivalent hexadecimals. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P71 (PHEXA)” is not available.
High−level Instructions Explanation of example Converts 2 bytes of data stored in data register DT0 to ASCII codes that express the equivalent hexadecimals when trigger R0 turns on. The converted data is stored in data registers DT11 and DT10.
High−level Instructions Conversion example The following shows conversion of hexadecimal data to ASCII codes.
High−level Instructions F72 (AHEX) P72 (PAHEX) ASCII code → Hexadecimal data Converts ASCII code that expresses hexadecimal characters to hexadecimal data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P72 (PAHEX)” is not available.
High−level Instructions Explanation of example Converts 4 ASCII codes stored in data registers DT0 and DT1 to hexadecimal numbers when trigger R0 turns on. The converted data is stored in data register DT40.
High−level Instructions Conversion Example The following shows conversion of ASCII codes to hexadecimal data.
High−level Instructions The converted results are stored in byte units. If an odd number of characters is being converted, “0” will be entered for bit position 0 to 3 of the final data (byte) of the converted results. Converted result ASCII code 44 Converted result n n n−1 0 n−2 n−1 n−2 This position is filled with “0”.
High−level Instructions F73 (BCDA) P73 (PBCDA) BCD data → ASCII code Converts BCD code to ASCII code that expresses the equivalent decimals. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P73 (PBCDA)” is not available.
High−level Instructions Explanation of example Converts BCD code that express a 4-digit decimal number (4-digit BCD H code) stored in data register DT0 to ASCII code when trigger R0 turns on. The converted data is stored in data registers DT10 and DT11.
High−level Instructions How to specify S2 S2 = H 00 Number of bytes for BCD data H1: 1 byte (BCD code that expresses a 2-digit decimal) H2: 2 bytes (BCD code that expresses a 4-digit decimal) H3: 3 bytes (BCD code that expresses a 6-digit decimal) H4: 4 bytes (BCD code that expresses a 8-digit decimal) Direction of converted data H0: Normal direction H1: Reverse direction Since you can specify source data in byte units, it is possible to convert only the lower byte of S1 to ASCII code.
High−level Instructions Conversion Example The following shows conversion from BCD data to ASCII codes.
High−level Instructions F74 (ABCD) P74 (PABCD) ASCII code → BCD data Converts ASCII code that expresses decimal characters to BCD code. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P74 (PABCD)” is not available.
High−level Instructions Explanation of example Converts ASCII codes stored in data registers DT1 and DT0 to BCD data when trigger R0 turns on. The converted data is stored in data register DT40.
High−level Instructions How to specify S2 S2 = H □ 0 0 □ Number of bytes for ASCII character H1: 1 byte (1 ASCII character) H2: 2 bytes (2 ASCII characters) H3: 3 bytes (3 ASCII characters) H4: 4 bytes (4 ASCII characters) H5: 5 bytes (5 ASCII characters) H6: 6 bytes (6 ASCII characters) H7: 7 bytes (7 ASCII characters) H8: 8 bytes (8 ASCII characters) Direction converted data H0: Normal direction H1: Reverse direction Precautions during programming The data for two ASCII code characters is converted to
High−level Instructions 7 ASCII characters (S2=H1007) ASCII code ASCII HEX code S1+3 S1+2 S1+1 S1 37 36 35 34 33 32 31 7 6 5 4 3 2 1 ASCII character 7 ASCII characters (7 bytes) This position is filled with “0”.
High−level Instructions F75 (BINA) P75 (PBINA) 16-bit binary data → ASCII code Converts 16-bit data to ASCII code that expresses the equivalent decimals. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P75 (PBINA)” is not available.
High−level Instructions Explanation of example Converts the 16-bit data stored in data register DT0 to ASCII codes that express the equivalent decimals when trigger R0 turns on. The converted data is stored in data registers DT52 to DT50.
High−level Instructions Conversion Example The following shows conversion from 16−bit decimal data to ASCII codes.
High−level Instructions Flag conditions Σ Error flag (R9007): Turns on and stays on when: Σ Error flag (R9008): Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − The number of bytes specified by S2 exceeds the area specified by D. − The data specified by S2 is recognized as “0”. − The converted result exceeds the area specified by D. − The number of bytes of converted result exceeds the number of bytes specified by S2.
High−level Instructions F76 (ABIN) P76 (PABIN) ASCII code → 16-bit binary data Converts ASCII code that expresses decimal digits to 16-bit data that expresses the equivalent number. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P76 (PABIN)” is not available.
High−level Instructions Description Converts the ASCII codes that express the decimal digits, starting from the 16-bit area specified by S1 to 16-bit data as specified by S2. The converted result is stored in the area specified by D. S2 specifies the number of source data bytes to be converted using decimal number. (This specification cannot be made with BCD data.) Precautions during programming The ASCII codes being converted should be stored in the direction of the last address in the specified area.
High−level Instructions Example of converting an ASCII code indicating a positive number Example 1: ASCII code S1+2 S1+1 30 30 31 2B 0 0 1 + ASCII code S1 20 20 (Space) (Space) Extra bytes Range specified by S2 Example 2: ASCII code S1+2 S1+1 30 30 31 0 0 1 ASCII code 20 S1 20 20 (Space) (Space) (Space) Extra bytes Range specified by S2 F76 (ABIN) instruction execution Converted result of example 1 or 2 D 00 64 K100 ASCII HEX code to express decimal characters ASCII HEX c
High−level Instructions F77 (DBIA) P77 (PDBIA) 32-bit binary data → ASCII code Converts 32-bit data to ASCII code that expresses the equivalent decimals. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P77 (PDBIA)” is not available.
High−level Instructions Explanation of example Converts the 32-bit data stored in data registers DT1 and DT0 to ASCII code that expresses the equivalent decimals when trigger R0 turns on. The converted data is stored in data registers DT54 to DT50 (10 bytes).
High−level Instructions Conversion Example The following shows conversion from 32−bit decimal format data to ASCII codes.
High−level Instructions F78 (DABI) P78 (PDABI) ASCII code → 32-bit binary data Converts ASCII code that expresses decimal digits to 32-bit data that expresses the equivalent number. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P78 (PDABI)” is not available.
High−level Instructions Description Converts ASCII code that expresses the decimal digits, starting from the 16-bit area specified by S1 to 32-bit data as specified by S2. The converted result is stored in the area starting from the 16-bit area specified by D. S2 specifies the number of bytes used to express the destination data using decimals. Precautions during programming The ASCII codes being converted should be stored in the direction of the last address in the specified area.
High−level Instructions Example of converting an ASCII code indicating a positive number Example 1: ASCII code S1+3 S1+2 S1+1 S1 38 37 36 35 34 33 32 31 7 8 6 5 4 3 2 1 ASCII code Range specified by S2 (8 bytes) Example 2: ASCII code S1+4 S1+3 S1+2 S1+1 S1 38 37 36 35 34 33 32 31 2B 20 8 7 6 5 4 3 2 1 + (Space) ASCII code Extra byte Range specified by S2 (10 bytes) F78 (DABI) instruction execution Converted result of example 1 or 2 D+1 00 BC D 61 4E K12
High−level Instructions F80 (BCD) P80 (PBCD) 16-bit binary data → 4-digit BCD data Converts 16-bit binary data to BCD code the expresses a 4-digit decimal. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P80 (PBCD)” is not available.
High−level Instructions Explanation of example Converts the contents of data register DT10 to BCD code that expresses a 4-digit decimal when trigger R0 turns on. The converted data is stored in data register DT20. If DT10 is 16 using decimal number conversion, the following will be stored in DT20.
High−level Instructions F81 (BIN) P81 (PBIN) 4-digit BCD data → 16-bit binary data Converts BCD code that expresses a 4-digit decimal to 16-bit binary data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P81 (PBIN)” is not available.
High−level Instructions Explanation of example Converts the contents of data register DT10 to 16-bit binary data when trigger R0 turns on. The converted data is stored in data register DT20. If DT10 is BCD data consisting of H15, the following will be stored in DT20.
High−level Instructions F82 (DBCD) P82 (PDBCD) 32-bit binary data → 8-digit BCD data Converts 32-bit binary data to BCD code that expresses an 8-digit decimal. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P82 (PDBCD)” is not available.
High−level Instructions Flag conditions ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − When the range that binary data can be BCD converted is exceeded.
High−level Instructions F83 (DBIN) P83 (PDBIN) 8-digit BCD data → 32-bit binary data Converts BCD code that expresses an 8-digit decimal to 32-bit binary data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P83 (PDBIN)” is not available.
High−level Instructions F84 (INV) P84 (PINV) 16-bit data invert Inverts all bits in the 16-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P84 (PINV)” is not available.
High−level Instructions F85 (NEG) P85 (PNEG) 16-bit data complement of 2 Takes complement of 2 in 16-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P85 (PNEG)” is not available.
High−level Instructions Description Takes two’s complement of 16-bit data specified by D. The two’s complement is obtained by inverting all bits and adding 1 to the inverted result. This instruction is useful for changing the sign of 16-bit data from positive to negative or from negative to positive. Flag conditions ・Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit.
High−level Instructions F86 (DNEG) P86 (PDNEG) 32-bit data complement of 2 Takes complement of 2 in 32-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P86 (PDNEG)” is not available.
High−level Instructions Description Takes two’s complement of 32-bit data specified by D. The two’s complement is obtained by inverting all bits and adding 1 to the inverted result. This instruction is useful for changing the sign of 32-bit data from positive to negative or from negative to positive. Flag conditions ・Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit.
High−level Instructions F87 (ABS) P87 (PABS) 16-bit data absolute value Takes absolute value of signed 16-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P87 (PABS)” is not available.
High−level Instructions F88 (DABS) P88 (PDABS) 32-bit data absolute value Takes absolute value of signed 32-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P88 (PDABS)” is not available.
High−level Instructions F89 (EXT) P89 (PEXT) 16-bit data sign extension Copies the sign bit of the specified 16-bit data to all the bits of the higher 16-bit area (extended 16-bit area). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P89 (PEXT)” is not available.
High−level Instructions Explanation of example Copies the sign bit of data register DT0 to all the bits of data register DT1 when trigger R20 turns on. If K−2 is stored in DT0, the data will be as follows.
High−level Instructions F90 (DECO) P90 (PDECO) Decode Decodes the specified data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P90 (PDECO)” is not available.
High−level Instructions Description Decodes the contents of 16-bit data specified by S according to the contents of n. The decoded result is stored in the area starting from 16-bit area specified by D. The length of the area required to store decoding results changes depending on the length of the data being decoded. How to specify control data “n” n specifies the starting bit position and the number of bits to be decoded using hexadecimal data.
High−level Instructions Relationship between number of bits and occupied data area for decoded result Number of bits to be decoded Data area required for the result Valid bits in the area for the result 1 1-word 2-bit* 2 1-word 4-bit* 3 1-word 4 1-word 16-bit 5 2-word 32-bit 6 4-word 64-bit 7 8-word 128-bit 8 16-word 256-bit 8-bit* * Invalid bits in the data area required for the result are set to “0”.
High−level Instructions Flag conditions ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − The number of bits to be decoded is outside the range of 1 to 8. − The sum of the number of bits to be decoded and the starting bit position to be decoded is outside the range of 1 to 16. − The last data area for the decoded result exceeds the limit.
High−level Instructions F91 (SEGT) P91 (PSEGT) 7-segment decode Converts 16-bit data to 4-digit data for 7-segment indication. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P91 (PSEGT)” is not available.
High−level Instructions Description Converts the 16-bit equivalent constant or 16-bit data specified by S to 4-digit data for 7-segment indication. The converted data is stored in the area starting from the 16-bit area specified by D. The relationship between the displayed contents and the contents specified for S, and the data of the 7−segment display is shown below.
High−level Instructions F92 (ENCO) P92 (PENCO) Encode Encodes the specified data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P92 (PENCO)” is not available.
High−level Instructions Explanation of example Encodes contents of data register DT11 and DT10 according to the n: H5 when trigger R20 turns on. The encoded result is stored in 8 bits of data register DT20 starting from bit position 0. When n: H0005 Number of bits to be encoded: 25 = 32 bits Starting bit position to be encoded for destination data: bit position 0 Source 32 bits specified by H5 The 8th bit of 32-bit data is in the on state.
High−level Instructions How to specify control data “n” n specifies the starting bit position of destination data and the number of bits to be decoded using hexadecimal data.
High−level Instructions Encoded example When encoding 16-bit data (nL=4), the encoded results are shown below.
High−level Instructions F93 (UNIT) P93 (PUNIT) 16-bit data combine Extracts the lower 4 bits (bit positions 0 to 3) of the specified 16-bit areas and combines them into one word. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P93 (PUNIT)” is not available.
High−level Instructions Explanation of example Extracts lower 4 bits of data registers DT12 to DT10, combines the extracted data, and stores it in data register DT20 when trigger R20 turns on. Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 DT10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 DT11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 DT12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 Bit position 15 · DT20 · 12 11 · · 8 7 · · 4 3 · · 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 When the n < K4, “0” is set to bit position 12 to 15.
High−level Instructions F94 (DIST) P94 (PDIST) 16-bit data distribute Divides the specified 16-bit data into four 4-bit units and distributes the divided data into the lower 4 bits of the specified 16-bit areas. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P94 (PDIST)” is not available.
High−level Instructions Explanation of example Divides the 16-bit data of data register DT10 into 4-bit units and the divided data is stored in the lower 4 bits (bit positions 0 to 3) of data registers DT20 to DT23 when trigger R20 turns on.
High−level Instructions F95 (ASC) P95 (PASC) Character → ASCII code Converts character constants to ASCII code. 4 For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P95 (PASC)” is not available. Outline Program example Boolean Ladder Diagram Address Trigger Instruction 10 ST 11 F R20 10 R 95 20 (ASC) M ABC1230_DEF F95 ASC, M ABC1230_DEF, DT 2 DT 2 D S “_” indicates a space. In actuality, this will be blank. S Character constants (max.
High−level Instructions Description Converts the character constants specified by S to ASCII code. The converted ASCII code is stored in 6 words starting from the 16-bit area specified by D. Precautions during programming The character constant M can be input with the programming tool software.
High−level Instructions Flag conditions ・Error flag (R9007): Turns on and stays on when the last area for ASCII code exceeds the limit (6 words: six 16-bit areas). ・Error flag (R9008): Turns on for an instant when the last area for ASCII code exceeds the limit (6 words: six 16-bit areas).
High−level Instructions 3 − 219
High−level Instructions F96 (SRC) P96 (PSRC) 16−bit data search Searches for a specified value in a block of 16-bit areas. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P96 (PSRC)” is not available.
High−level Instructions Explanation of example Searches for the value given in data register DT10 in the block of data register DT20 through DT40 when trigger R0 turns on. For example, to search the area of the value called H1234, “H1234” would be written to DT10.
High−level Instructions F97 (DSRC) P97 (PDSRC) 32-bit data search Searches for a specified value in a block of 32-bit areas. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P97 (PDSRC)” is not available.
High−level Instructions Explanation of example Searches for the value given in data registers DT10 and DT11 in the block of data register DT20 through DT40 when trigger R0 turns on. For example, to search the area of the value called H01234567, “H01234567” would be written to DT10 and DT11.
High−level Instructions F98 (CMPR) P98 (PCMPR) Data table shift−out and compress Shifts out non-zero data stored at the highest address of the table to the specified area and compresses the data in the table to the higher address. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P98 (PCMPR)” is not available.
High−level Instructions Explanation of example If the execution condition (trigger) R0 is on, the contents of data register DT5 are sent to data register DT10. Also, in the range from DT0 to DT5, non−zero contents are stored in sequential order, starting from DT5. The “0 (zero)” is set in the other areas of the data table.
High−level Instructions Application example In combination with the F99 (CMPW)/P99 (PCMPW) instruction, this can be used to construct an optional buffer. (1) Executing the F99 (CMPW)/P99 (PCMPW) instruction When data items are written to the first address of the buffer (the area of the specified range), they are stored and accumulated in the buffer in sequential order. The oldest data will be stored in the last address of the buffer.
High−level Instructions F99 (CMPW) P99 (PCMPW) Data table shift−in and compress Shifts in data to the smallest address of the specified data table and compresses the data in the table toward the higher address. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P99 (PCMPW)” is not available.
High−level Instructions Explanation of example If the execution condition (trigger) R0 is on, the contents of data register DT10 are sent to data register DT0. Also, in the range from DT0 to DT5, non−zero contents are stored in sequential order, starting from DT5. The “0 (zero)” is set in the other areas of the data table.
High−level Instructions Application example In combination with the F98 (CMPR)/P98 (PCMPR) instruction, this can be used to construct an optional buffer. (1) Executing the F99 (CMPW)/P99 (PCMPW) instruction When data items are written to the first address of the buffer (the area of the specified range), they are stored and accumulated in the buffer in sequential order. The oldest data will be stored in the last address of the buffer.
High−level Instructions F100 (SHR) P100 (PSHR) Right shift of multiple bits (n bits) in a 16−bit data Shifts a specified number of bits to the right in bit units. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P100 (PSHR)” is not available.
High−level Instructions Description Shifts n bits of the 16-bit data area specified by D to the right (to the lower bit position). n Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 D The data in the n th bit is transferred to R9009 (carry flag). Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 D The higher n bits of D are filled with 0s. When n bits are shifted to the right, − The higher n bits of the 16-bit data area are filled with 0s.
High−level Instructions F101 (SHL) P101 (PSHL) Left shift of multiple bits (n bits) in a 16−bit data Shifts a specified number of bits to the left in bit units. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P101 (PSHL)” is not available.
High−level Instructions Description Shifts n bits of the 16-bit area specified by D to the left (to the higher bit position). n Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 D The data in the n th bit is transferred to R9009 (carry flag). Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 0 0 0 D n bits starting from bit position 0 are filled with 0s. When the n bits are shifted to the left, − The n bits starting from bit position 0 are filled with 0s.
High−level Instructions F102 (DSHR) Right shift of n bits in a 32-bit data P102 (PDSHR) Outline Shifts a specified number of bits to the right in bit units. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P102 (PDSHR)” is not available.
High−level Instructions Description Shifts n bits of the 32-bit data area specified by D to the right (to the lower bit position) when the trigger turns on. [D+1] [D] [n bits] 15 0 15 0 CY 00000000 The data in the nth bit is transferred to R9009 (carry flag). The [n bits] are filled with 0s. When n bits are shifted to the right, − The higher n bits of the 16-bit data area specified by D are filled with 0s. − The data in the nth bit is transferred to special internal relay R9009 (carry flag).
High−level Instructions F103 (DSHL) P103 (PDSHL) Left shift of n bits in a 32-bit data Shifts a specified number of bits to the left in bit units. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P103 (PDSHL)” is not available.
High−level Instructions Only the lower eight bits of the 16-bit data [n] are effective. Select the amount of the shift within the range 1 to 255 bits. 15 [n] −−−− −−−− Upper 8 bits are invalid 0 0 0 0 0 0 0 0 0 K0 to K255(H00 to HFF) When [n] is specified using K0, the contents of D and D+1 and the carry flag do not change. When [n] is specified using K32 or higher, the contents of D and D+1 change to 0.
High−level Instructions F105 (BSR) P105 (PBSR) Right shift of one hexadecimal digit (4 bits) Shifts one hexadecimal digit (4 bits) of the specified 16-bit data to the right. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P105 (PBSR)” is not available.
High−level Instructions Description Shifts one hexadecimal digit (4 bits) of the 16-bit area specified by D to the right (to the lower digit position). D Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Hexadecimal Digit 4 Digit 3 Digit 2 Digit 1 D Hexadecimal Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 Digit 4 Digit 3 Digit 2 This hexadecimal digit position becomes 0.
High−level Instructions F106 (BSL) P106 (PBSL) Left shift of one hexadecimal digit (4 bits) Shifts one hexadecimal digit (4 bits) of the specified 16-bit data to the left. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P106 (PBSL)” is not available.
High−level Instructions Description Shifts one hexadecimal digit (4 bits) of the 16-bit area specified by D to the left (to the higher digit position). D Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 Hexadecimal Digit 4 Digit 3 Digit 2 Digit 1 D Bit position 15 · · 1211 · · 8 7 · · 4 3 · · 0 0 Digit 2 Digit 1 Hexadecimal Digit 3 This hexadecimal digit position becomes 0.
High−level Instructions F108 (BITR) P108 (PBITR) Right shift of multiple bits of 16-bit data range Shifts multiple bits of a specified 16-bit data range to the right. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P108 (PBITR)” is not available.
High−level Instructions Description Shifts n bits of the data range specified by D1 (starting) and D2 (ending) to the right (to the lower bit position) when the trigger turns on. Specified data range D2 D1 The n bits are shifted out. Trigger: on n bits D1 and D2 should be: − The same type of operand. − D1 D2. When n bits are shifted to the right, − The n bits of starting 16-bit area D1 are shifted out. − The n bits in the ending 16-bit area D2 becomes 0. 0 to 15 can be specified for n.
High−level Instructions F109 (BITL) P109 (PBITL) Outline Left shift of multiple bits of 16-bit data range Shifts multiple bits of a specified 16-bit data range to the left. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P109 (PBITL)” is not available.
High−level Instructions Description Shifts n bits of the data range specified by D1 (starting) and D2 (ending) to the left (to the higher bit position) when the trigger turns on. Specified data range D2 Trigger: on D1 The ending n bits are shifted out. n bits D1 and D2 should be: − The same type of operand. − D1 D2. When n bits are shifted to the left, − The n bits of ending 16-bit area D2 is shifted out. − The n bits in the starting 16-bit area D1 becomes 0. 0 to 15 can be specified for n.
High−level Instructions F110 (WSHR) Right shift of one word (16 bits) of 16-bit data range P110 (PWSHR) Shifts one word (16 bits) of a specified 16-bit data range to the right. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P110 (PWSHR)” is not available.
High−level Instructions Description Shifts one word (16 bits) of the data range specified by D1 (starting) and D2 (ending) to the right (to the lower word address). Specified data range D2 D1 The starting word is shifted out. D2 D1 0 The data in the ending word becomes 0. Starting area D1 and ending area D2 should be: − The same type of operand. D2. − D1 When one word (16 bits) is shifted to the right, − The starting word (D1) is shifted out. − The data in the ending word (D2) becomes 0.
High−level Instructions F111 (WSHL) P111 (PWSHL) Left shift of one word (16 bits) of 16-bit data range Shifts one word (16 bits) of a specified 16-bit data range to the left. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction (PWSHL)” is not available.
High−level Instructions Description Shifts one word (16 bits) of the data range specified by D1 (starting) and D2 (ending) to the left (to the higher word address). Specified data range D2 D1 D2 D1 The ending word is shifted out. 0 The data in the starting word becomes 0. Starting area D1 and ending area D2 should be: − The same type of operand. − D1 D2. When one word (16 bits) is shifted to the left, − The ending word (D2) is shifted out. − The data in the starting word (D1) becomes 0.
High−level Instructions F112 (WBSR) Right shift of one hexadecimal digit (4−bit) P112 (PWBSR) of 16-bit data range Shifts one hexadecimal digit (4 bits) of a specified 16-bit data range to the right. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instructions are not available.
High−level Instructions Description Shifts one hexadecimal digit (4 bits) of the data range specified by D1 (starting) and D2 (ending) to the right (to the lower digit position). Specified data range D2 D1 15· ·1211 · · 8 7 · · 4 3 · · 0 15· · · · 0 15· ·1211 · · 8 7 · · 4 3 · · 0 D2 D1 15· ·1211 · · 8 7 · · 4 3 · · 0 15· · · · 0 15· ·1211 · · 8 7 · · 4 3 · · 0 0 The data in the lower hexadecimal digit (bit position 0 to 3) is shifted out. The higher hexadecimal digit (bit position 12 to 15) becomes 0.
High−level Instructions F113 (WBSL) P113 (PWBSL) Left shift of one hexadecimal digit (4−bit) of 16-bit data range Shifts one hexadecimal digit (4 bits) of a specified 16-bit data range to the left. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P113 (PWBSL)” is not available.
High−level Instructions Description Shifts one hexadecimal digit (4 bits) of the data range specified by D1 (starting) and D2 (ending) to the left (to the higher digit position). Specified data range D2 D1 15· ·1211 · · 8 7 · · 4 3 · · 0 15· · · · 0 15· ·1211 · · 8 7 · · 4 3 · · 0 The data in the higher hexadecimal digit (bit position 12 to 15) is shifted out. D2 D1 15· ·1211 · · 8 7 · · 4 3 · · 0 15· · · · 0 15· ·1211 · · 8 7 · · 4 3 · · 0 0 The lower hexadecimal digit (bit positions 0 to 3) becomes 0.
High−level Instructions F115 (FIFT) P115 (PFIFT) FIFO buffer definition Defines the FIFO buffer conditions. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P115 (PFIFT)” is not available.
High−level Instructions Description This defines the area used as the FIFO buffer. A data storage area of n words (n = K1 to K256) is defined for the area specified by D. Definition of the area using the F115 (FIFT) instruction should be carried out only once, before writing to or reading from the FIFO buffer. Normally, reading and writing are disabled while this instruction is being executed. When the F115 (FIFT) instruction is executed, the FIFO buffer area is defined as follows.
High−level Instructions F116 (FIFR) P116 (PFIFR) Data read from FIFO buffer Reads data from the FIFO buffer. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P116 (PFIFR)” is not available.
High−level Instructions Explanation of example When the execution condition (trigger) R10 is on, data is read from the FIFO buffer area headed by DT0, and is stored in DT100.
High−level Instructions The reading pointer is stored in the upper eight bits of the third word of the FIFO buffer area, and is indicated by an address in the data storage area. The actual address is the value of the leading address in the FIFO buffer area specified by S, plus 3, plus the value of reading pointer (the value of which only the first byte is a decimal value). When the reading is executed, 1 is subtracted from the number of stored data items, and the reading pointer is incremented by 1.
High−level Instructions Precautions during programming An error occurs if the F116 (FIFR) instruction is executed when the number of stored data items (S+1) is 0. In the program noted below, the F116 (FIFR) instruction is not executed if the number of stored data items is 0.
High−level Instructions F117 (FIFW) P117 (PFIFW) Data write to FIFO buffer Writes data to the FIFO buffer. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P117 (PFIFW)” is not available.
High−level Instructions Explanation of example When the execution condition (trigger) R10 is on, the contents of DT110 are written to the FIFO buffer area headed by DT0.
High−level Instructions Description The 16−bit data specified by S will be stored in the FIFO buffer headed by the area specified by D. D should specify the beginning of the FIFO buffer defined by the F115 (FIFT) instruction. The specified data is written to the address indicated by the writing pointer when the instruction is executed.
High−level Instructions Flag conditions ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − The size (n) of the FIFO specified by D is n = 0, or when n > 256. − The number of stored data items of the FIFO > FIFO size (n). − The final address of the FIFO based on the FIFO size (n) exceeds the area. − The writing pointer of the FIFO > FIFO size (n).
High−level Instructions Precautions when using this instruction If data is received which exceeds the capacity of the buffer, an operation error will occur.
High−level Instructions Example: When the writing pointer has made one complete cycle DT0 K 5 DT1 K 5 DT2 Reading pointer ▲ DT3 0 0 K100 0▲ DT4 K101 1 DT5 K102 2 DT6 K103 3 DT7 K104 4 Writing WR0 K105 Execution of F117 (FIFW) instruction DT0 K 5 DT1 K 5 DT2 ▲DT3 0 0 K100 0▲ Writing pointer 1 cycle DT4 K101 1 DT5 K102 2 DT6 K103 3 DT7 K104 4 An error occurs, and processing is not carried out.
High−level Instructions Measures to avoid operation errors Do not execute the F117 (FIFW) instruction using the comparison instruction. Avoid executing the F117 (FIFW) instruction when the size of the FIFO buffer (DT0) is equal to the number of data items stored in the buffer (DT1). X0 DF F115 FIFT, K 5, DT0 R9010 F60, DT0, DT1 R900B R0 X1 R0 F117 FIFW, WR0, DT0 DF Execute the F117 (FIFW) instruction after executing the F116 (FIFR) instruction.
High−level Instructions F118 (UDC) Outline UP/DOWN counter Sets the UP/DOWN counter.
High−level Instructions Explanation of example The program on the preceding page shows an example in which initial values are set, and when the target value is 0, external output Y50 goes on. This can be used, for example, in programs such as those that cause a display lamp to light when the work being added or subtracted has reached a certain quantity. 1) When the trailing edge of rest input X2 is detected (on → off), data (target value) in data register DT10 is transferred to DT0.
High−level Instructions Precautions during programming If the elapsed value area has been specified as a hold type memory area, the elapsed value acts in accordance with the contents being retained. Be aware that, when an operation is begun, the set values are not automatically preset to the elapsed value area. To preset these values, the reset input must be switched from the “on” to the “off” state.
High−level Instructions F119 (LRSR) Left/right shift register Shifts one bit of the 16-bit data range to the left or right.
High−level Instructions Explanation of example Left shift operation DT9 DT0 Bit position 15 . . 12 11 . . 8 7 . . 4 3 . . 0 Data 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 15 . . 12 11 . . 8 7 . . 4 3 . . 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 R0: on R2: off → on Shifted-out bit is transferred to R9009 (carry flag). Bit position 15 . . 1211 . . 8 7 . . 4 3 . . 0 Data 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 15 . . 12 11 . . 8 7 . . 4 3 . .
High−level Instructions Flag conditions ・Error flag (R9007): Turns on and stays on when the area specified using the starting 16-bit area (D1) is larger than the area specified by the ending 16-bit area (D2) (when D1 > D2). ・Error flag (R9008): Turns on for an instant when the area specified using the starting 16-bit area (D1) is larger than the area specified by the ending 16-bit area (D2) (when D1 > D2). ・Carry flag (R9009): Turns on for an instant when the bit shifted-out is “1”.
High−level Instructions 3 − 273
High−level Instructions F120 (ROR) P120 (PROR) 16-bit data right rotation Rotates a specified number of bits in specified 16-bit data to the right. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P120 (PROR)” is not available.
High−level Instructions Description Rotates “n” bits of the 16-bit data specified by D to the right.
High−level Instructions F121 (ROL) P121 (PROL) 16-bit data left rotation Rotates a specified number of bits in specified 16-bit data to the left. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P121 (PROL)” is not available.
High−level Instructions Description Rotates “n” bits of the 16-bit data specified by D to the left.
High−level Instructions F122 (RCR) P122 (PRCR) 16-bit data right rotation with carry flag data Rotates a specified number of bits in the specified 16-bit data to the right together with carry flag data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P122 (PRCR)” is not available.
High−level Instructions Description Rotates “n” bits of the 16-bit data specified by D, including carry flag data, to the right.
High−level Instructions F123 (RCL) P123 (PRCL) 16-bit data left rotation with carry flag data Rotates a specified number of bits in the specified 16-bit data to the left together with carry flag data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P123 (PRCL)” is not available.
High−level Instructions Description Rotates “n” bits of the 16-bit data specified by D, including carry flag data, to the left.
High−level Instructions F125 (DROR) 32-bit data right rotation P125 (PDROR) Outline Rotates a specified number of bits in specified 32-bit data to the right. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P125 (PDROR)” is not available.
High−level Instructions Description Rotates “n” bits of the 32-bit data specified by D to the right when the trigger turns on. [D+1] 15 [D] 0 15 0 Trigger: on CY Data in bit position 0 of D When “n” bits are rotated to the right, − The data in bit position n-1 (nth bit starting from bit position 0) is transferred to special internal relay R9009 (carry flag).
High−level Instructions F126 (DROL) 32-bit data left rotation P126 (PDROL) Rotates a specified number of bits in specified 32-bit data to the left. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P126 (PDROL)” is not available.
High−level Instructions Description Rotates “n” bits of the 32-bit data specified by D to the left when the trigger turns on. [D+1] 15 [D] 0 15 0 Trigger: on CY Content of MSB When “n” bits are rotated to the left, − The data in bit position 32-n (nth bit starting from bit position 31) is transferred to special internal relay R9009 (carry flag). − “n” bits starting from bit position 31 are shifted out to the left and then shifted into the lower bit positions of the 16-bit data specified by D.
High−level Instructions F127 (DRCR) 32-bit data right rotation with carry flag data P127 (PDRCR) Rotates a specified number of bits in the specified 32-bit data to the right together with carry flag data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P127 (PDRCR)” is not available.
High−level Instructions Description Rotates “n” bits of the 32-bit data specified by D, including carry flag data, to the right when the trigger turns on. [D+1] 15 [D] 0 15 0 Carry flag Trigger: on Data in bit position 0 of D When “n” bits with carry flag data are rotated to the right, − The data in bit position n-1 (nth bit starting from bit position 0) is transferred to special internal relay R9009 (carry flag).
High−level Instructions F128 (DRCL) 32-bit data left rotation with carry flag data P128 (PDRCL) Rotates a specified number of bits in the specified 32-bit data to the left together with carry flag data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P128 (PDRCL)” is not available.
High−level Instructions Description Rotates “n” bits of the 32-bit data specified by D, including carry flag data, to the left when the trigger turns on. [D+1] Carry flag 15 [D] 0 15 0 Trigger: on Content of MSB When “n” bits with carry flag data are rotated to the left, − The data in bit position 32-n (nth bit starting from bit position 31) is transferred to special internal relay R9009 (carry flag).
High−level Instructions F130 (BTS) P130 (PBTS) 16-bit data bit set Turns on a specified bit of 16-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P130 (PBTS)” is not available.
High−level Instructions Description Turns on the bit of 16-bit data specified by D and n. Bits other than the specified bit do not change. The “n” is decimal data specifying the bit position to be turned on. Range of “n”: K0 to K15 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 n ———— ———— ———— The data in bit positions 4 through 15 are invalid.
High−level Instructions F131 (BTR) P131 (PBTR) 16-bit data bit reset Turns off a specified bit of 16-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P131 (PBTR)” is not available.
High−level Instructions Description Turns off the bit of 16-bit data specified by D and n. Bits other than the specified bit do not change. The “n” is decimal data specifying the bit position to be turned off. Range of “n”: K0 to K15 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 ———— ———— ———— n The data in bit positions 4 through 15 are invalid.
High−level Instructions F132 (BTI) P132 (PBTI) 16-bit data bit invert Inverts a specified bit in 16-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P132 (PBTI)” is are not available.
High−level Instructions Description Inverts [off (0) → on (1) or on (1) → off (1)] the state at bit position specified by “n” in the 16-bit area specified by D. Bits other than the specified bit are not inverted. The “n” is decimal data specifying the bit position to be inverted. Range of “n”: K0 to K15 Bit position 15 · · 12 11 · · 8 7 · · 4 3 · · 0 n ———— ———— ———— 0 0 0 0 The data in bit positions 4 through 15 are invalid.
High−level Instructions F133 (BTT) P133 (PBTT) 16-bit data bit test Checks the state [on (1) or off (0)] of the specified bit in 16-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P133 (PBTT)” is not available.
High−level Instructions Description Checks the state [on (1) or off (0)] of bit position specified by n in the 16-bit data specified by D. The judgment result is output to special internal relay R900B (=flag). The specified bit is checked by special internal relay R900B. − When the specified bit is on (1), special internal relay R900B (= flag) turns off. − When the specified bit is off (0), special internal relay R900B (= flag) turns on. The “n” is decimal data specifying the bit position to be checked.
High−level Instructions F135 (BCU) P135 (PBCU) Number of on (1) bits in 16-bit data Counts the number of bits in the on (1) state in the specified 16-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P135 (PBCU)” is not available.
High−level Instructions Description Counts the number of bits in the on (1) state in the 16-bit data specified by S. The counted result (number of on (1) bits) is stored in the 16-bit area specified by D. The results are stored in decimal number. Flag conditions ・Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit. ・Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit.
High−level Instructions F136 (DBCU) Number of on (1) bits in 32-bit data P136 (PDBCU) Counts the number of bits in the on (1) state in specified 32-bit data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P136 (PDBCU)” is not available.
High−level Instructions Description Counts the number of bits in the on (1) state in the 32-bit data specified by S. The counted result (number of on (1) bits) is stored in the 16-bit area specified by D. The results are stored in decimal number. Flag conditions ・Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit. ・Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit.
High−level Instructions F137 (STMR) Auxiliary timer (16−bit) Sets the 16−bit on−delay timer for 0.01 s units (0.01 to 327.
High−level Instructions When the time set for the special internal relay R900D has elapsed, the relay is turned on. R900D can also be used as a timer contact. (The relay is off when the execution condition (trigger) is off, and while subtraction is being carried out.) R0 F137 STMR, DT10,DT20 R900D R5 Operation is the same as that in the program example. Timer set time The timer setting is entered as a value of 0.01 x (timer set value).
High−level Instructions If the value in the elapsed value area D reaches 0, relay being used is turned on by the OT instruction which comes next in the program. The special internal relay R900D also goes on at this point. 3 R0 R5 F137 STMR, DT10, DT20 DT20 0 R900D F0 MV, DT30, DT40 3 Subtraction completed Precautions When Using R900D If R900D is used and multiple auxiliary timers are being used, always use R900D in the line following the auxiliary timer instruction.
High−level Instructions F138 (HMSS) Hours, minutes, and seconds data to seconds data P138 (PHMSS) Converts hour, minute, and second data to seconds data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P138 (PHMSS)” is not available.
High−level Instructions Description Converts the hour, minute, and second data stored in the 32-bit area specified by S to seconds data. The converted seconds data is stored in the 32-bit area specified by D. Composition of data Format of S+1 and S 32 bits (2 words) “S+1 and S” are allocated to express hour, minute, and second data. The data is expressed in BCD format. The BCD H data should be used for setting the hour (4 digits), minute (2 digits), and second (2 digits) data as follows. (The max.
High−level Instructions F139 (SHMS) Seconds data to hours, minutes, and seconds data P139 (PSHMS) Outline Converts seconds data to hour, minute, and second data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P139 (PSHMS)” is not available.
High−level Instructions Description Converts the seconds data stored in the 32-bit area specified by S to hour, minute, and second data. The converted hour, minute, and second data is stored in the 32-bit area specified by D. Composition of data Format of S+1 and S 32 bits (2 words) “S+1 and S” are allocated to express the seconds data. The data is expressed in BCD format.
High−level Instructions Flag conditions ・Error flag (R9007): ・Error flag (R9008): Turns on and stays on when: Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − The data specified by S is not BCD data. − The data specified by S exceeds the set range (35,999,999).
High−level Instructions F140 (STC) P140 (PSTC) Carry flag (R9009) set Turns on special internal relay R9009 (carry flag). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P140 (PSTC)” is not available. Outline Program example Ladder Diagram Trigger 10 R0 F140 STC Description Special internal relay R9009 (carry flag) goes on. Flag condition Carry flag (R9009): Turns on when this instruction is executed.
High−level Instructions F141 (CLC) P141 (PCLC) Carry flag (R9009) reset Turns off special internal relay R9009 (carry flag). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P141 (PCLC)” is not available. Outline Program example Ladder Diagram Trigger 10 R0 Boolean Address Instruction 10 ST 11 F141 R 0 (CLC) F141 CLC Description Special internal relay R9009 (carry flag) goes off. Flag condition Carry flag (R9009): Turns off when this instruction is executed.
High−level Instructions F142 (WDT) P142 (PWDT) Watching dog timer update Updates the time−out time of watching dog timer.
High−level Instructions Precautions during programming The F142 (WDT) instruction may be used any number of times. To change the time−out time through operation, use the process described below. 1) Execute the F142 (WDT) instruction immediately prior to the block to be processed, and specify the preset. 2) When the processing has been completed, execute the F142 (WDT) instruction again, and enter a preset with a new value.
High−level Instructions F143 (IORF) FP0/FP0R/FP−e/FPΣ/FP−X Availability Partial I/O update FP0/FP0R/FP−e/ FPΣ/FP−X Updates specified partial I/O points.
High−level Instructions FP0/FP0R/FP−e/FPΣ/FP−X Availability of the partial I/O update for various models Control unit FP0 Expansion FPΣ Expansion Add−on cassette FP−X Expansion FP0 Adapter FP0 A N/A — — — — FP0R A A* — — — — FP−e A — — — — — FPΣ 12k A N/A A — — — FPΣ 32k A A*) A — — — FP−X A — — A N/A N/A A: Available, N/A: Not Available *) For FPΣ 32k type and FP0R, partial I/O update is possible with FP0 expansion units, however, it takes approx.
High−level Instructions FP2/FP2SH/FP10SH F143 (IORF) P143 (PIORF) Partial I/O update Availability FP2/FP2SH/FP10SH Updates specified partial I/O points.
High−level Instructions FP2/FP2SH/FP10SH Description Updates the input and output relays (X and Y) specified by D1 and D2 immediately even in the program execution stage. Refreshing (updating) initiated by the F143 (IORF) instruction is done only for the unit on the master and expansion backplanes. No update is performed for the input/output relay of the MEWNET-F (remote I/O) system slave station.
High−level Instructions F144(TRNS) FP0/FP−e Availability Serial data communication FP0/FP−e Communicates with an external device using the RS232C port.
High−level Instructions FP0/FP−e Description Use this instruction for communication (transmission and reception) of command and data when an external device (personal computer, measuring instrument, bar code reader, etc.) is connected to the RS232C port. Transmission The “n” bytes of the data stored in the data table with the starting area specified by S are transmitted from the RS232C port to an external device by serial transmission.
High−level Instructions FP0/FP−e Program and operation during transmission To transmit, write the transmission data to the data table, select it with an F144 (TRNS) instruction, and execute. Data table for transmission Data register areas beginning with the area selected by S are used as the data table for transmission. [S] The number of bytes not yet transmitted is stored here.
High−level Instructions FP0/FP−e Program Select the starting address of the transmission data table with S and the number of transmission data bytes with “n”.
High−level Instructions FP0/FP−e Setting the reception buffer: System register 417 and 418 All areas of the data register are initially set for use as the reception buffer. To change the reception buffer, set the starting area number in system register 417 and the size (number of words, Max. 1,024 words) in system register 418.
High−level Instructions FP0/FP−e Example: Reception of the eight characters A, B, C, D, E, F, G, and H (8 bytes of data) from an external device The reception buffer is DT200 to DT204 in this example. System register settings are as follows: − System register 417: K200 − System register 418: K5 DT200 Each time data is received, the number of bytes received is stored.
High−level Instructions FP0/FP−e Operation When the reception completed flag (9038) is off and data is sent from an external device, operation will proceed as follows. (After RUN, R9038 is off during the first scan.) 1) The data received is stored in order in the reception data storage area of reception buffer beginning from the lower byte of the second word of the area. Start and end codes will not be stored.
High−level Instructions FP2/FP2SH/FP10SH F144(TRNS) Availability Serial data communication FP2/FP2SH/FP10SH Communicates with an external device using the COM. port of CPU.
High−level Instructions FP2/FP2SH/FP10SH Description Use this instruction for communication (transmission and reception) of command and data when an external device (personal computer, measuring instrument, bar code reader, etc.) is connected to the COM. port of CPU. Transmission The “n” bytes of the data stored in the data table with the starting area specified by S are transmitted from the COM. port to an external device by serial transmission.
High−level Instructions FP2/FP2SH/FP10SH Preparation of transmission 1) Setting the transmission format For FP10SH The initial settings for the transmission format are as follows: − Data length: 8 bits − Parity check: Yes, odd − Stop bits: 1 bit − End code: CR − Start code: No STX To change the transmission format to match the external device connected to the COM. port, set the parameters with the upper row of operation mode switches.
High−level Instructions FP2/FP2SH/FP10SH 2) Setting the baud rate For FP10SH The baud rate (transmission speed) for serial transmission is initially set to 9600 bps. To change the baud rate to match the external device connected to the COM. port, set the lower row of operation mode switches as shown below.
High−level Instructions FP2/FP2SH/FP10SH Program and operation during transmission To transmit, write the transmission data to the data table, select it with an F144 (TRNS) instruction, and execute. Data table for transmission Data register areas beginning with the area selected by S are used as the data table for transmission. [S] The number of bytes not yet transmitted is stored here.
High−level Instructions FP2/FP2SH/FP10SH Program Select the starting address of the transmission data table with S and the number of transmission data bytes with “n”.
High−level Instructions FP2/FP2SH/FP10SH Preparation of reception 1) Setting the transmission format For FP10SH The initial settings for the transmission format are as follows: − Data length: 8 bits − Parity check: Yes, odd − Stop bits: 1 bit − End code: CR − Start code: No STX To change the transmission format to match the external device connected to the COM. port, set the parameters with the upper row of operation mode switches.
High−level Instructions FP2/FP2SH/FP10SH 2) Setting the baud rate For FP10SH The baud rate (transmission speed) for serial transmission is initially set to 9600 bps. To change the baud rate to match the external device connected to the COM. port, set the lower row of operation mode switches as shown below.
High−level Instructions FP2/FP2SH/FP10SH Program and operation during reception Data sent from the external device connected to the COM port will be stored in the data register areas set as the reception buffer.
High−level Instructions FP2/FP2SH/FP10SH Program When reception of data from an external device has been completed, the reception completed flag (R9038) goes on and further reception of data is not allowed. To receive more data, an F144 (TRNS) instruction must be executed to turn off the reception completed flag (R9038) and clear the byte number to zero. R0 DF F144 TRNS, DT100, K 0 To repeat reception only, set to K0.
High−level Instructions FPΣ/FP−X/FP0R F145 (SEND) Data send P145 (PSEND) (For MEWTOCOL master mode) Availability FP0R FP−X: Ver 1.2 or more FPΣ: 32k Sends specified data to another PLC or computer from the serial port of the unit.
High−level Instructions FPΣ/FP−X/FP0R Specifications for each item The control data specified by [S1][S1+1] is specified as follows. [S1]: Specifying transmission unit and transmission method H0 [S1]: Word unit transmission Specifies No. of transmission words H001 to H1FB (1 to 507): when transmitting to Group A H001 to H18 (1 to 24)*: when transmitting to Group B H1FB is 507 words. H18 is 24 words.
High−level Instructions FPΣ/FP−X/FP0R Flag conditions Σ Error flag (R9007) : Turns on and stays on when: Σ Error flag (R9008) : Turns on for an instant when: − The control data of [S1] and [S1+1] is a value outside of the specified range. − The number of words specified by S1 causes the area of S2 or D to be exceeded when word unit transmission is being used. − [D]+[N] exceeds the area of [D]. − The operation mode for the target COM port is other than compute link.
High−level Instructions FPΣ/FP−X/FP0R For information on the contents of error codes, refer to the manual. If the error code is H73, a communication time−out error has occurred. The time−out time can be changed within a range of 10.0 ms to 81.9 seconds (in units of 2.5 ms), using the setting of system register 32. The default value is set to 10 seconds. Error code (HEX) Description 73 Time−out: Waiting for response For global transmission (the transmission performed by specifying H00 for the unit No.
High−level Instructions FPΣ/FP−X/FP0R F145 (SEND) Data send P145 (PSEND) (For MODBUS master mode) Availability FP0R/FP−X FPΣ: 32k Sends specified data to another PLC or computer from the serial port of the unit.
High−level Instructions FPΣ/FP−X/FP0R Specifications for each item The control data specified by [S1][S1+1] is specified as follows. [S1]: Specifying transmission unit and transmission method H0 [S1]: Word unit transmission Specifies No. of transmission words (H001 to H07F) *According to the restrictions on the MODBUS protocol. H8 [S1]: H0 fixed Bit unit transmis- Bit No. of remote unit (H0 to HF) sion Bit No.
High−level Instructions FPΣ/FP−X/FP0R Explanation of command Command 05 (Y, R single write) send Example) When the value of the bit 0 of WR3 is transmitted to the 1st bit of WY1 of the unit No. 7 in the remote unit from the COM1. [ F145 (SEND), DT10, WR3, WY0, K1 ] H8 [S1]: H1 H0 fixed H0 DT10 Bit unit Bit No. of remote unit Bit No. of local unit transmission (H0 to HF) (H0 to HF) *Bit units (H8) should be specified for the transmission method of the [S1] to send the command 05.
High−level Instructions FPΣ/FP−X/FP0R Command 15 (Y, R multi−points write) send Example) When the 64−bit data from the bit 0 of the WR3 to the bit F of the WR6 is transmitted to the W0 to Y3F of the unit No. 7 in the remote unit from the COM1. [ F145 (SEND), DT10, WR3, WY0, K0 ] H0 [S1]: H0 H0 H4 DT10 Word unit Specifies No. of transmission words transmission (H1 to H7F) *Word unit (H0) should be specified for the transmission method of [S1] to send the command 15.
High−level Instructions FPΣ/FP−X/FP0R Command 16 (DT multi−words write) send Example) When the 3−word data from WR3 to WR5 is transmitted to DT500 to DT502 of the unit No. 7 of the remote unit. [ F145 (SEND), DT10, WR3, DT0, K500 ] H0 [S1]: H0 H0 H3 DT10 Word unit Specifies No. of transmission words transmission (H1 to H7F) *Word units (H0) should be specified for the transmission method of [S1] to send the command 16. [S1+1]: H1 H0 fixed Selects COM port (H1 or H2) H0 H7 DT11 Unit No.
High−level Instructions FPΣ/FP−X/FP0R The SEND instruction only requests that the data be sent, but the actual processing takes place when the ED instruction is executed. The SEND/RECV execution end flag (R9045: COM1/R904B: COM2) can be used to check whether or not the transmission has been completed. R9045 (COM1) 0: Completed normally 1: Completed with error (The error code is stored in DT90124.
High−level Instructions FPΣ/FP−X/FP0R Availability F145 (SEND) FP0R FP−X: Ver. 2.50 FPΣ: Ver. 3.20 Data send (MODBUS master II: Type directly specifying MODBUS address) Sends specified data to another PLC or computer from the serial port of the unit. Feature: Data can be transmitted with this instruction only.
High−level Instructions FPΣ/FP−X/FP0R Specifications for each item [S1]: Specifying port number, transmission command and destination unit number H1 or H2 [S1]: H5 or H6 Selects COM Specifies Unit No. (H00 to HFF) port transmission command (1) Specifying COM port Specify H1 for COM 1 port, and H2 for COM2 port. If only one COM port is available, specify H1. (2) Specifying transmission command.
High−level Instructions FPΣ/FP−X/FP0R Command 06 (Register single preset) Example) When the 1−word data of WR3 is transmitted to the address H7788 of the unit No. 7 from the COM1. [ F145(SEND), H1607, WR3, H7788, K1 ] [S1]: H1 H6 Selects COM port H0 H7 Unit No. (H00 to HFF) [S1]:H1607 [S2]:WR3(WR3=1234H) [D] :H7788 [N] :K1 Command conversion * Reads the word data of WR3 and sets in the write data. 1 2 3 4 5 6 7 8 MODBUS commands Slave address Command (06H) Starting No. of write (H) Starting No.
High−level Instructions FPΣ/FP−X/FP0R Command 16 (Multi−point register preset) send Example) When the 3−word data from DT3 to DT5 is transmitted to the address H7788 of the unit No. 7 from the COM1 port. [ F145(SEND), H1607, DT3, H7788, K3 ] [S1]: H1 H6 Selects COM port [S1] : H1607 [S2] : DT3 ( DT3=0011H DT4=2233H DT5=4455H) [D] : H7788 [N] : K3 H0 H7 Unit No. (H00 to HFF) Command conversion * When specifying multiple points by [N], the command is automatically corrected. * Max.
High−level Instructions FPΣ/FP−X/FP0R Precautions during programming It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions for the same communication port simultaneously. The program should be set up so that these instructions are executed when the SEND/RECV execution enabled flag (R9044: COM1/R904A: COM2) is on.
High−level Instructions F145 (SEND) Data send (MEWNET link) P145 (PSEND) Sends data to another station through link modules in the network.
High−level Instructions 2 Example of bit unit transmission When the control data is as follows: DT10(S1)=H850D Bit unit Bit No. 13 of local station Bit No. 5 of remote station DT11(S1+1)=H010A Unit No.10 Route No.1 the on and off information of Bit No. 13 of DT20 is sent to Bit No. 5 of DT100 of Unit No. 10, which is connected to route No. 1, when the execution condition (trigger) R0 turns on.
High−level Instructions Specifying the various items Control data (S1) Specifying the remote station Specify the remote station by means of a route number and unit number. The setting is entered differently depending on whether the remote station is a PLC in the same network, or a PLC in a network on a different hierarchical level.
High−level Instructions (1) Specifying word unit transmission If word unit transmission is being used, the data for the specified number of words is sent from the memory area of the local station specified by S2, and is stored at the beginning of the memory area of the remote station specified by D and N. If only the MEWNET−H network is being used, up to 1,020 words can be sent at one time, and if the network is using the MEWNET−P or MEWNET−W, up to 16 words can be sent at one time.
High−level Instructions Sending data to a PLC on a different hierarchical level What is a hierarchical link? A hierarchical link functions as a relay station between two link units installed on the same backplane, enabling communication between CPUs belonging to different networks.
High−level Instructions Link Power CPU 2 Link Link Communicating with a CPU at depth 3 (sending data from CPU1 to CPU5) Depth 1 Power CPU 4 Power CPU 3 Link Link Depth 0 Link Power CPU 1 Link Example: Depth 3 Link Power CPU 5 Depth 2 The numbers CPU1 to CPU5 have been temporarily assigned, for the purpose of indicating the relay order of the hierarchical links. Specifying the control data (S1) The control data should be specified as an H constant.
High−level Instructions (1) Specifying word unit transmission If word unit transmission is being used, the data for the specified number of words is sent from the memory area of the local station specified by S2, and is stored starting from the beginning of the memory area of the remote station specified by D and N. If only the MEWNET−H network is being used, up to 1,020 words can be sent at one time, and if the network is using the MEWNET−P and MEWNET−W, up to 16 words can be sent at one time.
High−level Instructions 2 Specifying the relay station S+1 should be used to specify only the specified amount of depth, while (S1+3) is used to specify depth 2 for the same item, and (S1+4) is used to specify depth 3. S1+2: Route No. of relay destination in depth 1: H01 to H08 Unit No. of relay source in depth 1: H01 to H40 (1 to 64) 3 Specifying the remote station This should be specified right after the specification of the relay station.
High−level Instructions In this example, the control data beginning with DT10 (depth 3 → 6 words) should be specified as shown below. To send the 5 words of data → DT10 = H0005 CPU1 Route 1 DT11=H8103 CPU2 CPU2 No.2 Route 3 DT12=H0203 CPU3 CPU3 No.4 Route 1 DT13=H0401 CPU4 CPU4 No.16 Route 2 DT14=H1002 CPU5 No.10 DT15=H0A00 0 1 2 3 : Depth Precautions during programming It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions at the same time.
High−level Instructions Additional information concerning the F145 (SEND) instruction Sending the special data registers and special internal relays using the data transfer instruction Special data registers and special internal relays cannot be sent using the F145 (SEND) instruction. Use a program like that shown below to send these types of data.
High−level Instructions FPΣ/FP−X/FP0R F146 (RECV) Data receive P146 (PRECV) (For MEWTOCOL master mode) Availability FP0R FP−X: Ver 1.2 or more FPΣ: 32k Receives specified data from the serial port of another PLC or computer to the unit.
High−level Instructions FPΣ/FP−X/FP0R Specifications for each item The control data specified by [S1][S1+1] is specified as follows. [S1]: Specifying transmission unit and transmission method H0 [S1]: Word unit transmission Specifies No. of transmission words H001 to H1FD (1 to 509 words): when transmitting to Group A H001 to H1B (1 to 27 words): when transmitting to Group B Group A FPΣ, FP−X, FP0R, FP2, FP2SH, FP10SH Group B FP0, FP−e H8 [S1]: Bit unit transmission H0 fixed Bit No.
High−level Instructions Flag conditions FPΣ/FP−X/FP0R Σ Error flag (R9007) : Turns on and stays on when Σ Error flag (R9008) : Turns on for an instant when − The control data of [S1] and [S1+1] is a value outside of the specified range. − The number of words specified by S1 causes the area of S2 or D to be exceeded when word unit transmission is being used. − [S2]+[N] exceeds the area of [S2]. − The operation mode for the target COM port is other than compute link.
High−level Instructions FPΣ/FP−X/FP0R For information on the contents of error codes, refer to the manual. If the error code is H73, a communication time−out error has occurred. The time−out time can be changed within a range of 10.0 ms to 81.9 seconds (in units of 2.5 ms), using the setting of system register 32. The default value is set to 10 seconds.
High−level Instructions FPΣ/FP−X/FP0R F146 (RECV) Data receive P146 (PRECV) (For MODBUS master mode) Availability FP0R/FP−X FPΣ: 32k Receives specified data from the serial port of another PLC or computer to the unit.
High−level Instructions FPΣ/FP−X/FP0R Specifications for each item The control data specified by [S1][S1+1] is specified as follows. [S1]: Specifying transmission unit and transmission method H0 [S1]: Word unit transmission Specifies No. of transmission words (H001 to H07F) *According to the restrictions on the MODBUS protocol. H8 [S1]: Bit unit transmission H0 fixed Bit No. of local unit (H0 to HF) Bit No.
High−level Instructions FPΣ/FP−X/FP0R Explanation of command Command 01 (Y, R coil read) send Example) When the 1 bit of Y17 is readed from the unit No. 17 of the remote unit, and a command to transmit the readed bit data to the 5th bit of the DT100 in the local unit is sent from the COM1. [ F146 (RECV), DT10, WY0, K1, DT100 ] H8 [S1]: H5 H7 H0 fixed Bit unit Bit No. of local unit transmission (H0 to HF) DT10 Bit No.
High−level Instructions FPΣ/FP−X/FP0R Command 02 (X contact read) send Example) When the 1 bit of X17 is readed from the unit No. 17 of the remote unit, and a command to transmit the readed bit data to the 5th bit of DT100 in the local unit is sent. [ F146 (RECV), DT10, WX0, K1, DT100 ] H8 [S1]: H5 H7 H0 fixed Bit unit Bit No. of local unit transmission (H0 to HF) DT10 Bit No.
High−level Instructions FPΣ/FP−X/FP0R Command 03 (DT read) send Example) When the 6 words of data from DT500 to DT505 is readed from the unit No. 17 of the remote unit, and a command data to the area starting with DT100 in the local unit is sent from the COM1. [ F146 (RECV), DT10, DT0, K500, DT100 ] H0 [S1]: H0 H0 H6 DT10 Word unit Specifies No.
High−level Instructions FPΣ/FP−X/FP0R Example) When the 6 words of data from LD100 to LD105 is readed from the unit No. 17 of the remote unit, and a command data to the area starting with DT100 in the local unit is sent from the COM1. [ F146 (RECV), DT10, LD0, K100, DT100 ] H0 [S1]: H0 H0 H6 DT10 Word unit Specifies No. of transmission words transmission (H001 to H07F) *Word units (H0) should be specified for the transmission method of [S1] to read in word units by the command 04.
High−level Instructions FPΣ/FP−X/FP0R The SEND instruction only requests that the data be sent, but the actual processing takes place when the ED instruction is executed. The SEND/RECV execution end flag (R9045: COM1/R904B: COM2) can be used to check whether or not the transmission has been completed. R9045 (COM1) 0: Completed normally 1: Completed with error (The error code is stored in DT90124.
High−level Instructions FPΣ/FP−X/FP0R F146 (RECV) Availability Data receive (MODBUS master mode II: Type directly specifying MODBUS address) FP0R FP−X: Ver. 2.50 FPΣ: Ver. 3.20 Receives specified data from the serial port of another PLC or computer to the unit. Feature: Data can be transmitted with this instruction only.
High−level Instructions FPΣ/FP−X/FP0R Specifications for each item [S1]: Specifying port number, transmission command and destination unit number H1 or H2 [S1]: H1 H2 H3 H4 Selects COM Specifies Unit No. (H01 to HFF) port transmission command (1) Specifying COM port Specify H1 for COM 1 port, and H2 for COM2 port. If only one COM port is available, specify H1. (2) Specifying transmission command. Any one of H1, H2, H3 and H4 can be specified.
High−level Instructions FPΣ/FP−X/FP0R Example) When 64 bits (4 words) are read from the bit address H7788 of the unit No. 17 connected to the COM1 and written in the bit 0 of DT100 of the local unit. [ F146(RECV), H1111,H7788, K64, DT100 ] [S1]: H1 H1 Selects COM port H1 H1 Unit No. (H01 to HFF) [S1]:H1111 [S2]:H7788 [N] :K64 [D] :DT100 Command conversion 1 2 3 4 5 6 7 8 MODBUS commands Slave address Command (01H) Starting No. of read (H) Starting No.
High−level Instructions FPΣ/FP−X/FP0R Command 03 (Holding register read) Example) When 6 words are read from the address H7788 of the unit No. 17 connected to the COM1 and written in the area starting with DT100 in the local unit. [ F146(RECV), H1311,H7788, K6, DT100 ] [S1]: H1 H3 Selects COM port [S1]:H1311 [S2]:H7788 [N] :K6 [D] :DT100 H1 H1 Unit No. (H01 to HFF) Command conversion 1 2 3 4 5 6 7 8 MODBUS commands Slave address Command (03H) Starting No. of read (H) Starting No.
High−level Instructions FPΣ/FP−X/FP0R Precautions during programming It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions for the same communication port simultaneously. The program should be set up so that these instructions are executed when the SEND/RECV execution flag (R9044: COM1/R904A: COM2) is on.
High−level Instructions F146 (RECV) Data receive (MEWNET link) P146 (PRECV) Receives data from another station through link units in the network. Outline Program example Boolean Ladder Diagram Address Trigger 10 ST 11 F146 R0 10 F146 RECV, DT10 , DT 0 , K 100 , DT50 S1 N S2 Instruction R (RECV) DT 10 DT 0 K D 0 100 DT 50 S1 Starting 16-bit area for storing control data S2 Type of source operands for storing data in the remote station.
High−level Instructions 2 Example of bit unit reception When the control data is as follows: DT10(S1)=H850D Bit unit Bit No. 13 of remote station’s memory area Bit No. 5 of local station’s memory area DT11(S1+1)=H010A Unit No.10 Route No.1 the on and off information of Bit No. 13 of DT100 of the unit No. 10 connected to route No. 1 is sent to Bit No. 5 of DT50 when the execution condition (trigger) R0 turns on.
High−level Instructions Specifying the various items Control data (S1) Specifying the remote station Specify the remote station by means of a route number and unit number. The setting is entered differently depending on whether the remote station is a PLC in the same network, or a PLC in a network on a different hierarchical level.
High−level Instructions (1) Specifying word unit reception If word unit reception is being used, the data for the specified number of words is sent from the memory area of the remote station specified by S2 and N, and is stored in the memory area of the local station that starts with D. If only the MEWNET−H network is being used, up to 1,020 words can be received at one time, and if the network is using the MEWNET−P/W, up to 16 words can be received at one time.
High−level Instructions Sending data from a PLC on a different hierarchical level What is a hierarchical link? A hierarchical link functions as a relay station between two link units installed on the same backplane, enabling communication between CPUs belonging to different networks.
High−level Instructions Link Power CPU 2 Link Link Communicating with a CPU at depth 3 (reception from CPU5 to CPU1) Depth 1 Power CPU 4 Power CPU 3 Link Link Depth 0 Link Power CPU 1 Link Example: Depth 3 Link Power CPU 5 Depth 2 The numbers CPU1 to CPU5 have been temporarily assigned, for the purpose of indicating the relay order of the hierarchical links. Specifying the control data (S1) The control data should be specified as an H constant.
High−level Instructions (1) Specifying word unit reception If word unit reception is being used, the data for the specified number of words is sent from the memory area of the remote station specified by S2 and N, and is stored in the memory area of the local station beginning with D. If only the MEWNET−H network is being used, up to 1,020 words can be received at one time, and if the network is using the MEWNET−P and MEWNET−W, up to 16 words can be received at one time.
High−level Instructions 2 Specifying the relay station S+1 should be used to specify only the specified amount of depth, while (S1+3) is used to specify depth 2 for the same item, and (S1+4) is used to specify depth 3. S1+2: Route No. of relay destination in depth 1: H01 to H08 Unit No. of relay source in depth 1: H01 to H40 (1 to 64) 3 Specifying the remote station This should be specified right after the specification of the relay station.
High−level Instructions In this example, the control data beginning with DT10 (depth 3 → 6 words) should be specified as shown below. To receive the 5 words of data → DT10 = H0005 CPU1 Route 1 DT11=H8103 CPU2 CPU2 No.2 Route 3 DT12=H0203 CPU3 CPU3 No.4 Route 1 DT13=H0401 CPU4 CPU4 No.16 Route 2 DT14=H1002 CPU5 No.10 DT15=H0A00 0 1 2 3 : Depth Precautions during programming It is not possible to execute multiple F145 (SEND) instructions and F146 (RECV) instructions at the same time.
High−level Instructions Additional information concerning the F146 (RECV) instruction Receiving the special data registers and special internal relays using the data transfer instruction Special data registers and special internal relays cannot be transferred using the F146 (RECV) instruction. Use a program like that shown below to receive these types of data.
High−level Instructions F147 (PR) Printout Outputs ASCII codes to the printer (for transistor output type only).
High−level Instructions Explanation of example The ASCII codes stored in data registers DT0 to DT5 are output through word external output relay WY0 when trigger R10 turns on.
High−level Instructions Precautions during programming Multiple F147 (PR) instructions cannot be executed at the same time. The program should be set up so that the printout flag (R9033) is used during execution of F147 (PR) instruction to inhibit simultaneous execution. The ASCII code conversion instruction [F95 (ASC)] can be used to convert character constants (M) to ASCII codes. Character constants (M) can be input only with programming tool software. A transistor−type output unit/board is necessary.
High−level Instructions Time chart Signal of output unit ASCII HEX code (Y0 to Y7) A B C D E CR LF H41 H42 H43 H44 H45 H0D H0A on off Strobe signal (Y8) R9033 on off Number of scans F147 (PR) instruction execution 0 1 2 3 4 5 6 7 8 9 1011 121314151617 323334353637 Using printer output during 8−point output When only eight output points are being used, connections should be made as shown below, and the program should be set up so that the strobe signal is output from Y7.
High−level Instructions F148 (ERR) P148 (PERR) Self-diagnostic error set Sets the specified condition as a self-diagnostic error. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P148 (PERR)” is not available.
High−level Instructions Description Along with self−diagnostic error codes specified by n being stored in the special data register DT9000 on DT90000, the self−diagnostic error flag (R9000) is turned on. Also, for FP0/FP−e/FP0R/FPΣ/FP−X, the ERROR/ALARM on the control unit blinks and for FP2/FP2SH/FP10SH, ERROR LED on the CPU lights. The specified value “n” is what determines whether operation stops or continues when the instruction is executed.
High−level Instructions F149 (MSG) P149 (PMSG) Message display Displays the message “specified character constant” on the programming tool. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P149 (PMSG)” is not available.
High−level Instructions Specifying Slot Numbers With the FPΣ The slot numbers of target intelligent unit are allocated automatically, based on the installation position. Number being specified 2 1 0 Control unit 3 Expansion unit Intelligent unit With the FP2 and FP2SH The slot numbers of the target intelligent unit are allocated automatically, based on the installation position. Slot numbers are allocated in the order of the board number.
High−level Instructions With the FP3 and FP10SH The slot numbers of the target intelligent unit are allocated automatically, based on the installation position. Slot numbers are allocated in the order of the board number. With 3−slot and 5−slot boards, slot numbers are specified in the same way as with 8−slot boards.
High−level Instructions F150 (READ) Data read from intelligent unit P150 (PREAD) Reads data from the shared memory in an intelligent unit. Outline Program example Boolean Ladder Diagram Address Trigger 10 Instruction 10 ST 11 F150 R10 F150 READ, H 3, K 19, K 4, DT 0 S1 n S2 D R 10 (READ) H 3 K 19 K 4 DT 0 S1 16-bit equivalent constant for specifying the bank number in the shared memory of the intelligent unit.
High−level Instructions Explanation of example Reads four words of data stored in the addresses starting from K19 to K22 of the intelligent unit shared memory (located in slot 3) and stores them in data registers DT0 to DT3 of CPU when trigger R10 turns on. 1 2 3 4 (Slot No.
High−level Instructions Specifying S1 Intelligent unit without bank Specify the slot number in which the target intelligent unit has been installed. Upper byte Lower byte S1 H00 Slot No.: H00 to H1F Intelligent unit with bank Specify the slot number (H constant) in which the target intelligent unit has been installed, and the bank number (H constant). Upper byte Lower byte S1 Slot No.: H00 to H1F Bank No.: H00 to HFF Reference: Intelligent unit with bank Name Order No.
High−level Instructions F151 (WRT) P151 (PWRT) Outline Data write into intelligent unit Writes data into the shared memory in an intelligent unit. Program example Boolean Ladder Diagram Address Trigger 10 Instruction 10 ST 11 F151 R 10 (WRT) H R10 DT F151 WRT, H 0, DT 10, K 5, K 0 n S2 S1 D 0 10 K 5 K 0 S1 16-bit equivalent constant for specifying the bank number in the shared memory of the intelligent unit.
High−level Instructions Explanation of example Five words of data stored in data registers DT10 to DT14 of CPU are written into the addresses starting from K0 to K4 of the intelligent unit shared memory (located in slot 0) when trigger R10 turns on. 1 2 3 4 (Slot No.
High−level Instructions Specifying S1 Intelligent unit without bank Specify the slot number in which the target intelligent unit has been installed. Upper byte Lower byte S1 H00 Slot No.: H00 to H1F Intelligent unit with bank Specify the slot number (H constant) in which the target intelligent unit has been installed, and the bank number (H constant). Upper byte Lower byte S1 Slot No.: H00 to H1F Bank No.: H00 to HFF Reference: Intelligent unit with bank Name Order No.
High−level Instructions F152 (RMRD) Data read from MEWNET-F slave station P152 (PRMRD) Reads data from the specified intelligent unit of the MEWNET-F slave station Outline Program example Boolean Ladder Diagram Address Trigger 10 Instruction 10 ST 11 F152 R DT R10 F152 RMRD, DT 0, K 0, K 10, DT 10 n S2 S1 D 10 (RMRD) 0 K 0 K 10 DT 10 S1 Lower 16-bit area of two 16-bit areas for storing control data for F152 (RMRD)/P152 (PRMRD) S2 16-bit equivalent constant or 16-bit area for sp
High−level Instructions Explanation of example Ten words of data stored at address 0 to 9 in the shared memory of the intelligent unit of the slave station specified by DT0 and DT1 are read and the read data stored in data registers DT10 to DT19 of the master station “CPU” when R10 turns on. 0 Master station 1 0 1 2 1 3 4 DT0=H105 DT1=H0 Intelligent unit (shared memory) 8 9 2 Slave Power Master 2 Power CPU Master 1 No.
High−level Instructions Specifying control data (S1+1 and S1) Specify the master station number and the slave station number with S1, and the slot number of the target intelligent unit with S1+1. Intelligent unit without bank Upper byte Lower byte S1 Slave station No.H01 to H20 (1 to 32) Master station No. H01 to H04 (1 to 4) Upper byte Lower byte S1+1 H00 Slot No.H00 to H1F Intelligent unit with bank Upper byte Lower byte S1 Slave station No.H01 to H20 (1 to 32) Master station No.
High−level Instructions Precautions during programming It is not possible to execute multiple F152 (RMRD) instructions and F153 (RMWT) instructions at the same time. The program should be set up so that these instructions are executed when the F152 (RMRD)/F153 (RMWT) instruction execution enabled flag (R9035) is on. R9035 0: Execution inhibited (RMRD/RMWT instruction being executed) 1: Execution enabled The F152 (RMRD) instruction only enables a request to be accepted.
High−level Instructions F153 (RMWT) Data write into MEWNET-F slave station P153(PRMWT) Writes data into the specified intelligent unit of the MEWNET-F slave station.
High−level Instructions Explanation of example Twenty words of data stored in data registers DT250 to DT269 of the master station “CPU” are written into the shared memory of the intelligent unit of slave station starting from address 500 to 519 specified by DT0 and DT1 when R10 turns on. 0 Master station 2 CPU 1 2 3 4 Slave Power Master 2 CPU Master 1 Power No.
High−level Instructions Specifying control data (S1+1 and S1) Specify the master station number and the slave station number with S1, and the memory of the target intelligent unit with S1+1. Intelligent unit without bank Upper byte Lower byte S1 Slave station No.: H01 to H20 (1 to 32) Master station No.: H01 to H04 (1 to 4) Upper byte Lower byte H00 Slot No: H00 to H1F S1+1 Intelligent unit with bank Upper byte Lower byte S1 Slave station No.: H01 to H20 (1 to 32) Master station No.
High−level Instructions Precautions during programming It is not possible to execute multiple F152 (RMRD) instructions and F153 (RMWT) instructions at one time. The program should be set up so that these instructions are executed when the F152 (RMRD)/F153 (RMWT) instruction execution enabled flag (R9035) is on. 0: Execution inhibited (RMRD/RMWT instruction being executed) R9035 1: Execution enabled The F152 (RMRD) instruction only enables a request to be sent.
High−level Instructions F155 (SMPL) P155 (PSMPL) Availability Sampling start FP2/FP2SH/FP10SH FP−X (V2.00 or more) FPΣ (V3.10 or more)/FP0R Starts sampling data which is preset in trace memory. Outline Program example Boolean Ladder Diagram Address Trigger Instruction 10 ST 11 F155 R 10 (SMPL) R10 F155 SMPL 10 Explanation of example When the execution condition (trigger) R10 turns on, sampling of a relay (contact) and register registered in advance is carried out.
High−level Instructions Sampling traces This is a function which samples the on/off status of the registered relay and the data stored in the register, either periodically or when the appropriate conditions have been fulfilled, and stores the results in memory. It can be used to confirm changes in the data. 16 relays points and 3 words of registers can be set. Procedure for executing a sampling trace 1.
High−level Instructions F156 (STRG) P156 (PSTRG) Availability Sampling stop FP2/FP2SH/FP10SH FP−X (V2.00 or more) FPΣ (V3.10 or more)/FP0R Stops sampling data. Outline Program example Ladder Diagram Trigger Boolean Address Instruction 10 ST 11 F156 R 10 (STRG) R10 10 F156 STRG Explanation of example When the execution condition (trigger) R10 turns on, a sampling trace stop command trigger is applied.
High−level Instructions Sampling traces This is a function which samples the on/off status of the registered relay and the data stored in the register, either periodically or when the appropriate conditions have been fulfilled, and stores the results in memory. It can be used to confirm changes in the data. 16 relays points and 3 words of registers can be set. Procedure for executing a sampling trace 1.
High−level Instructions F157 (CADD) P157 (PCADD) Time addition Adds specified time data (hours, minutes, and seconds) to date (years, months, and days) and clock (hours, minutes, and seconds) data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P157 (PCADD)” is not available.
High−level Instructions Explanation of example Adds the time data stored in data registers DT11 and DT10 to the clock/calendar data stored in special data registers DT9054 to DT9056 (DT90054 to DT90056) when trigger R0 turns on. The result is stored in data registers DT32, DT31, and DT30.
High−level Instructions Flag conditions ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − The data specified by S1 and S2 is not BCD data. − The data specified by S1 is not the date/clock data. − The data specified by S2 is not the time data. − The specified data exceeds the area.
High−level Instructions F158 (CSUB) P158 (PCSUB) Time substruction Subtracts specified time data (hours, minutes, and seconds) from date (years, months, and days) and clock (hours, minutes, and seconds) data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P158 (PCSUB)” is not available.
High−level Instructions Explanation of example Subtracts the time data stored in data registers DT11 and DT10 from the date/clock data stored in data registers DT9054 to DT9056/ DT90054 to DT90056) when trigger R0 turns on. The result is stored in data registers DT32, DT31, and DT30.
High−level Instructions Flag conditions ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − The data specified by S1 and S2 is not BCD data. − The data specified by S1 is not the date/clock data. − The data specified by S2 is not the time data. − The specified data exceeds tha area.
High−level Instructions Usage example: Computing the elapsed time The elapsed time can be computed using the F158 (CSUB) instruction. Using the calendar timer, store the starting time and ending time in the data memory, and compute the elapsed time between the two values. An example in which operation was stopped at 08:02:15 and resumed at 10:30:25 will be used to show how the time that operation was stopped is computed. The computation can be thought of as subtracting 08:02:15 from 10:30:25.
High−level Instructions F159 (MTRN) FPΣ/FP−X/FP0R Availability Serial data communication FPΣ/FP−X/FP0R This is used to send data to or receive data from an external device through the specified RS232C port.
High−level Instructions FPΣ/FP−X/FP0R Description This instruction is used to send and receive instructions and data when an external device (computer, measuring instrument, bar code reader, etc.) has been connected to the specified RS232C port. 1) Transmission Transmits “n” bytes of the data stored in the data table that begins from the starting area specified in “S” through the communication port specified in “D” to an external device.
High−level Instructions FPΣ/FP−X/FP0R Programming and operation during transmission To execute transmission, write the data to be transmitted to the data table and specify with an F158(MTRN) instruction. Use an F0(MV) or F95(ASO) instruction to write the data to be transmitted to the transmission data storage area specified in “S”. − Do not include an end code in the transmission data. An end code is added automatically.
High−level Instructions FPΣ/FP−X/FP0R Program Specify the starting address of the transmission data table in “S”, and the number of data bytes to be transmitted in “n”. R0 Write the transmission data to the data table. F1 DMV, H44434241, DT101 F1 DMV, H48474645, DT103 R1 1 DF 1 Transmit the data in the data table.
High−level Instructions FPΣ/FP−X/FP0R Preparation for reception Setting of COM 1 port reception buffer No. 416 and No. 417 The area of data registers DT0 up to DT2047 is the default reception buffer. The maximum number of bytes that can be received is 4094 bytes. Specify start area as No. 416. No. of received bytes Reception data storage area Setting of COM 2 port reception buffer (This setting is not available for the FP0R.) Specified number of words for No. 417 No. 418 and No.
High−level Instructions FPΣ/FP−X/FP0R Programming and operation during reception Data sent from an external device connected to the RS232C port is stored in the data registers that have been set as the reception buffer. Data registers are used for the reception buffer. Specify the data registers in system registers 416 to 419. The number of bytes of data received is stored in the starting address of the reception buffer. The initial value is “0”.
High−level Instructions FPΣ/FP−X/FP0R Table of related flags and system registers Item For COM1 For COM2 For Tool Transmission mode flag R9032 R9042 R9040 Reception done flag R9038 R9048 R903E Transmission done flag R9039 R9049 R903F Beginning of reception buffer Specified in 416 Specified in 418 Specified in 420 Reception buffer capacity Specified in 417 Specified in 419 Specified in 421 Program The reception done flag (R9038/9048) turns on when data reception from the external de
FPΣ/FP−X/FP0R High−level Instructions Notes To perform repeated reception of data, refer to the following steps. 1) Receive data 2) Reception done (R9038/R9048: on, reception prohibited) 3) Process received data 4) Execute F159(MTRN) instruction (R9038/R9048: off, reception possible) 5) Receive subsequent data The reception done flag (R9038/R9048) also changes during scanning.
High−level Instructions F159 (MTRN) P159 (PMTRN) FP2/FP2SH Serial data communication (for MCU COM port) Availability FP2/FP2SH Data is transmitted to external equipment via the COM port of the specified MCU. Outline This function is available from FP2/FP2SH Ver. 1.50 or later.
High−level Instructions FP2/FP2SH Description 1) It is used to transmit commands or data to the COM port (COM1 or COM2) of the specified MCU unit connecting with external equipment (such as PC, measuring instrument, barcode reader). Note: The operation mode of the communication port of the MCU should be set to the general−purpose serial communication mode.
High−level Instructions FP2/FP2SH 9) The communication parameter data consists of 11 words. 1) Unit number setting value (K1 to K99) 2) Baud rate setting value (K0 to K10) *2 *2.
High−level Instructions FP2/FP2SH Flag conditions ・Error flag (R9007) (R9008): − It turns on, when the specified address using the index modifier exceeds a limit. − It turns on, when the MCU unit does not exist in the slot No. specified by [D]. − It turns on, when the MCU unit does not exist in the slot No. specified by [D] − It turns on, when the data device specified by [S] exceeds the area. − It turns on, when the transmitted byte number specified by [n] is outside of the specified area.
High−level Instructions FP2/FP2SH F161 (MRCV) Serial data reception P161(PMRCV) (for MCU COM port) Availability FP2/FP2SH Data is received from external equipment via the COM port of the specified MCU. Outline This function is available from FP2/FP2SH Ver. 1.50 or later.
High−level Instructions FP2/FP2SH Description 1) It is used to receive commands or data for the COM port (COM1 or COM2) of the specified MCU unit connecting with external equipment (such as PC, measuring instrument, barcode reader). Note: The operation mode of the communication port of the MCU should be set to the general−purpose communication mode. 2) The received data is readout to the communication port of the MCU unit in the slot No.
High−level Instructions FP2/FP2SH If nine or more data should be received, the MCU unit detects the received buffer full error. If the received buffer FULL error is detected, the MCU unit prohibits the reception of data in that channel and inform about the error. The byte number which can be received in one buffer is maximum of 2048 bytes (including terminal code). However, the data which can be received with the MRCV do not include terminal code.
High−level Instructions F160 (DSQR) 32-bit data square root P160 (PDSQR) Takes the square root of the specified 32-bit data. For the FP0R, FPΣ and FP−X, the P type high−level instruction “P160 (PDSQR)” is not available.
High−level Instructions Description The square root of 32-bit data specified by S1 is calculated and stored in the 32-bit area specified by D. In the result, the digits beyond the decimal point are disregarded. √(S+1, S) → (D+1, D) Flag conditions ・Error flag (R9007): ・Error flag (R9008): 3 − 436 Turns on and stays on when: Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − The data specified by S is a negative value.
High−level Instructions FP0/FPΣ/FP−X/FP0R Availability F0 (MV) High−speed counter control FP0/FP0R/FPΣ/FP−X This instruction is used to perform control such as software reset, counter disabling, and high−speed counter instruction clearing.
High−level Instructions Flag conditions FP0/FPΣ/FP−X/FP0R ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area is exceeded when an index modifier is used − The “S” is outside specification range Using the FP0/FP−e High−speed counter and Pulse output controls flag area Four bits are allocated to each high−speed counter channel for use as the control code write area DT9052 (DT90052 on the FP0 T32) A control code written using an F0(MV) instructi
High−level Instructions FP0/FPΣ/FP−X/FP0R Program example Example: Software reset of channel 0 of high−speed counter. X3 DF F0 MV, H4, DT9052 F0 MV, H0, DT9052 Using the FPΣ High−speed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below. The control code written by the F0 (MV) instruction is stored in the control code monitor area while it is written in the special register DT90052. (Refer to the table below.
High−level Instructions FP0/FPΣ/FP−X/FP0R Program example Example 1: Software reset of channel 0 of high−speed counter R0 DF F0 MV, H1, DT90052 F0 MV, H0, DT90052 Example 2: Software reset of channel 2 of high−speed counter R0 DF F0 MV, H2001, DT90052 F0 MV, H2000, DT90052 Using the FP−X High−speed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below.
High−level Instructions FP0/FPΣ/FP−X/FP0R Program example Example 1: Software reset of channel 0 of high−speed counter R0 DF F0 MV, H1, DT90052 F0 MV, H0, DT90052 Example 2: Software reset of channel 1 of high−speed counter R0 DF F0 MV, H1001, DT90052 F0 MV, H1000, DT90052 Note: FP−X Ry type At the reset input setting, you set whether the reset input (X2 or X5) of the pulse I/O cassette, which was assigned by the system register high−speed counter setting, will be enabled or disabled.
High−level Instructions FP0/FPΣ/FP−X/FP0R High−speed counter control for FP0R, FPΣ and FP−X Channel No.
High−level Instructions FP0/FP−e/FPΣ/FP−X/FP0R Availability F0 (MV) Pulse output control FP0/FP0R/FP−e/ FPΣ/FP−X This instruction is used to perform control such as software reset, counter disabling, and stopping pulse output.
High−level Instructions Flag conditions FP0/FP−e/FPΣ/FP−X/FP0R ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area is exceeded when an index modifier is used − The “S” is outside specification range Using the FP0/FP−e High−speed counter and Pulse output controls flag area Four bits are allocated to each Pulse output channel for use as the control code write area DT9052 (DT90052 on the FP0 T32) A control code written using an F0(MV) instructio
High−level Instructions FP0/FP−e/FPΣ/FP−X/FP0R Program example Example 1: Software reset of channel 0 of Pulse output. R0 DF F0 MV, H1, DT9052 F0 MV, H0, DT9052 Example 2: Enable near home input during pulse output control and change to deceleration. X3 DF F0 MV, H4, DT9052 F0 MV, H0, DT9052 Using the FPΣ High−speed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below.
High−level Instructions FP0/FP−e/FPΣ/FP−X/FP0R Program example Example 1: Software reset of Pulse output (ch0) R0 DF F0 MV, H1, DT90052 F0 MV, H0, DT90052 (ch2) R0 DF F0 MV, H2001, DT90052 F0 MV, H2000, DT90052 Example 2: Enable near home input during pulse output control and change to deceleration.
High−level Instructions FP0/FP−e/FPΣ/FP−X/FP0R Using the FP−X High−speed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below. The control code written by the F0 (MV) instruction is stored in the control code monitor area while it is written in the special register DT90052. (Refer to the table below.) The written data is the data for lower 8 bits only.
High−level Instructions FP0/FP−e/FPΣ/FP−X/FP0R Example 2: Enable near home input during pulse output control and change to deceleration. (ch0) X3 DF F0 MV, H110, DT90052 F0 MV, H100, DT90052 (ch1) X3 DF F0 MV, H1110, DT90052 F0 MV, H1100, DT90052 Using the FP0R High−speed counter and Pulse output controls flag area The area DT90052 for writing channels and control codes is allocated as shown below.
High−level Instructions FP0/FP−e/FPΣ/FP−X/FP0R Availability Writing and reading the high−speed counter and pulse output elapsed value F1 (DMV) FP0/FP0R/FP−e/ FPΣ/FP−X This instruction is used to write and read the elapsed value of the high−speed counter/pulse output.
High−level Instructions FP0/FP−e/FPΣ/FP−X/FP0R Writing the elapsed value This instruction writes the 32−bit data specified in “S” to the elapsed value area of the high−speed counter and pulse output channel being used, and simultaneously sets the data in the elapsed value area of the high−speed counter used inside the system. Make sure the 32−bit data value that is written to the elapsed value is within the following range.
High−level Instructions FP0/FP−e/FPΣ/FP−X/FP0R Program examples The elapsed value area varies depending on the model and channel number. Example 1: On R0 input, the value in data register DT4 is set in the ch0 elapsed value area as the set value. R0 DF F1 DMV, DT4, DT9044 Decrement input X0 R0 Value in DT4 0 Time Setting set value Example 2: On R1 input, the elapsed value of the ch0 is stored in data register DT100.
High−level Instructions FP0/FP−e/FPΣ/FP−X/FP0R Table of channel number and elapsed value area For FP0/FP−e High−speed counter channel no. Pulse output channel no. Elapsed value area ch0 ch0 DT9044 to DT9045 ch1 ch1 DT9048 to DT9049 ch2 − DT9104 to DT9105 ch3 − DT9108 to DT9109 For FP0(T32) High−speed counter channel no. Pulse output channel no.
High−level Instructions FP0/FP−e/FPΣ/FP−X/FP0R For FP−X Tr type High−speed counter channel no. Pulse output channel no.
High−level Instructions F165(CAM0) FP0R Availability Cam control (High−speed counter control) FP0R This instruction enables the control according to the maximum of 31−point target values for the high−speed counter. [Feature] An interrupt program can be also executed whenever the elapsed value reaches each target value.
High−level Instructions FP0R To perform the control with the maximum target value, positive integer numbers must be specified for all the target position data. [When the maximum value control is performed] Using the maximum target value of data table or hardware/software reset signal enables the value to return to the starting address of data table. (V1.
High−level Instructions FP0R Precautions during programming To use this instruction, the high−speed counter function must be used. The high−speed counter control flag (R9110 to R9115) corresponding to the specified channel turns on when the execution condition of F165(CAM0) instruction turns on until the cam control is cleared.
High−level Instructions FP0R *1: Specification of high−speed counter channel Specify the channel of the high−speed counter/pulse output with H constant in the starting area (2 words) of the data table.
High−level Instructions FP0R Example of setting 1 [Condition] (1) Target values: 4 points Position output from R10 (2) Each target value is as the table below. Position output Target value 1 (R11) 2000 2 (R12) 4000 3 (R13) 8000 4 (R14) 10000 (3) The maximum value is 14000 pulses. (4) The elapsed value of the high−speed counter is cleared to 0 before starting the position output.
High−level Instructions FP0R Explanation of program operation When adding + subtracting elapsed values with the maximum target value When the internal relay R3 is on, the operation is as follows. Elapsed value of high−speed counter Max. target value K14000 K10000 K8000 K4000 K2000 Time R3 R9110 R10 R11 R12 R13 R14 Example of setting 2 [Condition] (1) Cam output: 4 points Output from R10 to R13 (2) The target values for each cam are as the table below.
High−level Instructions FP0R Explanation of program operation When adding + subtracting elapsed values with the maximum target value and interrupt control, the operation will be performed as below if the following conditions are met; Elapsed value when the instruction is executed: K−4000 < Elapsed value < K4000 Internal relay R3: ON *The operation can be started once the interrupt program is permitted to be started with ICTL instruction.
High−level Instructions Availability Target value match on (with channel specification) F166(HC1S) FP0/FP0R/FP−e/ FPΣ/FP−X When the elapsed value of the specified channel of the high−speed counter matches the target value, the specified output is turned on.
High−level Instructions High−speed counter control flag varies FP0, FPΣ, FP−e FP−X, FP0R R903A R9110 (Refer to next page) The number of the high−speed counter control flag varies depending on the channel used. Regarding the channel number and control flag for each model, refer to the table on the next page.
High−level Instructions FP0/FP−e/FPΣ/FP−X Flag conditions ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area is exceeded when an index modifier is used. − The “n” is outside specification range. − The “S” is outside specification range. − The “D” is outside specification range. − The high−speed counter has not been set for the specified channel by the system register. FP0, FP−e Channel No.
High−level Instructions F166(HC1S) FP0R Availability Target value match on (High−speed counter control) FP0R When the elapsed value of the specified channel of the high−speed counter (HSC) matches the target value, the specified output is turned on.
High−level Instructions FP0R Possible specification range for “Yn”: Devices specified for the match ON/OFF output Type Device area FP0R Y0 to Y1F However, for the device that is not implemented, only the memory turns ON/OFF. Example of target value match on setting When specifying the high−speed counter Condition (1) Specify the high−speed counter channel number 0. (2) Set the target value to 10000. (3) Set the output coil to be turned off when the values match to Y2.
High−level Instructions FP0R FP0R Channel No.
High−level Instructions FP0R F166(HC1S) Availability Target value match on (Pulse output control) FP0R When the elapsed value of the specified pulse output channel matches the target value, the specified output is turned on. Outline Program example Boolean Ladder Diagram R0 DF Address F166 HS1S , H100, K10000, Y2 n S Instruction 10 ST 11 DF 12 F166 D R 0 (HC1S) H 100 K 10000 Y 2 n The channel number of the pulse output that corresponds to the match output.
High−level Instructions FP0R Example of target value match on setting When specifying the pulse output Condition (1) Specify the pulse output channel number 0. (2) Set the target value to 10000. (3) Set the output coil to be turned off when the values match to Y2.
High−level Instructions FP0R FP0R For pulse output Channel Pulse output No.
High−level Instructions F167(HC1R) Availability Target value match off (with channel specification) FP0/FP0R/FP−e/ FPΣ/FP−X When the elapsed value of the specified channel of the high−speed counter matches the target value, the specified output is turned off.
High−level Instructions High−speed counter control flag varies FP0, FPΣ, FP−e FP−X, FP0R R903A R9110 (Refer to next page) The number of the high−speed counter control flag varies depending on the channel used. Regarding the channel number and control flag for each model, refer to the table on the next page.
High−level Instructions Flag conditions FP0/FP−e/FPΣ/FP−X ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area is exceeded when an index modifier is used. − The “n” is outside specification range. − The “S” is outside specification range. − The “D” is outside specification range. − The high−speed counter has not been set for the specified channel by the system register. FP0, FP−e Channel No.
High−level Instructions FP0R F167(HC1R) Availability Target value match off (High−speed counter control) FP0R When the elapsed value of the specified channel of the high−speed counter (HSC) matches the target value, the specified output is turned off.
High−level Instructions FP0R Possible specification range for “Yn”: Devices specified for the match ON/OFF output Type Device area FP0R Y0 to Y1F However, for the device that is not implemented, only the memory turns ON/OFF. Example of target value match OFF setting When specifying the high−speed counter Condition (1) Specify the high−speed counter channel number 0. (2) Set the target value to 10000. (3) Set the output coil to be turned off when the values match to Y2.
High−level Instructions FP0R FP0R Channel No.
High−level Instructions F167(HC1R) FP0R Availability Target value match off (Pulse output control) FP0R When the elapsed value of the specified pulse output channel matches the target value, the specified output is turned off. Outline Program example Boolean Ladder Diagram R0 DF Address F167 HS1R, H100, K10000, Y2 n S Instruction 10 ST 11 DF 12 F167 D R 0 (HC1R) H 100 K 10000 Y 2 n The channel number of the pulse output that corresponds to the match output.
High−level Instructions FP0R Example of target value match OFF setting When specifying the pulse output Condition (1) Specify the pulse output channel number 0. (2) Set the target value to 10000. (3) Set the output coil to be turned off when the values match to Y2.
High−level Instructions FP0R FP0R For pulse output Channel Pulse instruction No.
High−level Instructions FP0/FP−e 5 F168(SPD1) Availability Positioning control (trapezoidal control) FP0/FP−e Outputs a pulse from the specified output (Y0 or Y1) according to the specified parameter. Program example Outline Boolean Ladder Diagram Address Trigger 10 R0 Instruction 10 ST 11 F168 DT F168 SPD1 , DT100 , K 0 0 (SPD1) 100 K n S R S Starting address for the area that contains the data table. n Output Yn that corresponds to the pulse output (n: K0 or K1).
High−level Instructions FP0/FP−e Description of operating mode Incremental Outputs the pulses set with the target value.
High−level Instructions FP0/FP−e (*1): Specify the control code by setting the constant H. H□□□ Pulse width specification 0: Duty 50% 1: Fixed pulse width (approx. 80µs) Note: A specification of 2 or higher will result in 0. The pulse width is the output value from the IC and the actual pulse width varies due to the delay in the response of photocoupler.
High−level Instructions FP0/FP−e 2: For FP0 compatibility mode Pulses are output using a duty of 25% fixedly. (The setting is invalid.) The pulse output will start approx. 300us later after the direction output. (The characteristics of a motor driver is considered.
High−level Instructions FP0/FP−e 5 F168(SPD1) Availability Positioning control (home position return) FP0/FP−e Outputs a pulse from the specified output (Y0 or Y1) according to the specified parameter. Program example Outline Boolean Ladder Diagram Address Trigger 10 R0 Instruction 10 ST 11 F168 DT F168 SPD1 , DT100 , K 0 0 (SPD1) 100 K n S R S Starting address for the area that contains the data table. n Output Yn that corresponds to the pulse output (n: K0 or K1).
High−level Instructions FP0/FP−e Description of operating mode Until the home input (X0 or X1) is entered, the pulse is continuously output. To decelerate the movement when near the home, set the bit corresponding to DT9052 to off → on → off → with the near home input. During operation, the elapsed value area and set value area will become insufficient. At the completion of operations, the elapsed value will become 0.
High−level Instructions FP0/FP−e (*1): Specify the control code by setting the constant H. H□□□ Pulse width specification 0: Duty 50% 1: Fixed pulse width (approx. 80µs) Note: A specification of 2 or higher will result in 0. The pulse width is the output value from the IC and the actual pulse width varies due to the delay in the response of photocoupler.
High−level Instructions FP0/FP−e 2: For FP0 compatibility mode Pulses are output using a duty of 25% fixedly. (The setting is invalid.) The pulse output will start approx. 300us later after the direction output. (The characteristics of a motor driver is considered.
High−level Instructions FP0/FP−e Caution regarding pulse output function (F168 and F169) Use a program such as the following when performing continuous motor rotation in one direction.
High−level Instructions 5 F169(PLS) FP0/FP−e Pulse output (with channel specification) (JOG operation) Availability FP0/FP−e Outputs the pulse of the specified parameter from the specified output (Y0 or Y1). Program example Outline Boolean Ladder Diagram Address Trigger 10 R10 Instruction 10 ST 11 F169 DT F169 PLS , DT10 , K 0 K n S S Starting address for the area that contains the data table. n Output Yn that corresponds to the pulse output (n: K0 or K1).
High−level Instructions FP0/FP−e Data table settings S Control code S+1 Frequency (Hz) (*1) K40 to K10000 (Hz) (*2) (*1): Specify the control code by setting the constant H. H□□□ Pulse width specification 0: Fixed pulse width (approx. 80µs) (CPU ver. 2.1 or later) 1 to 9: Duty ration approx.
High−level Instructions FP0/FP−e 2: For FP0 compatibility mode Pulses are output using a duty of 25% fixedly. (The setting is invalid.) The pulse output will start approx. 300us later after the direction output. (The characteristics of a motor driver is considered.) Precautions during programming If both the regular program and the interrupt program contain code for the same channel, make sure both are not executed simultaneously.
High−level Instructions FP0/FP−e 5 F170(PWM) Availability PWM output (with channel specification) FP0/FP−e Outputs the PWM of the specified parameter from the specified output (Y0 or Y1). Program example Outline Boolean Ladder Diagram Address Trigger 10 R10 Instruction 10 ST 11 F170 DT F170 PWM , DT20 , K 0 K n S S Starting address for the area that contains the data table. n Output Yn that corresponds to the PWM output (n: K0 or K1).
High−level Instructions FP0/FP−e Data table settings S Control code S+1 Duty (%) H0 to H16 (*1) K1 to K999 (0.1% to 99.9%) (*1): Control code contents (frequency settings) FP0 Setting FP0 compatibility mode of FP0R Frequency (Hz) Period (ms) Frequency (Hz) Period (ms) H11 1000 1.0 1000 1.0 H12 714 1.4 750 1.3 H13 500 2.0 500 2.0 H14 400 2.5 400 2.5 H15 200 5.0 200 5.0 H16 100 10.0 100 10.0 H0 38 26.3 40 25.0 H1 19 52.6 20 50.0 H2 9.5 105.3 10 100.
High−level Instructions FPΣ/FP−X 5 F171(SPDH) Pulse output (with channel specification) (trapezoidal control) Availability FPΣ/FP−X This instruction outputs pulses from the specified channel for the pulse output according to the specified parameters. Program example Outline Boolean Ladder Diagram Address Trigger 10 R10 DF F171 SPDH , DT100 , K 0 Instruction 10 ST 11 DF 12 F171 DT n S R 10 (SPDH) 100 K S Starting address of area containing the data table.
High−level Instructions FPΣ/FP−X The control code, initial speed, maximum speed, acceleration/deceleration time, and target value are specified by creating the data table “S” to “S+11” on the following page using the user program. The frequency is changed using the specified acceleration/deceleration time from the initial speed to the maximum speed. During deceleration, the frequency is changed based on the same slope as during acceleration.
High−level Instructions FPΣ/FP−X Operation modes Incremental Outputs the pulses set with the target value.
High−level Instructions FPΣ/FP−X Setting the data table f Fmax Output pulse number Fmin t t Acceleration time t Deceleration time S S+1 Control code (*1) S+2 S+3 Initial speed Fmin (Hz) (*2) S+4 S+5 Maximum speed Fmax (Hz) (*2) S+6 S+7 Acceleration/decele (*3) ration time t (ms) S+8 S+9 Target value (pulse number) S+10 S+11 (*4) K0 (*1): Specification of control code (specify with H constant) H□□□□□□□□ 0: Fixed Number of acceleration/deceleration steps 0: 30 steps 1: 60 steps (Can be s
High−level Instructions FPΣ/FP−X Application example R0 F1 DMV, H1100, DT 0 F1 DMV, K1000, DT 2 F1 DMV, K7000, DT 4 F1 DMV, K300, DT 6 F1 DMV, K100000, DT 8 F1 DMV, K 0, DT 10 R1 (DF) F171 SPDH, DT 0, K 0 7kHz Output pulse number 100,000 1kHz 300ms f 300ms With 30 steps: f = (7000 − 1000) ÷ 30 steps = 200(Hz) t = 300ms ÷ 30 steps = 10ms t With 60 steps: (FPΣ V1.
High−level Instructions 5 F171(SPDH) FPΣ/FP−X Pulse output (with channel specification) (home position return) Availability FPΣ/FP−X This instruction outputs pulses from the specified channel for the pulse output according to the specified parameters. Program example Outline Boolean Ladder Diagram Address Trigger 10 R10 DF F171 SPDH , DT100 , K 2 Instruction 10 ST 11 DF 12 F171 DT n S R 10 (SPDH) 100 K S Starting address of area containing the data table.
High−level Instructions FPΣ/FP−X For FP−X Tr type Channel no. Output ch0 Y0 CW PLS Y1 CCW SIGN Y4 or Y8 ch1 Deviation counter clear Y2 CW PLS Y3 CCW SIGN Y5 or Y9 ch2 Output method Deviation counter clear Y4 CW PLS Y5 CCW SIGN No deviation counter clear control ch3 Y6 CW PLS Y7 CCW SIGN No deviation counter clear control Note) There is no ch3 for C14T and C14TD. Note) C14T and C14TD is Y4 or Y5. C30T, C30TD, C60T and C60TD is Y8 or Y9.
High−level Instructions FPΣ/FP−X For FP−X Tr type Channel no. Control flag ch0 R911C ch1 R911D ch2 R911E ch3 R911F Elapsed value area Target value area DT90348 DT90350 DT90349 DT90351 DT90352 DT90354 DT90353 DT90355 DT90356 DT90358 DT90357 DT90359 DT90360 DT90362 DT90361 DT90363 Near home home input X4 DT90052 X5 X6 X7 Note) There is no ch3 for C14T and C14TD. Operation modes Return to home position Pulses are output continually until home input (X2 or X5) occurs.
High−level Instructions FPΣ/FP−X Setting the data table S S+1 Control code (*1) S+2 S+3 Initial speed Fmin (Hz) (*2) S+4 S+5 Maximum speed Fmax (Hz) (*2) S+6 S+7 Acceleration/deceleration time t (ms) (*3) S+8 S+9 Deviation counter clear signal output time tr(ms) (*4) (*1): Control code specification (specify with an H constant) H□□□□□□□□ 0: Fixed Number of acceleration/deceleration steps 0: 30 steps 1: 60 steps (Can be specified for only FPΣ V1.4 or more and FP−X.
High−level Instructions FPΣ/FP−X (*4): Deviation counter clear signal output time Set the deviation counter clear signal output time. 0.5 ms to 100 ms [K0 to K100] Set value and margin of error (0.5 ms or less) Specify K0 when not using this signal or when specifying 0.
FPΣ/FP−X Flag conditions ・Error flag (R9007): ・Error flag (R9008): High−level Instructions Turns on and stays on when: Turns on for an instant when: − The area is exceeded when an index modifier is used. − The “n” is outside specification range. − The data of “S, S+1” to “S+4, S+5” are outside specification range. − The “S+2, S+3” > “S+4, S+5”. − With the FP−X, the pulse output has not been set by the system register.
High−level Instructions 5 F171(SPDH) FP0R Availability Pulse output (Trapezoidal control) FP0R Outputs pulses from the specified pulse output channels according to the specified parameters. [Feature] An acceleration time and deceleration time can be set respectively. Also, the deceleration stop is available. The target speed can be changed.
High−level Instructions FP0R The pulse output frequency can be changed by rewriting the target speed during the pulse output. Two control methods are available, which are type 0 and type 1. Using the type 0, the speed can be changed within the range of the target speed specified first. Using the type 1, the speed can be accelerated/decelerated up to the range of the maximum frequency, regardless of the target speed specified fist.
High−level Instructions FP0R Pules output channels and areas used Channel No.
High−level Instructions FP0R Change of speed during pulse output (1)With the type 0, if a value larger than the target speed at start−up is specified, it will be corrected to the target speed at start−up. With the type 1, if the target value is set to a value larger than 50kHz, it will be corrected to 50kHz. (2)If the elapsed value crosses over the acceleration forbidden area starting position during accelerating, acceleration cannot be performed.
High−level Instructions FP0R [Explanation of pulse output operation] Pulses are output using a duty of 25% fixedly. When using the PLS +SIGN method, pulses will be output approx. 300 us later after the output of direction signal. (The characteristics of a motor driver is considered.
High−level Instructions FP0R Data table Refer to the Sample program1. Sample program3: Trapezoidal control type 0, with change of speed R0 ( DF ) F1 DMV, H10000000, DT0 F1 DMV, K1000, DT2 F1 DMV, K7000, DT4 Frequency 7kHz 5kHz Output pulse number F1 DMV, K450, DT8 F1 DMV, K300, DT6 F1 DMV, K100000, DT10 R1 R2 F171 SPDH, DT0, K0 ( DF ) F1 DMV, K5000, DT4 100,000 1kHz 450ms R1 R2 Deceleration Time 300ms Deceleration stop When changing the target value, keep the trigger ON.
High−level Instructions FP0R Sample program4: Trapezoidal control type 1, with change of speed R0 Frequency ( DF ) F1 DMV, H10010000, DT0 50kHz F1 DMV, K1000, DT2 F1 DMV, K25000, DT4 F1 DMV, K600, DT8 F1 DMV, K400, DT6 R2 1kHz 300ms F1 DMV, K100000, DT10 R1 Output pulse number 100,000 25kHz 300ms F1 DMV, K20000, DT4 Time 400ms Deceleration stop F171 SPDH, DT0, K0 ( DF ) 200ms R1 R2 When changing the target value, keep the trigger ON.
High−level Instructions FP0R 5 F171(SPDH) Availability Pulse output (JOG positioning type 0) FP0R Outputs the specified number of pulses and performs the deceleration stops after the position control starting input during the pulse output.
High−level Instructions FP0R Image of operation: When the target speed does not change Frequency Target speed Target value Initial speed Acceleration Flag Position control starting input Time Deceleration time Position control starting input Pulse output instruction flag Image of operation: When the target speed changes Frequency Target speed Target value Initial speed Acceleration Flag Position control starting input Position Time control Deceleration starting input time When changing the target
High−level Instructions FP0R Pulse output channels and areas used Channel Output Output type No.
High−level Instructions FP0R Assignment of control code (Specify with H constant) H 10: Fixed When the target value has been set to 0, it will stop when the position control starting input turns on. (Only V1.06 or later) For reversing the output when the target value has been set to 0, set the output type of control code to 4, 5, 6 instead of 0, 1, 2. Control assignment 1: JOG positioning Control assignment 2 0: Type 0 Interrupt execution assignment 0: Execute in main program.
FP0R High−level Instructions Flag conditions ・Error flag (R9007): ・Error flag (R9008): − Turns on when the area specified using the index modifier exceeds the limit. − Turns on when n is out of the specified range. − Turns on when each data of [S,S+1] to [S+4,S+5] is out of the specified range. − Turns on when [S+2,S+3]>[S+4,S+5]. − Turns on when [S+10,S+11] is out of the specified range. − Turns on when the pulse output has not been set by the system register.
High−level Instructions 5 F171(SPDH) FP0R Availability Pulse output (JOG positioning type 1) FP0R Outputs the specified number of pulses changing the target speed again and performs the deceleration stop after the position control starting input during the pulse output.
High−level Instructions FP0R The initial speed may be corrected to enable accelerating/decelerating within the specified time. Frequency Target speed 2 Target value Target speed 1 Initial speed Acceleration Change time Time Deceleration time Flag Position control starting input Note) Note that the position control starting input will be disregarded even if it is turned on during acceleration.
High−level Instructions FP0R Setting the data table S S+1 Control code S+2 S+3 Initial speed (Hz) S+4 S+5 Target speed 1 (Hz) S+6 S+7 Acceleration time (ms) Acceleration/deceleration time range (ms) K1 to K32760 (Unit: ms) S+8 S+9 Target speed 2 (Hz) Velocity range (Frequency) (Hz) 1Hz to 50kHz [K1 to K50000 (Unit: Hz)] S+10 S+11 Change time (ms) K1 to K32760 (Unit: ms) S+12 S+13 Deceleration time (ms) K1 to K32760 (Unit: ms) S+14 S+15 Target value (No.
High−level Instructions FP0R Assignment of control code (Specify with H constant) H 10: Fixed Control assignment 1: JOG positioning Control assignment 2 1: Type 1 Interrupt execution assignment 0: Execute in main program. 1: Execute in interrupt program. (The trigger is the level type.) *As for the output assignment When starting the instruction with the setting of “1: Calculation only”, the pulse output is not performed.
High−level Instructions FP0R Flag conditions ・Error flag (R9007): ・Error flag (R9008): − Turns on when the area specified using the index modifier exceeds the limit. − Turns on when n is out of the specified range. − Turns on when each data of [S,S+1] to [S+4,S+5] is out of the specified range. − Turns on when [S+8,S+9] is out of the specified range. − Turns on when [S+2,S+3]>[S+4,S+5]. − Turns on when [S+2,S+3]>[S+8,S+9]. − Turns on when [S+14,S+15] is out of the specified range.
High−level Instructions FPΣ/FP−X F172 (PLSH) Availability Pulse output (with channel specification) (JOG operation) FPΣ/FP−X Outputs the pulses of the specified parameter from the specified channel for the pulse output.
High−level Instructions FPΣ/FP−X For FP−X Tr type Channel no. Output ch0 ch1 ch2 ch3 Output method Y0 CW PLS Y1 CCW SIGN Y2 CW PLS Y3 CCW SIGN Y4 CW PLS Y5 CCW SIGN Y6 CW PLS Y7 CCW SIGN Note) There is no ch3 for C14T and C14TD. Note) The pulse I/O cassette (AFPX−PLS) cannot be installed on the FP−X Tr type. Note) Use the ch2 and ch3 at up to 20 kHz.
High−level Instructions FPΣ/FP−X Precautions during programming During the time that the circular interpolation control flag R904E is on, the pulse output instructions F166 to F176 cannot be executed. When using this instruction for FPΣ, the setting for the channels corresponding to system registers no. 400 and no. 401 should be set to “High−speed counter not used”. When using this instruction for FP−X, set the pulse output by the system register.
High−level Instructions FPΣ/FP−X Data table settings Mode with no target value S S+1 Control code S+2 S+3 Frequency Target value match stop mode (*1) S S+1 Control code (*1) (*2) S+2 S+3 Frequency (*2) S+4 S+5 Target value (*3) (*1): Control code specification (specify with an H constant) H□□□□□□□□ 0: Fixed Target value setting 0: Mode with no target value 1: Target value match stop mode (Can be specified for only FPΣ V1.4 or more and FP−X.
High−level Instructions FP0R 5 Double word compare: Start equalPulse output (JOG operation type 0 and 1) F172(PLSH) Availability FP0R Performs the pulse output from the specified pulse output channels according to the specified parameters. [Feature] Acceleration time and deceleration time can be set individually. The deceleration stop is also available. The target speed can be changed.
High−level Instructions FP0R Precautions during programming When the same channel is described in a normal program and interrupt program both, do not execute them at the same time. This instruction cannot be executed when the corresponding pulse output instruction flag to the channel started is on. If rewriting during RUN is performed during the pulse output, the pulse output stops during the program is being rewritten. It is not effective if the control code is changed after starting the instruction.
High−level Instructions FP0R (3) For deceleration, the speed cannot be lower than the deceleration minimum speed. For information on the deceleration minimum speed, refer to the special registers.
High−level Instructions FP0R Absolute The pulse that is the difference between the specified target value and the current value is output.
High−level Instructions FPΣ/FP−X F173(PWMH) Availability PWM output (with channel specification) FPΣ/FP−X/FP0R Outputs the PWM of the specified parameter from the specified channel for the PWM output.
High−level Instructions FPΣ/FP−X/FP0R For FP−X Ry type (AFPX−PLS) Channel no. Output Control flag ch0 Casette mounting part 1 Y100 R911C Y200 R911D ch1 Casette mounting part 2 For FP−X Tr Channel no. Output Control flag ch0 Y0 R911C ch1 Y2 R911D ch2 Y4 R911E ch3 Y6 R911F Note) There is no ch3 for FPX−C14T. Note) The pulse I/O cassette (AFPX−PLS) cannot be installed on the FP−X Tr type. Note) Use the ch2 and ch3 at up to 20 kHz. For FP0R Channel no.
High−level Instructions FPΣ/FP−X/FP0R Flag conditions ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The specified area is exceeded when an index is modified. − The n is any value other than 0 or 2. − The control code is outside specification range. (During instruction startup) − The duty is higher than 100%. (During instruction startup) − With the FP−X, the PWM output has not been set by the system register.
High−level Instructions FPΣ/FP−X/FP0R For FP0R K Frequency (Hz) Period (ms) K3 6 166.67 K4 7.5 133.33 K5 12.5 80.00 K6 25 40.00 K7 50 20.00 K8 100 10.00 K9 200 5.00 K10 400 2.50 K11 600 1.67 K12 800 1.25 K13 1000 1.00 K14 1200 0.83 K15 1600 0.63 K16 2000 0.50 K17 3000 0.33 K18 4800 0.
High−level Instructions FPΣ/FP−X 5 F174(SP0H) Pulse output (with channel specification) (Selectable data table control operation) Availability FPΣ/FP−X Outputs the pulses from the specified channel for the pulse output according to the specified data table. Program example Outline Boolean Ladder Diagram Address Trigger 10 R10 DF F174 SP0H , DT100 , K 0 Instruction 10 ST 11 DF 12 F174 DT n S R 10 (SP0H) 100 K S Starting address of area containing the data table.
High−level Instructions FPΣ/FP−X For FP−X Tr type Channel no. Output ch0 ch1 ch2 ch3 Output method Y0 CW PLS Y1 CCW SIGN Y2 CW PLS Y3 CCW SIGN Y4 CW PLS Y5 CCW SIGN Y6 CW PLS Y7 CCW SIGN Note) There is no ch3 for C14T and C14TD. Note) The pulse I/O cassette (AFPX−PLS) cannot be installed on the FP−X Tr type. Note) Use the ch2 and ch3 at up to 20 kHz.
High−level Instructions FPΣ/FP−X Precautions during programming The high−speed counter control flag R903A (R903C) is on from the time that the execution condition for the F174 (SP0H) instruction has gone on until the pulse output stops. During the time that the high−speed counter control flag R903A (R903C) is on, the high−speed counter and pulse output instructions F166 to F176, which use the same control flag, cannot be executed.
High−level Instructions FPΣ/FP−X Setting the data tabler [S] Control code (*1) [S+2] Frequency 1 (*2) [S+4] Target value 1 (Number of pulses) (*3) [S+6] Frequency 2 [S+8] Target value 2 (Number of pulses) [S+2n] Frequency n [S+2(n+1)] Target value n (Number of pulses) [S+2(n+2)] K0 End of table (Pulse output stops.) (*1): Specification of control code “H constant” Upper word 0: Fixed Duty (on width) 0: Duty 1/2 (50%) 1: Duty 1/4 (25%) H□□□ □□□ □□ Frequency range 0: 1.5 Hz to 9.
High−level Instructions FPΣ/FP−X Program example [Operation content] Pulse output from the specified channel ch0 begins at 1,000 Hz when the F174 1. (SP0H) instruction execution condition (trigger) R10 goes on. 2. At the point when 1,000 pulses have been counted at a frequency of 1,000 Hz, the frequency switches to 2,500 Hz. At the point when 3,000 pulses have been counted at a frequency of 2,500 Hz, the frequency switches to 5,000 Hz.
High−level Instructions 5 F174(SP0H) FP0R Availability Pulse output (Arbitrary data table control operation) FP0R Outputs pulses from the specified pulse output channels according to the specified data table.
High−level Instructions FP0R Pules output channels and areas used Channel No.
High−level Instructions FP0R *1: Assignment of control code (Specify with H constant) H 10: Fixed Control assignment 0: Arbitrary table control 000: Fixed Operation mode assignment 0: Incremental 1: Absolute Output type assignment 0: CW/CCW 1: PLS+SIGN (Forward OFF/Reverse ON) 1: PLS+SIGN (Forward ON/Reverse OFF) *2: Velocity range (Frequency) (Hz) 1Hz to 50kHz [K1 to K50000 (Unit: Hz)] *3: Target value range (ms) K−2,147,483,648 to K2,147,483,647 32−bit data value specified for
High−level Instructions FP0R Setting and program Control assignment: Arbitrary table control, operation mode: Incremental, the output type is CW/CCW.
High−level Instructions 5 F175(SPSH) FPΣ/FP−X Availability Pulse output (Linear interpolation) FPΣ C32T2, C32T2H C28P2, C28P2H/FP−X Pulses are output from channel for 2 pulse output, in accordance with the parameters in the designated data table, so that the path to the target position forms a straight line.
High−level Instructions FPΣ/FP−X The control code, initial speed, maximum speed, acceleration/deceleration time, and target value are specified by creating the data table “S” to “S+11” on the following page using the user program. If the frequency is set to 40 kHz or more, specify a duty of 1/4 (25%). If the frequency for ch2 or ch3 of FP−X Tr type is set to 10kHz or more, specify a duty of 1/4 (25%). Table of areas used For FPΣ Channel no.
High−level Instructions FPΣ/FP−X Precautions during programming Designate settings for the target value and movement distance so they are within the following range. −8,388,608 to +8,388,607 When using in combination with other positioning instructions like F171, designate so the target value is within the above range, even in those instructions. When using in application requiring precision, check with the actual machine.
High−level Instructions FPΣ C32T2/FP−X Setting the data table [S] Control code (*1) [S+2] Composite speed Initial speed Fmin(Hz) (*2) [S+4] Composite speed Maximum speed Fmax(Hz) (*2) [S+6] Acceleration/Deceleration time T (ms) [S+8] X−axis (CH0) Target value (Movement distance) (*4) [S+10] Y−axis (FPΣ: CH2, FP−X: CH1) Target value (Movement distance) (*4) [S+12] X−axis (CH0) component speed Initial speed Fxmin [S+14] X−axis (CH0) component speed Maximum speed Fxmax [S+16] Y−axis (FP
High−level Instructions FPΣ C32T2/FP−X Note: Cautions regarding specification of composite speed (initial speed) The trajectory might not be linear if the initial composite speeds for CH0 and CH2 are not 1.5 Hz or higher in the formula below (when the formula below can’t be worked out). 1.5 (∆x2+∆y2) f ∆x ∆x: Short CH of distance between target and current value ∆y: Long CH of distance between target and current value When using ch2, ch3 of FP−X Tr type, 1.
High−level Instructions FPΣ C32T2/FP−X Example: With incremental, initial speed 300Hz, maximum speed 5kHz, acceleration/deceleration time 0.5s, CH0 target value 1000, CH2 target value 50 300 × 1000 = 299.626Hz CH0 component initial speed = (10002 + 502) CH2 component initial speed = 300 × 50 (10002 + 502) = 14.981Hz CH0 number of acceleration/deceleration steps = 500 × 10−3 × 299.626 CH2 number of acceleration/deceleration steps = 500 × 10−3 × 14.981 147.8 ⇒ 60 steps 7.
High−level Instructions 5 F175(SPSH) FP0R Availability Pulse output (Linear interpolation) FP0R Pulses area output from channel for 2 pulse output, in accordance with the parameters in the designated data table, so that the path to the target position forms a straight line.
High−level Instructions FP0R Table of areas used FP0R Pulse output channel No.
High−level Instructions FP0R *1: Assignment of control code (Specify with H constant) H 10: Fixed Control assignment 0: Interpolation *As for the output assignment Type 0: Linear interpolation When starting the instruction with the setting of “1: Calculation only”, the pulse output is not performed. When starting the instruction with the assignment of the same channel and the same parameter after executing this instruction once for a channel, it can be started at high speed.
High−level Instructions FP0R *2: Composite speed range (Initial speed, Maximum speed ) (Hz) 6.0Hz to 50kHz [K6 to K50000] (However, 6.0 Hz is for an angle of 0 deg or 90 deg only. Also, specify K6 when specifying 6.0 Hz.) − When specifying K1 to K5, it is the same as 6.0 Hz (K6). − If initial speed is set equal to maximum speed, pulses will be output with no acceleration/deceleration. − Set the composite speed so that component speed of each axis is 6 Hz or greater.
High−level Instructions FP0R Flag conditions ・Error flag (R9007): ・Error flag (R9008): − Turns on when the area is exceeded when an index modifier is used. − Turns on when the “n” is other than 0. − Turns on when the data “S, S+1 to S+!0, S+11” of data table are outside specification range.
High−level Instructions FPΣ 5 Availability Pulse output (Circular interpolation) F176(SPCH) FPΣ C32T2, C32T2H C28P2, C28P2H Pulses are output from channel ch0 and ch2, in accordance with the parameters in the designated data table, so that the path to the target position forms an circular.
High−level Instructions FPΣ C32T2/FP−X Flag for circular interpolation R904E: Circular interpolation control flag Turns ON when circular interpolation instruction F176 starts up and maintains that state until the target value is reached. R904F: Set value change confirmation flag When conducting control with the continuous mode for performing continuous circular interpolation actions, use this after circular interpolation instruction startup when overwriting the next target value.
High−level Instructions FPΣ C32T2/FP−X Setting the data table Pass position setting method S S+1 Control code S+2 S+3 Composite speed (Frequency) Fv (Hz) S+4 S+5 X−axis (CH0) Target position S+6 S+7 Y−axis (CH2) Target position S+8 S+9 X−axis (CH0) Pass position S+10 S+11 Y−axis (CH2) Pass position S+12 S+13 Radius S+14 S+15 X−axis (CH0) Center position S+16 S+17 Y−axis (CH0) Center position Center position setting method (*1) S S+1 Control code (*1) (*2) S+2 S+3 Composite speed (
High−level Instructions FPΣ C32T2/FP−X (*3): Target position and pass position K−8388608 to K8388607 (*4): Operation connection mode Stop: When stop (0) is specified, it will stop when the target position is reached. Continue: When the following circular interpolation data table is overwritten when continue (1) is specified after circular interpolation action begins, the following circular interpolation begins when the first circular interpolation that was started up finishes (target position reached).
High−level Instructions FP0R 5 F177(HOME) Availability Pulse output (Home return) FP0R Performs the home return operation on the specified pulse output channels.
High−level Instructions FP0R Table of areas used FP0R Pulse output Output channel No.
High−level Instructions FP0R Assignment of control code (Specify with H constant) H 10: Fixed Control assignment 0: Home return Control assignment type 0: Home return type 0 0: Home return type 1 00: Fixed Operation mode assignment 0: Forward 1: Reverse Output type assignment 0: CW/CCW 1: PLS+SIGN (Forward OFF/Reverse ON) 2: PLS+SIGN (Forward ON/Reverse OFF) Output type Mode selection CW/CCW Operation mode PLS+SIGN Forward OFF Reverse ON PLS+SIGN Forward ON Reverse OFF Elapsed value Forward Output f
High−level Instructions FP0R Precautions during programming Even in the state that the home input turns on, once this instruction is executed, the pulse output starts. If the near home input becomes effective during the acceleration, the deceleration operation will start. When the same channel is described in a normal program and interrupt program both, do not execute them at the same time. This instruction cannot be executed when the corresponding control flags to each channel are on.
High−level Instructions FP0R 5 F178(PLSM) Availability Input pulse measurement FP0R Measures the number of pulses and the pulse period of the specified high−speed counter channel when using the high−speed counter function. Program example Outline Boolean Ladder Diagram 10 R3 DF Address 10 ST 11 F178 F178 PLSM , DT100 , DT101 , DT200 S1 R 3 (PLSM) DT 100 DT 101 DT 200 Constant Index modifier D S2 Instruction S1 Specification of channel No. and No. of moving average.
High−level Instructions FP0R Specification of each item Specifying the channel number and number of moving average [S1] Specify the channel number of the high−speed counter and number of moving average. If necessary, specify the measurement of pulse period. Setting of measurement limit for measuring period in 1ms unit 0: No measurement limit process 1:100ms 2:200ms 3:300ms 4:500ms 5:1s 6:2s 7:5s 8:10s 9:60s A: Undefined any more S1 n Measurement of No. of moving Channel No.
High−level Instructions FP0R A maximum of approx. 174.7 ms can be measured in 1us unit. A maximum of approx. 49.7 days can be measured in 1ms unit. Period measurement data When measurement starts, −1 is set. When measurement limit is exceeded, −1 is set. Precautions during programming The same channel cannot be specified at the same time with other high−speed counter control instructions .
High−level Instructions FP0R Flag conditions ・Error flag (R9007): ・Error flag (R9008): − Turns on when the area specified using the index modifier exceeds the limit. − [S1] Turns on when the specified channel is out of the specified range. − [S1] Turns on when the number of moving average is out of the specified range. − [S2] Turns on when the counting period is out of the specified range. − [D] Turns on when the range data to be stored exceeds the area.
High−level Instructions FP–e F180 (SCR) Availability FP−e screen display registration FP−e Instruction to register the screen displayed in the N mode and S mode. Outline Program example Boolean Ladder Diagram Address Trigger 10 Instruction 10 ST 11 F180 H R0 F180 SCR, H0, DT 10, DT100, DT 101 S1 S3 S2 S4 R 0 (SCR) 0 DT 10 DT 100 DT 101 S1 FP−e screen mode and number (Specify between 0 and 3.
High−level Instructions Flag conditions FP–e ・Error flag (R9007): Turns on and stays on when: ・Error flag (R9008): Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − The value of S1 or S2 exceeds the limit of specified range. How to specify S1 Specify the type of FP−e mode.
High−level Instructions FP–e S2+1: Second word Specifies the method for displaying data in the upper. The bits shown in the figure below are allocated. Please specify with the H constant. S2+2: Third word Specifies the method for displaying data in the lower. The bits shown in the figure below are allocated. Please specify with the H constant.
High−level Instructions F181 (DSP) FP–e Availability FP−e screen display switching FP−e Specify the screen to be displayed on the FP−e. Outline Program example Boolean Ladder Diagram Address Trigger 10 Instruction 10 ST 11 F181 DT R0 R 0 (DSP) 0 F181 DSP, DT 0 S FP−e screen mode and number (Specify between 0 and 7.
High−level Instructions FP–e Availability F182 (FILTR) FP−X V2.0 or more FPΣ V3.10 or more FP0R Time constant processing The filter processing is executed for the specified bits and the bitwise results are output.
High−level Instructions FP–e Precautions during programming When the system detects a leading edge of the trigger, all the bits of the input specified by S1 is unconditionally output. Max. 1 scan time error in the filter processing time occurs occasionally. Explanation of example The changes in values of R0 or X0 to XF, when the conditions prior to the execution of this instruction (R0=0) are as below, are explained with a time chart.
High−level Instructions 5 F183 (DSTM) Auxiliary timer (32-bit ) Outline Sets the 32−bit ON−delay timer for 0.01 s units (0.01 to 21474836.
High−level Instructions Timer set time The timer setting is entered as a value of 0.01 x (timer set value). The timer set value is specified as a K constant within the range of K1 to K2147483647. The F183 (DSTM) is set between 0.01 and 21,474,836.47 seconds, in units of 0.01 seconds. If the set value is K500, the set time will be 0.01 x 500 = 5 seconds.
High−level Instructions 3 If the values in the elapsed value area (D +1, D) reach (S + 1, S), relays being used are turned on by the OT instruction which comes next in the program. The special internal relay R900D also goes on at this point.
High−level Instructions 3 − 574
High−level Instructions F190 (MV3) P190 (PMV3) Three 16-bit data move Copies three 16-bit data to the specified 48-bit area (3 words). For the FP0R/FPΣ/FP−X, the P type high−level instruction “P190 (PMV3)” is not available.
High−level Instructions Explanation of example When trigger R0 turns on, − the contents of data register DT10 are copied to DT40. − the contents of data register DT20 are copied to DT41. − the contents of data register DT30 are copied to DT42.
High−level Instructions F191 (DMV3) Three 32-bit data move P191 (PDMV3) Outline Copies three 32-bit data to the specified 96-bit area (6 words). For the FP0R/FPΣ/FP−X, the P type high−level instruction “P191 (PDMV3)” is not available.
High−level Instructions Explanation of example When trigger R0 turns on, − the contents of data register DT11 and DT10 are copied to data registers DT41 and DT40. − the contents of data register DT21 and DT20 are copied to DT43 and DT42. − the contents of data register DT31 and DT30 are copied to DT45 and DT44.
High−level Instructions F215 (DAND) 32-bit data AND P215 (PDAND) Outline Performs bit-wise AND operation on two 32-bit data items. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P215 (PDAND)” is not available.
High−level Instructions Description Performs AND operation on each bit in the 32-bit equivalent constant or 32-bit data specified by “S1+1 and S1” and “S2+1 and S2” when the trigger turns on. The AND operation result is stored in the 32-bit area specified by D. Flag conditions ・Error flag (R9007): ・Error flag (R9008): ・= flag (R900B): 3 − 580 Turns on and stays on when the area specified using the index modifier exceeds the limit.
High−level Instructions F216 (DOR) P216 (PDOR) Outline 32-bit data OR Performs bit-wise OR operation on two 32-bit data items. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P216 (PDOR)” is not available.
High−level Instructions Description Performs OR operation on each bit in the 32-bit equivalent constant or 32-bit data specified by “S1+1 and S1” and “S2+1 and S2” when the trigger turns on. The OR operation result is stored in the 32-bit area specified by D. Flag conditions ・Error flag (R9007): ・Error flag (R9008): ・= flag (R900B): 3 − 582 Turns on and stays on when the area specified using the index modifier exceeds the limit.
High−level Instructions F217 (DXOR) 32-bit data XOR P217 (PDXOR) Outline Performs bit-wise exclusive OR operation on two 32-bit data items. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P217 (PDXOR)” is not available.
High−level Instructions Description Performs exclusive OR operation on each bit in the 32-bit equivalent constant or 32-bit data specified by “S1+1 and S1” and “S2+1 and S2” when the trigger turns on. The exclusive OR operation result is stored in the 32-bit area specified by D. You can use this instruction to check how many bits in two 32-bit data items are the same.
High−level Instructions F218 (DXNR) 32-bit data XNR P218 (PDXNR) Performs bit-wise exclusive NOR operation on two 32-bit data items. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P218 (PDXNR)” is not available.
High−level Instructions Description Performs exclusive NOR operation on each bit in the 32-bit equivalent constant or 32-bit data specified by “S1+1 and S1” and “S2+1 and S2” when the trigger turns on. The exclusive NOR operation result is stored in the 32-bit area specified by D. You can use this instruction to check how many bits in two 32-bit data items are the same.
High−level Instructions F219 (DUNI) P219 (PDUNI) 32-bit data unites Unites two 32-bit data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P219 (PDUNI)” is not available.
High−level Instructions Explanation of example [S1+1, S1]: HCCCCAAAA [S2+1, S2]:H33335555 [DT10] [DT11] [DT20] [DT21] Inverted [S3+1, S3]:H0F0F0FF0 [S3+1, S3]:HF0F0F00F [DT30] [DT31] [Inverted DT30] [Inverted DT31] H03030550 HC0C0A00A [D+1, D]:HC3C3A55A [DT40] [DT41] Description The two groups of double word data specified by “S1+1 and S1” and “S2+1 and S2” are combined by bit unit processing using the master data specified by “S3+1 and S3” and stored in the 32−bit area specified by D.
High−level Instructions FP2/FP2SH/FP−X F230 (TMSEC) Time data P230 (PTMSEC) Availability second conversion FP2/FP2SH/FP−X FPΣ 32k/FP0R The specified time data (a date and time) is changed into the number of seconds. Outline With FP2/FP2SH, this function is available from Ver. 1.50 or later.
High−level Instructions Description 1) Conversion to the number of seconds from standard time *1 is performed for the input time data [S ~ S+2], and a conversion result is stored in [D, D+1] by the 32−bit binary. 2) The conversion is in consideration of the leap year. 1 minute −−− 60 seconds 1 hour −−− 60 minutes 1 day −−− 24 hours 1 year (leap year) −−− 366 days 1 year (except a leap year) −−− 365 days A leap year (4 multiple years) −−− Feb.
High−level Instructions FP2/FP2SH/FP−X F231 (SECTM) Second P231 (PSECTM) Availability time data conversion FP2/FP2SH/FP−X FPΣ 32k/FP0R The specified number of seconds is changed into time data (a date and time). Outline With FP2/FP2SH, this function is available from Ver. 1.50 or later.
High−level Instructions Description 1) The input number of seconds (S) is converted to the time data based on standard time *1, and stored in (D). 2) The conversion is in consideration of the leap year. 1 minute −−− 60 seconds 1 hour −−− 60 minutes 1 day −−− 24 hours 1 year (leap year) −−− 366 days 1 year (except a leap year) −−− 365 days A leap year (4 multiple years) −−− Feb.29 3) The range which can specify the number of seconds (S) is 100 years which can be expressed by time data.
High−level Instructions F235 (GRY) P235 (PGRY) 16-bit data → Gray code Converts 16-bit data to gray code. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P235 (PGRY)” is not available.
High−level Instructions F236 (DGRY) 32-bit data → Gray code P236 (PDGRY) Converts 32-bit binary data to gray code. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P236 (PDGRY)” is not available.
High−level Instructions F237 (GBIN) P237 (PGBIN) 16-bit Gray code → 16-bit binary data Converts 16-bit gray code to 16-bit binary data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P237 (PGBIN)” is not available.
High−level Instructions F238 (DGBIN) P238 (PDGBIN) 32-bit Gray code → 32-bit binary data Converts gray code to 32-bit data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P238 (PDGBIN)” is not available.
High−level Instructions Binary/Hexadecimal/BCD/Gray Code Expressions Decimal Binary data Gray code 0 1 2 3 4 5 6 7 0000 0000 0000 0000 0000 0000 0000 0001 0000 0000 0000 0010 0000 0000 0000 0011 0000 0000 0000 0100 0000 0000 0000 0101 0000 0000 0000 0110 0000 0000 0000 0111 0000 0000 0000 0000 0000 0000 0000 0001 0000 0000 0000 0011 0000 0000 0000 0010 0000 0000 0000 0110 0000 0000 0000 0111 0000 0000 0000 0101 0000 0000 0000 0100 8 9 10 11 12 13 14 15 0000 0000 0000 1000 0000 0000 0000 1001 0000 00
High−level Instructions 3 − 598
High−level Instructions F240 (COLM) P240(PCOLM) Outline Bit line to bit column conversion Converts a selected bit line to a bit column. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P240 (PCOLM)” is not available.
High−level Instructions Explanation of example When the specified bit position n = 10 S 15 0 0 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1 15 D 0 10 1 D+1 0 D+2 0 D+3 1 D+4 1 D+5 0 D+6 1 D+7 1 D+8 1 D+9 0 D+10 0 D+11 0 D+12 1 D+13 0 D+14 1 D+15 0 Description The bit data at the position specified by “n” of the 16-word data area with the head address D is rewritten using the 16-bit data of the area specified by S.
High−level Instructions F241 (LINE) P241(PLINE) Bit column to bit line conversion Converts a specified bit column to a bit line. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P241 (PLINE)” is not available. Outline Program example Boolean Ladder Diagram Address Trigger R0 F241 LINE, DT10, 10 10 ST 11 F241 K10, DT20 n S Instruction D S Starting address of area where bit column will be read.
High−level Instructions Explanation of example When the specified bit position n = 10 15 S S+1 0 S+2 0 S+3 1 S+4 1 S+5 0 S+6 1 S+7 1 S+8 1 S+9 0 S+10 0 S+11 0 S+12 1 S+13 0 S+14 1 S+15 0 D 0 10 1 15 0 0 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1 Description Reads the bit data at the position specified by “n” from the area specified by S and stores it in the area specified by D. “n” can be set between 0 and 15.
High−level Instructions FPΣ/FP−X/FP0R Availability 5 F250 (BTOA) Binary ASCII conversion FP−X/FPΣ 32k/FP0R Converts 16−bit/32−bit binary data to ASCII code.
High−level Instructions FPΣ/FP−X/FP0R Specifying the conversion method [N] Example of converting 16−bit data (K1234 and K56) to decimal ASCII codes R1 ( DF ) F251 F250 ATOB, BTOA, M D−16, 16−D, DT S210,, DT20, H 214 , DT100 D Notes About the digit number of ASCII data • When converting 16−bit data to hexadecimal ASCII codes Specified range: H1 to 4 When less than H4, the specified number of digits is stored from the lower bytes.
High−level Instructions FPΣ/FP−X/FP0R About normal direction and reverse direction (only when converting to hexadecimal ASCII data) Conversion examples Converts 16−bit data (K1234 and K56) to decimal ASCII codes. DT10 = K 1234 DT11 = K 56 ”1234__56” When No. of converted data is “2”, Starting position for storing is “0”, Size of the area for storing is “4”.
High−level Instructions FPΣ/FP−X/FP0R Converts 32−bit data (K1234 and K56789) to decimal ASCII codes. DT10、11 = K 1234 DT12、13 = K 56789st ”___1234__56789” When No. of converted data is “2”, Starting position for storing is “1”, Size of the area for storing is “7”. R0 ( DF ) F251 BTOA, F250 ATOB, M 32−D, D−16, DT10 DT 10,, HDT20, 217 , DT100 DT 100 Converts 16−bit data (H0123 and H89AB) to hexadecimal ASCII codes. DT10 = H 123 DT11 = H 89AB ”2301AB89” When No.
High−level Instructions FPΣ/FP−X/FP0R Converts 32−bit data (H00000123 and H0089ABCD) to hexadecimal ASCII codes (Normal direction) DT10、11 = H 123 DT12、13 = H 89ABCD ”230100CDAB89” When No. of converted data is ”2”, Starting position for storing is ”0”, Size of the area for storing is ”6”.
High−level Instructions FPΣ/FP−X/FP0R Availability 5 F251 (ATOB) ASCII Binary conversion FP−X/FPΣ 32k/FP0R Converts ASCII code to 16−bit/32−bit binary data.
High−level Instructions FPΣ/FP−X/FP0R Specifying the conversion method [N] Example of converting the ASCII data string ”123456789012” to decimal 3 digits x 4 data R0 ( DF ) F251 ATOB, M D−16, DT S210,, H DT20, 413 , DT100 D When converting by the above program: About normal direction and reverse direction The conversions in the normal direction and reverse direction are available for hexadecimal ASCII data. Example of converting ”0123456789ABCDEF”.
High−level Instructions FPΣ/FP−X/FP0R Conversion examples Examples of converting to decimal 3 digits x 4 data (when no comma ”,” exists) Converts to 16−bit data. ”123456789012” DT100 DT100 DT102 DT103 = = = = K K K K 123 456 789 12 When No. of numeric data is “4”, Starting position for reading is “1”, Digit No. of numeric data is “3”.
High−level Instructions FPΣ/FP−X/FP0R Example of converting to decimal number x 4 data (in case of comma−deliminated “,” data) ”12,345,6789,0,” * The last of character strings is a comma. DT100 DT101 DT102 DT103 = = = = K K K K 12 345 6789 0 When No. of numeric data is “4”, Starting position for reading is “1”, Digit No. of numeric data is “4”. (Converts to 16−bit data) * Specify the maximum digit number.
High−level Instructions FPΣ/FP−X/FP0R Particular examples If there is numeric data larger than the specified digit number between commas. (Example: Decimal number x 4, the digit number of the numeric data is 4) ”1234,567890,12,345” K K K K K 1234 5678 90 12 345 The overflowed numbers become one numeric data. It is ignored.
High−level Instructions FPΣ/FP−X/FP0R Availability 5 F252 (ACHK) Outline FP−X (V2.00 or more) FPΣ 32k/FP0R ASCII data check Checks whether the specified ASCII data is correct or not.
High−level Instructions Flag conditions FPΣ/FP−X/FP0R Σ Error flag (R9007): Turns on and stays on when Σ Error flag (R9008): Turns on for an instant when − There is an error in the control string specified by S1. − The direction of converted data is changed to the normal direction when the conversion format specified by S1 is in decimal. − The size of the area for storing ASCII codes specified by N exceeds the rated value when the conversion format specified by S1 is in hexadecimal.
High−level Instructions Overview of Character String Instructions F257 (SCMP) to F265 (SREP) Configuration of character string instruction data tables Data tables for character strings show the character string size, the number of characters, and the character data. 15 S 0 Max. number of characters that can be stored Character string size S+1 No.
High−level Instructions How data tables are set Specify the values for the character string size and number of characters. The F0 (MV) instruction is used to specify values. Specify the characters. The F95 (ASC) instruction is used to specify characters. Example: The example shows (character string size “16 characters”, “no specification of characters”) for DT0.
High−level Instructions F257 (SCMP) P257 (PSCMP) Comparing character strings These instructions compare two specified character strings and output the judgment results to a special internal relay. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P257 (PSCMP) cannot be specified.
High−level Instructions Description The character string specified for “S1” is compared to that specified for S2, and the judgment result is output to special internal relays R9009 to R900C (judgment flags for comparison instructions). R9009 to R900C are assigned based on whether “S1” or “S2” is larger, as shown in the table below.
High−level Instructions F258 (SADD) P258 (PSADD) Character string coupling These instructions couple one character string with another. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P258 (PSADD) cannot be specified.
High−level Instructions Description The character string specified for “S1” is coupled to that specified for “S2”, and the result is stored in the character string specified by “D”. At the starting address of the area for storing results “D”, designate the character string size using the user program.
High−level Instructions F259 (LEN) P259 (PLEN) Number of characters in a character string These instructions determine the number of characters in a character string. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P259 (PLEN) cannot be specified.
High−level Instructions Explanation of example DT0 10 DT1 8 “B” “D” DT4 “1” DT5 “3” DT2 DT3 “A” “C” “E” = DT100 8 “2” DT6 Higher Lower 16 bits 16 bits Description The number of characters in the character string specified by “S” is determined, and the result is stored in “D”. Precautions during programming If the number of characters is larger than the character size string, an operation error occurs.
High−level Instructions F260 (SSRC) P260 (PSSRC) Search for character string These instructions search for a specified character string. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P260 (PSSRC) cannot be specified.
High−level Instructions Explanation of example The DT0 character is searched from the character string of DT10, and the result is stored in DT120.
High−level Instructions F261 (RIGHT) P261 (PRIGHT) Retrieving data from character strings (right side) These instructions retrieve a specified number of characters from the right side of the character string. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P261 (PRIGHT) cannot be specified.
High−level Instructions Explanation of example A character is retrieved from the end of the character string of DT0, and is sent to DT20.
High−level Instructions F262 (LEFT) P262 (PLEFT) Retrieving data from character strings (left side) These instructions retrieve a specified number of characters from the left side of the character string. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P262 (PLEFT) cannot be specified.
High−level Instructions Explanation of example A character is retrieved from the beginning of the character string of DT0, and is sent to DT20.
High−level Instructions F263 (MIDR) P263 (PMIDR) Retrieving a character string from a character string These instructions retrieve a character string consisting of a specified number of characters from the specified position in the character string. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P263 (PMIDR) cannot be specified.
High−level Instructions Explanation of example Three characters are retrieved from the position byte 1 (second character) of the character string of DT0, and are sent to DT20.
High−level Instructions F264 (MIDW) P264 (PMIDW) Writing a character string to a character string These instructions write a specified number of characters from a character string to a specified position in the character string. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P264 (PMIDW) cannot be specified.
High−level Instructions Explanation of example Three characters are retrieved from the character string of DT0, and are sent to the position byte 1 (second character) of the character string block of DT20.
High−level Instructions F265 (SREP) P265 (PSREP) Replacing character strings These instructions replace a specified number of characters in a character string with the same number of different characters, starting from a specified position. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P265 (PSREP) cannot be specified.
High−level Instructions Explanation of example The DT0 character string is replaced with the number of characters in DT1 (5 characters) from byte p=1 in DT20. In this case, n=3 characters of the data stored in the source are deleted in the replacement.
High−level Instructions F270 (MAX) P270(PMAX) Maximum value search in 16-bit data table Searches for a maximum value in a table of 16-bit areas. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P270 (PMAX)” is not available.
High−level Instructions Precaution during programming Even if D+1 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.) Flag conditions ・Error flag (R9007): ・Error flag (R9008): 3 − 636 Turns on and stays on when: Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − S1 > S2. − The areas of S1 and S2 are different.
High−level Instructions F271 (DMAX) P271(PDMAX) Maximum value search in 32-bit data table Searches for a maximum value in a table of 32-bit areas. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P271 (PDMAX)” is not available.
High−level Instructions If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower word had been specified. Double word data table S1: S1+1: Lower word 0 Higher word S1+2: 1 D: Lower word D+1: Higher word D+2: Maximum value Relative address S1+3: S2−1: Lower word S2: Higher word n Relative address If there are several values which are a maximum value, the relative address of the first value found searching from S1 is stored in D+2.
High−level Instructions F272 (MIN) P272 (PMIN) Minimum value search in 16-bit data table Searches for a minimum value in a table of 16-bit areas. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P272 (PMIN)” is not available.
High−level Instructions Precaution during programming Even if D+1 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.) Flag conditions ・Error flag (R9007): ・Error flag (R9008): 3 − 640 Turns on and stays on when: Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − S1 > S2. − The areas of S1 and S2 are different.
High−level Instructions F273 (DMIN) Minimum value search in 32-bit data table P273 (PDMIN) Searches for a minimum value in a table of 32-bit areas. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P273 (PDMIN)” is not available.
High−level Instructions If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower word had been specified. Double word data table S1+1: Lower word 0 Higher word D+1: S1+2: 1 D+2: S1: D: Lower word Higher word Minimum value Relative address S1+3: S2−1: Lower word S2: Higher word n Relative address If there are several values which are a minimum value, the relative address of the first value found searching from S1 is stored in D+2.
High−level Instructions F275 (MEAN) P275(PMEAN) Total and mean numbers calculation in 16-bit data table Calculates the total and mean numbers in the specified word data table. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P275 (PMEAN)” is not available.
High−level Instructions Precaution during programming Even if D+2 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.) Flag conditions ・Error flag (R9007): ・Error flag (R9008): Turns on and stays on when: Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − S1 > S2. − The areas of S1 and S2 are different.
High−level Instructions F276 (DMEAN) Total and mean numbers calculation in 32-bit data table P276(PDMEAN) Calculates the total and mean numbers in the specified double word data table. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P276 (PDMEAN)” is not available.
High−level Instructions If S2 specifies a higher word of double word data, processing will take place over the same area as if the lower word had been specified. Double word data table S1: Lower word 0 S1+1: Higher word 1 S1+2: S1+3: S2−1: Specified areas Lower word n S2: Higher word Decimals of the average value are rounded off so that the average value is an integer.
High−level Instructions F277 (SORT) Sort data in 16-bit data table P277 (PSORT) (in smaller or larger number order) Sorts a string of data words. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P277 (PSORT)” is not available.
High−level Instructions Description The data words (signed) from the area specified by S1 to the area specified by S2 are sorted in ascending order (the smallest word is first) or descending order (the largest word is first) depending on the condition set with S3. If S1 = S2, sorting does not take place. The sort condition is specified as follows in S3: − K0: Ascending order − K1: Descending order Double sorting is used for the sorting method.
High−level Instructions F278 (DSORT) Sort data in 32-bit data table P278 (PDSORT) (in smaller or larger number order) Outline Sorts a string of data double words. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P278 (PDSORT)” is not available.
High−level Instructions Description The double data words (signed) from the area specified by S1 to the area specified by S2 are sorted in ascending order (the smallest word is first) or descending order (the largest word is first) depending on the condition set with S3. If S1 = S2, sorting does not take place. The sort condition is specified as follows in S3: − K0: Ascending order − K1: Descending order Double sorting is used for the sorting method.
High−level Instructions F282 (SCAL) P282 (PSCAL) Scaling of 16−bit data The output value Y is found for the input value X by performing scaling for the given data table. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P282 (PSCAL) cannot be specified.
High−level Instructions Description The output value for the input value X is found by performing scaling according to the data table, where the 16−bit data designated in “S1” is designated in “S2”. The number “n” of items in the data table is determined by the value “n” designated for the head “S2” of the data table.
High−level Instructions F283 (DSCAL) Scaling of 32−bit data P283 (PDSCAL) The output value Y is found for the input value X by performing scaling for the given data table. Outline With the FP0R/FPΣ/FP−X, the differential execution type instruction P283 (PDSCAL) cannot be specified.
High−level Instructions Description The output value for the input value X is found by performing scaling according to the data table, where the 32−bit data designated in “S1” is designated in “S2”. The number “n” of items in the data table is determined by the value “n” designated for the head “S2” of the data table.
High−level Instructions FP–e Availability F284 (RAMP) FP−X V2.0 or more FPΣ V3.10 or more FP0R Inclination output of 16−bit data Executes the linear output according to the elapsed time from the start by performing scaling with the output initial value, target value and time range.
High−level Instructions FP–e Explanation of example When specifying each value as below by the program: Flag conditions ・Error flag (R9007): ・Error flag (R9008): 3 − 656 Turns on and stays on when: Turns on for an instant when: − the area specified using the index modifier exceeds the limit. − the output time range specified by ”S3” is smaller than k1 or larger than k30000.
High−level Instructions F285 (LIMT) P285 (PLIMT) 16-bit data upper and lower limit control This instruction carries out upper and lower limit control for 16-bit data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P285 (PLIMT)” is not available.
High−level Instructions Description The 16-bit output value stored in the area specified by D is controlled based on whether or not the 16-bit input value specified by S3 falls within the range bounded by the upper and lower limits set in S2 and S1. The output value is determined based on the following conditions: − When the lower limit S1 is greater than the input value S3, the lower limit value S1 is stored in D as the output value.
High−level Instructions F286 (DLIMT) 32-bit data upper and lower limit control P286 (PDLIMT) This instruction carries out upper and lower limit control for 32-bit data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P286 (PDLIMT)” is not available.
High−level Instructions Description The output value (double words data) stored in the area specified by D is controlled based on whether or not the input value (double words data) specified by S3 falls within the range bounded by the upper and lower limits set in S2 and S1. The output value is determined based on the following conditions: − When the lower limits S1+1 and S1 are greater than the input value S3+1 and S3, the lower limit value S1+1 and S1 are stored in D+1 and D as the output value.
High−level Instructions F287 (BAND) 16-bit data deadband control P287 (PBAND) This instruction carries out dead-band control for 16-bit data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P287 (PBAND)” is not available. Outline Program example Boolean Ladder Diagram Address Trigger Instruction 10 ST 11 F287 (BAND) DT 10 DT 20 DT 30 DT 40 R0 10 F287 BAND, DT10, DT20, DT30, DT40 S1 S2 S3 D S1 The area where the lower limit is stored or the lower limit data.
High−level Instructions Description The output value (word data) stored in the area specified by D is controlled based on whether or not the input value (word data) specified by S3 falls within the dead-band bounded by the upper and lower limits set in S1 and S2. The output value is determined based on the following conditions: When the lower limit S1 is greater than the input value S3, the input value S3 minus the lower limit value S1 is stored in D as the output value.
High−level Instructions F288 (DBAND) 32-bit data deadband control P288 (PDBAND) This instruction carries out dead-band control for 32-bit data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P288 (PDBAND)” is not available. Outline Program example Boolean Ladder Diagram Address Trigger 10 ST 11 F288 (DBAND) DT 10 DT 20 DT 30 DT 40 R0 10 F288 DBAND, DT10, DT20, DT30, DT40 S1 S2 S3 Instruction D R 0 S1 The area where the lower limit is stored or the lower limit data.
High−level Instructions Description The output value (double word data) stored in the area specified by D is controlled based on whether or not the input value (double word data) specified by S3 falls within the dead-band bounded by the upper and lower limits set in S1 and S2.
High−level Instructions F289 (ZONE) 16-bit data zone control P289 (PZONE) This instruction carries out zone control for 16-bit data. For the FP0R/FPΣ/FP−X, the P type high−level instruction “P289 (PZONE)” is not available.
High−level Instructions Description The bias value specified by S1 or S2 is added to the input value (word data) specified by S3, and the output value is stored in the area specified by D. The output value is determined by the following conditions: When the input value S3 is less than zero, the input value S3 plus the negative bias value S1 is stored in D as the output value. When the input value S3 equals zero, zero is stored in D as the output value.
High−level Instructions F290 (DZONE) 32-bit data zone control P290 (PDZONE) This instruction carries out zone control for 32-bit data. (double words) For the FP0R/FPΣ/FP−X, the P type high−level Instruction “P290 (PDZONE)” is not available.
High−level Instructions Description The bias value specified by S1 or S2 is added to the input value (double word data) specified by S3, and the output value is stored in the area specified by D. The output value is determined by the following conditions: When the input value S3+1 and S3 are less than zero, the input value S3+1 and S3 plus the negative bias value S1+1 and S1 are stored in D+1 and D as the output value.
High−level Instructions F300 (BSIN) P300 (PBSIN) BCD type Sine operation Triangle functions, calculates trigonometric functions and the sine [SIN( )] of BCD code angular data, and stores it as BCD.
High−level Instructions Description The SIN([S]) of an angle data (units are degrees) specified by S is calculated and the result stored in the 3-word area beginning at D. SIN[S] → [D] [D+1]. [D+2] D: Sign D+1: Integer value D+2: Decimal Select a BCD value for S within the range 0° to 360° in units of 1 degree. Be sure to specify the value using BCD H data. The sign stored in D is 0 when the result of processing is positive, and 1 when the result is negative.
High−level Instructions F301 (BCOS) BCD type Cosine operation P301(PBCOS) Triangle functions, calculates trigonometric functions and the cosine [COS ( )] of BCD code angular data, and stores it as BCD.
High−level Instructions Description The COS([S]) of an angle data (units are degrees) specified by S is calculated and the result stored in the 3-word area beginning at D. COS[S] → [D] [D+1]. [D+2] D: Sign D+1: Integer value D+2: Decimal Select a BCD value for S within the range 0° to 360° in units of 1 degree. Be sure to specify the value using BCD H data. The sign stored in D is 0 when the result of processing is positive, and 1 when the result is negative.
High−level Instructions F302 (BTAN) P302 (PBTAN) BCD type Tangent operation Triangle functions, calculates trigonometric functions and the tangent [TAN ( )] of BCD code angular data, and stores it as BCD.
High−level Instructions Description The TAN([S]) of an angle data (units are degrees) specified by S is calculated and the result stored in the 3-word area beginning at D. TAN[S] → [D] [D+1]. [D+2] D: Sign D+1: Integer value D+2: Decimal Select a BCD value for S within the range 0° to 360° in units of 1 degree. Be sure to specify the value using BCD H data. The sign stored in D is 0 when the result of processing is positive, and 1 when the result is negative.
High−level Instructions F303 (BASIN) BCD type Arcsine operation P303 (PBASIN) Triangle functions, This instruction calculates arcsine [SIN−1 ( )].
High−level Instructions Description SIN−1 (the arcsine) of the value specified in S, S+1, and S+2 is calculated, and the result (an angle) is stored in D. SIN−1 ([S] [S+1]. [S+2]) → [D] S: Sign S+1: Integer value S+2: Decimal Set 0 for the sign in S when the data to be processed is positive, and set 1 for the sign when the data is negative. Set the integer and decimal parts of the data each within a range of 0 to 1.0000 in S+1 and S+2.
High−level Instructions F304 (BACOS) P304 (PBACOS) BCD type Arccosine operation Triangle functions, This instruction calculates arccosine [COS−1 ( )].
High−level Instructions Description COS−1 (the arccosine) of the value specified in S, S+1, and S+2 is calculated, and the result (an angle) is stored in D. COS−1 ([S][S+1]. [S+2]) → [D] S: Sign S+1: Integer value S+2: Decimal Set 0 for the sign in S when the data to be processed is positive, and set 1 for the sign when the data is negative. Set the integer and decimal parts of the data each within a range of 0 to 1.0000 in S+1 and S+2.
High−level Instructions F305 (BATAN) P305 (PBATAN) BCD type Arctangent operation Triangle functions, This instruction calculates arctangent [TAN−1 ( )].
High−level Instructions Description TAN−1 (the arctangent) of the value specified in S, S+1, and S+2 is calculated, and the result (an angle) is stored in D. TAN−1 ([S][S+1]. [S+2]) → [D] S: Sign S+1: Integer value S+2: Decimal Set 0 for the sign in S when the data to be processed is positive, and set 1 for the sign when the data is negative. Set the integer and decimal parts of the data each within a range of 0 to 9999.9999 in S+1 and S+2.
High−level Instructions F309 (FMV) P309 (PFMV) Outline Floating point data move Copies floating point data (32 bits) to the specified 32-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P309 (PFMV)” is not available. Program example Boolean Ladder Diagram Address Trigger R0 10 F309 FMV, 10 ST 11 F309 R 0 (FMV) f f 1.234, DT10 S Instruction 1.
High−level Instructions Description The floating point data (32 bits) specified by S is copied to the 32-bit area specified by D when the trigger turns on. Floating point data 15 Real number data 0 DT: Lower word D+1: Higher word Range of real number data which can be set are as follows: Positive: f0.0000001 to f9999999 Negative: f−9999999 to f−0.000001 Precaution during programming For FP0, this instruction F309 (FMV) cannot be programmed in the interrupt program.
High−level Instructions F310 (F+) P310 (PF+) Floating point data addition Adds two real number data items and stores the result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P310 (PF+)” is not available.
High−level Instructions Specifying the integer device with [D], the real numbers are automatically converted into integer data. R0 F310 F+, DT 0, DT 2, % DT 4 When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified. Program example The “f4.554” is stored to DT30 and DT31 when the R0 turns on. R0 F310 F+, f1.414, f3.14, DT30 The “f135.795” is stored to DT30 and DT31 when the R0 turns on. R0 F309 FMV, f12.345 DT10 F309 FMV, f12.
High−level Instructions F311 (F−) P311 (PF−) Floating point data subtraction Subtracts real number data from the minuend and stores the result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P311 (PF−)” is not available.
High−level Instructions Specifying the integer device with [D], the real numbers are automatically converted into integer data. R0 F311 F−, DT 0, DT 2, % DT 4 When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified. Program example The “f0.445” is stored to DT30 and DT31 when the R0 turns on. R0 F311 F−, f1, f0.555, DT30 The “f100.15” is stored to DT30 and DT31 when the R0 turns on. R0 F309 FMV, f100.1, DT10 F309 FMV, f0.
High−level Instructions F312 (F*) P312 (PF*) Floating point data multiplication Multiplies two real number data items and stores the result in the specified 32-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instructions are not available.
High−level Instructions Specifying the integer device with [D], the real numbers are automatically converted into integer data. R0 F312 F*, DT 0, DT 2, % DT 4 When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified. Program example The “f123.4000” is stored to DT30 and DT31 when the R0 turns on. R0 F312 F*, f1.234, f100, DT30 Precaution during programming For FP, this instruction F312 (F*) cannot be programmed in the interrupt program.
High−level Instructions F313 (F%) P313 (PF%) Floating point data division Divides real number data by the divisor and stores the divided result in the specified 32-bit area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P313 (PF%)” is not available.
High−level Instructions Specifying the integer device with [D], the real numbers are automatically converted into integer data. R0 F313 F%, DT 0, DT 2, % DT 4 When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified. Program example The “f5.432100” is stored to DT30 and DT31 when the R0 turns on. R0 F312 F%, f54.321, f10, DT30 Precaution during programming For FP, this instruction F313 (F%) cannot be programmed in the interrupt program.
High−level Instructions F314 (SIN) P314 (PSIN) Floating point data Sine operation Triangle functions, This instruction calculates sine [SIN ( )]. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P314 (PSIN)” is not available.
High−level Instructions Specifying the integer device with [D], the real numbers are automatically converted into integer data. R0 F314 SIN, DT 0, % DT 4 When the constant K is specified in S, the operations are the same as when a integer device is specified. Program example The “f0.4999999” is stored to DT20 and DT21 when the R0 turns on. Radians of 30 deg. R0 F314 SIN, f0.
High−level Instructions F315 (COS) P315 (PCOS) Floating point data Cosine operation Triangle functions, This instruction calculates cosine [COS ( )]. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P315 (PCOS)” is not available.
High−level Instructions Specifying the integer device with [D], the real numbers are automatically converted into integer data. R0 F315 COS, DT 0, % DT 4 When the constant K is specified in S, the operations are the same as when a integer device is specified. Program example The “f0.7071068” is stored to DT20 and DT21 when the R0 turns on. Radians of 45 ° R0 F315 COS, f0.
High−level Instructions F316 (TAN) P316 (PTAN) Floating point data Tangent operation Triangle functions, This instruction calculates tangent [TAN ( )]. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P316 (PTAN)” is not available.
High−level Instructions Program example The “f1.732048” is stored to DT20 and DT22 when the R0 turns on. Radians of 60 ° R0 F316 TAN, f1.047197, DT20 Precautions during programming The accuracy of the calculation decreases as the absolute value of the angle data specified in S+1 and S increases. We recommend that angle data be set within the following range: −2π (radians) [S+1, S] 2π (radians) For FP0, this instruction F316 (TAN) cannot be programmed in the interrupt program.
High−level Instructions F317 (ASIN) P317 (PASIN) Floating point data Arcsine operation Triangle functions, This instruction calculates arcsine [SIN−1 ( )]. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P317 (PASIN)” is not available.
High−level Instructions Program example The “f0.5235986 (radians of 30 degrees)” is stored to DT20 and DT21 when the R0 turns on. R0 F317 ASIN, f0.4999999, DT20 Precautions during programming D+1 and D is stored within the following range: −π/2 (radians) [D+1, D] π/2 (radians) For FP0, this instruction F317 (ASIN) cannot be programmed in the interrupt program.
High−level Instructions F318 (ACOS) Floating point data Arccosine operation P318 (PACOS) Triangle functions, This instruction calculates arccosine [COS−1 ( )]. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P318 (PACOS)” is not available.
High−level Instructions Program example The “f0.7853980 (radians of 45 degrees)” is stored to DT20 and DT21 when the R0 turns on. R0 F318 ACOS, f0.7071069, DT20 Precautions during programming D+1 and D is stored within the following range: 0.0 (radians) [D+1, D] π (radians) For FP0, this instruction F318 (ACOS) cannot be programmed in the interrupt program.
High−level Instructions F319 (ATAN) P319 (PATAN) Floating point data Arctangent operation Triangle functions, This instruction calculates arctangent [TAN−1 ( )]. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P319 (PATAN)” is not available.
High−level Instructions Program example The “f1.047197 (radians of 60 degrees)” is stored to DT20 and DT21 when the R0 turns on. R0 F319 ATAN, f1.73205, DT20 Precautions during programming D+1 and D is stored within the following range: − π/2 (radians) < [D+1, D] < π/2 (radians) For FP0, this instruction F319 (ATAN) cannot be programmed in the interrupt program.
High−level Instructions F320 (LN) P320 (PLN) Floating point data natural logarithm This instruction calculates a natural logarithm LN( ). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P320 (PLN)” is not available.
High−level Instructions Program example The “f1.6094379” is stored to DT20 and DT21 when the R0 turns on. R0 F320 LN, K 5, DT20 The “f−0.3160815” is stored to DT30 and DT31 when the R0 turns on. R0 F320 LN, f0.729, DT30 Precaution during programming For FP0, this instruction F320 (LN) cannot be programmed in the interrupt program.
High−level Instructions F321 (EXP) P321 (PEXP) Floating point data exponent This instruction calculates the exponent of a floating point real number EXP( ). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P321 (PEXP)” is not available.
High−level Instructions Program example The “f7.389056” is stored to DT20 and DT21 when the R0 turns on. R0 F321 EXP, K 2, DT20 The “f221.406402” is stored to DT30 and DT31 when the R0 turns on. R0 F321 EXP, f5.4, DT30 Precaution during programming For FP0, this instruction F321 (EXP) cannot be programmed in the interrupt program.
High−level Instructions F322 (LOG) P322 (PLOG) Floating point data logarithm This instruction calculates the logarithm of a floating point real number LOG( ). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P322 (PLOG)” is not available.
High−level Instructions Program example The “f1.30103” is stored to DT20 and DT21 when the R0 turns on. R0 F322 LOG, K20, DT20 The “f0.0108932” is stored to DT30 and DT31 when the R0 turns on. R0 F322 LOG, f1.0254, DT30 Precaution during programming For FP0, this instruction F322 (LOG) cannot be programmed in the interrupt program.
High−level Instructions F323 (PWR) P323 (PPWR) Floating point data power This instruction raises a floating point real number to the specified power. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P323 (PPWR)” is not available.
High−level Instructions Specifying the integer device with [D], the real numbers are automatically converted into integer data. R0 F323 PWR, DT 0, DT 2, % DT4 When the constant K is specified in S1 and S2, the operations are the same as when a integer device is specified. Program example The “f625.0” is stored to DT20 and DT21 when the R0 turns on. R0 F323 PWR, K 5, K 4, DT20 The “f30.51758” is stored to DT30 and DT31 when the R0 turns on. R0 F323 PWR, f3.
High−level Instructions F324 (FSQR) Floating point data square root P324 (PFSQR) Takes the square root of the specified real number data and stores result in the specified area. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P324 (PFSQR)” is not available.
High−level Instructions Program example The “f1.41421” is stored to DT20 and DT21 when the R0 turns on. R0 F324 FSQR, K 2, DT20 Precaution during programming For FP0, this instruction F324 (FSQR) cannot be programmed in the interrupt program. Flag conditions ・Error flag (R9007): ・Error flag (R9008): Turns on and stays on when: Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − If data other than real number data is specified in S+1 and S.
High−level Instructions F325 (FLT) P325 (PFLT) 16-bit integer data → Floating point real number data Converts 16-bit integer data to floating point real number data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P325 (PFLT)” is not available.
High−level Instructions Flag conditions ・Error flag (R9007): ・Error flag (R9008): ・=lag (R900B): 3 − 714 Turns on and stays on when the area specified using the index modifier exceeds the limit. Turns on for an instant when the area specified using the index modifier exceeds the limit. Turns on for an instant when the converted data is recognized as “0”.
High−level Instructions F326 (DFLT) P326 (PDFLT) 32-bit integer data → Floating point real number data Converts 32-bit integer data to floating point real number data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P326 (PDFLT)” is not available.
High−level Instructions Flag conditions ・Error flag (R9007): Turns on and stays on when the area specified using the index modifier exceeds the limit. ・Error flag (R9008): Turns on for an instant when the area specified using the index modifier exceeds the limit. = flag (R900B): Turns on for an instant when the converted data is recognized as “0”. ・Carry flag (R9009): There are too many significant digits in mantissa of converted real number data.
High−level Instructions F327 (INT) P327 (PINT) Outline Floating point real number data → 16-bit integer data (largest integer not exceeding the floating point real number data) Converts real number data to 16-bit integer data (the largest integer not exceeding the floating point real number data). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P327 (PINT)” is not available.
High−level Instructions Description Converts real number data range: (+32767.99 to −32767.99) specified by S to signed 16-bit integer data (the largest integer not exceeding the floating point data) when the trigger turns on. The converted data is stored in D. Real number data Signed 16-bit integer data 15 0 S: Lower word S+1: Higher word 15 0 D: Precaution during programming For FP0, this instruction F327 (INT) cannot be programmed in the interrupt program.
High−level Instructions F328 (DINT) P328 (PDINT) Outline Floating point real number data → 32-bit integer data (largest integer not exceeding the floating point real number data) Converts real number data to 32-bit integer data (the largest integer not exceeding the floating point real number data). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P328 (PDINT)” is not available.
High−level Instructions Description Converts real number data (range: +2147483000 to −2147483000) specified by S+1 and S to signed 32-bit integer data (the largest integer not exceeding the floating point data) when the trigger turns on. The converted data is stored in D+1 and D.
High−level Instructions F329 (FIX) P329 (PFIX) Floating point real number data → 16-bit integer data (rounding the first decimal point down to integer) Converts real number data to 16-bit integer data (rounding the first decimal point down to integer). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P329 (PFIX)” is not available.
High−level Instructions Description Converts real number data (range: 32767.99 to −32768.99) specified by S to signed 16-bit integer data (rounding the first decimal point down to integer) when the trigger turns on. The converted data is stored in D. Real number data Signed 16-bit integer data 15 0 S: Lower word S+1: Higher word 15 0 D: Precaution during programming For FP0, this instruction F329 (FIX) cannot be programmed in the interrupt program.
High−level Instructions F330 (DFIX) P330 (PDFIX) Floating point real number data → 32-bit integer data (rounding the first decimal point down to integer) Converts real number data to 32-bit integer data (rounding the first decimal point down to integer). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P330 (PDFIX)” is not available.
High−level Instructions Description Converts real number data (range: −2,147,483,000 to 2,147,483,000) specified by S+1 and S to signed 32-bit integer data (rounding the first decimal point down to integer) when the trigger turns on. The converted data is stored in D+1 and D.
High−level Instructions F331 (ROFF) P331 (PROFF) Floating point real number data → 16-bit integer data (rounding the first decimal point off to integer) Converts real number data to 16-bit integer data (rounding the first decimal point off to integer). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P331 (PROFF)” is not available.
High−level Instructions Description Converts real number data (range: +32767.49 to −32768.49) specified by S to signed 16-bit integer data (rounding the first decimal point off to integer) when the trigger turns on. The converted data is stored in D. Real number data Signed 16-bit integer data 15 0 S: Lower word S+1: Higher word 15 0 D: Precaution during programming For FP0, this instruction F331 (ROFF) cannot be programmed in the interrupt program.
High−level Instructions F332 (DROFF) P332 (PDROFF) Floating point real number data → 32-bit integer data (rounding the first decimal point off to integer) Converts real number data to 32-bit integer data (rounding the first decimal point off to integer). For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P332 (PDROFF)” is not available.
High−level Instructions Description Converts real number data (range: −2,147,483,000 to 2,147,483,000) specified by S+1 and S to signed 32-bit integer data (rounding the first decimal point off to integer) when the trigger turns on. The converted data is stored in D+1 and D.
High−level Instructions F333 (FINT) P333 (PFINT) Floating point real number data rounding the first decimal point down This instruction rounds down the decimal part of real number data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P333 (PFINT)” is not available.
High−level Instructions Description The decimal part of the real number data specified in S+1 and S is rounded down, and the result is stored in D+1 and D. Real number data Real number data 15 0 S: Lower word S+1: Higher word 15 0 D: Lower word D+1: Higher word Precaution during programming For FP0, this instruction F333 (FINT) cannot be programmed in the interrupt program.
High−level Instructions F334 (FRINT) P334 (PFRINT) Floating point real number data rounding the first decimal point off This instruction rounds off the decimal part of real number data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P334 (PFRINT)” is not available.
High−level Instructions Description The decimal part of the real number data stored in S+1 and S is rounded off, and the result is stored in D+1 and D. Real number data Real number data 15 0 S: Lower word S+1: Higher word 15 0 D: Lower word D+1: Higher word Precaution during programming For FP0, this instruction F334 (FRINT) cannot be programmed in the interrupt program.
High−level Instructions F335 (F+/−) P335 (PF+/−) Floating point real number data sign changes (negative/positive conversion) This instruction changes the sign of real number data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P335 (PF+/−)” is not available.
High−level Instructions Description The real number data stored in S+1 and S is changed sign bit, and the result is stored in D+1 and D. Real number data Real number data 15 0 S: Lower word S+1: Higher word 15 0 D: Lower word D+1: Higher word Precaution during programming For FP0, this instruction F335 (F+/−) cannot be programmed in the interrupt program.
High−level Instructions F336 (FABS) P336 (PFABS) Floating point real number data absolute Takes absolute value of real number data. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P336 (PFABS)” is not available.
High−level Instructions Description Takes the absolute value of real number data specified by S when the trigger turns on. The result (absolute value) is stored in D+1 and D. Real number data Real number data 15 0 S: Lower word S+1: Higher word 15 0 D: Lower word D+1: Higher word Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue.
High−level Instructions F337 (RAD) P337 (PRAD) Floating point real number data conversion of angle units (Degrees → Radians) This instruction converts the units of an angle from degrees to radians. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P337 (PRAD)” is not available.
High−level Instructions Program example The “f0.7853981” is stored to DT20 and DT21 when the R0 turns on. R0 F337 RAD, f45, DT20 Precaution during programming For FP0, this instruction F337 (RAD) cannot be programmed in the interrupt program. Flag conditions ・Error flag (R9007): ・Error flag (R9008): Turns on and stays on when: Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − If data other than real number data is specified in S+1 and S.
High−level Instructions F338 (DEG) P338 (PDEG) Floating point real number data conversion of angle units (Radians → Degrees) Converts the units of an angle from radians to degrees. For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction “P338 (PDEG)” is not available.
High−level Instructions Specifying the integer device with [S], the integer data is internally converted to real numbers before operations continue. R0 F338 DEG, % DT 0, DT 4 Specifying the integer device with [D], the real numbers are automatically converted into integer data. R0 F338 DEG, DT 0, % DT 4 When the constant K is specified in S, the operations are the same as when a integer device is specified. Program example The “f30.00000” is stored to DT20 and DT21 when the R0 turns on. R0 F338 DEG, f0.
High−level Instructions F345 (FCMP) Floating point real number data comparison P345 (PFCMP) Outline Compares one real number data (floating point data) item with another.
High−level Instructions Flag conditions ・Error flag (R9007): ・Error flag (R9008): 3 − 742 Turns on and stays on when: Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − If data other than real number data are specified in (S1+1, S1) and (S2+1, S2).
High−level Instructions F346 (FWIN) P346 (PFWIN) Floating point real number data band comparison Compares one real number data item with the data band specified by two other real number data items.
High−level Instructions Specifying the integer device with [S1], [S2] and [S3], the integer data is internally converted to real numbers before operations continue. When the constant K is specified in S1, S2 and S3, the operations are the same as when a integer device is specified. Flag conditions ・Error flag (R9007): ・Error flag (R9008): 3 − 744 Turns on and stays on when: − The area specified using the index modifier exceeds the limit.
High−level Instructions F347 (FLIMT) Floating point data upper and lower limit control P347 (PFLIMT) This instruction carries out upper and lower limit control for real number data. Program example Outline Boolean Ladder Diagram Address Trigger 10 ST 11 F347 (FLIMT) DT 10 DT 20 DT 30 DT 40 R0 10 F347 FLIMT, DT10, DT20, DT30, DT40 S1 S2 S3 Instruction D R 0 S1 The area where the lower limit is stored or the lower limit data.
High−level Instructions When Lower limit S1+1 and S1 Input value S3+1 and S3 and S3 stored in D+1 and D as the output value. Upper limit S2+1 and S2, the input value S3+1 Output value D+1 and D [S2+1, S2] Lower limit S1+1 and S1 Input value S3+1 and S3 Upper limit S2+1 and S2 [S1+1, S1] Specifying the integer device with [S1], [S2] and [S3], the integer data is internally converted to real numbers before operations continue.
High−level Instructions F348 (FBAND) Floating point real number data deadband control P348 (PFBAND) Outline This instruction carries out dead-band control for real number data. Program example Boolean Ladder Diagram Address Trigger 10 ST 11 F348(FBAND) R0 10 F348 FBAND, DT10, DT20, DT30, DT40 S1 S2 S3 Instruction D R 0 DT 10 DT 20 DT 30 DT 40 S1 The area where the lower limit is stored or the lower limit data.
High−level Instructions Description The output value (real number data) stored in the area specified by D is controlled based on whether or not the input value (real number data) specified by S3 falls within the dead-band bounded by the upper and lower limits (real number data) set in S1 and S2.
High−level Instructions F349 (FZONE) P349 (PFZONE) Floating point real number data zone control Outline This instruction carries out zone control for real number data.
High−level Instructions Description The bias value specified by S1 or S2 is added to the input value (real number data) specified by S3, and the output value is stored in the area specified by D. The output value is determined by the following conditions: When the input value S3+1 and S3 are less than 0.0, the input value S3+1 and S3 plus the negative bias value S1+1 and S1 are stored in D+1 and D as the output value. When the input value S3+1 and S3 are equals 0.
High−level Instructions F350 (FMAX) Maximum value search in floating point real number P350 (PFMAX) data table Outline Searches for a maximum value in a table of real number data.
High−level Instructions If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower word had been specified. Real number data table S1: S1+1: Lower word 0 Higher word S1+2: 1 D: Lower word D+1: Higher word D+2: Maximum value Relative address S1+3: S2−1: Lower word S2: Higher word n Relative address If there are several values which are a maximum value, the relative address of the first value found searching from S1 is stored in D+2.
High−level Instructions F351 (FMIN) P351 (PFMIN) Minimum value search in floating point real number data table Outline Searches for a minimum value in a table of real number.
High−level Instructions If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower word had been specified. Real number data table S1: S1+1: Lower word 0 Higher word S1+2: 1 D: Lower word D+1: Higher word D+2: Minimum value Relative address S1+3: S2−1: Lower word S2: Higher word n Relative address If there are several values which are a minimum value, the relative address of the first value found searching from S1 is stored in D+2.
High−level Instructions F352 (FMEAN) P352 (PFMEAN) Total and mean numbers calculation in floating point real number data table Calculates the total and mean numbers in the specified real number data table Program example Outline Boolean Ladder Diagram Address Trigger R0 10 F352 FMEAN, DT10, DT20, S1 10 ST R 11 F352 (FMEAN) DT 10 DT 20 DT 30 DT30 S2 Instruction D S1 Starting 16-bit area for storing the real number data S2 Ending 16-bit area for storing the real number data D S
High−level Instructions If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower word had been specified. Real number data table S1: Lower word 0 S1+1: Higher word 1 S1+2: S1+3: S2−1: Specifies areas Lower word n S2: Higher word Precautions during programming Even if D+2 overflows the selected area, it will still be stored, and this may corrupt the data in the leading part of the other area. (An area overflow check is not performed.
High−level Instructions F353 (FSORT) P353 (PFSORT) Sort data in real number floating point data table Outline Sorts a string of real number data (in smaller or larger number order). Program example Boolean Ladder Diagram Address Trigger R0 10 F353 FSORT, DT10, S1 DT20, K0 S2 S3 Instruction 10 ST R 0 11 F353 (FSORT) DT 10 DT 20 K S1 Starting 16-bit area of sort data (2 words) S2 Ending 16-bit area of sort data (2 words) S3 Constant or area where sort condition is stored.
High−level Instructions If S2 specifies a higher word of real number data, processing will take place over the same area as if the lower word had been specified. Real number data table Lower word 0 S1: S1+1: Higher word 1 S1+2: S1+3: S2−1: Specified areas Lower word n S2: Higher word Flag conditions ・Error flag (R9007): ・Error flag (R9008): 3 − 758 Turns on and stays on when: Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − S1 > S2.
High−level Instructions FP2/FP2SH/FP−X/FPΣ F354 (FSCAL) Scaling of real number data P354 (PFSCAL) Availability FP2/FP2SH FP−X (V1.13 or more) FPΣ 32k/FP0R Scaling(linearization) on a real number data table is performed, and the output (Y) to an input value (X) is calculated. Outline With FP2/FP2SH, this function is available from Ver. 1.50 or later.
High−level Instructions 3) The linear table [S2] must be having the section of two or more points registered. Moreover, the linear table must be registered in ascending order, from small to large number of the x sequences. 2 <= Registration mark (m) <= 99 (m=n+1) xt−1 < xt (1 <= t <= n) 4) When the distance between two points of a scaling table is very large, an operation error occurs. for example) Point1: (x0,y0)=(HFF000000, HFF000000) =(−1.7*1034, −1.
High−level Instructions 5 F355 (PID) PID processing This instruction carries out PID processing using data table.
High−level Instructions Flag conditions ・Error flag (R9007): ・Error flag (R9008): Turns on and stays on when: Turns on for an instant when: − The value set for the parameter is out of range. − The area specified using the index modifier exceeds the limit.
High−level Instructions Explanation of parameters 1 Control mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S] Select the type of PID processing and auto-tuning on/off with the H constants.
High−level Instructions 6 Output upper limit value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [S+5] K1 to K10000 (> lower limit value) Specify the output value (MV) range. Values specified for the range are output. The limits should be as follows: output lower limit value < output upper limit value 0 7 10000. Proportional gain (Kp) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
High−level Instructions Precautions when executing auto−tuning If “Execute auto−tuning” is specified using the parameter table (control mode [S]), attention should be paid to the following points. After auto−tuning has been completed, the control mode [S] area is automatically rewritten from H8000 to H8003 to H0 to H3. Make sure the mode is not rewritten again in the program.
High−level Instructions Operation of PID control PID is a control method widely used in the instrumentation field involving feedback control of process quantities such as temperature, pressure, flow, and fluid level. 1) Proportional operation Proportional operation generates an output which is proportional to the input. Setting signal SV + Offset e Kp − Output MV Measurement signal PV e Kp=2 MV 2 1 Kp=1 1 .5 0 t 0 t Kp=.5 The amount of control is held constant. An offset remains.
High−level Instructions 3) Derivative operation Derivative operation generates an output which is proportional to the derivative time of the input. Setting signal SV + Offset e − mD=TD・ Derivative operation Output mD Measurement signal PV de dt e mD The advancing characteristic of derivative control alleviates the adverse effect which the delaying characteristic of the process exerts on control. Derivative control grows stronger as the derivative time (Td) is increased.
High−level Instructions Availability 5 F356 (EZPID) FP−X: Ver 1.20 or more FPΣ: 32k/FP0R Easy PID Temperature control (PID) can be easily performed using the image of a temperature controller. Outline Program example Boolean Ladder Diagram Address Trigger R1 10 ST 11 F356(EZPID) S3 S2 1 WX2 F356 EZPID, WR1, WX2, DT32710, DT100 S1 R WR1 Y0 10 Instruction DT32710 DT100 S4 OT 21 S1 Control data S2 Measured value (PV) S3 Starting No.
High−level Instructions General explanation of used memories S1: S2: S3: S4: It is recommended to specify the non−hold type area (e.g. WR) where can be operated in bit unit. When bit0 is 1, it is auto−tuning request. This bit is reset with this instruction when auto−tuning has completed. Reset this bit to cancel auto−tuning. When bit0 is 0, it is PID control. When auto−tuning has completed successfully, 1 is set for bit 1.
High−level Instructions Explanation of operation Specify set value (SP) with the instruction or an indicator before the operation. If auto−tuning is requested with a device such as indicator, the above auto−tuning request program is not necessary. When R1 turns on, work area DT100 to DT129 will be initialized. (However, only DT100 (MV) can be held.) The control conditions are that operation cycle is 1 sec, derivative type reverse operation (heating), and PWM resolution is 1000.
High−level Instructions Note) The default value is written when the execution condition turns on. Output (MV) is output only in the ranges of upper limit value and lower limit value. “Also, set to be as −1000 lower limit value < upper limit value 10000.” How to output PWM. The cycle of a PWM output is decided by the setting value of S4+4. The default value is periodic 1 second. Duty of PWM is decided by the rate of the output MV (S4) that accounts for in the range of k0 to k10000.
High−level Instructions Note) When analog output is used for output, it is not necessary to write OUT instruction immediately after this instruction. Also, when analog output is used, PWM output is fixed to off.
High−level Instructions 2−1: Auto−tuning bias value (S4+6) Auto−tuning is executed with (set value (SP) − auto−tuning bias value) as a set value (SP’). It is used to control excessive temperature rise while auto−tuning is performed. For the forward operation, auto−tuning is executed with (set value (SP) + this set value) as a set value.
High−level Instructions Precautions on programming 1: When the execution condition has turned on, the area of S4 to S4+29 is initialized. If it is set to values other than the default values, write with F0(MV) instruction using always on relay R9010 as execution condition. 2: As operation cycle or timing of PWM output is always operated internally with PID processing instruction, always operate only once in 1 scan. Therefore, do not execute it during the subroutine or interrupt program.
High−level Instructions Precautions when using MV holding function · · · · The usage varies according to models and versions. 1. For FPΣ, FP−X, FP0R (V1.05 or older) Use the default upper limit and lower limit values for using the MV holding function. 2. For FP0R (V1.06 or later) Upper limit and lower limit values are held as well as MV value, set MV value, upper limit and lower limit values before executing this instruction.
High−level Instructions F373 (DTR) P373 (PDTR) 16-bit data revision detection This instruction detects changes in 16-bit data values. Outline Program example Boolean Ladder Diagram Address Trigger R0 10 F373 DTR, DT10, DT20 S D Trigger R0 R9009 R10 Instruction 10 ST 11 F373 (DTR) DT 10 DT 20 17 ST 18 AN 20 OT R 0 R 0 R9009 R 10 17 S 16-bit area for detecting data changes. D Area where data of previous execution is stored.
High−level Instructions Precautions during programming The internal relay R9009 (carry flag) used for detection of data changes is updated at each execution of the instruction. For this reason, Programs using R9009 should insert it immediately after an F373 (DTR)/P373 (PDTR) instruction. Output to an output relay or internal relay to hold the result. (Refer to the explanation of F64 (BCMP)/P64 (PBCMP).
High−level Instructions F374 (DDTR) P374 (PDDTR) 32-bit data revision detection This instruction detects changes in 32-bit data values. Outline Program example Boolean Ladder Diagram Address Trigger R0 10 F374 DDTR, Trigger DT10, DT20 S D R0 R9009 R10 Instruction 10 ST 11 F374 (DDTR) DT 10 DT 20 17 ST 18 AN 20 OT R 0 R 0 R9009 R 10 17 S Lower 16-bit area of 32-bit data for detecting data changes.
High−level Instructions Precautions during programming The internal relay R9009 (carry flag) used for detection of data changes is updated at each execution of the instruction. For this reason, Programs using R9009 should insert it immediately after an F374 (DDTR)/P374 (PDDTR) instruction. Output to an output relay or internal relay to hold the result. (Refer to the explanation of F64 (BCMP)/P64 (PBCMP).
High−level Instructions F410 (SETB) P410 (PSETB) Setting the index register bank number Setting the index register bank number Outline Program example Boolean Ladder Diagram Address Trigger R0 10 Instruction 10 ST 11 F410 R 0 (SETB) K F410 SETB, K 1 1 n Constant data or area where register bank number is stored.
High−level Instructions Program example Changing the index register banks 0 1 I0 to ID of bank 0 R9010 F410 SETB, SETB, HH11 2 I0 to ID of bank 1 R9010 F410 SETB, H 2 3 I0 to ID of bank 2 R9010 F410 SETB, H 3 I0 to ID of bank 3 Flag conditions ・Error flag (R9007): ・Error flag (R9008): Turns on and stays on when: Turns on for an instant when: − The area specified using the index modifier exceeds the limit. − The bank number is not from K0 to K15.
High−level Instructions F411 (CHGB) Changing the index register bank number P411 (PCHGB) Index register bank number change over with remembering preceding bank number. Outline Program example Boolean Ladder Diagram Address Trigger R0 10 F411 CHGB, Instruction 10 ST R 0 11 F411 (CHGB) K K2 2 n Constant data or area where register bank number is stored.
High−level Instructions Program example This is a program in which the index register bank is switched to “2” at the beginning of the interrupt program, and is then switched back again to the original index register bank just before the end of the interrupt program (before the IRET instruction).
High−level Instructions F412 (POPB) P412 (PPOPB) Restoring the index register bank number Changes index register bank number back to the bank before F411 (CHGB)/P411 (PCHGB) instructions. Outline Program example Ladder Diagram Trigger R0 10 Boolean Address Instruction 10 ST 11 F412 R 0 (POPB) F412 POPB Description The current index register bank number is changed to the number stored in the push area. The contents of the push area are not changed at this time.
High−level Instructions F414 (SBFL) P414 (PSBFL) Setting the file register bank number Setting the file register bank number Outline Program example Boolean Ladder Diagram Address Trigger R0 10 Instruction 10 ST 11 F414 (SBFL) DT 1 F414 SBFL, DT 1 R 0 n Constant data or area where register bank number is stored.
High−level Instructions F415 (CBFL) P415 (PCBFL) Changing the file register bank number Changing the file register bank number. Outline Program example Boolean Ladder Diagram Address Trigger X10 10 Instruction 10 ST 11 F415 (CBFL) DT 1 F415 CBFL, DT 1 X 10 n Constant data or area where register bank number is stored.
High−level Instructions F416 (PBFL) P416 (PPBFL) Restoring the file register bank number Changes file register bank number back to the bank before F415 (CBFL)/P415 (PCBFL) instructions. Outline Program example Boolean Ladder Diagram Address Trigger R0 10 Instruction 10 ST 11 F416 R 0 (PBFL) F416 PBFL Description The current file register bank number is changed to the number stored in the push area. The contents of the push area are not changed at this time.
High−level Instructions 3 − 788
Chapter 4 Precautions Concerning Programs
Precautions Concerning Programs 4-2
4.1 4.1 4.1.1 Changing the Set Value of Timer/Counter During RUN Method of Rewriting Constant in the Program This method rewrites the value in the program. Timer set value X0 Changing the Set Value of Timer/Counter During RUN TMX5, K 30 T5 Y10 Changing the set values (constants) in the program Constants in the program can be rewritten as long as the following conditions are observed.
Precautions Concerning Programs Operation and cautions after the change After the change using the programming tool software or FP programmer II, the timer or counter in operation will continue to run. Operation based on the changed set value will be start the next time the execution condition changes from off to on.
4.1 4.1.2 Changing the Set Value of Timer/Counter During RUN Method of Rewriting a Value in the Set Value Area Transfers to SV area when mode changes to RUN mode. Timer set value X0 T5 TMX5, K30 SV5 30 Y10 This method rewrites the value in the set value area. The program itself is not rewritten. Changing values in the set value area SV Values in the set value area SV can be changed with the following conditions.
Precautions Concerning Programs Method 1: Method using the programming tool software Select “MONITOR & TEST RUN” from the online menu, read the set value area SV of the timer or counter using the data monitor, and change the value. Method 2: Method using the FP Programmer II Use the word data monitor function to read the set value area SV of the timer or counter to be changed, and rewrite the value. Example of changing the value of SV0 from K30 to K50. 1. Execute word data monitor (OP8). (−) OP 2.
4.1 Changing the Set Value of Timer/Counter During RUN Method 3: Method using the program (high−level instruction) To change a set value of timer/counter based on an input condition, use a high-level instruction as shown below to rewrite the value in the set value area SV of the desired timer or counter. Example: Changing the set value to K20 when input X0 turns on X0 F0 MV, K20, SV3 X1 T3 When X0 turns on, the set value of timer changes from 5 seconds to 2 seconds.
Precautions Concerning Programs 4.2 4.2.1 Use of Duplicated Output Duplicated Output Duplicated output refers to repeatedly specifying the same output in a program. If the same output is specified for the “OT” and “KP” instructions, it is considered to be duplicated output. Even if the same output is used for multiple application instructions, such as the SET or RST instruction, or high−level instruction for data transfer, it is not regarded as duplicated output.
4.2 4.2.2 Use of Duplicated Output When Output is Repeated with an OT, KP, SET, or RST Instruction Condition of internal and output relays during operation When instructions are repeatedly used which output to internal and output relays such as transfer instructions and OT, KP, SET and RST instructions, the contents are rewritten at each step during operation. Example: Processing when SET, RST and OT instructions are used (X0 to X2 are all on).
Precautions Concerning Programs 4.3 4.3.
4.3 Leading Edge Detection Method Precautions when using an instruction which performs leading edge detection When RUN begins, for example when the system is powered on, the off → on change of the trigger is not detected. The instruction is not executed. Execution of the instruction will take place as explained on the following page.
Precautions Concerning Programs Example 1: DF (leading edge differential) instruction X0 Y10 DF Add R9014 X0 R9014 Y10 DF RUN (Power on) X0 Y10 Even if X0 was initially on, the input condition for the DF instruction is off−to−on at the second scan, therefore differential output is obtained.
4.3 4.3.3 Leading Edge Detection Method Precautions when Using a Control Instruction Instructions which leading edge detection compare the condition of the previous execution and the condition of the current execution, and execute the instruction only if the previous condition was off and the current condition is on. In any other case, the instruction is not executed.
Precautions Concerning Programs Example 2: Using the CT instruction between JP and LBL instructions R0 JP 1 X0 CT 200 X1 LBL 1 Time chart 1 R0 X0 Counting operation Final timing at which the previous JP instruction was not executed Time chart 2 The count is not incremented, because the final timing at which the previous JP instruction was not executed has not been changed, and the execution condition X0 for the counter input has not changed.
4.4 4.4 Operation Errors 4.4.1 Operation Errors Operation Errors An operation error is a condition in which operation is impossible when a high-level instruction is executed. When an operation error occurs, the ERROR LED will light (for FP0, ERROR/ALARM LED will blink), and the operation error flags (R9007 and R9008) will turn on. The operation error code K45 (H2D) is set at special data register DT9000/DT90000.
Precautions Concerning Programs 4.4.2 Operation Mode when an Operation Error Occurs Normally, the operation stops when an operation error occurs. However, when you set system register 26 to “continuation” (K1), the CPU operates even if an operation error occurs. System registers are specified as described below. Using programming tool software 1. Set the mode of the CPU to PROG. 2. Select the “Option” in “PLC Configuration” option from the menu. 3.
4.4 4.4.3 Operation Errors Dealing with Operation Errors Procedure: 1. Check the location of the error. Check the address where the error occurred, which is stored in DT9017 and DT9018 or in DT90017 and DT90018, and make sure the application instruction for that address is correct and appropriate. 2. Clear the error. Use a programming tool to clear the error. (If the mode selector is set to RUN, RUN will resume as soon as the error is cleared.
Precautions Concerning Programs 4.4.4 Points to Check in Program This is an example of a program in which an operation error is likely to occur. Check if an extraordinarily large value or negative value was stored in the index register. When a data register is modified using an index register X0 F0 MV, DT0, IXDT0 In this case, index register (IX) modifies the address of data register DT0. If data in IX is larger than the last address of the data register, an operation error will occur.
4.5 4.5 Handling Index Registers Handling Index Registers 4.5.1 Index Registers Index registers are used for indirect specification of values to number (addresses) and operands in relays and memory areas. (This is also called “index modification”.) Add the index register to the relay, memory area, or constant you want to modify, and then write the modifying value (16-bit data) to the index register. The FP0 and FP−e have two points, IX and IY.
Precautions Concerning Programs 4.5.2 Memory Areas Which can be Modified with Index Registers Index registers can be used to modify other types of memory areas in addition to data registers DT. IXWX0, IXWY1, IXWR0, IXSV0, IXEV2, I0WX10, I2WY1, I3WR0, IASV0, IBEV2 Constants can also be modified. IXK10, IXH1001 In the FP2SH/FP10SH, the relay numbers can be modified. I0X0, IAR10 In the FP2/FP2SH/FP10SH, an index register can be modified using another index register.
4.5 4.5.3 Handling Index Registers Example of Using an Index Register Repeatedly reading in external data With the FP0R/FPΣ/FP−X/FP2/FP2SH/FP10SH, any value between I0 and ID should be specified in place of IX. Example: Writing the contents of word external input relay WX3 to a sequence of data registers beginning from DT0. X0 F0 MV, K0, IX 1 F0 MV, WX3, IXDT0 2 F35 +1, IX 3 X1 DF 1 When X0 turns on, K0 is written to index register IX.
Precautions Concerning Programs Repeatedly changing the output destination (for FP2/FP2SH/FP10SH only) Example: Changing the output destination successively each time X0 turns on R9013 F0 MV, K0, I0 1 I0Y10 X0 2 X0 F35 +1, I0 3 4 - 22 1 K0 is initially written to index register I0. 2 When the X0 turns on, the first time Y10 will turn on. 3 Add 1 to the value of I0. From this point on, the output destinations successively change as follows each time X0 turns on.
4.5 Handling Index Registers Inputting and outputting data based on a number specified by an input With the FP0R/FPΣ/FP−X/FP2/FP2SH/FP10SH, any value between I0 and ID should be specified in place of IX.
Precautions Concerning Programs Example 2: External output of the elapsed value in a timer number specified by a digital switch WY3 7-segment indicator Timer elapsed value display Programmable controller Timer number setting 1 Digital switches WX1 R1 DF 4 - 24 F81 BIN, WX1, IX 1 F80 BCD, IXEV0, WY3 2 1 Convert the BCD timer number data in WX1 to binary, and set it in index register IX.
4.6 4.6 4.6.1 Handling BCD Data Handling BCD Data BCD Data BCD is an acronym for binary−coded decimal, and means that each digit of a decimal number is expressed as a binary number. Example: Expressing a decimal number in BCD Decimal number Each digit is converted to a binary number. BCD (Binary−coded decimal) 4.6.
Precautions Concerning Programs Output to a 7−segment display (with decoder) Use the BIN−to−BCD conversion instruction F80 (BCD).
4.7 4.7 Precautions for Programming Precautions for Programming Programs which do not execute correctly Do not write the following programs as they will not execute correctly.
Precautions Concerning Programs 4.8 Rewrite Function During RUN 4.8.1 Operation of Rewrite During RUN How operation of rewrite during RUN Rewriting programs can be executed even in RUN mode. When a rewrite is attempted during RUN, the tool service time is temporarily extended, program rewriting is performed, and operation is resumed without the need to change the mode. For this reason, the time of the scan during the RUN rewrite extends from several ms to several hundreds of ms.
4.8 4.8.2 Rewrite Function During RUN Cases Where Rewriting During Run is not Possible When the timeout error message is indicated: Even if the timeout error message is indicated, it is highly possible that the program in PLC has been already rewritten. Carry out the following operations. 1. When ladder symbol mode As a ladder editing is left, set it to the offline edit mode. Complete the program conversion in the tool software, and then change to the online edit mode to check. 2.
Precautions Concerning Programs 5. LOOP/LBL 6. MC/MCE Also, rewritng is not possible during RUN in case of other syntax errors. 2. During the forced input/output operation Interrupt restrictions When using interrupt, high−speed counter, pulse output or PWM output functions, do not perform a rewrite during RUN. If a rewrite during RUN is executed, the operation as below will be performed. Exercise caution. 1. Interrupt programs will be disabled. Enable by executing an ICTL instruction once again.
4.8 4.8.3 Rewrite Function During RUN Procedures and Operation of Rewrite During RUN Item FPWIN GR Ladder symbol mode Rewrite procedure Maximum jof 128 steps.Changes are per- Rewriting performed by step.Caution is formed by block.When PG conversion is required as rewriting takes place simultaexecuted online, the program will be reneously with the change. written.
Precautions Concerning Programs 4.9 4.9.1 Processing During Forced Input and Output Processing when forced input/output is initiated during RUN Forced reset/reset processing A External input External output → Input/output update Forced reset/reset processing PLC → X Y B Operation Forced reset/reset processing Peripheral service 1.
4.9 Processing During Forced Input and Output Operation during operation For small−sized PLCs FP0R, FP0, FPΣ and FP−X Forced relay R and output Y are rewritten according to the results of operation. For medium−sized PLCs FP2 and FP2SH For the relay and output Y specified by OT or KP instruction, the value of the forced processing has a priority. When rewritten by a high−level instruction, the result of the instruction has a priority.
Precautions Concerning Programs 4.10 Second Program Area (FP2SH, FP10SH) Explanation of operation method for FP2SH and FP10SH For the type of FP2SH of which program capacity exceeds 60k steps and for the type of FP10SH of which program capacity exceeds 60k steps if the memory is added, the program area is divided into the first program area and the second program area. The divided programs are separate program units, however, uploading and downloading with TOOL is performed simultaneously.
4.10 Second Program Area (FP2SH, FP10SH) Operation flow diagram of FP2SH and FP10SH I/O update Index register bank = 0 File register bank = 0 First program operation As shown in the left diagram, the second program is executed after the first program has completed. At the points when the first program or the second program starts, the following settings will be automatically selected.
Precautions Concerning Programs 4 - 36
Chapter 5 Appendix
Appendix ........................................................................................ 5-1 5.1 System Registers / Special Internal Relays / Special Data Registers....... 5-3 5.1.1 Table of System Registers for FP0 ............................................................5-5 5.1.2 Table of Special Internal Relays for FP0 .................................................5-15 5.1.3 Table of Special Data Registers for FP0..................................................5-18 5.1.
5.1 System Registers / Special Internal Relays / Special Data Registers Precation for System Registers What is the system register area • System registers are used to set values (parameters) which determine operation ranges and functions used. Set values based on the use and specifications of your program. • There is no need to set system registers for functions which will not be used. Type of system registers The registers to be used depend on each PLC.
Checking and changing the set value of system register If you are going to use a value which is already set(the value which appears when read), there is no need write it again. Using programming tool software Produce: 1. Set the control unit in the PROG mode. 2.Option ->PLC Configuration 3.When the function for which setting are to be entered is selected in the PLC Configuration dialog box,the value and setting status for the selected system register are displayed.
5.1.1 Table of System Registers for FP0 Content of system register settings 1. Setting the timers and counters (System register 5) By indicating the counter start number, the timer and counter are split into two areas. The timer and counter together total 144 points, and the default value for th split is 100. Thus the point allotment is as shown in the table below. Timer Counter 100 points (No. 0 to No. 99) 44 points (No. 100 to No.
2. Hold types and non-hold type settings (System registers 6 to 8 and 14) With the C10/C14/C16/C32/SL1, the areas held in the event of a power supply interruption are fixed at the areas shown in the table below, and the settings for system registers 6 to 8 and 14, will be invalid.
Table of system registers C10, C14, C16, C32, T32 and SL1 in the table respectively indicate 10-point, 14-point, 16-point, 32-point type and S-LINK type FP0 control units. AddDefault Item Name Descriptions ress value The set values are fixed and cannot be changed. AllocaThe stored values vary depending on Sequence program area tion of 0 the type.
FP0 Item Address Name Default value Descriptions 10 ms to 81900 ms (K4 to K32760) Used of default setting (K2600/6500 ms) is recommended. 31 Wait time setting for multi-frame communication 6500 ms (K2600) Time setting 2.5 ms to 160 ms (K1 to K64 ): Scans once each specified time interval. 0 (K0):Normal scan 34 Input setting 400 Constant value settings for scan time High-speed counter mode settings (X0 to X2) Setting by programming tool software 0 ms (K0) Do not set X0 as highspeed counter.
FP0 Item Input setting Address 400 Name Highspeed counter mode settings (X0 to X2) Setting by FP programmer II Default value H0 Descriptions CH0/ CH1 Note1) If the operation mode is set to 2-phase, individual, or direction differentiation, the setting for CH1 is invalid. Note2) If reset input settings overlap, the setting of CH1 takes precedence.
FP0 Item Address Name Default value CH2 Do not set X3 as high-speed counter. 2-phase input (X3, X4) 2-phase input (X3, X4), Reset input (X5) Incremental input (X3) Incremental input (X3), Reset input (X5) Decremental input (X3) Decremental input (X3), Reset input (X5) Individual input (X3, X4) Individual input (X3, X4), Reset input (X5) Direction decision (X3, X4) Direction decision (X3, X4), Reset input (X5) Do not set X4 as highspeed counter. CH3 Do not set X4 as high-speed counter.
FP0 Item Address Name Default value Descriptions The checked contacts are set as pulse catch input. 402 Pulse catch input function settings Not set (H0) In FP Programmer II, enter the above settings in hexadecimal. Example: When X3 and X4 are set as pulse catch input Settings X6 and X7 are invalid. Using FPWIN GR Input setting The checked contacts are set as interrupt input. Specify the effective interrupt edge.
FP0 Item Address Name 410 Unit No. setting for tool port (when connecting CNET) Default value 1 (K1) Descriptions 1 to 32 (K1 to K32) Using FPWIN GR Modem: Disable/Enable Data length: 7 bits/8 bits Using FP programmer II Specify the setting contents using H constants. Tool port setting 411 Communication format setting for tool port Modem: Disabled Data length: 8 bits (H0) When connecting a modem, set the unit number to 1 with system register 410.
FP0 Item Address 412 413 Name Selection of operation Not used (K0) Communication format Start code: None Terminal code: CR Stop bit: 1 bit Paritycheck: With odd Data length: 8 bits (H3) RS232C port setting 414 Baud rate setting 415 Unit no. (when connecting C-NET) 416 Default value Setting by programming tool software Modem connection Descriptions Using FPWIN GR Not used Computer link General-purpose communication Using FP programmer II K0: RS232C port is not used.
Item 5-14 Address Name 417 Starting address setting for received buffer 418 Capacity setting for reception buffer C10C/C14 C/C16C C32C/SL1 T32C Default value 0 (K0) 1660 (K1660) 6144 (K6144) 16384 (K16384) Descriptions C10C/C14C/C16C: 0 to 1659 (K0 to K1659) C32C/SL1: 0 to 6143 (K0 to K6143) T32C: 0 to 16383 (K0 to K16383) 0 to 1660 (K0 to K1660) 0 to 6144 (K0 to K6144) 0 to 16384 (K0 to K16384)
5.1.2 Table of Special Internal Relays for FP0 The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction. FP0 Address Name Self-diagnostic error flag Description Turns on when a self-diagnostic error occurs. The self-diagnostic error code is stored in DT9000. R9001 to R9003 Not used - R9004 I/O verification error flag Turns on when an I/O verification error occurs.
FP0 Address Name R9013 Initial on pulse relay R9014 Initial off pulse relay R9015 Step ladder initial on pulse relay Description Turns on only at the first scan in the operation. Turns off from the second scan and maintains the off state. Turns off only at the first scan in the operation. Turns on from the second scan andmaintains the on state. Turns on for an instant only in the first scan of the process the moment step ladder process is opened. R9016, R9017 Not used - R9018 0.
FP0 Address R9029 (*Note) R902A (*Note) R902B (*Note) R902C to R902F R9030, R9031 R9032 R9033 R9034 R9035 R9036 R9037 R9038 R9039 R903A R903B R903C R903D Name External interrupt enable flag Description Turns on during forced on/off operation for input/output relay timer/counter contacts. Turns on while the external interrupt trigger is enabled by the ICTL instruction. Interrupt error flag Turns on when an interrupt error occurs.
5.1.3 Table of Special Data Registers for FP0 The special data registers are one word (16-bit) memory areas which store specific information. With the exception of registers for which “Writing is possible” is indicated in the “Description” column, these registers cannot be written to.
Address FP0 C10, FP0 T32 C14, C16, C32, SL1 - DT9020 (Availabl e type: SL1) Name Descriptions S-LINK status flag/error flag Notes - ERR1 and ERR3 occur even if the power supply on the S-LINK side is interrupted, but are canceled when the power supply is turned on again. - ERR4 is held.
Address FP0 C10, FP0 T32 C14, C16, C32, SL1 Name Descriptions (When normal) - DT9021 (Availabl e type: SL1) No. of units connected to S-LINK/error address Note - When the SET switch is pressed, the number of input/output units connected to the S-LINK system is set. (If the same address has been specified for multiple units, the units are counted as a single unit. This is invalid, however, if an ERR4 error is in progress.) (If ERR4 occurs) The current scan time is stored here.
Address FP0 C10, FP0 T32 C14, C16, C32, SL1 Name DT90023 DT9023 Scan time (minimum value) (*Note1) DT90024 DT9024 Scan time (maximum value) (*Note 1) DT90025 (*Note2) DT9025 (*Note2) Mask condition monitoring register for interrupts (INT 0 to 5) DT90026 DT9026 Not used DT90027 (*Note2) DT9027 (*Note2) Periodical interrupt interval (INT24) DT90028 DT90029 DT90030 (*Note2) DT90031 (*Note2) DT90032 (*Note2) DT90033 (*Note2) DT90034 (*Note2) DT90035 (*Note2) DT90036 DT9028 DT9029 DT9030 (*Note
Address FP0 C10, FP0 T32 C14, C16, C32, SL1 Name Descriptions DT90038 DT9038 Work 2 for F96 (SRC) instruction The position of the first matching data, counting from the starting 16-bit area, is stored here when an F96 (SRC) instruction is executed.
Address FP0 C10, FP0 T32 C14, C16, C32, SL1 Name Descriptions A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, stop high-speed counter instruction (F168), and clear the high-speed counter.
Address FP0 C10, FP0 T32 C14, C16, C32, SL1 DT90054 DT90055 DT90056 DT90057 5-24 Name - Real-Time Clock (Clock/Calendar) monitor and setting (minute/second) - Real-Time Clock (Clock/Calendar) monitor and setting (day/hour) - Real-Time Clock (Clock/Calendar) monitor and setting (year/month) - Real-Time Clock (Clock/Calendar) monitor and setting (day-of-the-week) Descriptions The year, month, day, hour, minute, second, and day-of-the-week data for the Real-Time Clock (Clock/Calendar) is stored.
Address FP0 C10, FP0 T32 C14, C16, C32, SL1 Name Descriptions The Real-Time Clock(Clock/Calendar) is adjusted as follows. When setting the Real-Time Clock (Clock/Calendar) by program By setting the highest bit of DT90058 to 1, the time becomes that written to DT90054 to DT90057 by F0 (MV) instruction. After the time is set, DT90058 is cleared to 0. (Cannot be performed with any instruction other than F0 (MV) instruction.) Example: Set the time to 12:00:00 on the 5th day when the X0 turns on.
Address FP0 C10, FP0 T32 C14, C16, C32, SL1 DT90059 DT9059 DT90060 DT9060 DT90061 DT9061 DT90062 DT9062 DT90063 DT9063 DT90064 DT9064 DT90065 DT9065 DT90066 DT9066 DT90067 DT9067 5-26 Name Serial communication error code Step ladder process Process number: 0 to 15 Process number: 16 to 31 Process number: 32 to 47 Process number: 48 to 63 Process number: 64 to 79 Process number: 80 to 95 Process number: 96 to 111 Process number: 112 to 127 Descriptions - Tool port bit 0=1: Over run e
Address FP0 C10, FP0 T32 C14, C16, C32, SL1 DT90104 Name DT9104 High-speed counter elapsed value area for ch2 (*Note1) DT90105 DT90106 DT9105 DT9106 High-speed counter target value area for ch2 (*Note1) DT90107 DT9107 DT90108 DT9108 High-speed counter elapsed value area for ch3 (*Note1) DT90109 DT9109 DT90110 DT9110 High-speed counter target value area for ch3 (*Note1) DT90111 DT9111 Descriptions The elapsed value (24-bit data) for the highspeed counter is stored here.
5.1.4 Table of System Registers for FP-e FP-e No.
FP-e No. 400 Name High-speed counter operation mode settings (X0 to X2) Default value CH0: Do not set input X0 as highspeed counter CH1: Do not set input X1 as highspeed counter Highspeed counter 401 High-speed counter operation mode settings (X3 to X5) CH2: Do not set input X3 as highspeed counter HC3: Do not set input X4 as highspeed counter Descriptions CH0 Do not set input X0 as high-speed counter.
FP-e No. Name 402 Pulse catch input settings 403 Interrupt input settings Interruptinput Default value Not set Not set Descriptions Specify the input contacts used as pulse catch input. Specify the input contacts used as intrrupt input. Specify the effective interrupt edge.
FP-e No. Temperature inout 409 410 Tool port setting COM. port setting Default value Name Number of temperature input average processing times (Available PLC: model with thermocouple input) Unit No. setting 0 1 Disabled Descriptions 0 to 50 For default valeu “0”, the number of average processing times is 20. 1 to 99 Modem connection: enabled/Disabled Data length: 7 bits/8 bits When connecting a modem, the format will be as follows depending on the data length setting.
5.1.5 Table of Special Internal Relays for FP-e The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction. FP-e Relay No.
FP-e Relay No. R9010 R9011 R9012 Name Always on relay Always off relay Scan pulse relay R9013 Initial (on type) pulse relay R9014 Initial (off type) pulse relay R9015 R9016 R9017 Step ladder initial pulse relay (on type) Not used Not used Description Always on. Always off. Turns on and off alternately at each scan. Goes on for only the first scan after operation (RUN) has been started, and goes off for the second and subsequent scans.
FP-e Relay No. Name R9020 RUN mode flag R9021 R9022 R9023 R9024 R9025 R9026 R9027 R9028 Not used Not used Not used Not used Not used Message flag Not used Not used R9029 Forcing flag R902A Interrupt enable flag R902B R902C R902D R902E R902F Interrupt error flag Not used Not used Not used Not used 5-34 Description Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN. Turns on while the F149 (MSG) instruction is executed.
FP-e Relay No.
5.1.6 Table of Special Data Registers for FP-e The special data registers are one word (16-bit) memory areas which store specific information. FP-e (A: Available, N/A: Not available) Register Name Descriptions No. Self-diagnostic error The self-diagnostic error code is stored here DT9000 code when a self-diagnostic error occurs. Switches the FP-escreen to the screen of the mode specified.
FP-e (A: Available, N/A: Not available) Register No. Name DT9020 DT9021 Not used Not used DT9022 Scan time (current Note) value) DT9023 Scan time (minimum value) Note) DT9024 Scan time (maximum value) Note) DT9025 Mask condition monitoring register for interrupts DT9026 Not used DT9027 Periodical interrupt interval (INT24) Descriptions The current scan time is stored here. Scan time is calculated using the formula: Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms.
FP-e (A: Available, N/A: Not available) Register Name No. DT9036 Not used Operation auxiliary register for search DT9037 instruction F96(SRC) Operation auxiliary register for search DT9038 instruction F96(SRC) DT9039 Not used Temperature input DT9040 ch.0 Temperature input DT9041 ch.
FP-e (A: Available, N/A: Not available) Register Name No. DT9050 DT9051 High-speed counter target value area For CH1 Descriptions The target value (24-bit data) of the high-speed counter specified by the high-speed counter instruction is stored here. Target values have been preset for the various instructions to be used when the high-speed counter related instruction is executed. The value can be read by executing F1 (DMV) instruction.
FP-e (A: Available, N/A: Not available) Register Name No. Real-Time Clock (Clock/Calendar) DT9054 setting (minute/second) Real-Time Clock DT9055 (Clock/Calendar) setting (day/hour) Real-Time Clock (Clock/Calendar) DT9056 setting (year/month) DT9057 Descriptions The year, month, day, hour, minute, second and day-of-the-week data for the Real-Time Clock (Clock/Calendar) is stored. The built-in RealTime Clock(Clock/Calendar) will operate correctly through the year 2099 and supports leap years.
FP-e (A: Available, N/A: Not available) Register Name No. Descriptions Read -ing Writ -ing A N/A A A Error code is sotred here when a communication error occurs.
FP-e (A: Available, N/A: Not available) Register Name No. High-speed DT9104 For counter ch2 elapsed DT9105 value DT9106 High-speed counter target value For ch2 High-speed counter elapsed value For ch3 High-speed counter target value For ch3 DT9107 DT9108 DT9109 DT9110 DT9111 5-42 Descriptions The elapsed value (24-bit data) for the highspeed conter is stored here. The value can be read and written by executing the F1 (DMV) instruciton.
5.1.7 Table of System Registers for FP0R No.
FP0R No.
FP0R No.
FP0R Controller output settings 2 (PLS/PWM) Transistor type C16 or over No.
FP0R No. 410 412 413 Tool port setting 415 420 421 410 412 413 COM port setting Default value Name Unit No. setting Communication mode setting Selection of modem connection Communication format setting Communication speed (Baud rate) setting Starting address for received buffer of general (serial data) communication mode Buffer capacity setting for data received of general (serial data) communication mode Unit No.
FP0R Item Address Name Controller input time constant setting 1 X0 to X3 ContController input time roller 431 constant setting 1 input X4 to X7 time Controller input time consconstant setting 2 432 tant X8 to XB set(C32/T32/F32) tings Controller input time constant setting 2 433 XC to XF (C32/T32/F32) Note) X6 and X7 is invalid for C10. Default value Description 430 5-48 1 ms None 0.1 ms 0.
5.1.8 Table of Special Internal Relays for FP0R The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction. WR900 FP0R Relay No. Name Self-diagnostic R9000 error flag R9001 Not used R9002 Not used R9003 Not used I/O verification R9004 error flag R9005 Not used R9006 Not used Description Turns on when a self-diagnostic error occurs.
WR901 FP0R Relay No. Name R9010 Always on relay R9011 Always off relay R9012 Scan pulse relay Initial (on type) R9013 pulse relay Initial (off type) R9014 pulse relay Step ladder initial R9015 pulse relay (on type) R9016 Not used R9017 Not used Description Always on. Always off. Turns on and off alternately at each scan. Goes on for only the first scan after operation (RUN) has been started, and goes off for the second and subsequent scans.
WR902 FP0R Relay No. Name R9020 RUN mode flag R9021 R9022 R9023 R9024 R9025 R9026 R9027 R9028 Not used Not used Not used Not used Not used Message flag Not used Not used R9029 Forcing flag R902A R902B R902C Interrupt enable flag Interrupt error flag Sample point flag Sample trace end flag Sampling stop R902E trigger flag Sampling enable R902F flag A: Available, N/A: Not available R902D Description Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN.
WR903 FP0R Relay No. Name R9030 Not used R9031 Not used R9032 R9033 R9034 R9035 R9036 R9037 COM port communication mode flag Print instruction execution flag RUN overwrite complete flag Not used Not used COM port communication error flag Description - Turns on when the general-purpose communication function is being used - Goes off when the MEWTOCOL-COM or the PLC link function is being used. Off: Printing is not executed. On: Execution is in progress.
WR904 FP0R Relay Name No. TOOL port R9040 operation mode flag COM port PLC R9041 link flag R9042 Not used R9043 Not used R9044 R9045 COM port SEND/RECV instruction execution flag COM port SEND/RECV instruction execution end flag Not used Not used Not used Not used Not used Not used Description - Turns on when the general-purpose communication function is being used - Goes off when the computer link function is being used. Turn on while the PLC link function is used.
WR906 FP0R Relay No. Name R9060 Unit No.1 R9061 Unit No.2 R9062 Unit No.3 R9063 Unit No.4 R9064 Unit No.5 R9065 Unit No.6 R9066 R9067 R9068 MEWNETW0 PC(PLC) link 0 transmission assurance relay Unit No.7 Unit No.8 Unit No.9 R9069 Unit No.10 R906A Unit No.11 R906B Unit No.12 R906C Unit No.13 R906D Unit No.14 R906E Unit No.15 R906F Unit No.16 A: Available, N/A: Not available 5-54 Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link 0 mode.
WR907 FP0R Relay No. Name Unit R9070 No.1 Unit R9071 No.2 Unit R9072 No.3 Unit R9073 No.4 Unit R9074 No.5 Unit R9075 No.6 Unit R9076 No.7 MEWNETUnit W0 R9077 No.8 PC(PLC) link 0 Unit R9078 operation No.9 mode relay Unit R9079 No.10 Unit R907A No.11 Unit R907B No.12 Unit R907C No.13 Unit R907D No.14 Unit R907E No.15 Unit R907F No.16 A: Available, N/A: Not available Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No.
WR908 FP0R Relay No. Name R9080 Unit No.1 R9081 Unit No.2 R9082 Unit No.3 R9083 Unit No.4 R9084 Unit No.5 R9085 Unit No.6 R9086 R9087 R9088 MEWNETW0 PC(PLC) link 1 transmission assurance relay Unit No.7 Unit No.8 Unit No.9 R9089 Unit No.10 R908A Unit No.11 R908B Unit No.12 R908C Unit No.13 R908D Unit No.14 R908E Unit No.15 R908F Unit No.16 A: Available, N/A: Not available 5-56 Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link 1 mode.
WR909 FP0R Relay No. Name Unit R9090 No.1 Unit R9091 No.2 Unit R9092 No.3 Unit R9093 No.4 Unit R9094 No.5 Unit R9095 No.6 Unit R9096 No.7 MEWNETUnit W0 R9097 No.8 PC(PLC) link 1 Unit R9098 operation No.9 mode relay Unit R9099 No.10 Unit R909A No.11 Unit R909B No.12 Unit R909C No.13 Unit R909D No.14 Unit R909E No.15 Unit R909F No.16 A: Available, N/A: Not available Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No.
WR910 FP0R Relay Name No.
5.1.
Address DT90014 Name Operation auxiliary register for data shift instruction DT90015 Operation auxiliary register for division instruction DT90016 FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing One shift-out hexadecimal digit is stored in bit positions 0 to 3 when the data shift instruction, A A F105 (BSR) or F106 (BSL) is executed. The value can be read and written by executing F0 (MV) instruction.
Address Name DT90022 Scan time (current Note) value) DT90023 Scan time (minimum Note) value) DT90024 Scan time (maximum Note) value) DT90025 Mask condition monitoring register for interrupts (INT0 to 11) DT90026 Not used DT90027 Periodical interrupt interval (INT24) DT90028 Sample trace interval FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing The current scan time is stored here.
Address Name DT90037 Work1 for SRC instructions DT90038 Work2 for SRC instructions DT90039 DT90040 DT90041 DT90042 DT90043 DT90044 DT90045 DT90046 DT90047 DT90048 DT90049 DT90050 DT90051 Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing The number of data that match the searched data is stored here when F96 (SRC) A N/A insturction is executed.
Address Name FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, continue or clear high-speed counter instruction.
Address Name DT90053 Clock/calender monitor (hour/minute) (T32 only) DT90054 Clock/calender setting (minute/second) (T32 only) DT90055 Clock/calender setting (day/hour) (T32 only) DT90056 Clock/calender setting (year/month) (T32 only) DT90057 Clock/calender setting (day-of-the-week) (T32 only) FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing Hour and minute data of the clock/calender are stored here. This data is read-only data. It cannot be overwritten.
Address Name FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing The clock/calender is adjusted as follows. When setting the clock/calender by program By setting the highest bit of DT90058 to 1, the time becomes that written to DT90054 to DT90057 by F0 (MV) instruction. After the time is set, DT90058 is cleared to 0. (Cannot be performed with any instruction other than F0 (MV) instruction.) Set the time to 12:00:00 on the 5th day when the X0 turns on.
Address DT90060 DT90061 DT90062 DT90063 DT90064 DT90065 DT90066 DT90067 DT90068 DT90069 DT90070 DT90071 DT90072 DT90073 DT90074 DT90075 DT90076 DT90077 DT90078 DT90079 DT90080 DT90081 5-66 Name Step ladder process (0 to 15) Step ladder process (16 to 31) Step ladder process (32 to 47) Step ladder process (48 to 63) Step ladder process (64 to 79) Step ladder process (80 to 95) Step ladder process (96 to 111) Step ladder process (112 to 127) Step ladder process (128 to 143) Step ladder process (144 to 159)
Address DT90082 DT90083 DT90084 DT90085 DT90086 DT90087 DT90088 DT90089 DT90090 DT90091 DT90092 DT90093 DT90094 DT90095 DT90096 DT90097 Name Step ladder process (352 to 367) Step ladder process (368 to 383) Step ladder process (384 to 399) Step ladder process (400 to 415) Step ladder process (416 to 431) Step ladder process (432 to 447) Step ladder process (448 to 463) Step ladder process (464 to 479) Step ladder process (480 to 495) Step ladder process (496 to 511) Step ladder process (512 to 527) Step la
Address DT90098 DT90099 DT90100 DT90101 DT90102 DT90103 DT90104 DT90105 DT90106 DT90107 DT90108 DT90109 DT90110 DT90111 DT90112 DT90113 DT90114 DT90115 DT90116 DT90117 DT90118 DT90119 DT90120 DT90121 Name Step ladder process (608 to 623) Step ladder process (624 to 639) Step ladder process (640 to 655) Step ladder process (656 to 671) Step ladder process (672 to 687) Step ladder process (688 to 703) Step ladder process (704 to 719) Step ladder process (720 to 735) Step ladder process (736 to 751) Step ladd
Address DT90123 DT90124 DT90125 DT90126 DT90127 to DT90139 Name Not used COM SEND/RECV instruction end code Not used Forced ON/OFF operating station display Not used DT90140 DT90141 DT90142 DT90143 DT90144 MEWNET-W0 PC(PLC) link 0 status DT90145 DT90146 DT90147 DT90148 DT90149 DT90150 DT90151 DT90152 MEWNET-W0 PC(PLC) link 1 status DT90153 DT90154 DT90155 DT90156 DT90157 MEWNET-W0 PC(PLC) link 0 status FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing N/A N/A For details, refer t
Address DT90158 DT90159 DT90160 DT90161 DT90162 to DT90169 Name MEWNET-W0 PC(PLC) link 1 status MEWNET-W0 PC(PLC) link 0 unit No. MEWNET-W0 PC(PLC) link 0 error flag Stores the unit No. of PC(PLC) link 0. A N/A Stores the error contents of PC(PLC) link 0. A N/A Not used - N/A N/A MEWNET-W0 PC(PLC) link 0 status Duplicated destination for PC(PLC) inter-link address Counts how many times a token is lost. Counts how many times two or more tokens are detected.
Address DT90219 Name Unit No. (Station No.) selection for DT90220 to DT90251 DT90222 PC(PLC) link Unit (station) No. 1 or 9 DT90223 DT90226 PC(PLC) link Unit (station) No. 2 or 10 PC(PLC) link Unit (station) No. 3 or 11 PC(PLC) link Unit (station) No. 4 or 12 DT90239 System regis- ter 40 and 41 System regis- The contents of the system register settings partaining to the PLC inter-link function for the various unit numbers are stored as shown below.
Address Name System regis- DT90240 DT90241 DT90242 System register 40 and 41 PC(PLC) link Unit (station) No. 7 or 15 5-72 System register 44 and 45 System register 40 and 41 PC(PLC) link Unit (station) No. 8 or 16 System register 42 and 43 System register 44 and 45 System regis- DT90251 DT90252 DT90253 DT90254 DT90255 DT90256 ter 42 and 43 ter 46 and 47 DT90248 DT90250 System regis- System regis- DT90247 DT90249 when DT90219 is 0.
Address DT90300 DT90301 FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing Counting area for input (X0) or A A Note) (X0, X1) of the main unit.
Address DT90320 DT90321 FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing A Counting area for input (X5) of A Note1) the main unit. A A Note1) Name Elapsed value area Lower words Target value area Lower words Higher words HSC-CH5 DT90322 DT90323 Higher words The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed.
Address DT90370 DT90371 DT90372 DT90373 DT90374 DT90375 DT90376 DT90377 DT90378 DT90379 DT90380 DT90381 DT90382 DT90383 DT90384 DT90385 DT90386 DT90387 DT90388 DT90389 Name Control flag monitor area HSC-CH0 HSC-CH1 HSC-CH2 HSC-CH3 HSC-CH4 HSC-CH5 Not used Not used Not used Not used Control flag monitor area (Transistor output type only) Not used Not used Not used Not used Not used Not used PLS-CH0 PLS-CH1 PLS-CH2 PLS-CH3 FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing When HSC co
Address DT90400 DT90401 DT90402 DT90403 DT90404 DT90405 DT90406 DT90407 DT90408 DT90409 DT90410 DT90411 DT90412 DT90413 DT90414 DT90415 DT90416 DT90417 DT90418 DT90419 5-76 FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing Available for the transistor A A output type only. A A Note) When controlling the pulse output CH by A N/A F166(HC1S), F167(HC1R) A N/A instructions, the target value is stored. A N/A The target value for match A N/A ON/OFF is stored.
Address DT90420 DT90421 DT90422 DT90423 DT90424 DT90425 DT90426 DT90427 DT90428 DT90429 DT90430 DT90431 DT90432 DT90433 DT90434 DT90435 DT90436 DT90437 DT90438 DT90439 FP0R (A: Available, N/A: Not available) Read- WritDescription ing ing Available for the transistor A A output type only. A A Note) When controlling the pulse output CH by A N/A F166(HC1S), F167(HC1R) A N/A instructions, the target value is stored. A N/A The target value for match A N/A ON/OFF is stored.
5.1.10 Table of System Registers for FPΣ No.
No.
No. 400 Name High-speed counter operation mode settings (X0 to X2) Default value CH0: Do not set input X0 as highspeed counter CH1: Do not set input X1 as highspeed counter Highspeed counter 401 High-speed counter operation mode settings (X3 to X5) CH2: Do not set input X3 as highspeed counter HC3: Does not set input X4 as highspeed counter 5-80 Descriptions CH0 Do not set input X0 as high-speed counter.
No. Name 402 Pulse catch input settings 403 Interrupt input settings Default value Not set Interruptinput Not set Descriptions Specify the input contacts used as pulse catch input. Specify the input contacts used as intrrupt input. Specify the effective interrupt edge.
No. 410 412 413 Tool port setting 415 420 421 410 412 413 COM 1 port setting Default value Name Unit No. setting Communication mode setting Selection of modem connection Communication format setting Communication speed (Baud rate) setting Starting address for received buffer of general (serial data) communication mode Buffer capacity setting for data received of general (serial data) communication mode Unit No.
No. 411 412 Default value Name Unit No. setting 1 Communication mode setting Computer link Selection of modem connection Disabled 414 Communication format setting Data lenght bit: 8 bits Parity check: “with odd” Stop bit: 1 bit 415 Communication speed (Baud rate) setting 9600 bps COM 2 port setting Descriptions 1 to 99 Computer link General-purpose serial communication MODBUS RTU Enabled/Disabled Enter the settings for the various items.
5.1.11 Table of Special Internal Relays for FPΣ The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction. WR900 Relay No.
WR901 Relay No. R9010 R9011 R9012 Name Always on relay Always off relay Scan pulse relay R9013 Initial (on type) pulse relay R9014 Initial (off type) pulse relay Description Always on. Always off. Turns on and off alternately at each scan. Goes on for only the first scan after operation (RUN) has been started, and goes off for the second and subsequent scans. Goes off for only the first scan after operation (RUN) has been started, and goes on for the second and subsequent scans.
WR902 Relay No. Name R9020 RUN mode flag R9021 R9022 R9023 R9024 R9025 R9026 R9027 R9028 Not used Not used Not used Not used Not used Message flag Not used Not used R9029 Forcing flag R902A Interrupt enable flag R902B Interrupt error flag R902C Sample point flag Note) R902D R902E R902F Sample trace end flag Note) Sampling stop trigger flag Note) Sampling enable flag Note) Note) Available for the 32k type only. 5-86 Description Turns off while the mode selector is set to PROG.
WR903 Relay No. R9030 R9031 R9032 R9033 R9034 R9035 R9036 R9037 Name Not used Not used COM1 port communication mode flag Print instruction execution flag RUN overwrite complete flag Not used Not used COM1 port communication error flag Description - Turns on when the general-purpose communication function is being used - Goes off when the MEWTOCOL-COM or the PLC link function is being used. Off: Printing is not executed. On: Execution is in progress.
WR904 Relay No.
WR906 Relay No. Name R9060 Unit No.1 R9061 Unit No.2 R9062 Unit No.3 R9063 Unit No.4 R9064 Unit No.5 R9065 Unit No.6 R9066 Unit No.7 R9067 R9068 MEWNET-W0 PC(PLC) link 0 transmission assurance relay Unit No.8 Unit No.9 R9069 Unit No.10 R906A Unit No.11 R906B Unit No.12 R906C Unit No.13 R906D Unit No.14 R906E Unit No.15 R906F Unit No.16 Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link 0 mode.
WR907 Relay No. Name R9070 R9071 R9072 R9073 R9074 R9075 R9076 R9077 R9078 R9079 R907A R907B R907C R907D R907E R907F 5-90 MEWNET-W0 PC(PLC) link 0 operation mode relay Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16 Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No. 2 is in the RUN mode.
WR908 Relay No. Name R9080 Unit No.1 R9081 Unit No.2 R9082 Unit No.3 R9083 Unit No.4 R9084 Unit No.5 R9085 Unit No.6 R9086 Unit No.7 R9087 R9088 MEWNET-W0 PC(PLC) link 1 transmission assurance relay (32k only) Unit No.8 Unit No.9 R9089 Unit No.10 R908A Unit No.11 R908B Unit No.12 R908C Unit No.13 R908D Unit No.14 R908E Unit No.15 R908F Unit No.16 Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link 1 mode.
WR909 Relay No. Name R9090 R9091 R9092 R9093 R9094 R9095 R9096 R9097 R9098 R9099 R909A R909B R909C R909D R909E R909F 5-92 MEWNET-W0 PC(PLC) link 1 operation mode relay (32k only) Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16 Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No. 2 is in the RUN mode.
5.1.12 Table of Special Data Registers for FPΣ The special data registers are one word (16-bit) memory areas which store specific information. (A: Available, N/A: Not available) Register Name Descriptions No. Self-diagnostic error The self-diagnostic error code is stored here DT90000 code when a self-diagnostic error occurs. DT90001 Not used When an error occurs at FPΣ expansion I/O unit, the bit corresponding to the unit No. will Position of abnormal be set on “1”. Monitor using binary display.
(A: Available, N/A: Not available) Register Name No. Descriptions When the state of installation of an FPΣ expansion I/O unit has changed since the power was turned on, the bit corresponding to the unit No. will turn on. Monitor using binary display.
(A: Available, N/A: Not available) Register Name No. DT90022 Scan time (current Note) value) DT90023 Scan time (minimum Note) value) DT90024 Scan time (maximum Note) value) DT90025 Mask condition monitoring register for interrupts (INT0 to 7) DT90026 Not used DT90027 Periodical interrupt interval (INT24) Descriptions The current scan time is stored here. Scan time is calculated using the formula: Scan time (ms) = stored data (decimal) x 0.1 ms Example: K50 indicates 5 ms.
(A: Available, N/A: Not available) Register Name No.
(A: Available, N/A: Not available) Register Name No. Descriptions Read -ing Writing N/A A A N/A A A A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, continue or clear high-speed counter instruction.
(A: Available, N/A: Not available) Register Name No. Descriptions Reading Writing A A N/A N/A The Real-Time Clock(Clock/Calendar) is adjusted as follows. When setting the Real-Time Clock(Clock/Calendar) by program By setting the highest bit of DT90058 to 1, the time becomes that written to DT90054 to DT90057 by F0 (MV) instruction. After the time is set, DT90058 is cleared to 0. (Cannot be performed with any instruction other than F0 (MV) instruction.
(A: Available, N/A: Not available) Register Name No.
(A: Available, N/A: Not available) Register Name No.
(A: Available, N/A: Not available) Register Name No.
(A: Available, N/A: Not available) Register Name No. DT90123 Not used COM1 SEND/RECV DT90124 instruction end code COM2 SEND/RECV DT90125 instruction end code Forced Input/Outptu DT90126 unit No.
(A: Available, N/A: Not available) Register Name No. DT90156 DT90157 DT90158 DT90159 DT90160 DT90161 DT90162 to DT90169 MEWNET-W0 PC(PLC) link 0 status MEWNET-W0 PC(PLC) link 1 Status (32k type only) MEWNET-W0 PLC link unit No. MEWNET-W0 PLC link error flag Stores the unit No.
(A: Available, N/A: Not available) Register Name Descriptions No. DT90194 to Not used DT90199 The elapsed value (32-bit data) for the highDT90200 High-speed For speed counter is stored here. The value can counter CH2 be read and written by executing the F1 (DMV) DT90201 elapsed value instruction. A A A N/A High-speed counter elapsed value For CH3 The elapsed value (32-bit data) for the highspeed counter is stored here. The value can be read and written by executing F1 (DMV) instruction.
(A: Available, N/A: Not available) Register Name No. Unit No. (Station No.) DT90219 selection for DT90220 to DT90251 DT90222 DT90239 System register 42 and 43 System register 44 and 45 System register 40 and 41 PLC link Unit (station) No. 3 or 11 System register 42 and 43 System regis- The contents of the system register settings partaining to the PLC inter-link function for the various unit numbers are stored as shown below.
(A: Available, N/A: Not available) Register Name No. DT90242 DT90251 DT90252 DT90253 DT90254 D590255 DT90256 5-106 N/A N/A N/A N/A System register 44 and 45 System register 40 and 41 PLC link Unit (station) No. 7 or 15 System register 42 and 43 The contents of the system register settings partaining to the PLC inter-link function for the various unit numbers are stored as shown below. when DT90219 is 0.
5.1.
FP-X Item Address 40 41 PC (PLC) link W0-0 setting 42 43 44 45 46 47 50 PC (PLC) link W0-1 setting 51 52 53 54 55 57 5-108 Default value Name Range of link relays used for PC(PLC) link Range of link data registers used for PC(PLC) link Starting number for link relay transmission Link relay transmission size Starting number for link data register transmission Link data register transmission size PC(PLC) link switch flag Maximum unit number setting for MEWNET-W0 PC(PLC) link Range of link relays used
FP-X Tr type Item Controller input settings 1 (HSC) Address 400 Name Highspeed counter settings (X0 to X3) Default value Description CH0: Do not set input X0 as high-speed counter Do not set input X0 as high-speed counter. Incremental input (X0) Decremental input (X0) Two-phase input (X0, X1) Individual input (X0, X1) Incremental/decremental control input (X0, X1) CH1: Do not set input X1 as high-speed counter Do not set input X1 as high-speed counter.
FP-X Tr type Item Address Name Default value CH0: Normal output Controller output settings (PLS/ PWM) 402 Pulse/ PWM output settings (Y0 to Y7) CH1: Normal output CH2: Normal output CH3: Normal output Interrupt/ Pulse catch settings Interrupt edge settings 403 Pulse catch input settings Not set 404 Interrupt input settings Not set 405 Interrupt edge setting for controller input Leading edge Description Normal output (Y0, Y1) Pulse output (Y0, Y1) PWM output (Y0), Normal output (Y1) Normal
FP-X Ry type Item Address 400 Name High-speed counter settings (X100 to X102) Pulse output settings (Y100 to Y101) Pulse I/O cassette settings (HSC/ PLS) 401 High-speed counter settings (X200 to X202) Pulse output settings (Y200 to Y201) Default value Description CH8: Do not set input X100 as high-speed counter Do not set input X100 as high-speed counter.
Note1) If the operation mode is set to Two-phase, incremental/decremental, or incremental/decremental control, the setting for CH9 is invalid in system register 400 and the setting for CHB is invalid in system register 401. Note2) If reset input settings overlap, the CH9 setting takes precedence in system register 400 and the CHB setting takes precedence in system register 401.
FP-X Ry type Item Address Name Default value Description CH0: Do not set input X0 as high-speed counter Do not set input X0 as high-speed counter. Incremental input (X0) Decremental input (X0) Two-phase input (X0, X1) Do not set input X1 as high-speed counter. Incremental input (X1) Decremental input (X1) Two-phase input (X0, X1) Do not set input X2 as high-speed counter. Incremental input (X2) Decremental input (X2) Two-phase input (X2, X3) Do not set input X3 as high-speed counter.
FP-X Ry type Item Address Name 405 Interrupt edge setting for controller input Leading edge Interrupt edge setting for pulse I/O cassette Leading edge Interrupt edge settings 406 Default value Description The pressed contact is up and set to trailing edge. The pressed contact is up and set to trailing edge. Note1) For counting two-phase input, only CH0, CH2, CH4 and CH6 can be used.
FP-X Item Address 410 412 Default value Name Unit No.
FP-X Item Address 410 412 Default value Name Unit No. setting 1 Communication mode setting Computer link Selection of modem connection Disabled Description 1 to 99 Computer link General-purpose serial communication PC(PLC) link MODBUS RTU Enabled/Disabled Enter the settings for the various items. 413 Communication format setting Data length bit: 8 bits Parity check: Odd Stop bit: 1 bit 415 Baud rate setting 9600 bps COM.
FP-X Item Address Default value Name Unit No. setting 1 Communication mode setting Computer link Selection of modem connection Disabled Selection of port Built-in USB 414 Communication format setting Data length bit: 8 bits Parity check: “with odd” Stop bit: 1 bit 415 Baud rate setting 9600 bps 411 412 COM.
FP-X Item Address Name Default value Controller input time constant setting 1 X0 to X3 Controller input time 431 constant setting 1 X4 to X7 Controller input time None 432 constant setting 2 Cont1 ms X8 to XB roller 2 ms Controller input time input 4 ms 433 constant setting 2 time 8 ms XC to XF None consController input time 16 ms tant 434 constant setting 3 32 ms setX10 to X13 64 ms tings (Note1) Controller input time 128 ms 435 constant setting 3 156 ms X14 to X17 Controller input time 436 constant se
5.1.14 Table of Special Internal Relays for FP-X The special internal relays turn on and off under special conditions. The on and off states are not output externally. Writing is not possible with a programming tool or an instruction. WR900 FP-X Address Name Self-diagnostic error R9000 flag R9001 Not used Application cassette R9002 I/O error flag Application cassette R9003 abnormal error flag I/O verification error R9004 flag Description Turns on when a self-diagnostic error occurs.
WR901 FP-X Address Name R9010 Always on relay R9011 Always off relay R9012 Scan pulse relay R9013 Initial (on type) pulse relay R9014 Initial (off type) pulse relay Description Always on. Always off. Turns on and off alternately at each scan. Goes on for only the first scan after operation (RUN) has been started, and goes off for the second and subsequent scans. Goes off for only the first scan after operation (RUN) has been started, and goes on for the second and subsequent scans.
WR902 FP-X Address Name R9020 RUN mode flag R9021 R9022 R9023 R9024 R9025 R9026 R9027 R9028 Not used Not used Not used Not used Not used Message flag Not used Not used R9029 Forcing flag R902A Interrupt enable flag R902B Interrupt error flag R902C Sample point flag R902D Sample trace end flag R902E Sampling stop trigger flag R902F Sampling enable flag Description Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN.
WR903 FP-X Address Name R9030 Not used R9031 Not used Description - Turns on when the general-purpose communication R9032 R9033 R9034 R9035 R9036 R9037 COM1 port mode flag PR instruction flag Editing in RUN mode flag Not used Not used COM1 port communication error flag function is being used - Goes off when any function other than the general- purpose communication function is being used. Off: Printing is not executed. On: Execution is in progress.
WR904 FP-X Address Name R9040 TOOL port mode flag R9041 COM1 port PC(PLC) link flag R9042 COM2 port mode flag R9043 Not used R9044 COM1 port SEND/RECV instruction execution flag R9045 COM1 port SEND/RECV instruction execution end flag R9046 Not used R9047 COM2 port communication error flag R9048 R9049 COM2 port reception done flag during general-purpose communicating COM2 port transmission done flag during general-purpose communication R904A COM2 port SEND/RECV instruction execution fl
WR905 FP-X Address Name R9050 MEWNET-W0 PC(PLC) link transmission error flag R9051 to R905F Not used 5-124 Description When using MEWNET-W0 - Turns on when a transmission error occurs at PC(PLC) link. - Turns on when there is an error in the PC(PLC) link area settings.
WR906 FP-X Address Name R9060 Unit No.1 R9061 Unit No.2 R9062 Unit No.3 R9063 Unit No.4 R9064 Unit No.5 R9065 Unit No.6 R9066 Unit No.7 R9067 R9068 MEWNET-W0 PC(PLC) link 0 transmission assurance relay Unit No.8 Unit No.9 R9069 Unit No.10 R906A Unit No.11 R906B Unit No.12 R906C Unit No.13 R906D Unit No.14 R906E Unit No.15 R906F Unit No.16 Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link mode.
WR907 FP-X Address Name R9070 R9071 R9072 R9073 R9074 R9075 R9076 R9077 R9078 R9079 R907A R907B R907C R907D R907E R907F 5-126 MEWNET-W0 PC(PLC) link 0 operation mode relay Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16 Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No. 2 is in the RUN mode.
WR908 FP-X Address Name R9080 Unit No.1 R9081 Unit No.2 R9082 Unit No.3 R9083 Unit No.4 R9084 Unit No.5 R9085 Unit No.6 R9086 Unit No.7 R9087 R9088 MEWNET-W0 PC(PLC) link 1 transmission assurance relay Unit No.8 Unit No.9 R9089 Unit No.10 R908A Unit No.11 R908B Unit No.12 R908C Unit No.13 R908D Unit No.14 R908E Unit No.15 R908F Unit No.16 Description Turns on when Unit No. 1 is communicating properly in PC(PLC) link mode.
WR909 FP-X Address Name R9090 R9091 R9092 R9093 R9094 R9095 R9096 R9097 R9098 R9099 R909A R909B R909C R909D R909E R909F 5-128 MEWNET-W0 PC(PLC) link 1 operation mode relay Unit No.1 Unit No.2 Unit No.3 Unit No.4 Unit No.5 Unit No.6 Unit No.7 Unit No.8 Unit No.9 Unit No.10 Unit No.11 Unit No.12 Unit No.13 Unit No.14 Unit No.15 Unit No.16 Description Turns on when Unit No. 1 is in the RUN mode. Turns off when Unit No. 1 is in the PROG. mode. Turns on when Unit No. 2 is in the RUN mode.
WR910 FP-X Address Name Description R9100 to Not used R910F R9110 HSC-CH0 R9111 HSC-CH1 R9112 HSC-CH2 R9113 HSC-CH3 - Turns on while the F166 (HC1S) and F167 (HC1R) R9114 HSC-CH4 instructions are executed. R9115 HSC-CH5 - Turns off when the F166 (HC1S) and F167 (HC1R) R9116 HSC-CH6 instructions are completed.
5.1.
Address Name DT90011 Add-on cassette verify error unit DT90012 DT90013 Not used Not used DT90014 Operation auxiliary register for data shift instruction DT90015 Operation auxiliary register for division instruction DT90016 FP-X (A: Available, N/A: Not available) Read WritDescription -ing ing When the state of installation of an FP-X addon cassette has changed since the power was turned on, the bit corresponding to the unit No. will turn on. Monitor using binary display.
Address Name DT90022 Scan time (current Note) value) DT90023 Scan time (minimum Note) value) DT90024 Scan time (maximum Note) value) DT90025 Mask condition monitoring register for interrupts (INT0 to 13) DT90026 Not used DT90027 Periodical interrupt interval (INT24) DT90028 Sample trace interval FP-X (A: Available, N/A: Not available) Read WritDescription -ing ing The current scan time is stored here.
Address Name FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing The number of data that match the searched data is stored here when F96 (SRC) A N/A insturction is executed. The position of the first matching data is stored here when an F96 (SRC) instruction is A N/A executed. N/A N/A The potentiometer value (K0 to K1000) is stored here. This value can be used in analog timers and other applications by using the A N/A program to read this value to a data register.
FP-X Address Name (A: Available, N/A: Not available) Read WritDescription -ing ing A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, continue or clear high-speed counter instruction.
FP-X Address Name (A: Available, N/A: Not available) Read WritDescription -ing ing A value can be written with F0 (MV) instruction to reset the high-speed counter, disable counting, continue or clear high-speed counter instruction.
FP-X Address Name DT90053 Real-Time Clock monitor (hour/minute) DT90054 Real-Time Clock setting (minute/second) DT90055 Real-Time Clock setting (day/hour) DT90056 Real-Time Clock setting (year/month) DT90057 Real-Time Clock setting (day-of-theweek) (A: Available, N/A: Not available) Read WritDescription -ing ing Hour and minute data of the Real-Time Clock are stored here. This data is read-only data. It cannot be overwritten.
Address Name FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing The Real-Time Clock is adjusted as follows. When setting the Real-Time Clock by program By setting the highest bit of DT90058 to 1, the time becomes that written to DT90054 to DT90057 by F0 (MV) instruction. After the time is set, DT90058 is cleared to 0. (Cannot be performed with any instruction other than F0 (MV) instruction.) Set the time to 12:00:00 on the 5th day when the X0 turns on.
Address DT90060 DT90061 DT90062 DT90063 DT90064 DT90065 DT90066 DT90067 DT90068 DT90069 DT90070 DT90071 DT90072 DT90073 DT90074 DT90075 DT90076 DT90077 DT90078 DT90079 DT90080 DT90081 5-138 Name Step ladder process (0 to 15) Step ladder process (16 to 31) Step ladder process (32 to 47) Step ladder process (48 to 63) Step ladder process (64 to 79) Step ladder process (80 to 95) Step ladder process (96 to 111) Step ladder process (112 to 127) Step ladder process (128 to 143) Step ladder process (144 to 159)
Address DT90082 DT90083 DT90084 DT90085 DT90086 DT90087 DT90088 DT90089 DT90090 DT90091 DT90092 DT90093 DT90094 DT90095 DT90096 DT90097 Name Step ladder process (352 to 367) Step ladder process (368 to 383) Step ladder process (384 to 399) Step ladder process (400 to 415) Step ladder process (416 to 431) Step ladder process (432 to 447) Step ladder process (448 to 463) Step ladder process (464 to 479) Step ladder process (480 to 495) Step ladder process (496 to 511) Step ladder process (512 to 527) Step la
Address DT90098 DT90099 DT90100 DT90101 DT90102 DT90103 DT90104 DT90105 DT90106 DT90107 DT90108 DT90109 DT90110 DT90111 DT90112 DT90113 DT90114 DT90115 DT90116 DT90117 DT90118 DT90119 DT90120 DT90121 Name Step ladder process (608 to 623) Step ladder process (624 to 639) Step ladder process (640 to 655) Step ladder process (656 to 671) Step ladder process (672 to 687) Step ladder process (688 to 703) Step ladder process (704 to 719) Step ladder process (720 to 735) Step ladder process (736 to 751) Step ladd
Address Name DT90123 Not used COM1 SEND/RECV instruction end code COM2 SEND/RECV instruction end code Forced ON/OFF operating station display DT90124 DT90125 DT90126 DT90127 to DT90139 Not used DT90140 DT90141 DT90142 DT90143 DT90144 MEWNET-W0 PC(PLC) link 0 status DT90145 DT90146 DT90147 DT90148 DT90149 DT90150 DT90151 DT90152 MEWNET-W0 PC(PLC) link 1 status DT90153 DT90154 DT90155 DT90156 DT90157 MEWNET-W0 PC(PLC) link 0 status FP-X (A: Available, N/A: Not available) Read Writ Description -ing
Address DT90158 DT90159 DT90160 DT90161 DT90162 to DT90169 Name MEWNET-W0 PC(PLC) link 1 status MEWNET-W0 PC(PLC) link 0 unit No. MEWNET-W0 PC(PLC) link 0 error flag Stores the unit No. of PC(PLC) link 0. A N/A Stores the error contents of PC(PLC) link 0. A N/A Not used - N/A N/A MEWNET-W0 PC(PLC) link 0 status Duplicated destination for PC(PLC) inter-link address Counts how many times a token is lost. Counts how many times two or more tokens are detected.
Address DT90219 Name Unit No. (Station No.) selection for DT90220 to DT90251 DT90222 PC(PLC) link Unit (station) No. 1 or 9 DT90223 DT90226 PC(PLC) link Unit (station) No. 2 or 10 PC(PLC) link Unit (station) No. 3 or 11 PC(PLC) link Unit (station) No. 4 or 12 DT90239 System regis- ter 40 and 41 System regis- The contents of the system register settings partaining to the PLC inter-link function for the various unit numbers are stored as shown below.
Address Name System regis- DT90240 DT90241 DT90242 System register 40 and 41 PC(PLC) link Unit (station) No. 7 or 15 5-144 System register 44 and 45 System register 40 and 41 PC(PLC) link Unit (station) No. 8 or 16 System register 42 and 43 System register 44 and 45 System regis- DT90251 DT90252 DT90253 DT90254 DT90255 DT90256 ter 42 and 43 ter 46 and 47 DT90248 DT90250 System regis- System regis- DT90247 DT90249 when DT90219 is 0.
Address DT90300 DT90301 FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing Counting area for input (X0) or A A Note) (X0, X1) of the main unit.
Address DT90320 DT90321 FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing Counting area for input (X5) of A A Note1) the main unit.
Address DT90336 DT90337 Name Elapsed value area Lower words Target value area Lower words Elapsed value area Lower words Target value area Lower words Elapsed value area Lower words Target value area Lower words Higher words HSC-CH9 Note2) DT90338 DT90339 DT90340 DT90341 Higher words Higher words DT90343 DT90344 DT90345 HSC-CHA Higher words Higher words DT90347 Higher words The target value is set when instructions F166 (HC1S) and F167 (HC1R) are executed.
FP-X Tr type FP-X (A: Available, N/A: Not available) Address DT90348 DT90349 DT90350 DT90351 DT90352 DT90353 DT90354 DT90355 DT90356 DT90357 DT90358 DT90359 DT90360 DT90361 Name Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Target value area Elapsed value area Lower words Description Reading Writing Counting area for the pulse I/O CH0 (Y0, Y1).
FP-X Tr type Address Name FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing A N/A When HSC control is executed by F0 (MV)S, DT90052 A N/A instruction, the setting value for A N/A the target CH is stored in each A N/A CH.
FP-X Ry type Address DT90348 DT90349 DT90350 DT90351 DT90352 DT90353 DT90354 DT90355 FP-X (A: Available, N/A: Not available) Read- WritDescription ing ing Counting area for output A A Note) (Y100, Y101) of the pulse I/O cassette.
5.1.16 Table of System Registers for FP2/FP2SH/FP10SH Allocation of user memory (system registers 0, 1 and 2) Available PLC: FP2 The configuration of user memory of FP2 is as follows: Be sure to set the A (using system ergister 0), B (using system register 1), and C (using system register 2) as even numbers. The area remaining in A after 512 words are subtracted is the sequence program area that can actually be used.
FP2 (32K) Users memory capacity Setting range of A Setting range of B Setting range of C : 32K words : 2K to 32K words (default value: 12k) : 0 to 30K words (default value: 0) :0 to 30K words (default value: 0) Allocate so that A + B + C ≦ 32. Setting example: The values of D when B = C = 0.
Setting the number of timers and counter (system register 5) Timers and counters share the same area. If the method of dividing the area is changed, the number of timers and counters will also change. Type Total point numbers Default value of system register 5 FP2 1,024 points 1000 FP2SH/FP10SH 3,072 points 3000 Timer 1000 points (No. 0 to 999) 3000 points (No. 0 to 2999) Counter 24 points (No. 1000 to 1023) 72 points (No.
For the FP2SH/FP10SH, the index registers can be set to hold type or non-hold type. The register numbers and settings are related as shown below.
MEWNET-W PC link setting For PC link (W) 0: System register 40 to 45 For PC link (W) 1: System register 50 to 55 Regarding the link relays and link data registers, specify the range for communication and divide it up for sending and receiving. The default settings have the range for communication (system register 40, 41, 50 and 51) set to 0 so that PC link communication is not possible.
Table of system registers for FP2/FP2SH/FP10SH AddDefault Item Name ress value Sequence program area 12K 0 capacity setting words Available PLC: FP2 AllocaMachine language tion of program area capacity 1 0 word user setting memory Available PLC: FP2 Configuration capacity 2 setting 0 word Available PLC: FP2 Descriptions FP2 (16K): 2 to 16K words FP2 (32K): 2 to 32K words FP2 (16K): 0 to 14K words FP2 (32K): 0 to 30K words FP2 (16K): 0 to 14K words FP2 (32K): 0 to 30K words Enabled: Action on error 4 Bat
FP2/FP2SH/FP10SH AddItem ress 5 6 Name Counter starting address (setting the number of timers and counters) Hold type area starting address setting for timer/counter Default value FP2SH/ FP10SH: 3000 FP2: 1000 FP2SH/ FP10SH: 3000 FP2: 1000 FP2SH/ FP10SH: 500 FP2: 200 Hold type area starting address setting for 7 internal relays (in word units) Hold type area starting 8 0 address setting for data registers Hold type area starting address setting for file 9 0 registers (For FP2SH, bank 0) Hold/ Hold typ
FP2/FP2SH/FP10SH AddItem ress 16 17 Hold/ Nonhold 18 19 20 21 22 23 Action on error 24 25 26 27 28 5-158 Default value Name Hold type area starting address setting for MEWNET-H link relays Available PLC: FP10SH Hold type area starting address setting for MEWNET-H link data registers Available PLC: FP10SH Hold type area starting address setting for index register Available PLC: FP2SH/ FP10SH Hold type area starting address setting for file register (for bank 2) Disable or enable setting for dupl
FP2/FP2SH/FP10SH AddItem ress 29 30 31 Time setting for FP2SH/ FP10SH 32 33 34 31 Time setting for FP2 32 33 34 Name Operation time setting for communication processing Time-out time setting of system watching dog timer Multi-frame communication time settings in the computer link and communication time setting for data sending buffer Time-out time setting for the F145 (SEND)/P145 (PSEND), F146 (RECV)/P146 (PRECV), F152 (RMRD)/P152 (PRMRD) and F153 (RMWT)/P153 (PRMWT) instructions Effective time
FP2/FP2SH/FP10SH AddItem ress 25 Default value Name Operation settings when connection time error occurs in the remote slave station Available PLC: FP2SH Stop Descriptions Stop/continuation Enabled: Remote I/O control 35 36 40 41 42 43 PC link 0 setting 44 45 46 5-160 Operation mode setting when the MEWNET-F system is used I/O data updating mode settings for MEWNET-F system Size of link relays used for communication Size of link data registers used for PC link 0 settings for communication
FP2/FP2SH/FP10SH AddItem ress MEWNET -H setting 49 50 51 52 PC link 1 setting 53 54 55 410 Tool port setting 411 Default value Name Processing capacity setting for PC link of MEWNET-H link system Available PLC: FP10SH Size of link relays used for communication Size of link data registers PC link 1 used for settings for commuMEWNETnication W/-P link Send area system starting Available address of PLC: link relay MEWNETSize of link W: relays used FP10SH, for send FP2, area FP2SH Send area MEWNETstart
FP2/FP2SH/FP10SH AddItem ress Tool port setting 414 Communication method setting for COM port 413 Communication format setting (Common setting for both computer link and serial data communication) When used for computer link, the start and end code settings of format for MEWTOCOL-COM will not be effective.
Operation of DF instruction between MC and MCE instructions When a leading edge detection instruction (DF instruction) is used with the MC and MCE instructions, the derivative output may change as follows depending on the trigger of MC instruction and input timing of DF instruction. Take care regarding this point.
Example 2: When system register 4 sets 1 (new) Time chart 1 Time chart 2 5-164
5.1.
FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name R9009 Carry flag R900A > Flag R900B = Flag R900C < Flag R900D Auxiliary timer contact (Available PLC: FP-M C20, C32/FP1 C56, C72/FP2/FP2SH/FP3/ FP10SH) Description Turns on for an instant, - when an overflow or underflow occurs. - when “1” is set by one of the shift instructions.
FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name Description R901D 2 s clock pulse relay Repeats on/off operations in 2 s cycles. R901E 1 min clock pulse relay Repeats on/off operations in 1 min cycles. R901F Not used R9020 RUN mode flag R9021 Test RUN mode flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) Turns off while the mode selector is set to PROG. Turns on while the mode selector is set to RUN. Turns on while the initialize/test switch of the CPU is set to TEST and mode selector is set to RUN.
FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name Sampling trace end flag R902D (Available PLC: FP2/ FP2SH/FP3/FP10SH) Sampling trigger flag R902E (Available PLC: FP2/ FP2SH/FP3/FP10SH) Sampling enable flag R902F (Available PLC: FP2/ FP2SH/FP3/FP10SH) R9030 F145 (SEND)/P145 (PSEND) and F146 (RECV)/P146 (PRECV) instruction executing flag R9031 F145 (SEND)/P145 (PSEND) and F146 (RECV)/P146 (PRECV) instruction end flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) R9032 R9033 R9034 R9035 5-168 COM port mode flag (
FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name R9036 R9037 R9038 R9039 R903A R903B R903C R903D R903E R903F R9040 F152 (RMRD)/P152 (PRMRD) and F153 (RMWT)/P153 (PRMWT) instruction end flag (Available PLC: FP2/ FP2SH/FP3/FP10SH) I/O link error flag (Available PLC: FP-M C20, C23/FP1) COM port communication error flag (Available PLC: FP-M C20C, C32C/FP1 C24C, C40C, C56C, C72C/FP2/FP2SH/ FP10SH) COM port receive flag (Available PLC: FP-M C20C, C32C/FP1 C24C, C40C, C56C, C72C/FP2/FP2SH/ FP10SH) COM port send
FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name MEWNET-W/-P link transmission error flag R9050 [W/P LINK 1] for FP3/ FP10SH [W LINK 1] for FP2/FP2SH MEWNET-W/-P link transmission error flag R9051 [W/P LINK 2] for FP3/ FP10SH [W LINK 2] for FP2/FP2SH MEWNET-W/-P link transmission error flag R9052 [W/P LINK 3] for FP3/ FP10SH [W LINK 3] for FP2/FP2SH MEWNET-W/-P link transmission error flag R9053 [W/P LINK 4] for FP2/ FP10SH [W LINK 4] for FP2SH MEWNET-W/-P link transmission error flag R9054 [W/P LINK 5] for FP2/
FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name Description Turns on when Unit No. 1 is communicating properly in the PC Unit R9060 link mode. Turns off when operation is stopped, when an error No.1 occurs, or when not in the PC link mode. Turns on when Unit No. 2 is communicating properly in the PC Unit R9061 link mode. Turns off when operation is stopped, when an error No.2 occurs, or when not in the PC link mode. Turns on when Unit No. 3 is communicating properly in the PC Unit R9062 link mode.
FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name Description Unit Turns on when unit No. 1 is in the RUN mode. R9070 No.1 Turns off when unit No. 1 is in the PROG. mode. Unit Turns on when unit No. 2 is in the RUN mode. R9071 No.2 Turns off when unit No. 2 is in the PROG. mode. Unit Turns on when unit No. 3 is in the RUN mode. R9072 No.3 Turns off when unit No. 3 is in the PROG. mode. Unit Turns on when unit No. 4 is in the RUN mode. R9073 No.4 Turns off when unit No. 4 is in the PROG. mode.
FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name Description Turns on when unit No. 1 is communicating properly in the PC Unit R9080 link mode. Turns off when operation is stopped, when an error No.1 occurs, or when not in the PC link mode. Turns on when unit No. 2 is communicating properly in the PC Unit R9081 link mode. Turns off when operation is stopped, when an error No.2 occurs, or when not in the PC link mode. Turns on when unit No. 3 is communicating properly in the PC Unit R9082 link mode.
FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name Description Unit Turns on when unit No. 1 is in the RUN mode. R9090 No.1 Turns off when unit No. 1 is in the PROG. mode. Unit Turns on when unit No. 2 is in the RUN mode. R9091 No.2 Turns off when unit No. 2 is in the PROG. mode. Unit Turns on when unit No. 3 is in the RUN mode. R9092 No.3 Turns off when unit No. 3 is in the PROG. mode. Unit Turns on when unit No. 4 is in the RUN mode. R9093 No.4 Turns off when unit No. 4 is in the PROG. mode.
FP1/FP-M/FP2/FP2SH/FP10SH/FP3 Address Name R9103 IC memory card protect switch flag (Available PLC: FP2SH/ FP10SH) R9104 IC memory card access switch flag (Available PLC: FP2SH/ FP10SH) Description Monitors the protective condition of the IC memory card as: - on: The protect switch is not in the write-protected (WP) position. - off: The protect switch is in the write-protected (WP) position.
5.1.18 Special Data Registers for FP2/FP2SH/FP3/FP10SH FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The self-diagnostic error code is stored here when a self-diagnostic error occurs. Self-diagnostic DT9000 DT90000 Monitor the error code using decimal error code display. DT9001 DT90001 Not used Communication The slot number, where an erroneous error of unit is installed, can be monitored here.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH When an error condition is detected in an intelligent unit, the bit corresponding Abnormal to the slot of the unit will be set to on. DT9006 DT90006 intelligent unit Monitor using binary display. (slot No. 0 to 15) (1: abnormal intelligent unit, 0: normal intelligent unit) DT9007 DT90007 DT90010 I/O verify error unit (slot No. 0 to 15) DT9011 DT90011 I/O verify error unit (slot No.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The address whre an operation error occurred is stored. Each time an error occurs, the new address overwrites the Operation error DT9018 DT90018 address previous address. At the beginning of scan, the addressis 0. Monitor the (non-hold) address using decimal display. (Reference: DT90258) The data stored here is increased by one very 2.5 ms (H0 to HFFFF) 2.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The current scan time is stored here. Scan time is Scan time calculated using the display is formula: Scan time DT9022 DT90022 only possible Scan time (ms) = stored (current value) in RUN data (decimal) x 0.1 mode, and Example: shows the K50 indicates 5 ms. operation The minimum scan time cycle time. is stored here.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The value registered using programming tool software is stored. DT9028 DT90028 Sample trace - K0: sampling triggered by F155 (*Note) (*Note) interval (SMPL)/P155 (PSMPL) instruciton - K1 to K3000 (x 10ms): 10ms to 30s DT9029 DT90029 The address (K constant) of a break in a Break address (*Note) (*Note) test run is stored.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Hour and minute data of the Real-Time Clock(Clock/Calendar) are stored here. This data is read-only data. It cannot be Real-Time Clock overwritten.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The Real-Time Clock(Clock/Calendar) is adjusted as follows. When setting the Real-Time Clock (Clock/Calendar) by program By setting the highest bit of DT9058/DT90058 to 1, the time becomes that written to DT9054 to DT9057/DT90054 to DT90057 by F0 (MV) instruction. After the time is set, DT9058/DT90058 is cleared to 0. (Cannot be performed with any instruciton other than F0 (MV) instruction.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The system uses this as a communication status when Serial communication error occurs.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Step ladder proDT9078 DT90078 cess (288 to 303) Step ladder proDT9079 DT90079 cess (304 to 319) Step ladder proDT9080 DT90080 cess (320 to 335) Step ladder proDT9081 DT90081 cess (336 to 351) Step ladder proDT9082 DT90082 cess (352 to 367) Step ladder proDT9083 DT90083 cess (368 to 383) Step ladder proDT9084 DT90084 Indicates the startup condition of the cess (384 to 399) step ladder process.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Step ladder proDT9100 DT90100 cess (640 to 655) Step ladder proDT9101 DT90101 cess (656 to 671) Step ladder proDT9102 DT90102 cess (672 to 687) Step ladder proDT9103 DT90103 cess (688 to 703) Step ladder proDT9104 DT90104 cess (704 to 719) Step ladder proDT9105 DT90105 cess (720 to 735) Step ladder proDT9106 DT90106 cess (736 to 751) Indicates the startup condition of the Step ladder proDT9107 DT90107 ste
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH DT9123 DT90123 Not used DT9124 DT90124 Not used DT9125 DT90125 Not used Forced on/off This displays the unit number that has DT9126 DT90126 operating station executed forced on/off operation. (*Note) (*Note) display The number of times, which MEWNETF remote I/O service was performed by each master, is stored.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The bit corresponding to the station number of the MEWNET-F where an MEWNET-F error is occurring is set to on. Monitor (remote I/O) error using binary display.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Display the error conditions for 8 types of errors using 1 byte.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The number of times the receiving operation is DT9148 DT90148 (*Note1) (*Note1) performed (counted using ring counter) The current interval between two receiving DT9149 DT90149 (*Note1) (*Note1) operations: value in the register x 2.5 ms The minimum interval between two receiving DT9150 DT90150 (*Note1) (*Note1) operations: value in the register x 2.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Link unit no. DT9160 DT90160 [W/P link 1] Stores the unit No. of link 1. (*Note) Error flag DT9161 DT90161 [W/P link 1] Stores the error flag of link 1. (*Note) Link unit no. DT9162 DT90162 [W/P link 2] Stores the unit No. of link 2. (*Note) Error flag DT9163 DT90163 [W/P link 2] Stores the error flag of link 2. (*Note) Link unit no. DT9164 DT90164 [W/P link 3] Stores the unit No. of link 3.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Station number, whre the send area address DT9170 DT90170 for the PC link is overlapped with this station, is stored here. Test result in the optical transmission path DT9171 DT90171 test mode for MEWNET-P link system is stored here. DT9172 DT90172 Counts how many times a token is lost. Counts how many times two or more tokens DT9173 DT90173 are detected.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH MEWNET-H The link status for the MEWNET-H link is link status/ monitored as: link unit number (H DT9195 DT90195 link 1) (For FP2/ FPSH, using W2 mode) MEWNET-H The link status for the MEWNET-H link is link status/ monitored as: link unit number (H DT9196 DT90196 link 2) (For FP2/ FPSH, using W2 mode) MEWNET-H The link status for the MEWNET-H link is link status/ monitored as: link unit number (H DT9197 DT
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Counts how many times a parity error is DT9213 DT90213 detected. DT9214 DT90214 End code receiving error DT9215 DT90215 Format error DT9216 DT90216 Not support error DT9217 DT90217 Self-diagnostic result Counts how many times loop change is DT9218 DT90218 detected. Available PLC: FP3, FP10SH Counts home many times link error is DT9219 DT90219 MEWNETdetected.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH DT9238 DT90238 Send WACK DT9239 DT90239 Send WACK DT9240 DT90240 Send answer DT9241 DT90241 Send answer DT9242 DT90242 Unidentified command Counts how many times a parity error is DT9243 DT90243 detected.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH An Operation error program block number Operation is stored (higher byte) here when an error program operation error is detected. No. (hold) DT90257 (Available Program block number PLC: FP2SH/ - H1: In the first program block FP10SH) - H2: In the 2nd program block The program block number for the latest Operation operation error is stored here each time an error program operation error is detected. No.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH File register bank (shelter The shelter number of the file register DT90264 number) bank is stored here. (Available PLC: FP2SH) Free compile Free capacity of compile memory is stored memory here. If the program memory is 120K capacity DT90265 (Available steps, the capacity of 1st program block is PLC: FP2SH/ stored.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH The first error alarm relay number which went on is stored. The error has been reset by executing a RST instruction.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Eighth error alarm relay which went on DT90408 (Available PLC: FP2SH/ FP10SH) Ninth error alarm relay which went on DT90409 (Available PLC: FP2SH/ FP10SH) Tenth error alarm relay which went on DT90410 (Available PLC: FP2SH/ FP10SH) The error alarm relay number which went Eleventh error on is stored. To reset the specified error alarm relay which went on alarm relay, use an RST instruction only.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Fifteenth alarm relay which went on DT90415 (Available PLC: FP2SH/ FP10SH) Sixteenth error alarm relay which went on DT90416 (Available PLC: FP2SH/ FP10SH) Seventeenth The error alarm relay number which went error alarm on is stored. To reset the specified error relay which alarm relay, use an RST instruction only.
FP2/FP2SH/FP3/FP10SH (A: Available, N/A: Not available) Address FP2/ Name Descriptions FP3 FP2SH FP10SH Time at which the first error alarm relay (DT90401) The time (minute and second) data at went on (for which the first error alarm relay in DT90420 minute and DT90401 went on is stored.
Out Not AND AND Not OR OR Not Leading edge start Trailing edge start Leading edge AND Trailing edge AND Leading edge OR ST/ OT / AN AN/ OR OR/ ST↑ ST↓ AN↑ AN↓ OR↑ Trailing edge OR OR↓ Leading edge out OT↑ Trailing edge out OT↓ Alternative out AND stack OR stack ALT ANS ORS Connects the multiple instruction blocks in parallel.
Stores the operated result up to this instruction. *2 Reads the operated result stored by the PSHS instruction. *2 Reads and clears the operated result stored by the PSHS instruction Turns on the contact for only one scan when the leading edge of the trigger is detected. Turns on the contact for only one scan when the trailing edge of the trigger is detected. Turns on the contact for only one scan when the leading edge of the trigger is detected. The leading edge detection is possible on the first scan.
UP/DOWN counter F118 (UDC) Increments or decrements from the preset value “S” based on up/donw input. Shift register SR Shifts one bit of 16-bit [word internal relay (WR)] data to the left. Left/right shift register F119 (LRSR) Shifts one bit of 16-bit data range specified by “D1” and “D2” to the left or to the right.
End ED Conditional end Eject CNDE EJECT Step ladder instructions Start step SSTP Next step NSTL NSTP Clear step CSTP Clear multiple steps SCLR Step end STPE Subroutine instructions Subroutine CALL call Output off type subroutine call FCAL Subroutine SUB entry Subroutine RET return Interrupt instructions Interrupt INT The operation of program is ended. Indicates the end of a main program. The operation of program is ended when the trigger turns on. Adds page break fo ruse when printing.
Interrupt setting PLC link time setting MEWTOCOLCOM response control High-speed counter operation mode changing System registers “No. 40 to No. 47” changing : Available, SYS2 Change the communication conditions for the COM port or tool port based on the contents specified by the character constant. Change the password specified by the PLC based on the contents specified by the character constant. Set the interrupt input based on the contents specified by the character constant.
Data compare instructions 16-bit ST= data compare ST<> (Start) ST> ST>= ST< ST<= 16-bit AN= data compare AN<> (AND) AN> AN>= AN< AN<= 16-bit OR= data compare OR<> (OR) OR> OR>= OR< OR<= : Available, 5-206 : Not available, Begins a logic operation by comparing two 16bit data in the comparative condition “S1=S2”. Begins a logic operation by comparing two 16bit data in the comparative condition “S1S2”.
32-bit STD= data compare STD<> (Start) STD> STD>= STD< STD<= 32-bit AND= data compare AND<> (AND) AND> AND>= AND< AND<= 32-bit ORD= data compare ORD<> (OR) ORD> ORD>= ORD< ORD<= : Available, : Not available, Begins a logic operation by comparing two 32bit data in the comparative condition “(S1+1, S1)=(S2+1, S2)”. Begins a logic operation by comparing two 32bit data in the comparative condition “(S1+1, S1)<(S2+1, S2)” or “(S1+1, S1)>(S2+1, S2)”.
5-208 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 FP2 *1 FP2SH/FP10SH FP-X STF= FPΣ Begins a logic operation by comparing two 32bit data in the comparative condition “(S1+1, point S1)=(S2+1, S2)”. Begins a logic operation by comparing two 32type real STF<> bit data in the comparative condition “(S1+1, number S1)<(S2+1, S2)” or “(S1+1, S1)>(S2+1, S2)”.
5.3 Table of High-level Instructions (S)→(D) S, D (S+1, S)→(D+1, D) FP-X FP2SH/FP10SH S, D FPΣ Description rand FP2 Data transfer instructions F0 16-bit data MV P0 move PMV F1 32-bit data DMV P1 move PDMV F2 16-bit data MV P2 invert and PMV/ move F3 32-bit data DMV/ P3 invert and PDMV/ move F4 Reading of GETS P4 head word PGETS No.
F15 P15 F16 P16 F17 P17 16-bit data exchange 32-bit data exchange Higher/lower byte in 16-bit data exchange F18 16-bit data P18 block exchange Control instruction F19 Auxiliary jump XCH PXCH DXCH PDXCH SWAP PSWAP D1, D2 (D1)→(D2), (D2)→(D1) D1, D2 (D1+1, D1)→(D2+1, D2) (D2+1, D2)→(D1+1, D1) The higher byte and lower byte of “D” are exchanged. BXCH PBXCH D1, D2, D3 Exchange the data between “D1” and “D2” with the data specified by “D3”.
BCD arithmetic instructions F40 4-digit BCD B+ P40 data addition PB+ F41 8-digit BCD DB+ P41 data addition PDB+ F42 4-digit BCD B+ P42 data addition PB+ F43 8-digit BCD DB+ P43 data addition PDB+ F45 4-digit BCD data BP45 subtraction PBF46 8-digit BCD data DBP46 subtraction PDBF47 4-digit BCD data BP47 subtraction PBF48 8-digit BCD data DBP48 subraction PDBF50 4-digit BCD data B* P50 multiplication PB* F51 8-digit BCD data DB* P51 multiplication PDB* F52 4-digit BCD data B% P52 division PB% F53 8-digit BCD
S1, S2, D (S1) OR (S2)→(D) Data conversion instructions F70 Block check BCC P70 code PBCC calculation F71 P71 F72 P72 F73 P73 F74 P74 F75 P75 Hexadecima l data → ASCII code HEXA PHEXA ASCII code → Hexadecimal data AHEX PAHEX 4-digit BCD data → ASCII code BCDA PBCDA ASCII code → 4-digit BCD data ABCD PABCD 16-bit binary data → ASCII code BINA PBINA : Available, 5-212 : Not available, 7 7 S1, S2, D {(S1) AND (S2)} OR {(S1) AND (S2)}→(D) 7 {(S1) AND (S2)} OR {(S1) AND (S2)}→(D) 7 S1,
ASCII code → 16-bit binary data ABIN PABIN F77 P77 32-bit binary data → ASCII code DBIA PDBIA S1, S2, D F78 P78 ASCII code → 32-bit binary data 16-bit binary data → 4-digit BCD data DABI PDABI S1, S2, D BCD PBCD S, D F76 P76 F80 P80 S1, S2, D F81 P81 4-digit BCD data → 16-bit binary data BIN PBIN S, D F82 P82 32-bit binary data → 8-digit BCD data DBCD PDBCD S, D F83 P83 8-digit BCD data → 32-bit binary data 16-bit data invert (complement of 1) 16-bit data complement of 2 32-bit data
DIST PDIST S, n, D Character→ ASCII code ASC PASC S, D F96 P96 16-bit table data search SRC PSRC S1, S2, S3 F97 P97 32-bit table data search DSRC PDSRC S1, S2, S3 F94 P94 16-bit data distribute F95 P95 Data shift instructions F98 Data table shift-out P98 and compress CMPR PCMPR D1, D2, D3 Each of the digits of the data of “S” are stored in (distriuted to) the least significant digits of the areas beginning at “D”.
FIFO instructions F115 FIFO buffer define P115 F116 Data read from P116 FIFO buffer F117 Data write into P117 FIFO buffer Basic function instructions F118 UP/DOWN counter F119 Left/right shift register Data rotate instructions F120 16-bit data right P120 rotate F121 16-bit data left P121 rotate F122 16-bit data right P122 rotate with carry flag (R9009) data F123 16-bit data left P123 rotate with carry flag (R9009) data F125 32-bit data right P125 rotate FIFT PFIFT FIFR PFIFR n, D FIFW PFIFW S, D UDC
F136 P136 Number of DBCU on (1) bits in PDBCU 32-bit data Basic function instruction F137 Auxiliary STMR timer (16-bit) Special instructions F138 Hours, minHMSS P138 utes and sec- PHMSS onds to seconds data F139 Seconds to SHMS P139 hours, PSHMS minutes and seconds data F140 Carry flag STC P140 (R9009) set PSTC F141 Carry flag CLC P141 (R9009) reset PCLC F142 Watching WDT P142 dog timer PWDT update F143 Partial I/O IORF P143 update PIORF S, D Store the number of on bits in the data of (S+1, S) in “D”.
F155 P155 F156 P156 F157 P157 F158 P158 F159 P159 F161 P161 Sampling trigger Time addition Time substruction Serial port communication MCU serial port reception - SMPL PSMPL STRG PSTRG CADD PCADD CSUB PCSUB MTRN PMTRN MRCV PMRCV S1, D S1, D S2, S2, S, n, D S, D2 D1, When the trigger of this instruction turns on, the sampling trace stops. The time after (S2+1, S2) elapses from the time of (S1+2, S1+1, S1) is stored in (D+2, D+1, D).
F167 High-speed counter output reset (with channel specification) Positioning control (with channel specification) Pulse output (with channel specification) HC1R n, S, Yn Turns output Yn off when the elapsed value of the built-in highspeed counter reaches the target value of (S+1, S). Outputs a positioning pulse from the specified output (Y0 or Y1) according to the contents of the data table beginning at “S”.
F174 F175 F176 F177 F178 Pulse output (Selectable data table control operation ) Pulse output (Linear interpolation) SP0H Pulse output (Circular interpolation) SPCH Pulse output (Home return) HOME Input pulse measurement (No. of pulses, cycle for input pulses) PLSM SPSH S, n S, n S, n S, n S1, S2, D Outputs the pulses from the specified channel according to the data table specified by S.
High speed counter/Pulse output instruction for FPΣ/FP-X F0 High-speed MV S, DT90052 Performs high-speed counter counter and and Pulse output controls Pulse output according to controls the control code specified by “S”. The control code is stored in DT90052. F1 Change and read DMV FPΣ: Transfers (S+1, S) to high-speed of the elapsed S, DT90044 counter and Pulse output value of highFP-X: elapsed value area (DT90045, speed counter S, DT90300 DT90044).
F175 F176 Pulse output (Linear interpolation) SPSH Pulse output (Circular interpolation) SPCH Screen display instructions F180 FP-e screen SCR display registration F181 FP-e screen DSP display switching Basic function instruction F182 Time FILTR constant processing F183 Auxiliary DSTM timer (32-bit) S, n S, n Pulses are output from channel, in accordance with the designated data table, so that the path to the target position forms a straight line.
F235 P235 F236 P236 F237 P237 F238 P238 F240 P240 F241 P241 F250 F251 F262 P262 S, D DGRY PDGRY S, D 16-bit gray code → binary data conversion 32-bit gray code → binary data conversion Bit line to bit column conversion Bit column to bit line conversion Binary data → ASCII conversion ASCII → binary data conversion GBIN PGBIN S, D DGBIN PDGBIN S, D COLM PCOLM S, n, D LINE PLINE BTOA S, n, D S1, S2, n, D S1, S2, n, D S1, S2, n The values of bit “n” of (S) to (S+15) are stored in bits 0 to 15 of “
F271 P271 F272 P272 F273 P273 F275 P275 F276 P276 F277 P277 F278 P278 Maximum value (double word data (32bit)) DMAX PDMAX Minimum value (word data (16bit)) MIN PMIN Minimum value (double word data (32-bit)) DMIN PDMIN Total and mean values (word data (16bit)) Total and mean values (double word data (32-bit)) Sort (word data (16-bit)) MEAN PMEAN DMEAN PDMEAN SORT PSORT S1, S2, D S1, S2, D S1, S2, D S1, S2, D S1, S2, D S1, S2, S3 S1, S2, S3 Sort (double word data (32bit)) DSORT PDSORT
F286 P286 F287 P287 F288 P288 S1, S2, S3, D Upper and lower limit control (32-bit data) DLIMT PDLIMT Deadband control (16-bit data) Deadband control (32-bit data) BAND PBAND S1, S2, S3, D DBAND PDBAND S1, S2, S3, D F289 P289 Zone control (16-bit data) ZONE PZONE S1, S2, S3, D F290 P290 Zone control (32-bit data) DZONE PDZONE S1, S2, S3, D When (S1+1, S1)>(S3+1, S3), (S1+1, S1)→(D+1, D) When (S2+1, S2)<(S3+1, S3), (S2+1, S2)→(D+1, D) When (S1+1, S1)
F317 P317 F318 P318 F319 P319 F320 P320 F321 P321 F322 P322 F323 P323 F324 P324 F325 P325 F326 P326 F327 P327 F328 P328 Floating-point type data sine operation Floating-point type data cosine operation Floating-point type data tangent operation Floating-point type data arcsine operation Floating-point type data arccosine operation Floating-point type data arctangent operation Floating-point type data natural logarithm Floating-point type data exponent SIN PSIN COS PCOS S, D SIN(S+1, S)→(D+1, D) S, D
F331 P331 F332 P332 F333 P333 FIX PFIX DFIX PDFIX ROFF PROFF DROFF PDROFF FINT PFINT S, D S, D S, D S, D S, D Converts real number data specified by (S+1, S) to the 16-bit integer data with sign (rounding the first decimal point down), and the converted data is stored in “D”. Converts real number data specified by (S+1, S) to the 32-bit integer data with sign (rounding the first decimal point down), and the converted data is stored in (D+1, D).
F351 P351 F352 P352 F353 P353 F354 P354 Floating-point type data dead-band control FBAND PFBAND Floating-point type data zone control FZONE PFZONE Floating-point type data maxi-mum value FMAX PFMAX Floating-point type data mini-mum value FMIN PFMIN Floating-point type data total and mean values FMEAN PFMEAN Floating-point type data sort FSORT PFSORT Scaling of real number data FSCAL PFSCAL S1, S2, S3, D S1, S2, S3, D S1, S2, S3, D S1, S2, D S1, S2, D S1, S2, D S1, S2, S3 S1, S2, D
Eaay PID EZPID Compare instructions F373 16-bit data P373 revision detection DTR PDTR F374 P374 DDTR PDDTR 32-bit data revision detection S S1, S2, S3, S4 S, D S, D Index register bank processing instructions F410 Setting the SETB n P410 index regis-ter PSETB bank number F411 Changing the CHGB n P411 index regis-ter PCHGB bank number F412 P412 Restoring the index regis-ter bank number POPB PPOPB - File register bank processing instructions F414 Setting the file SBFL n P414 register bank PSBFL
5.4 Table of Error codes Difference in ERROR display There are differences in the way errors are displayed depending on the model. Model Display Display method FP1,FP-M,FP2,FP3,FP10SH LED ERROR. Continually lit FPΣ,FP0, FP0R, FP-X LED ERROR/ALARM Flashes/contunually lit FP-e Screen display ERR. Continually lit Error Confirmation When ERROR Turns ON When the “ERROR” on the control unit (CPU unit) turns on or flashes, a self-diagnostic error or syntax check error has occurred.
-Self-diagnostic Error This error occurs when the control unit (CPU unit) self-diagnostic function detects the occurrence of an abnormality in the system. The self-diagnostic function monitors the memory abnormal detection, I/O abnomal detection, and other devices. When a self-diagnostic error occurs - The ERROR turns on or flashes. - The operation of the control unit (CPU unit) might stop depending on the contect of error and the system register setting.
Duplicated output error Stops E3 Not paired error Stops E4 Parameter mismatch error Stops Program area error Stops E2 E5 (Note) FP10SH (Note) FP2SH Stops FP2 Syntax error E1 FP-X Operation status FPΣ Name FP0R Error code FP0 Table of Syntax Check Error FP-e A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A Description and steps to take A program with a syntax error has been written. ⇒ Change to PROG.
High-level instruction type error Stops E8 E9 E10 High-level instruction operand combination error No program error Rewrite during RUN syntax error Stops There is an incorrect operand in an instruction which requires a specific combination operands (for example, the operands must all be of a certain type). ⇒ Enter the correct combination of operands. Stops Program may be damaged. ⇒Try to send the program again.
Table of Self-Diagnostic Error E23 E24 E25 E25 A A A Stops Probably an abnormality in the internal RAM. ⇒Please contact your dealer. A A A Stops The models of master memories are different. Use the master memories created with the same model. FP-X Probably a hardware abnormality ⇒Please contact your dealer.
E30 Stops A parameter error was detected in the MEWNET-W2 configuration area. Set a correct parameter. Stops Probably a hardware abnormality. ⇒ Please contact your dealer. E31 Interrupt error 1 Stops E32 Interrupt error 2 Stops E33 Multi-CPU data unmatch error CPU2 Stops E34 I/O status error Stops E35 MEWNET-F slave illegal unit error Stops E36 E37 MEWNET-F (remore I/O) limitation error MEWNET-F I/O mapping error Stops Stops An interrupt occurred without an interrupt request .
I/O error Selectable A A FP10SH E40 FP2SH Stops FP2 IC card read error FP-X E39 FPΣ Stops I/O mapping for remote I/O terminal boards,remote I/O terminal units and I/O link is not correct. ⇒Re-configure the I/O map for slave stations according to the I/O points of the slave stations. When reading in the program from the IC memory card(due to automatic reading because of the dip switch setting or program switching due to F14(PGRD) instruction): - IC memory card is not installed.
Selectable A A FP10SH I/O unit verify error FP2SH E42 FP2 Selectable FP-X Intelligent unit error An abnormality in an intelligent unit. FPΣ, FP-X: Check the contetns of special data register “DT90006” and locate the abnormal FP intelligent unit (application cassette for FP-X). FP2,FP2SH,and FP10SH: Check the contents of special data registers DT90006,DT90007 and locate the abnormal intelligent unit.Then check the unit referring to its manual..
E45 Operation error Selectable Scan time required for program execution exceeds the setting of the system watching dog timer. ⇒ Check the program and modify it so that the program can execute a scan within the specified time. Selection of operation status using system register24: -to continue operation,set 1 -to stop operation,set 0 Selectable The time required for slave station connection exceeds the setting of the system register 35.
E47 MEWNET-F attribute error E49 Expansion unit power supply sequence error E50 5-238 Backup battery errror Selectable Stops The power supply for the expansion unit was turned on after the control unit. Turn on the power supply for the expansion unit at the same time or before the control unit is turend on. Continues The voltage of the backup battery lowered or the backup battery of conrol unit is not installed. ⇒ Check the installation of the backup battery and then replace battery if necessary.
E53 Continues E54 IC memory card backup battery error Continues E55 IC memory card backup battery error Continues E56 Incompatible IC memory card error Continues E57 No unit for the configuration E100 to E199 E200 to E299 Selfdiagnostic error set by F148 (ERR)/P148 (PERR) instruction Continues Stop Continues FP10SH FP-X FPΣ FP2SH Continues Terminal station setting was not properly performed.
Table of MEWTOCOL-COM Communication Error Error code !21 !22 !23 !24 !25 !26 !27 !28 !29 !30 !32 !33 !36 !38 !40 !41 !42 !43 !50 !51 !52 Name NACK error WACK error Unit No. overlap Transmission format error Link unit hardware error Unit No.
Error code Name !64 External memory error !65 Protect error !66 Address error !67 No program error and No data error !68 Rewrite during RUN error !70 !71 SIM over error Exclusive access control error Description An abnormality occurred when loading RAM to ROM/IC memory card.There may be a problem with the ROM or IC memory card. -When loading,the specified contents exceeded the capacity. -Write error occurs. -ROM or IC memory card is not installed.
5.5 MEWTOCOL-COM Communication Commands Table of MEWTOCOL-COM commands Command name Read contact area Code RC (RCS) (RCP) (RCC) Description Reads the on and off status of contact. - Specifies only one point. - Specifies multiple contacts. - Specifies a range in word units. Turns contacts on and off.
5.6 Hexadecimal/Binary/BCD Decimal Hexadecimal Binary data 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 . . . 63 . . . 255 . . . 9999 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001A 001B 001C 001D 001E 001F . . . 003F . . . 00FF . . .
5.
Record of changes Record of changes Manual No. Date Description of changes ARCT1F313E/ ACG-M313E MAR.2000 First edition ARCT1F313E-1/ ACG-M313E-1 MAY.2000 2nd edition ARCT1F313E-2/ ACG-M313E-2 SEP.2000 3rd edition ARCT1F313E-3/ ACG-M313E-3 JUN.2003 4th edition Additions: FPSIGMA, FP-e ARCT1F313E-4/ ACG-M313E-4 JUL.2003 5th edition ARCT1F313E-5/ ACG-M313E-5 JUL.2004 6th edition Addition & New programming: ICTL, F4, F159, F161, F230, F231, F354 ARCT1F313E-6/ ACG-M313E-6 AUG.
Record of changes Manual No. Date Description of changes ARCT1F313E-12/ ACG-M313E-12 JUL.2006 13th edition ARCT1F313E-13/ ACG-M313E-13 SEP.2006 14th edition ARCT1F313E-14/ ACG-M313E-14 MAR.2007 15th edition ARCT1F313E-15/ ACG-M313E-15 JAN.2008 16th edition ARCT1F313E-16/ ACG-M313E-16 NOV.2008 17th edition Change in Corporate name ARCT1F313E-17/ ACG-M313E-17 JUL.2009 18th edition ARCT1F313E-18 AUG.