2 bit left shift (sfl), 1) overview, 2) format – Yaskawa MP2000 Series: User's Manual for Motion Programming User Manual

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

Advertising
background image

8.8 Data Operations

8-131

8

Command Reference

8.8.2 Bit Left Shift (SFL)

(1) Overview

The SFL command shifts a bit string designated by the leading bit number and bit width the specified number of
shifts to the left.

(2) Format

(3) Programming Examples

SFL command programming examples are shown below.

Examples: Ten bits with MB00100A (bit A of MW00100) as the leading bit are shifted five bits to the left.

With the SFL command, if the number of shifts is greater than the bit width, all data with the specified bit width will be set
to 0.

Motion Programs

Sequence Programs

Applicable

Applicable

SFL MB001000 N5 W10 ;

A B C

Item

Description

Usable Registers

A

Leading bit

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

B

Number of bits

to be shifted

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

C

Bit width

Type

Motion Programs/

Sequence Programs

Ladder Programs

B

W

SFL MB001000 N5 W10;

L

F

EXAMPLE

SFL MB00100A N5 W10 ;

F

A

1 1 0 0 0

MW00100

MW00101

1

3

0

0

1

0

1

F

A

MW00100

MW00101

3

0

1

0

0

0

0 entered.

0 is placed in the lower five bits

1 0 0 0 0 0

The upper five bits are deleted.

INFO

Advertising