Installation guide
Mint™ v4 Advanced Programming Guide
54 MN1270 02.2002
COMPAREMODE/CMD
Purpose:
Enables and disables the position compare on an axis.
Controllers Supported:
NextMove PCI NextMove PC NextMove BX MintDrive ServoNode 51
Format:
COMPAREMODE[axes] = <expression> {,<expression>}
v = COMPAREMODE[axis]
Dot Parameters:
Axis – Axis No.
Attributes:
Controller Read Write Command Multi-
Axis
Scaled Default Range
NextMove
0
0 ≤ x ≤ 1
Description:
Setting the compare mode of an axis to 1 will enable the position compare on an axis. The position
compare will remain enabled until it is turn off by setting compare mode to zero.
Each encoder channel has a position compare output, this mapping is fixed within the hardware and is:
Encoder
Channel
Digital Output
0 0
1 1
2 2
3 3
This is similar for any expansion boards, the bottom 4 digital outputs are mapped the encoder channels
on that card. When these outputs are not under position compare control they can be used as normal
outputs. When the position compare is enabled the associated output is no longer under user control
and cannot be written to using the
OUT command. Reading the OUT keyword will not report the state of
any pin under position compare control.
Position compare functionality is only avaliable on servo axes
Example:
COMPAREPOS.0.0 = 10.5
COMPAREPOS.0.1 = 15.2
COMPAREMODE.0 = 1 : REM enable the position compare
The above code will setup both the upper and lower position compare registers for axis zero, then
enable the position compare hardware. This puts the associated output under position compare control,
from this point on the output will turn on between positions 10.5 and 15.2.
See Also:
COMPARELATCH, COMPAREPOS
COMPAREPOS/CMP
Purpose:
This function writes to the ASIC position compare registers.