Title: Programmable Function
1Jul.2004
21. Features
Best solution for Simple Applications
Easy to Use
- similar to Visual Basic
High cost performance
- Stand-alone operation up to 512 steps
Small, Save wiring
- Option Unit NOT needed - Build-in I/O
32. Development System
Functions
(1) Setup Software AHF-P02 for Windows
- Edit - Compile - Online Trace
- Save Load - Print
- Save (in EEPROM) - Execute
(3) PC cable EH-PROG20-cable
(4) Servo Driver ADAX3 series
(2) Windows 95/98/XP PC with at least one
RS-232C port
with Programmable function
43. Application System
I/O Functions
- 12 digital inputs - 8 digital outputs - 2
analog inputs - 1 external encoder input - 1
RS-232C port
ONLY
Motion Functions
- Position control - Speed control - Torque
control - Synchronization control - Homing
Servo Driver controls itself !
Sequential Functions
- Jump - Loop - Wait - Sub routine call -
Internal variable - Calculation
Simple Application without PLC
And, More Safety with PLC
54. Setup Software AHF-P02
Code Window
Program
Data Window
Default values
Code Tab
Teaching function
Erase EEPROM
Tool Bar
Debug
Edit
File
Status
Down load to Drive
Print
Up load from Drive
Code Tab ON/OFF
Compile Down load
Compile
65. Statements of Programmable Function
Motion Functions (1)
Position Control - Standard control mode
Mnemonic Short Description Ref. Page
mov Positioning with trapezoidal speed profile 6-29
nchg change speed at pre-defined position 6-40
smov Positioning after speed controlled motion 6-45
sync 1, 2 Synchronize to external encoder 6-50
hp Return to home 6-25
stop Stop motion, Cancel synchronization 6-49
Homing - Re-define home for position control
Mnemonic Short Description Ref. Page
ort Detect home with external switch 6-42
hpset Set home on current position 6-27
75. Statements of Programmable Function
Motion Functions (2)
Speed Control - for unlimited traveling
Mnemonic Short Description Ref. Page
speed Speed controlled operation 6-47
nchg Change speed at pre-defined position 6-40
sync s Synchronize to analog input 6-50
stop Stop motion, Return to Position Control 6-49
Torque Control - for special application
Mnemonic Short Description Ref. Page
trq Torque controlled operation 6-54
tchg Change torque at pre-defined position 6-52
stop Stop control, Return to Position Control 6-49
85. Statements of Programmable Function
Motion Functions (3)
Power up
Position Control
Program Start (SON ON)
Initialize I/O
trq
speed
Homing
ort, hpset
Speed Control
Torque Control
mov, nchg sync, hp stop
trq
trq tchg
speed nchg
speed
stop
stop
smov
end
END
Emergency Stop by SON OFF
95. Statements of Programmable Function
I/O Functions
PC Connector - for RS-232C communication
Mnemonic Short Description Ref. Page
open com Declare use of port 6-64
print Send data to port 6-65
input Read data from port 6-67
LOC Unread received data flag 6-69
I/O Connector - for connection with other devices
Mnemonic Short Description Ref. Page
chg Allocate function on general I/O 6-62
X( ), Xw Read digital inputs 6-56
Y( ), Yw Write digital outputs 6-57
XA( ) Read analog inputs 6-60
sync 1,2,s Synchronize to external encoder or analog input 6-50
105. Statements of Programmable Function
Sequential Functions (1)
Program Control
Mnemonic Short Description Ref. Page
entry/end Beginning-End of main program 6-10
sub/sub end Beginning-End of subroutine 6-10
call Branch to subroutine 6-11
go to Unconditional Branch 6-14
If then Conditional Branch 6-15
select case Multiple conditional Branch 6-20
Ifs then else Change process by condition 6-16
for loop Loop by counter 6-12
until loop Conditional loop (post-checkout) 6-22
while loop Conditional loop (pre-checkout) 6-24
wait Wait by timer, Wait by condition 6-23
Special Program Control
Mnemonic Short Description Ref. Page
load Read value from EEPROM 6-18
save Write value to EEPROM 6-19
cont Resume program when SON OFF / ON 6-11
115. Statements of Programmable Function
Sequential Functions (2)
Variables - for Motion function
Name Short Description Ref. Page
P(00)-P(99) Position Command variables 6-89
N(00)-N(15) Speed Command variables 6-85
T(00)-T(15) Torque command variable 6-97
ACC(0),(1) Acceleration time 6-70
DEC(0),(1) Deceleration time -
U(00)-U(15) User variables 6-102
Variables - only for monitor
Name Short Description Ref. Page
MODE Control mode 6-84
HPOS Home position 6-74
NFB Actual speed 6-86
NRF Speed command 6-88
IFB Current feedback (d-02) 6-75
IRF Torque current instruction (d-03) 6-77
TRF Torque command 6-101
TFB Torque output 6-98
INP Positioning completion 6-76
SZD Zero speed detection 6-96
ERR(0)-ERR(3) Trip factor code (d-11, 12) 6-73
125. Statements of Programmable Function
Sequential Functions (3)
Variables - for adjust control system
Name Short Description Ref. Page
PBIAS Position command bias for sync operation 6-91
PFILT Position command filter (Fd-36) 6-92
KPF Position control feed forward gain (Fd-10) 6-81
POS Current position (d-08) 6-93
KP Position control response frequency (Fd-09) 6-80
SCV S-shaped curve ratio (Fb-30) 6-94
SFILT Speed command filter (Fd-20) 6-95
ACCEL Setup variable of acceleration time (Fb-04) 6-71
DECEL Setup variable of deceleration time (Fb-05) 6-72
NLM(0)-NLM(1) Speed limit variables (Fb-21, 22) 6-87
J Inertia moment (Fd-00) 6-78
KFC Speed response frequency (Fd-01) 6-79
KSP Speed control proportional gain (Fd-02) 6-83
KSI Speed control integral gain (Fd-03) 6-82
TFILT Torque command filter (Fd-06) 6-99
TLM(0)-TLM(3) Torque limit variable (Fd-07, 08, 09, 10) 6-100
135. Statements of Programmable Function
Sequential Functions (4)
Operators
Format Operation outline
ltVariable 1gt ltVariable 2gt ltVariable 3gt ltVariable 1gt ltVariable 2gt ? ltVariable 3gt ltVariable 1gt ltVariable 2gt ltVariable 3gt ltVariable 1gt ltVariable 2gt / ltVariable 3gt ltVariable 1gt ltVariable 2gt ltVariable 1gt ltVariable 2gt mod ltVariable 3gt ltVariable 1gt ltVariable 2gt or ltVariable 3gt ltVariable 1gt ltVariable 2gt and ltVariable 3gt ltVariable 1gt ltVariable 2gt xor ltVariable 3gt ltVariable 1gt not ltVariable 2gt ltVariable 1gt abs ltVariable 2gt Addition Subtraction Multiplication Division Assignment Modulus OR logical infix operation AND logical infix operation XOR logical infix operation NOT unary operation Absolute value operation
Conditions
Format Operation outline
ltVariable 1gt ltVariable 2gt ltVariable 1gt lt ltVariable 2gt ltVariable 1gt lt ltVariable 2gt ltVariable 1gt gt ltVariable 2gt ltVariable 1gt gt ltVariable 2gt ltVariable 1gt lt gt ltVariable 2gt True when the variables are equal. True when variable 1 is smaller than variable 2. True when variable 1 is smaller than or equal to variable 2. True when variable 1 is greater than variable 2. True when variable 1 is greater than or equal to variable 2. True when the variables are not equal.
146. Remarks
Best solution for Simple Applications
More Flexibility
- Read input Change motion
Simple HMI Auto gain selection
- Calculate commands by itself
Feeder Simple Indexer
157. Sample program (1)
Connection
Case Description
- Detect Limit Switch as Home Position - Wait
X(00)1, then positioning at P(01) - Wait
X(00)0, then positioning at P(00) - Wait
X(00)1(same)
167. Sample program (1)
Code Window
Line Label Mnemonic Parm1 Parm2 Parm3 Parm4 Parm5 Parm6
001 entry
002 ort 1 N(00) ACC(0) DEC(0)
003 LOOP wait X(00) 1
004 mov P(01) N(00) ACC(0) DEC(0)
005 wait X(00) 0
006 mov P(00) N(01) ACC(0) DEC(0)
007 goto LOOP
008 end
009
Timing Diagram
177. Sample program (2)
Connection
Case Description
- Read Value from Rotary Switch when X(04)1 -
Send Value to PC - Wait X(04)0 - Read (same)
187. Sample program (2)
Code Window
Line Label Mnemonic Parm1 Parm2 Parm3 Parm4 Parm5 Parm6
001 entry
002 open com
003 LOOP wait X(04) 1
004 U(00) Xw and 15
005 Print 2 U(00)
006 wait X(04) 0
007 goto LOOP
008 end
009
TX Data
BCC HEX value of X(03)0, X(02)0, X(01)0,
X(00)1 Masked by Xw and 15(0000
000Fh) Command of Print 2(82h)
197. Application Notes (1)
Wood Working Machine
207. Application Notes (2)
Grass Manufacturing Machine
21Preliminary
8. Enhance Plan
Feb.2004