![Nova Electronics MCX514 Скачать руководство пользователя страница 86](http://html1.mh-extra.com/html/nova-electronics/mcx514/mcx514_user-manual_1710400086.webp)
NOVA electronics Inc. MCX514 -
73
-
73
-
■
Example 2
When an external signal is input during the driving in X axis, save the position data.
External signal is input
Save the current position of the axis to the register
MR0 register
-562,490
Activation Factor
Action
Driving start
Fig. 2.6-8 Example 2: 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
←
03E8hWrite
// Drive speed 1000 PPS
WR7
←
0000h Write
WR0
←
0105h Write
WR6
←
0000h Write
// Logical position counter 0
WR7
←
0000h Write
WR0
←
0109h Write
// PIO signal setting 1
WR6
←
0000h Write
// D1,D0 00
P0M1,0
:
PIO0 signal General purpose
・
Synchronous input
WR0
←
0121h Write
// Interrupt setting
WR0
←
011Fh Write
// Select X axis
WR1
←
1000h Write
// D12
1
SYNC0
:
When synchronous action SYNC0 is activated
// Synchronous action setting
// Synchronous action SYNC0 setting
WR6
←
005Ah Write
// D3
~
D0 1010
PREV3
~
0
:
Activation factor XPIOm input
↑
// D8
~
D4 00101
ACT4
~
0
:
Action Save LP
→
MRm
WR0
←
0126h Write
// SYNC0 Enable
WR0
←
0181h Write
// Start driving
WR0
←
0152h Write
// Starts
+
direction continuous pulse driving
SYNC0 is activated and interrupt occurs
// Read logical position counter value saved in MR0
WR0
←
0134h Write
RR6
→
Read
RR7
→
Read
From chapter 2.6.7, a delay from the occurrence of an activation factor is from 0 (minimum) to 1CLK (maximum) and a delay up
to the action is 1CLK, so the delay time of this synchronous action is from a minimum of 1CLK (62.5nsec) up to 2CLK (125nsec).