Yaskawa MP900 Series Motion Programming Manual User Manual

Page 112

Advertising
background image

Advanced Programming

3.1.10 Repeat Commands: WHILE...WEND

3 -22

J

Programming Examples

In the following program, ten circles with a radius of 50 will be drawn.

MOV [axis1] 0 [axis2] 0;

←POSITIONING

MW00001 = 10000;

←INTERPOLATION OVERRIDE (100%)*

MW00100 = 1;

←Counter preset

INC;

←Incremental mode designation

PLN [axis1] [axis2];

←COORDINATE PLANE SETTING

WHILE MW0001 <= 10;

←Start of repeat programming

MCW [axis1] 0 [axis2] 0 U50. V50.F8000; ←CLOCKWISE CIRCULAR INTERPOLATION

MOV [axis1] 50. [axis2] 50.;

←POSITIONING

MW00100 = MW00100 + 1;

←Counter increment

WEND;

←End of repeat programming

50

+ axis 2

+ axis 1

50

(0, 0)

Circle 1

Circle 2

Circle 3

Circle 9

Circle 10

*

Example of MP930
The interpolation override setting differs depending on the Machine Controller mod-
el. Refer to 1.2.3 Feed Speeds for details.

3

A

EXAMPLE

"

Advertising
This manual is related to the following products: