CMP#.MODVAL1, CMP#.MODVAL2
Description
CMP#.MODVAL1 and CMP#.MODVAL2 set the limits of the compare channel modulo bound. The range of values included in and excluded from the modulo function output depends on which of CMP#.MODVAL1 and CMP#.MODVAL2 is greater.
|
Order |
Included range |
Excluded range |
|---|---|---|
|
MODVAL1 < MODVAL2 |
[MODVAL1, MODVAL2] |
[min, MODVAL1) + (MODVAL2, max] |
|
MODVAL1 = MODVAL2 |
Invalid |
|
|
MODVAL1 > MODVAL2 |
[MODVAL1, max] + [min, MODVAL2] |
(MODVAL2, MODVAL1) |
Scaling for CMP#.MODVAL1 and CMP#.MODVAL2 depends on CMP#.SOURCE.
Examples
Usage
Consider an application where we wish to restrict compare channel 1 operation to one revolution, -180 deg to 180 deg. Assuming CMP#.SOURCE is set to a source whose units are deg, we set CMP1.MODVAL1 to -180 and CMP2.MODVAL2 to 180.
Code
The following commands set the modulo range for channel 1 to -180 deg to 180 deg, as described above.
--> CMP1.MODVAL1 -180
--> CMP1.MODVAL2 180
Context
For more information please refer to Compare.
Versions
| Action | Version | Notes |
|---|---|---|
| Implemented | 02-06-00-000 |
General Information
|
Type |
Read/Write |
|
Units |
Depends upon CMP#.SOURCE |
|
Range |
Full position range |
|
Default Value |
0 |
|
Data Type |
Float |
|
See Also |
|
|
Stored in Non Volatile Memory |
Yes |
Variants Supported
All variants are supported.





