Danfoss VLT5000 SyncPos Operating Instructions Manual page 121

Motion controller for danfoss vlt5000 series; danfoss vlt 5000flux series
Table of Contents

Advertisement

■ ■ ■ ■ ■ IPOS
Summary
Queries last index or marker position of the slave.
Syntax
res = IPOS
Return value
res = last slave position (index or marker) absolute
to actual zero point.
The position input is made in user units (UU) and
corresponds in the standard setting (parameter
POSFACT_Z (23) and POSFACT_N (26) = 1) to the
number of quadcounts.
Description
The command IPOS returns the last index or marker
position of the slave absolute to the current zero
point.
NB!
If a temporary zero point, set and activated
via SET ORIGIN, exists, then the position is
respective to this zero point.
The configuration of IPOS, that is whether the slave
index- or marker position (= controlled drive) is
returned, is done via the parameter SYNCMTYPS.
NB!
The trigger signal for the marker position has
to be connected mandatory to the input 2.
The position value in IPOS is accurate to +/- 1qc. In
opposite to the position information in APOS, which
is just updated in a controller cycle of typically
1 ms, the actual position value is hardware stored in
real time a buffer (in an internal processor register),
when the configured signal is high. Then it will be
copied in the system variable IPOS.
If simultaneously to the marker position an interrupt
is initiated (ON INT 2 GOSUB ...) and within this
interrupt it is operated with IPOS, you should use
before IPOS reading a delay of 2 milliseconds
(DELAY 2) within the interrupt subroutine. So it can
be ensured, that the latched position value is already
complete copied in the system variable IPOS and
that not be taken an old value.
See also sample.
Command group
I/O
Cross Index
CPOS, DEF ORIGIN, SET ORIGIN, POSA, POSR,
MIPOS
Parameter: POSFACT_Z (23), POSFACT_N (26)
120
Programmable SyncPos motion controller
Syntax-Example
PRINT IPOS
/* queries last index position and display on PC */
Sample
// Definition interrupt handler
ON INT 2 GOSUB slave_int
// Define IPOS latching on positive edge at input 2
SET SYNCMTYPS 2
// Start moving
CVEL 10
CSTART x(1)
// Endless-Loop
mainloop:
// ...
GOTO mainloop
SUBMAINPROG
SUBPROG slave_int
// Latching APOS for testing,
// how exact it would be ...
int_pos = APOS
// Wait 2 milliseconds, to be sure,
// that IPOS is correct updated
DELAY 2
// Latching IPOS for a later handling etc.
triggered_pos = IPOS
// ....
// ...
PRINT "Interrupt position: ",int_pos
PRINT "Triggered position: ",triggered_pos
RETURN
ENDPROG
MG. 1 0.J8.02 – VLT is a registered Danfoss trade mark

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents