6 remainder (mod), 1) overview, 2) format – Yaskawa MP2000 Series: User's Manual for Motion Programming User Manual

Page 229: 3) programming examples, 2) format (3) programming examples

Advertising
background image

8 Command Reference

8.5.6 Remainder (MOD)

8-122

8.5.6 Remainder (MOD)

(1) Overview

When specified in the next block after Divide, MOD stores the remainder of the division in the specified vari-
able. The remainder is stored as the data type on the left side.

(2) Format

(3) Programming Examples

MOD command programming examples are shown below.

Example: Double integers

ML00106=ML00100*ML00102/ML00104;
(173575) (100000) (60000) (34567)
ML00108=MOD;
(32975)

The MOD command must be specified in the next block after Divide. If it is not executed in the next block
after Divide, the operation result cannot be guaranteed.

Motion Programs

Sequence Programs

Applicable

Applicable

MW00001 = 1000 / 999;
MW00002 = MOD;

A

Item

Description

Usable Registers

A

Data output

• All integer and double integer type registers (Excluding # and C registers)
• The above registers with subscript
• Subscript registers

EXAMPLE

Type

Motion Programs/

Sequence Programs

Ladder Programs

B

W

MW00101=MW00100/3;
MW00102=MOD;

L

ML00106=ML00102/ML00104;
ML00108=MOD;

F

IMPORTANT

Advertising