NOVA electronics Inc.
MCX514 -
93
-
93
-
2.9.7 Examples of Timer
■
Example 1 Driving starts after 17.35msec when X axis driving is finished.
When relative position driving is finished, it again starts the same relative position driving after 17.35msec. This is performed by
the function of a synchronous action.
V
Time
V
Time
Timer
Termination of driving
Start of driving
After 17.35 msecs
Fig. 2.9-4 Example 1: Timer Operation
【
Program Example
】
// Acceleration / deceleration driving setting
WR6
←
0190h Write
// Initial speed 400 PPS
WR7
←
0000h Write
WR0
←
0104h Write
WR6
←
9C40h Write
// Drive speed 40K PPS
WR7
←
0000h Write
WR0
←
0105h Write
WR6
←
E848h Write
// Acceleration 125K PPS/SEC
WR7
←
0001h Write
WR0
←
0102h Write
WR6
←
9C40h Write
// Drive pulse number 40000
WR7
←
0000h Write
WR0
←
0106h Write
// Timer setting
// Single timer
WR0
←
011Fh Write
// Select X axis
WR3
←
0000h Write
// D14
0
TMMD
:
Timer operation Once
// Timer value setting
WR6
←
43C6h Write
// Timer value 17350
μ
sec
WR7
←
0000h Write
WR0
←
0116h Write
// Synchronous action setting
// Synchronous action SYNC0 setting
WR6
←
0156h Write
// D3
~
D0 0110
PREV3
~
0
:
Activation factor Stops driving
// D8
~
D4 10101
ACT4
~
0
:
Action Timer-start
WR0
←
0126h Write
// Synchronous action SYNC1 setting
WR6
←
00A2h Write
// D3
~
D0 0010
PREV3
~
0
:
Activation factor Timer is up
// D8
~
D4 01010
ACT4
~
0
:
Action Starts relative position driving
WR0
←
0127h Write
// SYNC1
~
0 Enable
WR0
←
0183h Write
// Start driving
WR0
←
0150h Write
// Starts relative position driving