Mitsubishi — 5.2 Structure of an Applied Instruction

AH500 Motion Control Module Manual can be used as a pulse instruction, a 16-bit instruction, and a 32-bit instruction according to the information in the table. Typing an applied instruction Some applied instructions are composed of instruction names, e.g. BRET and SRET, but most applied instructions are composed of instruction names and operands. The applied instructions that a module can use are assigned the instruction numbers API 00~API 260. Besides, every applied instruction is assigned a mnemonic. For example, the mnemonic of API 12 is MOV. If users want to type an instruction by means of PMSoft, they can type the mnemonic assigned to the instruction.

Every applied instruction specifies operands. Take the instruction MOV for instance. M0 S D Instruction code Operands The instruction is used to move the value in the operand S to the operand D .  Length of an operand (16-bit instruction or 32-bit instruction) The values in operands can be grouped into 16-bit values and 32-bit values. In order to process values of difference lengths, some applied instructions are grouped into 16-bit instructions and 32-bit instructions. After “D” is added to the front of a 16-bit instruction, the instruction becomes a 32-bit instruction. The instruction MOV is a 16-bit instruction. X0.0 When X0.0 is ON, K10 is moved to D10.

The instruction DMOV is a 32-bit instruction. When X0.1 is ON, the value in (D11, D10) is moved to (D21, D20). X0.1  Continuity instruction/Pulse instruction The applied instructions can be grouped into continuity instructions and pulse instructions in terms of the ways the applied instructions are executed. If an instruction in a program is not executed, the execution of the program will take less time. As a result, if there are pulse instructions in a program, the scan cycle will be shorter. If “P” is added to the back of an instruction, the instruction becomes a pulse instruction. Some instructions are mostly used as pulse instructions.

Pulse instruction When X0.0 is turned from OFF to ON, the instruction MOVP is executed once. MOVP will not be executed again during the scan cycle, and therefore it is a pulse instruction. X0.0 5-10 MOV K10 D10 Source operand If there is more one source operand, the source operands will be represented by S , S , and etc. 1 2 S Destination operand If there is more than one destination operand, the destination operands will be represented by D , D , and etc. 1 2 D If operands are constants, they will be represented by m, m , m , n, n , n , and etc. 1 2 1 2 MOV K10 D10 DMOV D10 D20 MOVP D10 D12