Download Print this page

Danfoss MCO 305 Design Manual page 125

Hide thumbs Also See for MCO 305:

Advertisement

MCO 305 Design Guide
MIPOS
Summary
Syntax
Return Value
Description
Command Group
Cross Index
Syntax Example
Sample
__ Software Reference __
Query last index or marker position of the master
res = MIPOS
res = last index or marker position of the master absolute to actual zero point in qc
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 posi-
tion (= controlled drive) is returned, is done with the par. 33-19 Master Marker Type.
NB!:
The trigger signal for the marker position has to be connected mandatory to the
input 5.
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 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 MIPOS.
If simultaneously to the marker position an interrupt is initiated (ON INT 5 GOSUB
...) and within this interrupt it is operated with MIPOS, you should use before 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.
NB!:
The command MIPOS can not be used:
– with absolute encoders (see par. 32-30 Incremental Signal Type)
– when Parameter 32-50 is set to [3] – Motor Control.
I/O
CPOS, DEF ORIGIN, SET ORIGIN, POSA, POSR, ON INT
Parameters: 32-12 User Unit Numerator, 32-11 User Unit Denominator, 33-19
Master Marker Type
PRINT MIPOS
/* print to the PC the last index position of the master */
// Definition Interrupt-Handler
ON INT 5 GOSUB master_int
// Definition of IPOS-Latching on positive edge at input 5
SET SYNCMTYPM 2
CVEL 10
CSTART
mainloop:
GOTO mainloop
SUBMAINPROG
SUBPROG master_int
int_mpos = MAPOS
// Latching MAPOS for testing, how exact it would be ...
DELAY 2
// Wait 2 ms, to be sure, that MIPOS is correct updated
triggered_mpos = MIPOS
// ...
// ...
PRINT "Interrupt master position: ",int_mpos
PRINT "Triggered master position: ",triggered_mpos
RETURN
ENDPROG
®
MG.33.L4.02 – VLT
is a registered Danfoss trademark
// Start moving
// Endless-Loop
// ...
// Latching IPOS for a later handling etc.
125

Advertisement

loading