28.11.2012 Views

Table of Contents - TG Drives

Table of Contents - TG Drives

Table of Contents - TG Drives

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

EXTENDED REGISTER GROUPS<br />

CAPTURE, Capture exact time <strong>of</strong> external events<br />

FUNCTION<br />

The capture uses the digital input 1 (or the Encoder reference input) as trigger<br />

source for the event. The electrical time constant for this input is much shorter<br />

when used by this function, than it is for the normal In.Di1 function. This means<br />

that the noise immunity is lower for this function.<br />

Capture.Mode<br />

Capture.Time<br />

Capture.FTime<br />

Capture.Pos<br />

Capture.RPos<br />

Capture.Speed<br />

The capture function can be set up to occur on positive,<br />

negative or both edges <strong>of</strong> the input signal. This setting is<br />

made in the Capture.Mode register and is not affected by<br />

the in.level bits.<br />

When the Capture.Enable register has been set, the first<br />

condition met will cause the HW interrupt to sample the<br />

absolute time and store this in Capture.Time.<br />

The Capture.FTime register will hold the time within the<br />

cycle for the interrupt in microseconds.<br />

The Capture.Pos and Capture.RPos will be extrapolated<br />

with that time from the real sampled values <strong>of</strong> RD1.Pos<br />

and RD1.RPos.<br />

The Capture.Speed will be the sampled value <strong>of</strong><br />

RD1.Speed.<br />

When this interrupt is serviced, the Capture.Enable will be<br />

cleared.<br />

If the Vector.CapInt is defined and the Int.SysMask bit 1 is set, the program will<br />

start to execute at the line defined.<br />

HARDWARE CHANGE<br />

The old DMC used only IN.DI1 as the high-speed input. In theDMC 2 a Encoder<br />

reference input can be used by setting capture.mode bit3.<br />

i<br />

Connector X6B has the balanced input at X6B:8 and X6B:21.<br />

THIS IS A BALANCED 5 V INPUT.<br />

The DMC 2 does not support the prescaler on the capture input that the DMC1 has.<br />

RELATED ITEMS<br />

Vector.CapInt System interrupts vector<br />

for captures event.<br />

Int.SysMask Bit mask for system interrupts.<br />

Int.SysPend Bit mask for pending events.<br />

EXAMPLE USAGE<br />

.<br />

Vector.CapInt , @Caplabl<br />

Capture.Mode,1<br />

Capture.Enable , 1<br />

or Int.SysMask , 2<br />

wait Capture.Enable = 0<br />

.<br />

.register Target<br />

Caplabl:<br />

;set up the pointer<br />

;positve edge<br />

;activate<br />

;enable the PL2 interrupt<br />

;wait for capture<br />

User's Manual 5.1 Inmotion Technologies AB<br />

Doc. No.9032 0027 01 (B), Rev. 11.07.2001<br />

119

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!