MAPware-7000 Ladder Logic Guide Maple Systems Inc. 808 134th Street SW, Suite 120 Everett, WA 98204-7333 Phone: (425) 745-3229 Email: maple@maplesystems.com Web: www.maplesystems.com © 2011 Maple Systems Inc. All rights reserved. 1010-1041 rev.
i MAPware-7000 Ladder Logic Guide Table of Contents Logic Block Instructions ................................................................................................................... 1 Overview...................................................................................................................................... 1 Ladder Instruction Table.............................................................................................................. 1 Input/Output Instructions .......
MAPware-7000 Ladder Logic Guide ii Instruction 15- Invert Transfer .............................................................................................. 29 Instruction 16- Table Initialize ............................................................................................... 30 Instruction 17- Table Block Transfer ..................................................................................... 31 Instruction 18- Table Invert Transfer..................................................
iii MAPware-7000 Ladder Logic Guide Instruction 47- Less Than....................................................................................................... 83 Instruction 48- Double Word Less Than ................................................................................ 85 Instruction 49- Unsigned Less Than....................................................................................... 86 Instruction 50- Less Than or Equal To ..........................................................
MAPware-7000 Ladder Logic Guide iv Instruction 80- Subroutine Call............................................................................................ 127 Instruction 81- Subroutine Return ...................................................................................... 128 Instruction 82- FOR (For next loop) ..................................................................................... 129 Instruction 83- NEXT (For-Next loop) ...........................................................
v MAPware-7000 Ladder Logic Guide Instruction 112- Direct I/O .................................................................................................. 178 Instruction 112- Direct I/O .................................................................................................. 178 Instruction 113- Set Calendar .............................................................................................. 179 Instruction 114- Calendar Operation ..................................................
1 MAPware-7000 Ladder Logic Guide Logic Block Instructions Overview Logic Block instructions are the commands and instructions used to create the ladder logic routines supported by the HMC7000 Series. Over 100 instructions are available making the HMC as flexible as using a PLC. The ladder logic can read/write to any internal memory of the HMC including memory addresses allocated for use by the I/O expansion modules.
MAPware-7000 Ladder Logic Guide Instruction Name Symbol Description Turns ON output for 1 scan when input changes from On→Off. Falling Edge {input} Inverter 2 Execution Time (μSec) 1 μsec Inverts the input state. 0.8 μsec Stores the inverse state of the input going into coil. 1.1 μsec Turns ON output for 1 scan when input is ON and Operand A changes from Off→On. 1.3 μsec Turns ON output for 1 scan when input is ON and Operand A changes from On→Off. 1.
3 MAPware-7000 Ladder Logic Guide another. Instruction Name Symbol Description Execution Time (μSec) 1.8 μsec to 205.3 μsec Table Initialize Transfers a constant value or a value in the specified source register (Operand A) to a series of consecutive registers (1 to 1024) beginning with the target register.
MAPware-7000 Ladder Logic Guide 4 Math Instructions These are instructions which can be used to initialize data or move data from one memory location to another. Instruction Name Symbol Description Execution Time (μSec) 2.9 μsec to 3.2 μsec Addition Adds two signed registers and puts the sum in a third register. Subtraction Subtracts the value in Operand B from the value in Operand A and puts the result in a third register, Operand C. 1.6 μsec to 3.
5 Instruction Name MAPware-7000 Ladder Logic Guide Symbol Description Execution Time (μSec) 1.6 μsec Increment Whenever the input to this instruction is ON, the data in the selected register is incremented by 1. Decrement Whenever the input to this instruction is ON, the data in the selected register is decremented by 1. 1.6 μsec Log(10) NA Calculates Common Log (base 10) of value in Operand A and puts result in Operand C register. Ex.
MAPware-7000 Ladder Logic Guide Instruction Name Symbol Description 6 Execution Time (μSec) 2.3 μsec to 2.4 μsec Equal If data in Operand A is equal to the data in Operand B, the output is turned ON. Not Equal If data in Operand A is not equal to the data in Operand B, the output is turned ON. 2.2 μsec to 2.3 μsec Less than If data in Operand A is less than data in Operand B, the output is turned ON. 2.1 μsec to 2.
7 Instruction Name MAPware-7000 Ladder Logic Guide Symbol Description Execution Time (μSec) 2.5 μsec N bits shift right The data in Operand A is shifted n bits (116) to the right (LSB direction) and stored in Operand B and the carry bit. Note: the carry bit (S0) is the location of the 1st rightmost bit after the shift. N bits shift left The data in Operand A is shifted n bits (116) to the left (MSB direction) and stored in Operand B and the carry bit.
MAPware-7000 Ladder Logic Guide 8 Conversion Instructions These are instructions which convert the data from one type of format (ex. BCD, Hex, ASCII) to another format. Instruction Name Symbol Description Execution Time (μSec) The hexadecimal data in a series of 5.8 μsec to Hex to ASCII consecutive registers (1 to 32) beginning 87.1 μsec with Operand A is converted into ASCII characters and stored in consecutive registers starting with Operand B. The ASCII data in a series of consecutive 6.
9 MAPware-7000 Ladder Logic Guide value and stores in Operand B. Timer Instructions These are instructions which run timers. Instruction Name ON timer OFF timer Single Shot timer 1010-1041 rev. 00 Symbol Description While the input is ON, timer updates according to the time specified (hundredths of second) in Operand A. Time elapsed is recorded in Operand B. When time is reached, output is turned ON and the update of Operand B stops. When input is OFF, value in Operand B is reset back to 0.
MAPware-7000 Ladder Logic Guide 10 Counter Instructions These are instructions which run counters. Instruction Name Symbol Description Counter When the input is ON, timer will update according to the time specified (hundredths of second) in Operand A. Time elapsed is recorded in Operand B. When time reached, output is turned ON.
11 Instruction Name MAPware-7000 Ladder Logic Guide Symbol Description Execution Time (μSec) Disable Interrupt Prevents execution of interrupt programs. Watchdog Timer Reset The built-in watchdog timer resets the HMC7000 if timeout exceeds 200 msec. This instruction extends that time by up to an additional 100 msec. 1.0 μsec Step Sequence initialize This function initializes a step sequencer. It clears n bit registers starting with Operand A, then sets Operand A. 3.5 μsec to 86.
MAPware-7000 Ladder Logic Guide Instruction Name Symbol Description Compares the current value in a register A with a set value in B. If the current value A is less than B, then A is stored in result C. If A is greater than B, B is stored into C. Compares the current value in a register A with a set value in B. If the current value A is greater than B, then A is stored in result C. If A is less than B, B is stored into C.
13 Instruction Name MAPware-7000 Ladder Logic Guide Symbol Description Register Set Sets target register address to 0xFFFF. Execution Time (μSec) 1.1 μsec Register Reset Clears target register address to 0. 1.0 μsec Set Carry Sets the carry flag ON. 1.0 μsec Reset Carry Clears the carry flag to OFF. 1.0 μsec Encode Finds the uppermost ON bit position in the table of coils (of size 2n) beginning with coil A, and stores in coil B. 4.7 to 99.
MAPware-7000 Ladder Logic Guide 14 Instructions Defined Instruction 1- NO Contact Expression: Space Requirement: 1 line x 1 column Location Requirement: Left rail, Middle Function: NO (normally open) contact of device A. When the input is ON and the device A is ON, the output is turned ON. Execution Condition: Input Operation Output OFF Regardless of the state of device A OFF ON When device A is OFF. OFF When device A is ON. ON Operand: Coil or Bit A Register Name X Y B S T. C.
15 MAPware-7000 Ladder Logic Guide Instruction 2- NC Contact Expression: Space Requirement: 1 line x 1 column Location Requirement: Left rail, Middle Function: NC (normally closed) contact of device A. When the input is ON and the device A is OFF, the output is turned ON. Execution Condition: Input Operation Output OFF Regardless of the state of device A OFF ON When device A is OFF. ON When device A is ON. OFF Operand: Coil or Bit A Register Name X Y B S T. C.
MAPware-7000 Ladder Logic Guide 16 Instruction 3- Output Expression: Space Requirement: 1 line x 1 column Location Requirement: Right rail Function: This is the output coil of device A. When the input is ON, the device A is ON. Execution Condition: Input Operation Output OFF Sets device A to OFF. -- ON Sets device A to ON. -- Operand: Coil or Bit Name A X Device Y B S √ √ √ T. Register C. M X W Y W B W Example: Timing Diagram: Coil Y0005 comes on when the device X0000 is ON.
17 MAPware-7000 Ladder Logic Guide Instruction 4- Rising Edge (Transitional Contact) Expression: Space Requirement: 1 line x 1 column Location Requirement: Left rail, Middle Function: When the input at last scan is OFF and the input at this scan is ON, the output is turned ON. This instruction is used to detect the input changing from OFF to ON. Execution Condition: Input Operation Output OFF Regardless of the input state at last scan. OFF ON When the input state at last scan is OFF.
MAPware-7000 Ladder Logic Guide 18 Instruction 5- Falling Edge (Transitional Contact) Expression: Space Requirement: 1 line x 1 column Location Requirement: Left rail, Middle Function: When the input at last scan is ON and the input at this scan is OFF, the output is turned ON. This instruction is used to detect the input changing from ON to OFF Execution Condition: Input OFF ON Operation Output When the input state at last scan is OFF. OFF When the input state at last scan is ON.
19 MAPware-7000 Ladder Logic Guide Instruction 6- Forced Coil Expression: Space Requirement: 1 line x 1 column Location Requirement: Right rail Function: Regardless of the input state, the state of device A is retained. Execution Condition: Input Operation Output OFF No operation --- ON No operation --- Operand: Coil or Bit Name A X Device Y B S √ √ √ T. Register C.
MAPware-7000 Ladder Logic Guide 20 Instruction 7- Inverter Expression: Space Requirement: 1 line x 1 column Location Requirement: Left rail, Middle Function: When the input is OFF, the output is turned ON, and when the input is ON, the output is turned OFF. This instruction inverts the link state. Execution Condition: Input Operation Output OFF Inverts the input state. ON ON Inverts the input state. OFF Operand: No operand is required.
21 MAPware-7000 Ladder Logic Guide Instruction 8- Inverter Coil Expression: Space Requirement: 1 line x 1 column Location Requirement: Right rail Function: When the input is OFF, the device A is set to ON, and when the input is ON, the device A is set to OFF. This instruction inverts the input state and stores it in device A. Execution Condition: Input Operation Output OFF Sets device A ON. --- ON Sets device A OFF. --- Operand: Coil or Bit Name A X Device Y B S √ √ √ T.
MAPware-7000 Ladder Logic Guide 22 Instruction 9- Positive Pulse Contact Expression: Space Requirement: 1 line x 1 column Location Requirement: Left rail, Middle Function: When the input is ON and the device A is changed from OFF to ON (OFF at last scan and ON at this scan), the output is turned ON. This instruction is used to detect the device changing from OFF to ON. Execution Condition: Input Operation OFF ON Output Regardless of the state of device A. OFF State of device A is OFF.
23 MAPware-7000 Ladder Logic Guide Instruction 10- Negative Pulse Contact Expression: Space Requirement: 1 line x 1 column Location Requirement: Left rail, Middle Function: When the input is ON and the device A is changed from ON to OFF (ON at last scan and OFF at this scan), the output is turned ON. This instruction is used to detect the device changing from ON to OFF. Execution Condition: Input Operation OFF Output Regardless of the state of device A. OFF State of device A is OFF.
MAPware-7000 Ladder Logic Guide 24 Instruction 11- Positive Pulse Coil Expression: Space Requirement: 1 line x 1 column Location Requirement: Right rail Function: When the input is changed from OFF to ON, the device A is set to ON for 1 scan time. This instruction is used to detect the input changing from OFF to ON. Execution Condition: Input Operation Output OFF Sets device A to OFF. --- ON When the input at last scan is OFF, sets A to ON.
25 MAPware-7000 Ladder Logic Guide Instruction 12- Negative Pulse Coil Expression: Space Requirement: 1 line x 1 column Location Requirement: Right rail Function: When the input is changed from ON to OFF, the device A is set to ON for 1 scan time. This instruction is used to detect the input changing from ON to OFF. Execution Condition: Input Operation OFF ON Output When the input at last scan is OFF, sets A to OFF. --- When the input at last scan is ON, sets A to ON.
MAPware-7000 Ladder Logic Guide 26 Instruction 13- MOV Word Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A is stored in B. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name A Source B Destination X Y B S T. Register C.
27 MAPware-7000 Ladder Logic Guide Sample 3- Using the Index Register feature When B050 is changed from OFF to ON, the data of BW008 is stored in the index register I and the data of D(0000+I) is stored in YW010. If BW008 is 300, the data of D0300 is stored in YW010. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 28 Instruction 14- MOV DWord Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the double-word (32-bit) data of A+1× A is stored in double-word register B+1× B. The data range is -2147483648 to 2147483647. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name A Source B Destination X Y B S T. Register C.
29 MAPware-7000 Ladder Logic Guide Instruction 15- Invert Transfer Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the bit-inverted data of A is stored in B. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name A Source B Destination X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 30 Instruction 16- Table Initialize Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A is stored in n registers starting with B. The allowable range of the table size n is 1 to 1024 words. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name A Source n Table Size B Start of Destination X Y B S T. Register C.
31 MAPware-7000 Ladder Logic Guide Instruction 17- Table Block Transfer Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of n registers starting with A are transferred to n registers starting with B in a block. The allowable range of the table size n is 1 to 1024 words.
MAPware-7000 Ladder Logic Guide 32 Instruction 18- Table Invert Transfer Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of n registers starting with A are bit-inverted and transferred to n registers starting with B in a block. The allowable range of the table size n is 1 to 1024 words.
33 MAPware-7000 Ladder Logic Guide Instruction 19- Data Exchange Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B is exchanged. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 34 Instruction 20- Multiplexer Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of the register which is designated by B in the table, size n starting with A, is transferred to C.
35 MAPware-7000 Ladder Logic Guide Note: If the pointer data designates outside the table (10 or more in the above example), the transfer is not executed and the output comes ON. The table must be within the effective range of the register address. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 36 Instruction 21- Demultiplexer Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A is transferred to the register which is designated by B in the table, size n starting with C.
37 MAPware-7000 Ladder Logic Guide Note: If the pointer data designates outside the table (10 or more in the above example), the transfer is not executed and the output comes ON. The table must be within the effective range of the register address. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 38 Instruction 22- Addition Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are added, and the result is stored in C. If the result is greater than 32767, the upper limit value 32767 is stored in C, and the output is turned ON. If the result is smaller than -32768, the lower limit value -32768 is stored in C, and the output is turned ON.
39 MAPware-7000 Ladder Logic Guide If the data of D0100 is 32700, the result exceeds the limit value, therefore 32767 is stored in D0110, and B010 is turned ON. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 40 Instruction 23- Double-Word Addition Select the “Addition” function and place it in the logic block.
41 MAPware-7000 Ladder Logic Guide If the result is greater than 2147483647, the upper limit value 2147483647 is stored in C+1× C, and the output is turned ON. If the result is smaller than -2147483648, the lower limit value 2147483648 is stored in C+1× C, and the output is turned ON. Execution Condition: Input Operation Output OFF No execution OFF ON Execution (normal) OFF Execution (overflow or underflow condition) ON Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 42 Instruction 24- Subtraction Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of B is subtracted from the data of A, and the result is stored in C. If the result is greater than 32767, the upper limit value 32767 is stored in C, and the output is turned ON. If the result is smaller than -32768, the lower limit value -32768 is stored in C, and the output is turned ON.
43 MAPware-7000 Ladder Logic Guide If the data of D0200 is -31000, the result is smaller than the limit value, therefore -32768 is stored in BW50, and B010 is turned ON. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide Instruction 25- Double-Word Subtraction Select the “Subtraction” function and place it in the logic block. Select “DWord” from the Data Properties selection tab as shown below: Thus by selecting “DWord” in Data Properties, the Subtraction function can be changed to “Double-word Subtraction” as shown below: 1010-1041 rev.
45 MAPware-7000 Ladder Logic Guide Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the double-word data of B+1× B is subtracted from A+1× A, and the result is stored in C+1× C. The data range is -2147483648 to 2147483647. If the result is greater than 2147483647, the upper limit value 2147483647 is stored in C+1× C, and the output is turned ON.
MAPware-7000 Ladder Logic Guide 1010-1041 rev.
47 MAPware-7000 Ladder Logic Guide Instruction 26- Multiplication Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A is multiplied by the data of B, and the result is stored in double length register C+1×C. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide Instruction 27- Unsigned Multiplication Select “Multiplication” function and place it in the logic block. Select “Unsigned” in the Data Properties selection tab as shown below: 1010-1041 rev.
49 MAPware-7000 Ladder Logic Guide Instruction 27- Unsigned Multiplication (continued) Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the unsigned data of A and B are multiplied, and the result is stored in double-length register C+1×C. The data range of A and B is 0 to 65535 (unsigned 16-bit data).
MAPware-7000 Ladder Logic Guide 50 Instruction 28- Division Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A is divided by the data of B, and the quotient is stored in C and the remainder in C+1. Execution Condition: Input Operation Output ERF OFF No execution OFF --- ON Normal Execution (B ≠ 0) ON --- No execution ( B = 0) OFF --- Operand: Coil or Bit Name X Y B S T. Register C.
51 MAPware-7000 Ladder Logic Guide If the divisor (operand B) is 0, the ERF (instruction error flag = S1010) is set to ON. The ERF (S1010) can be reset to OFF by user program, e.g. [ RST S1010 ]. If the index register K is used as operand C, the remainder is ignored. If operand A is -32768 and operand B is -1, the data +32768 is stored in C and 0 is stored in C+1. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide Instruction 29- Unsigned Division Select “Division” function and place it in the logic block. Select “Unsigned” division from the Data Properties selection tab as shown below: 1010-1041 rev.
53 MAPware-7000 Ladder Logic Guide Instruction 29- Unsigned Division (continued) Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the unsigned data of A is divided by the unsigned data of B, and the quotient is stored in C and the remainder in C+1. The data range of A and B is 0 to 65535 (unsigned 16-bit data).
MAPware-7000 Ladder Logic Guide Note: If divisor (operand B) is 0, ERF (instruction error flag = S1010) is set to ON. The ERF (S1010) can be reset to OFF by user program, e.g. [ RST S1010 ]. If the index register K is used as operand C, the remainder is ignored. This instruction handles the register data as unsigned integer. 1010-1041 rev.
55 MAPware-7000 Ladder Logic Guide Instruction 30- Division – Double Word Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the double-word data of A+1× A is divided by the data of B, and the quotient is stored in C and the remainder in C+1. The data range of A+1× A is 0 to 4294967295, and the data range of B and C is 0 to 65535.
MAPware-7000 Ladder Logic Guide If the data of D0201×D0200 is 332257, the quotient 83 is stored in D1000 and the remainder 257 is stored in D1001. Note: If the divisor (operand B) is 0, the ERF (instruction error flag = S1010) is set to ON. The ERF (S1010) can be reset to OFF by user program, e.g. [ RST S1010 ]. If the index register K is used as operand C, the remainder is ignored. This instruction handles the register data as unsigned integer. 1010-1041 rev.
57 MAPware-7000 Ladder Logic Guide Instruction 31- Addition with carry Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A, B and the carry flag (CF = S976) are added, and the result is stored in C. If the carry occurs in the operation, the carry flag is set to ON. If the result is greater than 32767 or smaller than -32768, the output is turned ON.
MAPware-7000 Ladder Logic Guide 58 When B013 is ON, the data of double-length registers D0100×D0101 and BW20×BW21 are added, and the result is stored in D0201×D0200. The RSTC is a instruction to reset the carry flag before starting the calculation. If the data of D0100×D0101 is 12345678 and BW20×BW21 is 54322, the result 12400000 is stored in D0201×D0200. 1010-1041 rev.
59 MAPware-7000 Ladder Logic Guide Instruction 32- Subtraction with carry Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of B and the carry flag (CF = S976) are subtracted from A, and the result is stored in C. If a borrow occurs in the operation, the carry flag is set to ON. If the result is greater than 32767 or smaller than -32768, the output is turned ON.
MAPware-7000 Ladder Logic Guide 60 When B013 is ON, the data of double-length register BW23×BW22 is subtracted from the data of D0201×D0200, and the result is stored in D0211×D0210. The RSTC is a instruction to reset the carry flag before starting the calculation. If the data of D0200×D0201 is 12345678 and BW22×BW23 is 12340000, the result 5678 is stored in D0210×D0211. 1010-1041 rev.
61 MAPware-7000 Ladder Logic Guide Instruction 33- Increment Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A is increased by 1 and stored in A. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name A X Y B Operation Data S T. Register C.
MAPware-7000 Ladder Logic Guide 62 Instruction 34- Decrement Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A is decreased by 1 and stored in A. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name A X Y B Operation Data S T. Register C.
63 MAPware-7000 Ladder Logic Guide Instruction 35- Greater Than Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is greater than B, the output is turned ON.. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A>B ON A
MAPware-7000 Ladder Logic Guide 64 Instruction 36- Double Word Greater Than Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the double-word data of A+1× A and B+1× B are compared, and if A+1× A is greater than B+1× B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A+1.A> B+1.B ON A +1.A< B+1.B OFF Operand: Coil or Bit Name X Y B S T. Register C.
65 MAPware-7000 Ladder Logic Guide Note This instruction interprets the data as double word integer (-2147483648 to 2147483648). 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 66 Instruction 37- Unsigned Word Greater Than Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is greater than B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A>B ON A
67 MAPware-7000 Ladder Logic Guide Instruction 38- Greater Than or Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is greater than or equal to B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A>B ON A
MAPware-7000 Ladder Logic Guide Note This instruction interprets the data as signed integer (-32768 to 32767). 1010-1041 rev.
69 MAPware-7000 Ladder Logic Guide Instruction 39- Double Word Greater Than or Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A+1 X A and the data of B+1 X B are compared, and if A+1.A is greater than or equal to B+1.B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A+1.A > B+1.B ON A+1.A < B+1.B OFF Operand: Coil or Bit Name X Y B S T.
MAPware-7000 Ladder Logic Guide Note This instruction interprets the data as double word integer (-2147483648 to 2147483648). 1010-1041 rev.
71 MAPware-7000 Ladder Logic Guide Instruction 40- Unsigned Greater Than or Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is greater than or equal to B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A>B ON A
MAPware-7000 Ladder Logic Guide Note This instruction interprets the data as unsigned integer (0 to 65535). 1010-1041 rev.
73 MAPware-7000 Ladder Logic Guide Instruction 41- Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is equal to B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A=B ON A≠B OFF Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide Note This instruction interprets the data as signed integer (-32768 to 32767). 1010-1041 rev.
75 MAPware-7000 Ladder Logic Guide Instruction 42- Double Word Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A+1.A and the data of B+1.B are compared, and if A+1.A is equal to B+1.B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A+1.A = B+1.B ON A+1.A ≠ B+1.B OFF Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide Note This instruction interprets the data as double word integer (-2147483648 to 2147483648). 1010-1041 rev.
77 MAPware-7000 Ladder Logic Guide Instruction 43- Unsigned Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is equal to B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A=B ON A≠B OFF Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide Consequently, B020 is turned OFF. Note This instruction deals with the data as unsigned integer (0 to 65535). 1010-1041 rev.
79 MAPware-7000 Ladder Logic Guide Instruction 44- Not Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is not equal to B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A≠B ON A=B OFF Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 80 Instruction 45- Double Word Not Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A+1.A and the data of B+1.B are compared, and if A+1.A is not equal to B+1.B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A+1.A ≠ B+1.B ON A+1.A = B+1.B OFF Operand: Coil or Bit Name X Y B S T. Register C.
81 MAPware-7000 Ladder Logic Guide Note This instruction interprets the data as double word integer (-2147483648 to 2147483648). 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 82 Instruction 46- Unsigned Not Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is not equal to B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A≠B ON A=B OFF Operand: Coil or Bit Name X Y B S T. Register C.
83 MAPware-7000 Ladder Logic Guide Instruction 47- Less Than Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is less than B, the output is turned ON. Execution Condition: Input OFF ON Operation Output No execution Execution OFF ON OFF AB Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 1010-1041 rev.
85 MAPware-7000 Ladder Logic Guide Instruction 48- Double Word Less Than Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A+1.A and the data of B+1.B are compared, and if A+1.A is less than B+1.B, the output is turned ON. Execution Condition: Input Operation OFF No execution ON Execution Output OFF A+1.A< B+1.B ON A +1.A> B+1.B OFF Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 86 Instruction 49- Unsigned Less Than Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is less than B, the output is turned ON. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON OFF AB Operand: Coil or Bit Name A B X Y B Compared Data Reference Data S T. Register C.
87 MAPware-7000 Ladder Logic Guide Instruction 50- Less Than or Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is less than or equal to B, the output is turned ON. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON OFF AB Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 88 Instruction 51- Double Word Less Than or Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A+1.A and the data of B+1.B are compared, and if A+1.A is less than or equal to B+1.B, the output is turned ON. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON OFF A+1.A < B+1.B A+1.A > B+1.B Operand: Coil or Bit Name X Y B S T. Register C.
89 MAPware-7000 Ladder Logic Guide Instruction 52- Unsigned Less Than or Equal To Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of A and the data of B are compared, and if A is less than or equal to B, the output is turned ON. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON OFF AB Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 90 Instruction 53- Logic AND Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction finds logical AND of A and B, and stores the result in C. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON Operand: Coil or Bit Name X Y B S T. Register C.
91 MAPware-7000 Ladder Logic Guide Instruction 54- Logic OR Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction finds logical OR of A and B, and stores the result in C. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 92 Instruction 55- Logic Exclusive OR Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction finds logical exclusive OR of A and B, and stores the result in C. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON Operand: Coil or Bit Name X Y B S T. Register C.
93 MAPware-7000 Ladder Logic Guide Instruction 56- Logic Shift – 1 bit shift right Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of register A is shifted 1 bit to the right (LSB direction). 0 is stored in the left most bit (MSB). The pushed out bit state is stored in the carry flag (CF = S976). After the operation, if the right most bit (LSB) is ON, the output is turned ON.
MAPware-7000 Ladder Logic Guide 94 Instruction 57- Logic Shift – 1 bit shift left Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of register A is shifted 1 bit to the left (MSB direction). 0 is stored in the right most bit (LSB). The pushed out bit state is stored in the carry flag (CF = S976). After the operation, if the left most bit (MSB) is ON, the output is turned ON.
95 MAPware-7000 Ladder Logic Guide Instruction 58- Logic Shift – n bits shift right Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of register A is shifted n bits to the right (LSB direction) including the carry flag (CF = S976), and stored in B. 0 is stored in upper n bits. After the operation, if the right most bit (LSB) is ON, the output is turned ON.
MAPware-7000 Ladder Logic Guide 96 Instruction 59- Logic Shift – n bits shift left Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of register A is shifted n bits to the left (MSB direction) including the carry flag (CF = S976), and stored in B. 0 is stored in lower n bits. After the operation, if the left most bit (MSB) is ON, the output is turned ON.
97 MAPware-7000 Ladder Logic Guide Instruction 60- Shift Register Expression: Space Requirement: 3 line x 3 column Location Requirement: Middle, Right rail Function: While the enable input is ON, this instruction shifts the data of the bit table, size n starting with A, 1 bit to the left (upper address direction) when the shift input is ON. The state of the data input is stored in A. The pushed out bit state is stored in the carry flag (CF = S976).
MAPware-7000 Ladder Logic Guide 98 While B010 is ON, the data of the shift register is shifted 1 bit to the upper address direction when X009 is changed from OFF to ON. At the same time, the state of X008 is stored in the leading bit (B100). The output (B011) indicates the state of the last bit (B131). The figure below shows an operation example. (When X009 is changed from OFF to ON). Note When the shift input is ON, the shift operation is performed every scan.
99 MAPware-7000 Ladder Logic Guide Instruction 61- Bi-directional Shift Register Expression: Space Requirement: 4 line x 3 column Location Requirement: Middle, Right rail Function: While the enable input (E) is ON, this instruction shifts the data of the bit table, size n starting with A, 1 bit when the shift input (S) is ON. The shift direction is determined by the state of the direction input (L). When L is OFF, the direction is right (lower address direction).
MAPware-7000 Ladder Logic Guide 100 Example: 9 devices starting with B200 (B200 to B208) is specified as a shift register. When B010 is OFF, the data of the shift register is reset to 0. (B200 to B208 are reset to OFF). The carry flag (CF = S976) is also reset to OFF. While B010 is ON the following operation is enabled: - - When X0011 is ON (shift left), the data of the shift register is shifted 1 bit to the upper address direction when X009 is changed from OFF to ON.
101 MAPware-7000 Ladder Logic Guide Note: When the shift input is ON, the shift operation is performed every scan. Use a transitional contact for the shift input to detect the state changing. For the data input, the shift input and the enable input, direct linking to a connecting point is not allowed. In this case, insert a dummy contact (always ON special device = S04F, etc.) just before the input. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 102 Instruction 62- 1 bit rotate right Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of register A is rotated 1 bit to the right (LSB direction). The pushed out bit state is stored in the left most bit (MSB) and in the carry flag (CF = S976). After the operation, if the right most bit (LSB) is ON, the output is turned ON.
103 MAPware-7000 Ladder Logic Guide Instruction 63- 1 bit rotate left Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of register A is rotated 1 bit to the left (MSB direction). The pushed out bit state is stored in the right most bit (LSB) and in the carry flag (CF = S976). After the operation, if the left most bit (MSB) is ON, the output is turned ON.
MAPware-7000 Ladder Logic Guide 104 Instruction 64- n bit rotate right Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of register A is rotated n bits to the right (LSB direction), and stored in B. After the operation, if the right most bit (LSB) is ON, the output is turned ON.
105 MAPware-7000 Ladder Logic Guide Instruction 65- n bit rotate left Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the data of register A is rotated n bits to the left (MSB direction), and stored in B. After the operation, if the left most bit (MSB) is ON, the output is turned ON.
MAPware-7000 Ladder Logic Guide 106 Instruction 66- Hex to ASCII Conversion Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the hexadecimal data of n registers starting with A is converted into ASCII characters and stored in B and after. The uppermost digit of source A is stored in lower byte of destination B, and followed in this order. The allowable range of n is 1 to 32.
107 MAPware-7000 Ladder Logic Guide Instruction 67- ASCII to Hex Conversion Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, the ASCII characters stored in n registers starting with A is converted into hexadecimal data and stored in B and after. The lower byte of source A is stored as uppermost digit of destination B, and followed in this order.
MAPware-7000 Ladder Logic Guide Note: - If index register (I, J or K) is used for the operand A, only n = 1 is allowed. If n is odd number, lower 2 digits of the last converted data will not be fixed, Use even for n 1010-1041 rev.
109 MAPware-7000 Ladder Logic Guide Instruction 68- Absolute Value Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction finds the absolute value of operand A, and stores it in B. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON Operand: Coil or Bit Name A Source B Destination X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 110 Instruction 69- 2’s Complement Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction finds the 2’s compliment value of A, and stores it in B. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON Operand: Coil or Bit Name A Source B Destination X Y B S T. Register C.
111 MAPware-7000 Ladder Logic Guide Instruction 70- Double-word 2’s Complement Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction finds the 2’s complement value of double-word data A+1×A, and stores it in B+1×B.. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON Operand: Coil or Bit Name A Source B Destination X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 112 Instruction 71- 7 Segment Decode Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction converts the lower 4 bits data of A into the 7 segment code, and stores it in B. The 7 segment code is normally used for a numeric display LED. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON Operand: Coil or Bit Name A Source B Destination X Y B S T.
113 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 114 Instruction 72- ASCII Conversion Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction converts the alphanumeric characters into the ASCII codes, and stores them in the register table starting with B. (16 characters maximum).
115 MAPware-7000 Ladder Logic Guide Instruction 73- Binary Conversion Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction converts the 4 digits of BCD data of A into binary, and stores in B. If any digit of A contains non-BCD code (other than H0 through H9), the conversion is not executed and the instruction error flag (ERF = S1010) is set to ON.
MAPware-7000 Ladder Logic Guide 116 Instruction 74- BCD Conversion Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction converts the binary data of A into BCD, and stores in B. If the data of A is not in the range of 0 to 9999, the conversion is not executed and the instruction error flag (ERF = S1010) is set to ON.
117 MAPware-7000 Ladder Logic Guide Instruction 75- ON Timer Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is changed from OFF to ON, timer updating for the timer register B is started. The elapsed time is stored in B. When the specified time by A has elapsed after the input came ON, the output and the timer device corresponding to B are turned ON.
MAPware-7000 Ladder Logic Guide Time is set in 10 ms units for; RMP10: T000 to T060 (0 to 327.67 s) Time is set in 100 ms units for; RMP10: T061 to T190 (0 to 3276.7 s) Time is set in 1 s units for; RMP10: T191 to T255 (0 to 32767 s) Note: Multiple timer instructions (TON, TOF or TSS) with the same timer register are not allowed. 1010-1041 rev.
119 MAPware-7000 Ladder Logic Guide Instruction 76- OFF Timer Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is changed from OFF to ON, the output and the timer device corresponding to the timer register B are set to ON. When the input is changed from ON to OFF, timer updating for B is started. The elapsed time is stored in B.
MAPware-7000 Ladder Logic Guide Note: Time is set in 10 ms units for; RMP10: T000 to T060 (0 to 327.67 s) Time is set in 100 ms units for; RMP10: T061 to T190 (0 to 3276.7 s) Time is set in 1 s units for; RMP10: T191 to T255 (0 to 32767 s) Note: Multiple timer instructions (TON, TOF or TSS) with the same timer register are not allowed. 1010-1041 rev.
121 MAPware-7000 Ladder Logic Guide Instruction 77- Single Shot Timer Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is changed from OFF to ON, the output and the timer device corresponding to the timer register B are immediately set to ON, and timer updating for B is started. The elapsed time is stored in B. When the specified time by A has elapsed after the input came ON, the output and the timer device are turned OFF.
MAPware-7000 Ladder Logic Guide Note: 122 RMP10: T061 to T190 (0 to 3276.7 s) Time is set in 10 ms units for; RMP10: T000 to T060 (0 to 327.67 s) Time is set in 1 s units for; RMP10: T191 to T255 (0 to 32767 s) Time is set in 100 ms units for; Note: Multiple timer instructions (TON, TOF or TSS) with the same timer register are not allowed. 1010-1041 rev.
123 MAPware-7000 Ladder Logic Guide Instruction 78- Counter Expression: Space Requirement: 2 line x 3 column Location Requirement: Middle, Right rail Function: While the enable input is ON, this instruction counts the number of the count input changes from OFF to ON. The count value is stored in the counter register B. When the count value reaches the set value A, the output and the counter device corresponding to B are turned ON.
MAPware-7000 Ladder Logic Guide 124 Note: No transitional contact is required for the count input. The count input rising edge is detected by this instruction. For the count input, direct linking to a connecting point is not allowed. In this case, insert a dummy contact (always ON = S04F, etc.) just before the input. Refer to Note of Shift register FUN 074. Multiple counter instructions (CNT) with the same counter register are not allowed. 1010-1041 rev.
125 MAPware-7000 Ladder Logic Guide Instruction 79- Up/Down Counter Expression: Space Requirement: 3 line x 3 column Location Requirement: Middle, Right rail Function: This instruction implements a counter that can count up or down, storing the value in the target counter (A) register: Enable input (E)- When ON, counter increments/decrements value in target counter once every scan (while Count Input is ON) Count input (C) - Controls the counting.
MAPware-7000 Ladder Logic Guide 126 Example: Note: The transitional contact is required for the count input. Otherwise, counting is executed every scan while X005 is ON in this example. For the direction input and the count input, direct linking to a connecting point is not allowed. 1010-1041 rev.
127 MAPware-7000 Ladder Logic Guide Instruction 80- Subroutine Call Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction calls the subroutine number n. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON Operand: Coil or Bit Name n X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 128 Instruction 81- Subroutine Return Expression: Space Requirement: 1 line x 1 column Location Requirement: Middle, Right rail Function: This instruction indicates the end of a subroutine. When program execution is reached this instruction, it is returned to the original CALL instruction. Execution Condition: Input Operation Output --- Execution --- Operand: No operand is required. Example: When X007 is ON, the subroutine number 8 is called.
129 MAPware-7000 Ladder Logic Guide Instruction 82- FOR (For next loop) Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the program segment between FOR and NEXT is executed n times repeatedly in a scan. When the input is OFF, the repetition is not performed. However, the segment is executed once.
MAPware-7000 Ladder Logic Guide 130 Instruction 83- NEXT (For-Next loop) Expression: Space Requirement: 1 line x 1 column Location Requirement: Right rail Function: This instruction configures a FOR-NEXT loop. If the input is OFF, the repetition is forcibly broken, and the program execution is moved to the next instruction. Execution Condition: Input OFF ON Operation Forcibly breaks the repetition Repetition Output OFF ON Operand: No operand is required.
131 MAPware-7000 Ladder Logic Guide Instruction 84- Master Control Set/Reset Expression: Space Requirement: 1 line x 1 column Location Requirement: Right rail Function: When the MCS input is ON, ordinary operation is performed. When the MCS input is OFF, the state of left power rail between MCS and MCR is turned OFF. Execution Condition: MCS Input OFF ON Operation Output Sets OFF the left power rail until MCR Ordinary operation ----- Operand: No operand is required.
MAPware-7000 Ladder Logic Guide 132 Instruction 85- Jump Control Set/Reset Expression: Space Requirement: 1 line x 1 column Location Requirement: Right rail Function: When the JCS input is ON, instructions between JCS and JCR are skipped (not executed). When the JCS input is OFF, ordinary operation is performed. Execution Condition: JCS Input Operation Output OFF Ordinary operation --- ON Skip to JCR instruction --- Operand: No operand is required.
133 MAPware-7000 Ladder Logic Guide Instruction 86- Enable Interrupt Expression: Space Requirement: 1 line x 1 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction allows the execution of user designated interrupt operations (i.e. timer interrupt and I/O interrupt programs) that may have been temporarily disabled using the Disable Interrupt function.
MAPware-7000 Ladder Logic Guide 134 Instruction 87- Disable Interrupt Expression: Space Requirement: 1 line x 1 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction disables the execution of user designated interrupt operation, i.e. timer interrupt program and I/O interrupt programs. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: No operand is required.
135 MAPware-7000 Ladder Logic Guide Instruction 88- Watchdog timer reset Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction extends the watchdog timer reset time. A watchdog timer is a timer that runs in the background. If the timer reaches its preset timeout value, then it forces a reinitialization of the HMC7000.
MAPware-7000 Ladder Logic Guide 136 Instruction 89- Step Sequence Initialize Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle Function: When the input is ON, n devices starting with Operand A are reset to OFF, and A is set to ON. This instruction is used to initialize a series of step sequences. The step sequence is useful to describe a sequential operation.
137 MAPware-7000 Ladder Logic Guide 10 devices starting with B400 Note - The STIZ instruction is used together with STIN and STOT instructions to configure the step sequence. The STIZ instruction is executed only when the input is changed from OFF to ON. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 138 Instruction 90- Step Sequence Input Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle Function: When the input is ON and the device A is ON; the output is set to ON. Execution Condition: Input OFF ON Operation No execution When A is ON When A is OFF Output OFF ON OFF Operand: Coil or Bit Name A X Y B Step Device S T. Register C.
139 MAPware-7000 Ladder Logic Guide Instruction 91- Step Sequence Output Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle Function: When the input is ON, the device A is set to ON and the devices of STIN instructions on the same rung are reset to OFF. Execution Condition: Input Operation Output OFF No execution --- ON Execution --- Operand: Coil or Bit Name A X Y B Step Device S T. Register C.
MAPware-7000 Ladder Logic Guide - 140 To perform the conditional branch (sequence selection), separate the rungs as follows Not allowed 1010-1041 rev.
141 MAPware-7000 Ladder Logic Guide Instruction 92- Moving Average Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction calculates the average value of the last (n) scanned values in register A, and stores the average in register C. The number of scans (n) allowed is 1 to 64. Register B is the start of the data table, (where scanned values are stored). Finally, Register C+1 is used as a pointer to the data table.
MAPware-7000 Ladder Logic Guide 1010-1041 rev.
143 MAPware-7000 Ladder Logic Guide Instruction 93- Digital Filter Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction calculates the following formula to perform digital filtering for input data A, using filter constant B, and stores the result in C.
MAPware-7000 Ladder Logic Guide 144 Example: The filtered data of XW04 is stored in D0110. (D0111 is used for internal work data). When D0100 value is small Time 1010-1041 rev.
145 MAPware-7000 Ladder Logic Guide Instruction 94- PID1 Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: This function performs a PID (Proportional, Integral, and Derivative) calculation based upon fourteen input values. Basically, a PID controller is used to monitor some measureable process variable in a control system and determine how it varies (the “error” value) from a desired setpoint.
MAPware-7000 Ladder Logic Guide 146 Ir = the data remainder of the Integral computation S = setpoint value P = present value P-1 = the present value of the prior computation P-2 = present value of the second to the last computation G = gap constant at which the deviation error is considered to be zero (i.e. no adjustment required). If the calculated error falls within +G, then the deviation is set to 0 (see graph below). L = limit constant used to limit the deviation error to minimum/maximum value.
147 MAPware-7000 Ladder Logic Guide Operand: Coil or Bit Name X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 148 Operand A Offset Parameter Register Value A Present Value D12 25 A+1 Setpoint Value D13 100 Offset Parameter Register Value B Proportional Coefficient D14 1 B+1 Integral Gain Constant High D15 4 B+2 Integral Gain Constant Low D16 10 B+3 Derivative Gain Constant Low D17 20 B+4 Derivative Gain Constant High D18 5 B+5 Gap Constant D19 0 B+6 Limit Constant D20 100 Offset Parameter Register Value C Manipulation Value D21 0
149 MAPware-7000 Ladder Logic Guide Operand C Results: Offset Parameter Register Value C Manipulation Value D21 180 C+1 Last deviation error D22 75 C+2 Last Present Value D23 25 C+3 2nd to last Present Value D24 22 C+4 Remainder Value D25 2 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 150 Instruction 95- PID4 Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: This function performs PID (Proportional, Integral, and Derivative) control which is a fundamental method of feed-back control.
151 MAPware-7000 Ladder Logic Guide TS = the scan interval (range: 0 to +32767) KD = the derivative gain constant (range: -32768 to +32767) S = setpoint value (range: -32768 to +32767) P = present value (range: -32768 to +32767) GP = the gap or dead-band value. A dead-band limit causes the PID instruction to only execute when the error value is less than the dead-band value. The dead band must be given as a percentage of the setpoint value (i.e. range is 0 to 100).
MAPware-7000 Ladder Logic Guide Input Data Control Parameters A Present Value P A+1 Setpoint Value S 1010-1041 rev.
153 MAPware-7000 Ladder Logic Guide Example: In this example, the following values are loaded into each Operand register: Operand A Offset Parameter Register Value A Present Value D26 25 A+1 Setpoint Value D27 100 Offset Parameter Register Value B Proportional Coefficient D28 1 B+1 Integral Time D29 3 B+2 Derivative Gain D30 10 B+3 Dead-band Gap D31 10 B+4 Scan Interval D32 200 B+5 Action Type D33 0 Offset Parameter Register Value C Manipulation Value D34 0
MAPware-7000 Ladder Logic Guide 154 When the normally open contact B6 is ON, the PID4 calculation is performed based upon the formula given above and the values entered into the registers. The results are stored in the four consecutive registers as specified by Operand C. Operand C Results: Offset Parameter Register Value C Manipulation Value D34 4095 C+1 Last deviation error D35 -75 C+2 2nd to last deviation error D36 75 C+3 Last Manipulation Value D37 0 1010-1041 rev.
155 MAPware-7000 Ladder Logic Guide Instruction 96- Upper Limit Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, this function compares the value in A with the Upper Limit value as set in B. If the upper limit value is not exceeded, then value in A is placed into C. If upper limit is exceeded, the upper limit value is placed into C: If A < B, then C = A. If A > B, then C = B.
MAPware-7000 Ladder Logic Guide 156 When BW018 is 3000 and D1200 is 4000, 3000 is stored in BW021 and B0040 is OFF. When BW018 is 4500 and D1200 is 4000, the limit value 4000 is stored in BW021 and B0040 is ON. Note - This instruction deals with the data as signed integer (-32768 to 32767). 1010-1041 rev.
157 MAPware-7000 Ladder Logic Guide Instruction 97- Lower Limit Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: When the input is ON, this function compares the value in A with the Lower Limit value as set in B. If the lower limit value is not exceeded, then value in A is placed into C. If lower limit is exceeded, the lower limit value is placed into C: If A > B, then C = A. If A < B, then C = B.
MAPware-7000 Ladder Logic Guide 158 When BW019 is -1000 and D1220 is -1800, -1000 is stored in BW022 and B0041 is OFF. When BW019 is 800 and D1220 is 1200, the limit value 1200 is stored in BW022 and B0041 is ON. Note - This instruction deals with the data as signed integer (-32768 to 32767). 1010-1041 rev.
159 MAPware-7000 Ladder Logic Guide Instruction 98- Maximum Value Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction searches for the maximum value from the table of size n words starting with A, and stores the maximum value in B and the pointer indicating the position of the maximum value in B+1. The allowable range of the table size n is 1 to 64.
MAPware-7000 Ladder Logic Guide Note - This instruction deals with the data as signed integer (-32768 to 32767). If there are two or more maximum values in the table, the lowest pointer is stored. If Index registers I, J, or K are used as operand B, the pointer data is discarded. 1010-1041 rev.
161 MAPware-7000 Ladder Logic Guide Instruction 99- Minimum Value Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction searches for the minimum value from the table of size n words starting with A, and stores the minimum value in B and the pointer indicating the position of the minimum value in B+1. The allowable range of the table size n is 1 to 64.
MAPware-7000 Ladder Logic Guide 162 Instruction 100- Average Value Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction calculates the average value of the data stored in the n registers starting with A, and stores the average value in B. The allowable range of the table size n is 1 to 64.
163 MAPware-7000 Ladder Logic Guide Instruction 101 Function Generator Expression: Space Requirement: 1 line x 6 column Location Requirement: Middle, Right rail Function: The Function Generator is used to compute a value f(x) for a given value x stored in Register A. The value f(x) is then stored into Register C. The computed value is derived based upon a linear equation as represented by several points in a table of consecutive registers (of size 2n) beginning with Register B.
MAPware-7000 Ladder Logic Guide 164 Example: When B010 is ON, the FG instruction finds the function value f(x) for x = XW004, and stores the result in D0100. The function f(x) is defined by 2 * 4 = 8 parameters stored in D0600 to D0607. In this example, these parameters are set at the first scan.
165 MAPware-7000 Ladder Logic Guide Notes: The order of the x parameters should be x1 < x2 < ... < xi < ... < xn. In other words, the data table should be constructed so the X values go from lowest value for X1 to the highest value for Xn. If input value in Register A is smaller than x1, then y1 is given as f(x). In this example, if XW04 is less than D0600 (-2000), then value in D0100 would be D0604 data (-1800).
MAPware-7000 Ladder Logic Guide 166 Instruction 102- Device Set Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the device A is set to ON. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name A Device X Y B S √ √ √ T. Register C. M X W Y W B W S W T C D Constant I J K M W Example: When B010 is ON, B025 is set to ON.
167 MAPware-7000 Ladder Logic Guide Instruction 103- Device Reset Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the device A is reset to OFF. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name A Device X Y B S √ √ √ T. Register C. M X W Y W B W S W T C D Constant I J K M W Example: When B011 is ON, B005 is reset to OFF.
MAPware-7000 Ladder Logic Guide 168 Instruction 104- Register Set Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the data 0xFFFF is stored in Operand A. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name A X Y B Device S T. Register C.
169 MAPware-7000 Ladder Logic Guide Instruction 105- Register Reset Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the data 0 is stored in Operand A. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: Coil or Bit Name A X Y B Device S T. Register C.
MAPware-7000 Ladder Logic Guide 170 Instruction 106- Set Carry Expression: Space Requirement: 1 line x 1 column Location Requirement: Middle, Right rail Function: When the input is ON, the carry flag (CF = S000) is set to ON. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: No operand is required. Example: When B011 is changed from OFF to ON, the carry flag S000 is set to ON. 1010-1041 rev.
171 MAPware-7000 Ladder Logic Guide Instruction 107- Reset Carry Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the carry flag (CF = S000) is reset to OFF. Execution Condition: Input Operation Output OFF No execution OFF ON Execution ON Operand: No operand is required. Example: When B011 is changed from OFF to ON, the carry flag S000 is reset to OFF. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 172 Instruction 108- Encode Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction finds the bit position of the most significant ON bit in a bit table. The bit table is defined as starting with bit 0 (Least Significant Bit) of Register A, and of size 2n (where n can be 1-8). The value is stored in Register B.
173 MAPware-7000 Ladder Logic Guide The following figure shows an operation example. Note: If there is no ON bit in the bit table, the instruction error flag (ERF = S034) is set to ON. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 174 Instruction 109- Decode Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction sets the bit, which is designated by the lower n bits of A, to ON in the bit table of size 2n bits starting with 0 bit (LSB) of B, and resets all other bits to OFF.
175 MAPware-7000 Ladder Logic Guide Instruction 110- Bit Count Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: When the input is ON, this instruction counts the number of ON (1) bits of A, and stores the result in B. Execution Condition: Input OFF ON Operation No execution Execution Output OFF ON Operand: Coil or Bit Name A Source B Count Data X Y B S T. Register C.
MAPware-7000 Ladder Logic Guide 176 Instruction 111- Flip Flop Expression: Space Requirement: 2 line x 3 column Location Requirement: Middle, Right rail Function: If the Set Input (S) is ON, the device A is set to ON. If the Reset Input (R) is ON, the device A is reset to OFF. If both the set and reset inputs are OFF, the device A remains in the current state. If both the set and reset inputs are ON, the device A is reset to OFF. The state of the output is the same as the device.
177 MAPware-7000 Ladder Logic Guide Note: For the set input, direct linking to a connecting point is not allowed. In this case, insert a dummy contact that is always ON, just before the input. 1010-1041 rev.
MAPware-7000 Ladder Logic Guide 178 Instruction 112- Direct I/O Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: Under normal conditions, the external input (XW) and output (YW) registers are updated at the beginning of each PLC ladder logic scan. When the input is ON, this instruction immediately updates the target input (XW) or output (YW) register. For XW register ... reads the data from targeted input circuit For YW register ...
179 MAPware-7000 Ladder Logic Guide Instruction 113- Set Calendar Expression: Space Requirement: 1 line x 3 column Location Requirement: Middle, Right rail Function: When the input is ON, the built-in clock/calendar is set to the date and time specified by 6 registers starting with A. If invalid data is contained in the registers, the operation is not executed and the output is turned ON.
MAPware-7000 Ladder Logic Guide 180 Note: The day of the week is automatically set accordingly: Sunday = 1, Monday = 2, Tuesday = 3 ...Saturday = 7.
181 MAPware-7000 Ladder Logic Guide Instruction 114- Calendar Operation Expression: Space Requirement: 1 line x 5 column Location Requirement: Middle, Right rail Function: Use this function to determine how many days, hours, minutes, and seconds have passed between the date/time entered into Operand A and the current time in the RTC of the HMC7000. The result is stored into Operand B.
MAPware-7000 Ladder Logic Guide 182 output (B0035) is OFF. If D0050 to D0055 contain any invalid data, then operation is not executed and the output (B0035) is turned ON. Current date & time Notes: Future date and time cannot be used as subtrahend A. In the calculation results, 1 year is 365 days and 1 month is 30 days. Answer: 3 months (90 days) + 7 days + 1 hour + 30 minutes= 97 days, 1 hour, 30 minutes 1010-1041 rev.