9 rem instruction (rem) – Yaskawa Ladder Works Programming Manual User Manual

Page 32

Advertising
background image

2.9 REM Instruction (REM)

2-15

2.9 REM Instruction (REM)

[Outline]

The REM instruction outputs the remainder of real number division to the Dest. Here, the remainder
refers to the remainder obtained by repeatedly subtracting the Base designated by the Source. Thus,
the n is the number of times subtraction is repeated.

Dest = Source – (Base × n) (0 ≦ Dest < Base)

[Format]

Symbol : REM
Full Name : Real Remainder
Category : MATH

Icon :

[Parameter]

Parameter Name

Setting

Source

· Any real number type register
· Any real number type register with subscript
· Constant

Base

· Any real number type register
· Any real number type register with subscript
· Constant

Dest

· Any real number type register (except for # and C register)
· Any real number type register with subscript (except for # and C register)

[Program Example]

The remainder of the division of the real number variable MF00200 by the constant value, 1.5, is
determined and stored in DF00202.


Advertising