Omron CS1W-MC221 - 02-2008 Operation Manual page 535

Motion control units
Table of Contents

Advertisement

System Configuration and Wiring
7) Creating/Compiling/Saving MC Programs, Registering in Projects, and Saving
Projects
Creating the Program
MC Program
Program Contents
Saving and Compiling the MC Program
1,2,3...
1,2,3...
Registering in the Project
1,2,3...
Saving the Project
1,2,3...
508
Using CX-Motion, create the following MC program. For details on creating
programs, refer to the CX-Motion Online Help.
N000
P001 XY
*001
SAMPLE PROGRAM
N002
G04 5
N003
G26 XY
N004
G11
N005
G01 X400 Y300 F30
N006
G01 X100 Y200 F10
N007
G01 X200 Y400 F30
N008
G026 XY
N009
G79
N000
Declares program number P001 and use of the X and Y axes.
*001
This is a comment.
N002
Waits five seconds.
N003
Returns the X and Y axes to their reference origins.
N004
Selects the stop mode for positioning.
N005
Moves to X400 Y300 at speed 30.
N006
Moves to X100 Y200 at speed 10.
N007
Moves to X200 Y400 at speed 30.
N008
Returns the X and Y axes to their reference origins.
N009
Ends the program.
Compiling
After creating the program and before transferring it to the MC Unit, compile it
and check that no errors are generated.
1. Select File/Properties.
2. Select CS1W-MC221 for the MC type, and click OK.
3. Select Tool/Compile.
Saving
1. Select File/Save as....
2. After inputting a file name, click Save.
1. Click on the MC Unit that was added in 5) Creating Projects/Adding PLCs
(CPU Units, and select Edit/Add File.
2. Click on Program, and click on the file that was saved in Saving above.
The MC program will be registered in the project.
Save the project before transferring system parameters and the MC program
to the MC Unit.
1. Click on the project in the project workspace, and then select File/Save
project as....
2. Input a file name, and then select Save.
Section 11-2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs1w-mc221Cs1w-mc221-v1Cs1w-mc421Cs1w-mc421-v1

Table of Contents