![Omron CS1W-213 - REV 02-2008 Operation Manual Download Page 215](http://html1.mh-extra.com/html/omron/cs1w-213-rev-02-2008/cs1w-213-rev-02-2008_operation-manual_742355215.webp)
190
Sample Program
Section 7-7
Program Example
In the following example, W030 is used as a work bit.
7-7-4
Program Using Function Blocks
The following example shows function blocks for the ABSOLUTE MOVE-
MENT command.
Use of function blocks provides the following advantages.
• Bits for commands and address calculations for data areas that depend
on the unit number and axis number are automatically calculated in the
function block, reducing the work required to perform calculations.
• Acceleration times, deceleration times, position command values, speed
command values, and other settings can be easily made.
• Function blocks can be freely named, simplifying program management.
Refer to the following documentation for details on function blocks.
• Using Function Blocks for the First Time
Function Block Introduction Guide (R133)
• Using Function Blocks for Each Associated Device
OMRON FB Library Start-up Guide (R123)
OMRON FB Library Reference Manual (W442)
DIFU
W03000
MOVL
#00020F58
D00508
MOVL
#00003A98
D00510
MOVL
#00000064
D00512
W03000
Start switch
Work bit
MOVL
#00000064
D00514
203004
Set position
Set speed
Set acceleration time
Set deceleration time
RELATIVE MOVEMENT command
203004
RELATIVE MOVEMENT Bit
203213
Busy Flag
Summary of Contents for CS1W-213 - REV 02-2008
Page 2: ...CS1W NC113 213 413 133 233 433 Position Control Units Operation Manual Revised February 2008 ...
Page 3: ...iv ...
Page 13: ...xiv ...
Page 15: ...xvi ...
Page 19: ...xx ...
Page 43: ...18 Basic Operational Flow Section 2 1 ...
Page 87: ...62 Servo Relay Unit Section 3 7 ...
Page 199: ...174 Z phase Margin Section 6 8 ...
Page 217: ...192 Sample Program Section 7 7 ...
Page 285: ...260 Easy Backup Function Ver 2 0 or later Section 9 11 ...
Page 377: ...352 Common Parameter Area Appendix C ...