D-16, Bit modify and move instructions – Rockwell Automation 1785-Lxxx Enhanced and Ethernet PLC-5 Programmable Controllers User Manual

Page 316

Advertising
background image

Publication 1785-UM012D-EN-P - July 2005

D-16 Instruction Set Quick Reference

Bit Modify and Move Instructions

Instruction

Description

Convert to Radians
RAD

RAD

DEGREES TO RADIAN

Source

Dest

N7:9

0.785398

F8:10

45

When the input conditions are true, convert degrees (the
value in Source A) to radians and stores the result in the
Destination (Source times p/180).

Status

C

V

Z

S

Description

always resets

Bit

sets if overflow generated; otherwise resets

sets if result is zero; otherwise resets

sets if result is negative; otherwise resets

Instruction

Description

Move
MOV

Masked Move
MVM

MOV

MOVE

Source

N7:3

20

Dest

F8:12

20.000000

When the input conditions are true, move a copy of the value in
Source (N7:3) to the Destination (F8:12), converting from one
data type to another This overwrites the original value in
the Destination.

Status

C

V

Z

S

Description

always resets

Bit

sets if overflow is generated during

sets if the destination value is zero;

sets if result MSB is set; otherwise resets

floating point-to-integer conversion;

otherwise resets

otherwise resets

MVM

MASKED MOVE

Source

Mask

Dest

D9:5

D9:12

478F

00FF

008F

D9:3

When the input conditions are true, the controller passes the
value in the Source (D9:3) through the Mask (D9:5) and stores t
result in the Destination (D9:12). This overwrites the original
value in the Destination.

Status

C

V

Z

S

Description

always resets

Bit

always resets

sets if the result is zero; otherwise resets

sets if most significant bit of resulting value is set;

otherwise resets.

Advertising