NOVA electronics Inc.
MCX514 -
94
-
94
-
■
Example 2 Outputs designated drive pulses to X axis every 1msec.
Relative position driving (20kpps
×
10 pulses of the constant speed drive) starts every 1msec. This is performed by the function of
a synchronous action.
1. 000
ms
Drive Pulse
1. 000
ms
1. 000
ms
Fig. 2.9-5 Example 2: Timer Operation
【
Program Example
】
// Drive setting (constant speed driving at 1000 PPS)
WR6
←
1200h Write
// Initial speed 8M PPS (maximum in specification)
WR7
←
007Ah Write
WR0
←
0104h Write
WR6
←
4E20h Write
// Drive speed 20K PPS
WR7
←
0000h Write
WR0
←
0105h Write
WR6
←
000Ah Write
// Drive pulse number 10
WR7
←
0000h Write
WR0
←
0106h Write
WR6
←
0000h Write
// Logical position counter 0
WR7
←
0000h Write
WR0
←
0109h Write
// Timer setting
// Repeat timer
WR0
←
011Fh Write
// Select X axis
WR3
←
4000h Write
// D14
1
TMMD
:
Timer operation Repeat
// Timer value setting
WR6
←
03E8h Write
// Timer value 1000
μ
sec
WR7
←
0000h Write
WR0
←
0116h Write
// Synchronous action setting
// Synchronous action SYNC0 setting
WR6
←
0153h Write
// D3
~
D0 0011
PREV3
~
0
:
Activation factor Starts driving
// D8
~
D4 10101
ACT4
~
0
:
Action Timer-start
// D15 0
REP
:
Repeating action Disabled
WR0
←
0126h Write
// Synchronous action SYNC1 setting
WR6
←
80A2h Write
// D3
~
D0 0010
PREV3
~
0
:
Activation factor Timer is up
// D8
~
D4 01010
ACT4
~
0
:
Action Starts driving
// D15 1
REP
:
Repeating action Enabled
WR0
←
0127h Write
// SYNC1
~
0 Enable
WR0
←
0183h Write
// Start driving
WR0
←
0150h Write
// Starts relative position driving
・
・
・
// Timer-stop
WR0
←
0174h Write
// Timer-stop
// Disable synchronous action SYNC1
WR0
←
0192h Write
// Disables synchronous action SYNC1