![Nova Electronics MCX514 Скачать руководство пользователя страница 84](http://html1.mh-extra.com/html/nova-electronics/mcx514/mcx514_user-manual_1710400084.webp)
NOVA electronics Inc. MCX514 -
71
-
71
-
2.6.6 Examples of Synchronous Action
■
Example 1 When passing through the position 15,000 during the driving in X axis, output synchronous pulses to
XPIO0.
Driving start
Axis is passing through the position 15,000
XPIO0
Output the pulse signal to the external
Activation Factor
Action
Fig. 2.6-8 Example 1: Synchronous Action
【
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
←
03E8h Write
// Drive speed 1000 PPS
WR7
←
0000h Write
WR0
←
0105h Write
WR6
←
0000h Write
// Logical position counter 0
WR7
←
0000h Write
WR0
←
0109h Write
// MR0 setting
WR6
←
3A98h Write
// MR0 15000
WR7
←
0000h Write
WR0
←
0110h Write
// Multi-purpose register mode setting
WR6
←
0000h Write
// D1,D0 00 M0T1,0
:
MR0 Comparative object
Logical position counter
// D3,D2 00 M0C1,0
:
MR0 Comparison condition
≧
WR0
←
0120h Write
// PIO signal setting 1
WR6
←
0003h Write
// D1,D0 11 P0M1,0
:
PIO0 signal
Synchronous action output
WR0
←
0121h Write
// PIO signal setting 2
WR6
←
0070h Write
// D0
0 P0L
:
PIO0 Logical level of pulse signal Positive logic
// D6
~
D4 111 PW2
~
0
:
Pulse width 1msec (at CLK = 16MHz)
WR0
←
0122h Write
// Synchronous action setting
// Synchronous action SYNC0 setting
WR6
←
0091h Write
// D3
~
D0 0001 PREV3
~
0
:
Activation factor MR0 object changed to True
// D8
~
D4 01001 ACT4
~
0
:
Action synchronous pulse output
WR0
←
0126h Write
// SYNC0 Enable
WR0
←
0181h Write
// Start driving
WR0
←
0152h Write
// Starts
+
direction continuous pulse driving