Yaskawa MotionSuite Series Machine Controller Programming Manual

MotionSuite™ Series Machine Controller
Programming Manual
MotionSuite ™ Series Machine Controller Programming Manual Table of Contents /P reface
1 Motion Programming Outline........................................................................... ........ 1-1
1.1 What is a Motion Program .................................................................................. 1-2
1.1.1 Capabilities of Motion Programs ...............................................................1-2
1.1.2 Basic P rog ram Str u ct u re ......... .................. ................... ........................ ...... 1-3
1.1.4 Motion P ro g ram Star t ............... .................. ......................... .................. .... 1-6
1.1.5 Parallel Program Operation ....................................................................... 1-7
1.1.6 Program Editor ..........................................................................................1-7
1.2 Motion Programming Method ....................................... .......... .......... .......... .......1-9
1.2.1 Input Format .............................................................................................. 1-9
1.2.2 Con trol Axes .................... .............. ................... .............. .................... .....1-15
1.2.3 Feed Sp ee d ...... ...... .................. ......................... .................. .................. .... 1-21
1.2.4 Motion Co m m a n d Li st .............. .................. ......................... .................. .. 1-26
2 Motio n Co m m a n d s ................ .............. .................... ............. .................... .............. .2-1
2.1 Axial Motion Commands .................................................................................... 2-2
2.1.1 Positi o n i n g (MOV) ......................... ......................... .................. ................ 2-2
2.1.2 Linear Interpolation (MVS) ....................................................................... 2-7
2.1.4 Helical Interpolation (MCW, MCC) ........................................................ 2-19
2.1.5 Ze ro-po i n t Re tur n (ZRN) . ...... .................. ......................... .................. .... 2-22
2.1.6 Skip Command (SKP) ............................................................................. 2-28
2.1.7 Time Designation Positioning (MVT) ..................................................... 2-29
2.1.8 External Positioning (EXM) .................................................................... 2-31
2.2 Con trol Comm a n d ................ .................. ......................... .................. ................ 2-32
2.2.1 Absolute (ABS) Mode ............................................................................. 2-32
2.2.2 Incremental (INC) Mode ......................................................................... 2-34
2.2.3 Current Value Change (POS) .................................................................. 2-36
2.2.4 Coordinate Plane Designation (PLN) ...................................................... 2-39
2.2.5 Machin e Co o r d in ate Comma n d ( MV M) ...... ......................... .................. 2-40
2.2.6 Program Current Position Update (PLD) ................................................. 2-42
2.2.7 Timed Wait (TIM) ................................................................................... 2-43
2.2.8 Program End (END ) ......... .................. ......................... .................. .......... 2-44
3 Advanc e d P ro g r a m m ing .................... ........................ ................... .................. .......... 3-1
3.1 Ad v an c e d Co n t rol Comman d s ... .................. ......................... .................. ............ 3-2
3.1.1 In-Pos ition Check (PFN) Co m m a n d ........... ................... ........................ .... 3-2
3.1.2 Second In-Position Check (INP) Command . ............................................. 3-5
3.1.3 Ignore Single Block (SNG) Command ...................................................... 3-7
3.1.4 User Function Call-out (UFC) Command ................................................. 3-8
3.1.5 I/O Vari ab le Wait (IOW) Co mmand ........ ................... .................. .......... 3-17
i
MotionSuite ™ Series Machine Controller Programming Manual Table of Contents /P reface
3.1.6 Sub-p rog ram Call -o u t (MSEE) Co m m a n d ........................ ...................... 3-18
3.1.7 Sub-program End (RET) Command ........................................................ 3-19
3.1.8 1-scan Wait (EOX) Command ................................................................. 3-20
3.1.9 Branc h (IF ELSE IEND ) Command ..... ...... ................... ........................ .. 3-22
3.1.10 Re p e at (W H I LE WEND ) Co m m a n d ........................... ........................ .... 3-24
3.1.11 Parallel Execution (PFORK, JOINTO, PJOINT) Command .................. 3-26
3.1.12 Selec ti v e Execut i o n (S FORK, JOIN TO, SJOI N T) Comman d ................ 3-31
3.2 Speed/Acceleration Commands ........................................................................ 3-34
3.2.1 A cc e l e r a t i o n Time Change (ACC) Co m mand ........ .............. ...................3-34
3.2.2 S-Curve Time Constant Change (SCC) Command .................................3-36
3.2.3 Feed Sp ee d Ch an g e (V EL) Comm a n d ...... ................... .................. .......... 3-38
3.2.4 Interpolation Feed Speed Ratio Setting (IFP) Command ........................ 3-40
3.2.5 Maximum Interpolation Feed Speed Setting (FMX) Command ............. 3-42
3.2.6 Interpolation Acceleration Time Change (IAC) Command .................... 3-44
3.2.7 Interpolation Deceleration Time Change (IDC) Command .................... 3-46
4 Sequence Commands ................................................................................................4-1
4.1 Se q u e n ce Co m m a n d O u tli n e ................. ................... .................. ........................ 3-2
4.1.1 Calculation Commands .............................................................................. 4-2
4.1.2 Arithmetic Calculation Combination ......................................................... 4-4
4.1.3 Logical Calculation Combination .............................................................. 4-5
4.2 Aritmetic Calculations.........................................................................................4-6
4.2.1 Substitution (=) .........................................................................................4-6
4.2.2 Addition (+) ............................................................................................... 4-7
4.2.3 Subtraction (–) ........................................................................................... 4-8
4.2.4 Multipl icatio n (* ) ...................... .................. ................... ........................ .... 4-9
4.2.5 D i v i sion (/) ...... ...... ........................ ................... .................. ...................... 4-10
4.2.6 Remainder (MOD) ................................................................................... 4-11
4.3 Logical Calculations..........................................................................................4-12
4.3.1 Lo g i c a l OR (| ) .......................... .............. ................... .............. .................4-12
4.3.2 Logical AND (&) ..................................................................................... 4-13
4.3.3 Exclusive OR (^) ......................................................................................4-14
4.3.4 N O T (!) ................ .............. .................... ............. .................... .............. ...4-15
4.4 Value Comparisons............................................................................................4-16
4.4.1 V alue Comp a ri son Comma n d ( = =, < >, > , < , >= , <=) .......................... .4-16
4.5 Data Oper at io n s .................. .................. .................. ......................... .................. 4-18
4.5.1 Bit Right-shift (SFR) Co m m a n d ........... ................... .................. .............. 4-18
4.5.2 Bit Left-shift (SFL) Command ................................................................ 4-20
4.5.3 Block Transfer (BLK) .............................................................................. 4-22
4.5.4 Clear (CLR) ............................................................................................. 4-24
ii
MotionSuite ™ Series Machine Controller Programming Manual Table of Contents /P reface
4.6 Basi c F u n c t i o n s................ .............. .................... ............. .................... .............. .4-26
4.6.1 Sine (SIN) ................................................................................................4-26
4.6.2 Cosine (COS) ........................ .................. ................... ........................ ...... 4-28
4.6.3 Tangent (TAN) ........................................................................................4-30
4.6.4 Arc Sine (ASN) ........................................................................................4-31
4.6.5 A rc Cosine (ACS) ........... ........................ ................... .................. ............ 4-32
4.6.6 A rc Tangent (ATN) ...... .................. ................... ........................ .............. 4-33
4.6.7 Square Ro o t (S Q T) ................... ......................... .................. .................. .. 4-35
4.6.8 BCD→BIN (BI N ) ......................... ................... .................. ...................... 4-37
4.6.9 BIN→BCD (BCD) ............ ........................ ................... .................. .......... 4-38
4.6.10 Desig n at e d Bi t ON (S{ }) ... ........................ ................... .................. ........ 4-39
4.6.11 Designated Bit OFF (R{ }) ...................................................................... 4-40
5 Varia b l e s (Regist ers) .................. .................. ................... ........................ .................. 5-1
5.1 Outline ................................................................................................................. 5-2
5.1.1 V ariabl e O v e r v iew ........ .................. ................... .................. ...................... 5-2
5.1.2 G l o b a l a n d Lo ca l V ariable s .............. ......................... .................. .............. 5-4
5.2 Ho w to U se the Variables .......................... ................... ........................ .............. 5-8
5.2.1 Syste m Variable s .............. .................. ................... ........................ ............ 5-8
5.2.2 Data Variables (M Registers) .................................................................... 5-9
5.2.3 Input Variables (I registers) ..................................................................... 5-10
5.2.4 O u t p u t V a riables (O Re g i sters) ............... ......................... .................. ...... 5-12
5.2.5 Constant Variables (C Registers) ............................................................. 5-13
5.2.6 D V ariable s (D Regist e rs) ................... ................... ........................ .......... 5-14
iii
MotionSuite ™ Series Machine Controller Programming Manual Table of Contents /P reface
Outline of Manual
!
This manual is a collection of data regarding the design and maintenance of the Motion­Suite™ series machine controller. The following items are included in this manual:
• Product outline, specifications and programming methods
• Basic programming
• Advanced programming
!
Read this manual thoroughly so as to ensure proper use of the controller. Furthermore, store this manual properly so that it can be referenced whenever necessary .
Related Manuals
!
Related manuals are shown in the following table.
!
Use this product with full knowledge of the product specifications, usage limits, etc.
Document Name Document Number Content
MP930 Machine Controller Hardware Manual
MP930 Machine Controller Ladder Programming
MotionSuite™ Seri es Machine Controller Software Manual
• YEA-SIA-C887-1.1 B Describes in detail the functions, specifica­tions and usage methods of the MP930
• Functions/Specifications
• Setup procedures, etc .
• SIEZ-C887-1.2 Describes in detail the operation co mmands used in MP930 ladder program m ing
• YEA-SIA-C887-1.4B Descri bes in detail the process control com­mands used in MotionWorks™ software
iv
MotionSuite ™ Series Machine Controller Programming Manual Table of Contents /P reface
Using this Manual
!
Users of this manual This manual is to be used by the following personnel:
• Persons designing MotionSuite™ systems
• Persons writing MotionSuite™ motion programs
!
Abbreviations The following abbreviations are used in this manual:
• MC Unit: MC unit used is the MotionSuite™ motion controller
• I/O Unit: I/O unit used is the I/O expansion module (model: JEPMC-IO350)
• PP: Programming Panel
• PC: Personal Computer
v
MotionSuite ™ Series Machine Controller Programming Manual Table of Contents /P reface
Safety Notes
This chapter deals with the cautionary items regarding the safe and proper use of this device. Be sure to thoroughly read the directions in this manual and all associated materials prior to mounting, running, storage/inspection, and then execute the contents of these manuals correctly. Use the MotionSuite™ series machine controller after thorough study of all device data, safety information, and cautionary items.
Cautions on Usage
!!!!
!
During programming of the following axi s motion commands, be sur e to che ck the move path to make
sure that the tool does not interfere with the work.
Commands requiring such checks:
• Positioning (MOV) commands
• Linear Interpolation (MVS) commands
• Ci r cular Interpol ation (MCC, MCW) commands
• He lical Interpolation (MCC, MCW) commands
• Time Designated Positioning (MVT) commands
• Skip (SKP) commands
CAUTION
Example
axis2
axis3
axis2
Each axis is moving independent ly by feed speed
axis3
Positioning motion
Current position
End position
axis1
axis1
Move Path Based on the MOV Command
Forgetti ng this check may result in tool dam age , or bodily injury.
vi
MotionSuite ™ Series Machine Controller Programming Manual Table of Contents /P reface
!
I f the f o ll owing co m m a nd s are erroneously designat ed , the subsequ en t mo tio n o peratio n w il l b e co m ­pletely incorrect. V erify prior to running that these commands have been correctly designated
The following commands require such checks:
CAUTION
• Absolute mode (ABS)
• Incremental mode (INC)
• Current value change (POS)
• Machine coordinate designation (MVM)
Example
axis2
axis2
(0,0)
Y
axis1
Work coordinate
Current pos ition
axis2
axis1
(0,0)
POS Command (current value change)
Forgetti ng this step may result in tool damage, or bodily injury.
vii
axis1
MotionSuite ™ Series Machine Controller Programming Manual Table of Contents /P reface
!
! General Cautionary Items
!!
Cautions During Use
• The MotionSuite™ was n either designed nor manufactured for use in devices or systems under such critical conditions as fol low: Transporta tion s yst ems, m edic al dev ices, aeros pace, nu cl ear powe r contro l, submari ne relay devices, etc . Please contact Yaskaw a whe n cons idering any such special application.
• Although the MotionSui te™ is manufa cture d unde r rigorous qualit y con trol, pu t in pl ace sa fety appara tus s o that a major accident c annot occur when apply ing the Moti onSuit e™ in an insta ll ation where the occurre nce of major facilities damage or serious, life-threatening injury is anticipated due to the fai lure of the Motion­Suite™.
• The pictures and diagrams in this manual are representative examples, and may differ from the product received.
• These manuals may be changed as needed due to product improvements, specification change, or for improvement in ease of use of the manual.
• These changes are made following updating of the document number of the manual, and its issua nce as a revised edition. The publication number of the re vised edition is written on the manual cover.
• When ordering new manuals due to damage or loss, contact a Yaskawa dealer or the nearest Yaskawa corpo­rate office li s ted on the cover, and give the document number.
• If the nameplate mounted on the product becomes illegible or damaged, order another nameplate from a Yaskawa dealer or Yaskawa cor po r a te offic e li s t ed on th e co v e r.
• Any product modified by the custome r fall beyond Yaskawa’s product warranty . Yaskawa shoulder s no responsibility for any injury or damage resulting from modified products.
viii
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
1 Motion Programming Ou tline
This chapter deals with the methods of creating motion programs. Motion pro­grams are created using MotionWorks™ (Programming Unit); the programs are executed after transfer to the MotionSuite™ series machine controller.
1.1 What is a Motion Program .................................................................................. 1-2
1.1.1 Capabilities of Motion Programs ...............................................................1-2
1.1.2 Basic P rog ram Str u ct u re ......... .................. ................... ........................ ...... 1-3
1.1.4 Motion P ro g ram Star t ............... .................. ......................... .................. .... 1-6
1.1.5 Parallel Program Operation ....................................................................... 1-7
1.1.6 Program Editor ..........................................................................................1-7
1.2 Motion Programming Method ....................................... .......... .......... .......... .......1-9
1.2.1 Input Format .............................................................................................. 1-9
1.2.2 Con trol Axes ........ .................... .............. ................... .................... ...........1-15
1.2.3 Feed Sp ee d ...... ...... .................. ......................... .................. .................. .... 1-21
1.2.4 Motion Co m m a n d Li st .............. .................. ......................... .................. .. 1-26
1-1
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
1.1 What is a Motion Program?
A general description of motion programming is presented in this chapter. Be sure to read this section before doing any programming.
1.1.1 Capabilit ies of Motion Programs
Using MotionSuite™, it is possible to program the specific motions necessary for industrial machines. The main characteristics of motion progr ams are provi ded below for reference:
Motion Program MPM001
PFORK S1, S2, S3, S4
S1
S2
S3
S4
S5: PJOINT
Ladder Program
MSEE MP M001 DA0000
MSEE MP M002 DA0002
MSEE MP M003 DA0004
MSEE MP M004 DA0006
Motion Program
Motion Pro gram
Motion Pro gram
Motion Pro gram
Motion Pro gram
MPM001
MPM002
MPM003
MPM004
Parallel Operation 1
• A maxi mum of fou r pro grams c an be operat ed in par allel using the PFORK command within a si ngle motion pro­gram.
• Axes may be freely combined in up to four groups.
Machine
Simultaneous Control of Multiple Machines
MC-1
MC-2
• Several prog rams can be op e r at ed in parallel.
• A maximum of 14 axes can be con­trolled.
MC-3
MC-4
Maximum 14 axes simultaneo u s positioning
Maximum 14 axes simultaneo u s linear interpolation
2 axes simultaneous circular interpolation
Enhanced Motion Commands
• Positionin g 14 axes maximum
• Linear Interpolation 14 axes maximum
• Circular Interpolation 2 axes
• Helical Interpolation 3 axes
1-2
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
Example of Operation Com ma nds:
MW81D=AB01H*SIN(100)+50; MW5=BCD (1W0001); IF CF476 <> DF897; IF MW0001 > 7; IF 0B0 == 1; 0B0 = (IB0 | IB2 | IB3) & 1B1; MW6 = SQT (MW809);
Conditional Branching Commands
IF <Conditional>
Processed when conditions established
ELSE
Processed when conditions not established
IEND
Repeat Commands
WHILE <Conditional>
Processing
WEND
Calculations are Flexible and Dependable
• Integer arithmetic operations
• Real number arithmetic opera tions
• Logical operations
• Trigonometric operations
• Exponents
• Logarithms
•etc.
Control Commands
• Conditional branching comm ands (IF /ELSE)
• Repeat commands (WHILE)
• Timer commands (TIM )
• Subroutines (MSEE)
• Parallel execution com mands (PFORK)
• Selection execution commands (SFORK)
1.1.2 Basic Program Structure
a. Motion programs are written in a text format motion language. Up to 256 of
these motion programs can be created separately.
b. Motion programs are of the following two types: Main programs (MPM
which can be called out from DWG.H, and sub-programs (MPS can be called out from the main program.
Important Point
Numbers of the MPM and MPS programs cannot be duplicated.
1-3
"""
"""
) which
)
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
Motion Program Types
Classification
Designation
Method
Main Program MPM"""
1~256
Sub-Program MPS"""
1~256
c. Motion Program Execution Processing Format
Always refer to the motion program from the H drawing by using the MSEE command. H drawings can be referenced from source drawings, sub-drawings, or sub-sub-drawings.
System program starts by
operating conditions
Source Drawing
DWG.H
SEE H.01
Characteristics
Number of Programs
Can be called out from an H drawing A maximum of 256 combined
main programs and sub-programs
Can be called out from a main program
Sub-drawing
DWG.H01
SEE H01.01
Sub-sub-drawing
DWG.H01.01
MSEE MPM001
DEND
can be created.
Motion Program
MPM001
VEL [a1]5000 [b 1].. FMX T100000000; IAC T25; IDC T30; MOV [a1]300. [b1].. MVS [a1 ]20 0. [b1]..
END
MPM002
MSEE MP M0 0 2
DEND
END
MPM003
MSEE MPM003
MSEE MPS001
END
DEND
Subroutine
MPS001
RET
Figure 1.1: Motion Program Execution Processing Format
Supplement
See Section 3.4 “User Programs” in the MP930 Machine Controller Hardware Man­ual for details regarding this figure.
1-4
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
1.1.3 Function Performance List
The MP9xx motion program function specifications are as follows:
MP9xx Motion Control Function Specifications
Item Specifications
Number of Control Axes 1~14 maximum
Position Control Linear, rotational, unlimited, independent axis Interpolation Linear: 14 axes, Circular: 2 axes, Helical: 3 axes Speed Control None
Specs
Control
Torque Limit Limited (torque limit set by parameters only) Command Unit mm, inch, deg, pulse Minimum Command Setti ng Unit 1, 0.1, 0.01, 0.001, 0.0001, 0.00001 Maximum Command Value -2147483648~+2147483647 (with 32-bit symbols) Speed Command Unit mm/min, inch/min, deg/mi n, pulse/min Accel/Decel Type Linear, S-curve, separate accel/decel Override Functions Positioning: 0.01~100.00% of axis uni t
Interpolation: 0.01~100.00% of group unit Coordinates Cartesian Coordinates Zero-Point Return 4 Types:
Torque+C-phase, zero-point LS, torque+zero-point LS, C-phase
There is a zero-point setting function
Language Dedicated motion language Number of Tasks A maximum of four programs can be simultaneously execut ed in parallel. Number of Programs 256 maximum
Programs
Program Volume 80 Kbytes (characters)
(Adjustable by the volume of ladder progra m used: 100 Kbyte maximum) Applied Servo Amplifier SGD-"""N/SGDB-""AN Encoder Incremental/Absolute Command Language Axis Motion Commands : 8 types
MOV, MVS, MCW , MCC, ZRN, SKP, MVT, EXM
Basic Control Commands : 5 types
ABS, INC, POS, PLN, MVM
Speed/ Accel/D ecel Commands : 7 types
ACC, SCC, VEL, I A C, IDC, IFP, FMX
Advanced Control Commands : 4 types
PFN, INP, SNG, UFC
Control Commands : 9 types
MSEE, TIM, IOW, END, RET, IF ELSE IEND, WHILE WEND, PFORK JOINTO PJOINT, SFORK JOINTO SJOINT
Operation/Sequence Control Commands : 36 types
=, +, -, *, /, MOD, |, ^, &, !, (), S{}, R{}, SIN, COS, TAN, ASN, ACS, ATN, SQRT, BIN, BCD, ==, <>, >, <, >=, <=, TON, TOF, SFR, SFL, PON, NON, BLK, CLR
1-5
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
1.1.4 Motion Program Start
The motion program is started from an “H” drawing ladder program. Start is initiated by motion program start commands (MSEE) from within the ladder program and a low to high transition of the program run start request bit. Motion programs are desig­nated directly by the program number and indirectly by the register number containing the program number.
ABS; MOV X_Y_
MVS X_Y_F
MSEE MPM001 DA0000
IOW MB0001 MOV X_Y_
Ladder Program
Motion Control Program
Figure 1.2: Motion Program Start by Direct Designation
ABS;
MOV X_Y_ MVS X_Y_F
MSEE MW00200 DA0000
MPM Number is in MW00200
Ladder Program Motion Contro l Pr ogram
IOW MB0001 MOV X_Y_
Figure 1.3: Motion Program Start by Indirect Designation
1-6
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
1.1.5 Parallel Program Operation
With MP9xx, it is possible to program freely with various machine activities, due to capabilities for parallel running that make complex motion control possible. Parallel running of motion programs is available in the two following forms.
a. With motion program PFORK commands, parallel running of a maximum of 4
programs within 1 program is possible.
Motion Program MPM001
PFORK S1, S2, S3, S4
S1
S2
S3
S4
S5: PJ O INT
b. With ladder program MSEE commands, parallel running of multiple motion pro-
grams is possible. (When automatically generated with MotionWorks™ group setting display , parallel running of a maximum of 4 programs is possible.)
Ladder Program
Motion Program
MSEE MPM 00 1 DA 00 00
MSEE MPM 00 2 DA 00 02
MSEE MPM 00 3 DA 00 04
MSEE MPM 00 4 DA 00 06
Motion Program
Motion Program
Motion Program
MPM001
MPM002
MPM003
MPM004
Parallel Operation 1
• A maximum of four (4) programs can be operated i n par­allel us ing the PFORK command within a single motion program. The PFORK command must be ended with the PJOINT command.
Parallel Operation 2
• Several programs can be operated in parallel by using the ladder program MSEE com­mand.
1.1.6 Program Editor
The motion program editor is generated on the MotionWorks™ (programming device) motion program editor display. The editing display contains the following functions.
a. The same functions as the text editor, such as cut & paste, look-up, replace, and
jump
b. Special functions such as debugging operations and program instruction moni-
toring
c. Function for importing and reading text editor files
1-7
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
d. Function for writing and exporting motion program files as text files.
Figure 1.4: MotionWorks™ Motion Program Editor Display
Supplement
For motion program editor function details, please refer to the MotionSuite™ Series Machine Controller Software Manual.
1-8
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
1.2 Motion Programming Method
This section deals with the basic rules for creating motion programs. Read this section thoroughly prior to program execution.
1.2.1 Input Format ! Motion Program Sample
Motion programs are created in variable-length block format.
Program Sample
Block Number Program
00001 MPM001"sample” ...Program number and comment 00002 FMX=T1000000; ...Interpol ation feed high-speed setting 00003 IAC=T100; ...Interpolation feed accelerat ion time setting 00004 IDC=T100; ...Interpolation feed deceleration time setting 00005 VEL [X1]10000 [Y1]2000 [Z1]3000; ...Feed speed sett ing 00006 INC; ...Increment al mode command 00007 MOV [X1]100.[Y1]150.[Z1]200 .; ...Fas t feed 00008 MVS [X1]100.[Y1]50.F500000; ...Linear interpolation 00009 IOW IW0011=1; ... 00010 MW0100=(MW0110*100+50)/100; ... 00011 MW0200=(MW0210*100+50)/100; ... 00012 ABS; ... 00013 MOV [X1]MW0100 [Y1]MW0200; ... 00014 POS [X1]0 [Y1]0 ... 00015 PFORK LA01, LA02, LA03, LA04 ...Parallel operation command 00016 LA01: INC; ...Label 00017 MOV [X1]1000.; ... 00018 JOINTO LA05; ... 00019 LA02: INC; ... 00020 MOV [X1]2000.; ... 00021 JOINTO LA05; ... 00022 LA03: ABS; ... 00023 MV S[Z1]1500 F50000; ... 00024 MW1000=12345; ... 00025 JOINTO LA05; ... 00026 LA04: MW1100=1000; ... 00027 IOW IB101==1; ... 00028 JOINTO LA05; ... 00029 LA05:PJOINT ...Closes paral lel operation command 00030 END; ...Closes program
1-9
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
! Input Format
The variable length input formats are as given in the following table:
Variable Input Format List
Item Input Format
Program Number MPM Label 8 char acters maximum Motion Commands 3 alphabetical characters (some commands are other than 3 letters) Coordinate
Language
Interpolation Fee d Speed
Wait Time TIM T1000 10 msec units (no fractions) Sub-program Number MPS P Designation P100; Interpolation feed spee d ratio setting 1~100 Close Block ;
""" """
[abcd
] ± 123,456
AB C A: Axis Name B: Pos/Neg design ation possible C: See Item 1.2.2 “Control Axes” for details on coordinates
F3000000 Changes accordin g to the number of places below the decim al point. (set paramete r)
3000.000mm/min when numb er of places below decimal poi nt =3
30.00000mm/min when numb er of places below decimal poi nt =5
""" """
= 1~256
= 1~256
! Leading Zero
Numbers following the characters, including program numbers and register (variable) numbers, can omit the leading zero.
Example
[X1]00123 [X1]MW00010 MPS002
! +/- Symbol
Although the plus sign may be omitted from numbers, the negative sign may not be omitted.
Example
[X1]00123 [X1]-123
Supplement
Decimal places cannot be used in the interpolation feed speed (Fxxxx) command. F30000.000 is not possible; enter it as F30000000.
[X1]123
[X1]MW100
MPS2
[X1]123
[X1]-123
1-10
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
! Usable Characters
The usable characters and their meanings are given in the following table.
Usable Character List
Character Meaning
CC register DD register
II register
MM register
OO register
SS register F Interpolation feed speed P Interpolation feed speed override
R Circular radius
SS Step signal number
T Timer value, number of circle turns, FMX, IAC, IDC U Cir cular midpoint coordinate 1 (horizontal) V Cir cular midpoint coordinate 2 (vertical)
MPS Sub-program number
1-11
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
! Function Characters
The function characters and their meanings are given in the following table.
Function Character List
Character Meaning
SP Space
TAB Tab
; End of block
ENTER
0~9 numbers
A~Z Alphabet
. Decimal point
+ Operation
- Operation * Operation
/ Operation | Operation
^ Operation
& Operation
! Operation = Operation () Operation
== Operation
> Operation < Operation
<> Operation >= Operation <= Operation
S {} Operation
R {} Operation
——
Changes row
1-12
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
! Program Number Hand ling
The program number is a number for the purpose of program discrimination. There are two kinds of programs: Main programs and sub-programs. The numbers 1~256 may be applied to each.
!
Main Programs
"""
MPM
Program number (1~256)
!
Sub-programs
"""
MPS
Program number (1~256)
Figure 1.5: Motion Program File Names
Supplemental It em
(1) The same number cannot be designated for both main programs and sub-programs. (2) Up to 256 programs of the Main program and Subprogram combined can be
created.
! Comment Writing
It is possible to write comments within the program. These comments are saved within the controller. There are two ways to create a comment, as follows:
1. Surrounding a comment statement with quotation marks. “Character string”
Example
ZRN [AXIS1]0 [AXIS2]0 [AXIS3]0; “Zero return all axes” MVS [AXIS1]100.0 [AXIS2]200.0 [AXIS3]3 00.0; “Three axis linear int erpolation”
2. All characters following the first quotation mark in a line become comments without surrounding the line in quotation marks if “Character string
Example
“Move to the wait machine position by linear interpolation after all axi s zero point return ZRN [AXIS1]0 [AXIS2]0 [AXIS3]0; MVS [AXIS1]100.0 [AXIS2]200.0 [AXIS3]3 00.0;
ENTER
ENTER
is pressed.
1-13
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
! Creation of One-Block Commands
a. A one-block command is made according to the input format list. A representa-
tive example of a single block is shown below.
LABEL: MVS [X1] 20.0 [Y1] 30.0 [Z1] 40.0 F300000 ; “ Comment”
End of block
Coordinate Language Axis coordinate value and amount
of axial incremen tal moti o n
Motion Command Designates motion operation type and con­trol type.
Label Label to be bran ched t o when us i ng paral lel execution or selected execution commands
Interpolation fe ed s pee d
.
b. Always be sure to insert a space [SP] between the motion command and the
coordinate language.
c. Although there is no restriction on the number of characters in a single line of a
single block, we recommend that the number of characters be kept to within a range that can be displayed on-screen for the sake of program viewability.
d. A [;] is needed any time that a block is completed. e. The label is used as the target block for the parallel execution command
(PFORK) or selection execution command (SFORK).
! Label
A label must be us ed for the parallel execution command (PFORK) or selection execu­tion command (SFORK). Attach a colon [:] to the end of a 1~8 character string of alphanumeric characters or symbols. The characters that can be used in a label are shown below. The first character in a label must be alphabetical.
Numbers 0~9 Letters A~Z, a~z
Symbols $, %, ¥, @,—, _, .
Characters
1-14
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
Example
PFORK LAB1, LAB2
LAB1: ZRN [AXIS1]0 [AXIS2]0 [AXIS3]0;
JOINTO LAB3
LAB2: MVS [AXIS1]100.0 [AXIS2]200.0 [AXIS3]300.0;
JOINTO LAB3
LAB3: PJOINT
Important Point
1. The error “Duplicate Label Defined” results if the same label is used multiple times within a program.
2. An error results in the number of PFORK branches if the number of labels dif­fers.
1.2.2 Control Axes Axis Names
!
It is possible to set a desired axis name of up to eight characters. The axis names are set in the Group Definitions Screen in MotionWorks ™. The characters that can be used in a name, as well as the default axis names, are given below.
Usable Characters 0~9, A~Z, a~z Axis Name Examples [AXIS1] [X1] [CONV1] Default Axis Names If fou r axes are designated: [A1] [B1] [C1] [D1]
If eight axes are designat ed: [A1] [B1] [C1] [D1] [E1] [F1] [G1] [H1]
Supplement
1. Always be sure to enclose axis names written in 1 ~ 8 alphanumeric characters within [ ].
2. The same axis name cannot be set into multiple axes.
3. An error results if an axis name is designated in the motion program different from the axis name set in the Group Definition Screen.
1-15
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
! Coordinate Language List
The motion amount and coordinate values attached to the axis name are called “coor­dinate language” in this book. The meanings of the coordinate language used in this system are shown in the table below.
Coordinate La nguage Designatio n Method Meaning
Axis Name [X1], [Y1], [AXIS] Designates axis to be moved Motion Amount or
Coordinate Value
Auxiliary Data for Cir­cular Interpolati on and Helical Interpola tion
Amount of External Positioning Motion
Important Points
Direct Designation: 123.456 Variable Designation: MW0100
R Circula r interpolation radius (set by the increm ent) U
V D Distance of motion after external signal input (set by
Coordinate value of designated axis , or inc rem ental motion range
Circular interpolation center coordinate (Horizontal) Circular interpolation center coordinate (Vertical)
the incr em e nt)
1. The 32-bit integer data type is used when the motion amount or coor dinate value is designated by a variable. (Ex.) ML0100
2. When there are fractions, insert zeroes for the number of places following the decimal point. (Ex.) Use 300000 to designate 300.000 when the number of decimal places = 3. However, the servo parameter area (IWCxxx, OWCxxx) in the I, O registers cannot be used for variables of the motion amount or coordinate value.
! Number of Simul taneously Controlled Axes
The number of simultaneously controlled axes designated from the motion program is shown in the following chart.
Number of Simultaneously Controlled Axes List
Command Language
Positioning (MOV) 14 axes maximum Linear Interpol ation (MVS) 14 axes maximum Circular Interpolation (MCW/MCC) 2 axes Helical Interpolation (MCW/MCC) 3 axes Skip Command (SKP) 14 axes maximum External Positioning (EXM) 1 axis Time Designated Positioning (MVT) 14 axes maximum
Number of Simultaneously
Controlled Axes
1-16
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
! Command Units
The programmable command units are in accordance with the settings of b0~b3 “Command Unit Selection” of set-up parameter 17 “Servo Module Function Selection Flag” and set-up parameter 18 “Number of Places Below Decimal Point.”
Command Unit List
Parameter Setting
# of Places Below Decimal=0 1 pulse 1mm 1” # of Places Below Decimal=1 1 pulse 0.1mm 0.1º 0.1” # of Places Below Decimal=2 1 pulse 0.01mm 0.01º 0.01” # of Places Below Decimal=3 1 pulse 0.001mm 0.001º 0.001” # of Places Below Decimal=4 1 pulse 0.0001mm 0.0001º 0.0001” # of Places Below Decimal=5 1 pulse 0.00001mm 0.00001º 0.00001”
Command Unit
Pulse
Command Unit mmCommand Unit
deg
Command Unit
inch
Supplement
The number of places below the decimal point are disabled if command unit = pulse. The decimal points in the motion pr ogram input and posit ion monitor dis play are also meaningless.
! Maximum Command V alue
The maximum values of single motion commands are given in the table below.
# of Decimal
Places
0 -2147483648
1 -2147483648
2 -2147483648
3 -2147483648
Limited Lengths
4 -2147483648
5 -2147483648
Command Un it
Pulse
~2147483647
~2147483647
~2147483647
~2147483647
~2147483647
~2147483647
Command Unit mmCommand Unit
deg
-2147483648 ~2147483647
-2147483648 ~214748364.70~3599999.9
-2147483648 ~21474836.470~359999.99
-2147483648 ~2147483.6470~35999.999
-2147483648 ~214748.36470~3599.9999
-2147483648 ~21474.836470~359.99999
0~ 35999999
Command Unit
inch
-2147483648 ~2147483647
-2147483648 ~214748364.7
-2147483648 ~21474836.47
-2147483648 ~2147483.647
-2147483648 ~214748.3647
-2147483648 ~21474.83647
1-17
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
! Designation of “Absolute Mode” in a Rotary Axis
When an absolute value command (designation mode in a range of 0~359.999º) is used in a rotary axis, the commanded +/- sign shows the rotation direction, and the command value signifies the absolute position.
Example
When designating a position 180º from the current position:
Example of Designating the Rotary Axis Absolute Mode
270º
Example of Designating the Rotary Axis Absolute Mode
270º
180º
180º
90º
90º
ZRN [X1]0; INC MOV [X1]180.0; ABS MOV [X1]270.0; moves 90º clockwise
ZRN [X1]0; INC MOV [X1]180.0; ABS MOV [X1]-270.0; moves 270º counte r-clockwise
Supplement
When moving to the 0º position by designating the absolute mode in a rotary axis, -0.0 cannot be designated in a counter-clockwise motion. In this case, designate -360.0.
! Number and Variable Tabulation Method
Numbers used in motion programs are of two types: parameters and variables. The setting method for these numbers is given below.
a. Parameters
Tabulation of Numbers that Can be Designated
Type Range Notation Example
Decimal Integers -2147483648~2147483647 0, 734, +823, -2493 Decimal Fractions -2147483.648~2147483.647
Changes accord ing to number
of decimal place s Hexadecimal Integers 0~FFFFFFFFH FFFABCDEH, 2345H, FH Real Numbers
1-18
763., +824.2, -234.56
-321.12345
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
b. Variables
The following types of variables exist for use in motion programs. Use them according to the application.
Types of Variables and Tabu lation Method
Type
Global Variables
Local Variables D Register DB DW DL DF
Variable
Type
S Register SB SW SL SF M Register MB MW ML MF I Register IB IW IL IF O Register OB OW OL OF C Register CB CW CL CF
BIT WORD LONG FLOAT
Data Type
M B 1 2 3 4 5 F
Bit Position: Enabled only with bit data Variable Address: B, W, L, F Data Type: B, W, L, F Variable Name: S, M, I, O, C, D
(Ex.) MB001001=1;
MW00100=1234; ML00100=12345678; MF00100=1234.5678;
1-19
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
! Calculations and Functions
Calculations can combine global variables, local variables and constants with operators and functions. The result can be substituted by a variable. Calculation and functions use the following commands.
Type Command Name Command Format
= Substitution MW– =MW–; + Addition MW– =MW– +MW–;
Value Calculations
Logical Calculations
Value Comparisons
Data Operations
Basic Functions
Subtraction MW– =MW – –MW * Multiplication MW– =MW–*MW–; / Division MW– =MW–/MW–; MOD Remainder MW– =MOD; | OR (Logical OR) MB– =MB– | MB–; ^ XOR (Exclusive OR) MB– =MB– ^MB– & AND (Lo gical AND) MB– =MB– &MB–; ! NOT (Invert) MB– =MB– !MB–; = = Same IF MW– = =MW–; < > Not same IF MW– < >MW–; > Greater IF MW– >MW–; <Less IF MW <MW; >= Greater or equal IF MW– > =MW–; <= Less or equal IF MW– < =MW–; SFR Right-shift SFR MB– N– W–; SFL Left-shift SFL MB– N– W–; BLK B lock tra nsfer BLK M W– MW– W–; CLR Clear CLR MB– W–; SIN Sine SIN (MW–); COS Cosin e COS (M W–); TAN Tangent TAN (MF–); ASN ARC sine ASN (MF–); ACS AR C cosine ACS (MF–); ATN A R C tang e nt ATN (MW– ); SQT Square root SQT (MW–); BIN BCDBIN BIN (MW–); BCD BINBCD BCD (MW–); S{} Designated bit ON S{MB–}=MB– &MB–; R{} Designated bit OFF R{MB–}=MB– &MB–;
1-20
MotionSuite ™ Series Machine Controller Programming Manual Chapter 1: Motion Programmming Outline
1.2.3 Feed Speed ! Fast Feed Speed
a. Fast feed speed is used in the following axis motions:
• Positioning (MOV) commands
• JOG run (JOG) operation
• Step run (STEP) operation
b. Set the fast feed speed in the setup parameters “Fast Feed Speed (OLxx22) or in
the motion program “Feed Speed Change Command (VEL)”.
• Fast Feed Speed Parameters (set in setup parameters)
Parameter Number Name Setting Range Unit
OLxx22 Fast Feed Speed
• Methods for setting Fast Feed Speed in the motion program
1. Direct Setting Method for Fast Feed Speed Parameters OLC022=6000 ; Sets fast feed speed for the first axis OLC062=5000 ; Sets fast feed s pee d for the second axis OLC0A2=7000 ; Sets fast feed speed for the third axis
2. Setting Method Using t he F eed Speed Change Command (VEL) VEL [X1] 6000 [Y2] 5000 [Z1] 7000
0~2
31
-1
By command unit
c. The fast feed can be switched to override within a range of 0~327.67%. This can
be set for each axis using the setup parameter “Override (OWxx2C).” There are three override setting methods: in the motion program, in the ladder program, and in the setup parameter.
Command Speed × Override = Output Speed
(OLxx22) (OWxx2C)
Command Speed
(OLxx22)
Override Function Selection Fixed Parameter 17 Bit 9
Enable
Disable
Override
(OWxx2C)
100%
Supplement
1. Override is normally enabled during run. Ladder programs and motion pro­grams can be modified by parameter setting during axis motion.
2. When the output speed from the override setting data is outside of operable range, the Parameter Setting Error results.
Output
Speed
1-21
Loading...
+ 157 hidden pages