■ ■ ■ ■ ■ MI POS
Summary
Query last index or marker position of the master
Syntax
res = MIPOS
Return value
res = last index or marker position of the master
absolute to actual zero point in qc
Description
The command MIPOS returns the last index or
marker position of the master absolute to the current
zero point.
The configuration of MIPOS, that is whether master-
encoders index- or marker position (= controlled
drive) is returned, is done with the parameter
SYNCMTYPM.
NB!
The trigger signal for the marker position has
to be connected mandatory to the input 1.
The position value in MIPOS is accurate to +/- 1qc.
In opposite to the position information in MAPOS,
which is just updated in a controller cycle of typi-
cally 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 MIPOS.
If simultaneously to the marker position an interrupt
is initiated (ON INT 1 GOSUB ...) and within this inter-
rupt it is operated with MIPOS, you should use be-
fore reading of MIPOS 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 MIPOS and
that not be taken an old value.
See also sample.
Command group
I/O
Cross Index
CPOS, DEF ORIGIN, SET ORIGIN, POSA, POSR,
SYNCMTYPM
Parameter: POSFACT_N (26), POSFACT_Z (23)
Syntax-Example
PRINT MIPOS
/* Print to the PC the last index position of the
master */
124
Programmable SyncPos motion controller
Sample
// Definition Interrupt-Handler
ON INT 1 GOSUB master_int
// Definition of IPOS-Latching on positive edge
// at input 1
SET SYNCMTYPM 2
// Start moving
CVEL 10
CSTART x(1)
// Endless-Loop
mainloop:
// ...
GOTO mainloop
SUBMAINPROG
SUBPROG master_int
// Latching MAPOS for testing,
// how exact it would be ...
int_mpos = MAPOS
// Wait 2 milliseconds, to be sure,
// that MIPOS is correct updated
DELAY 2
// Latching IPOS for a later handling etc.
triggered_mpos = MIPOS
// ....
// ...
PRINT "Interrupt master position: ",int_mpos
PRINT "Triggered master position:
",triggered_mpos
RETURN
ENDPROG
MG. 1 0.J8.02 – VLT is a registered Danfoss trade mark
Need help?
Do you have a question about the VLT5000 SyncPos and is the answer not in the manual?
Questions and answers