GetAxisCamInfo
Gets the cam information from an axis that is currently set as cam slave.
Syntax
KsError GetAxisCamInfo(
int Index,
BOOL* InSync,
BOOL* EndOfProfile,
int* RepetitionCount,
int* RowIndex,
double* SlaveTargetPosition,
double* MinimumSlavePosition,
double* MaximumSlavePosition
);
Parameters
Index [in]: the index of an axis that is currently a cam slave. Indexes are zero based. Aliases affect this parameter.
InSync [out]: used for camRamp. TRUE: the synchronization is completed. FALSE: the slave axis is synchronizing with the master axis. For more information about camRamp, see the McCamStartMode type.
EndOfProfile [out]: the "pulsed" output (the value becomes one) signaling the cyclic end of the cam profile. It is displayed every time the end of the cam profile is reached. In the reverse direction, the EndOfProfile is displayed also at the end of the cam profile (in this case, the first point of the cam profile).
RepetitionCount [out]: for periodic cam tables only. The repetition count is the number of time the table was repeated to reach the current master target. The plus and minus signs indicate direction. Zero means we are in the defined table range, positive values mean the master position has exceeded the last value in the table, and negative values mean the master position has not yet reached the first table value.
RowIndex [out]: the index of the row currently used in the cam table. The row is selected based on the master position. When the master position exceeds the value given for current row but has not yet reached the value given for the next row, the RowIndex is the current row. For example, RowIndex is 2 if the current master position is in between MasterPositions[2] and MasterPositions[3].
The row looks like this:
| Row | MasterPos | SlavePos |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 10 | 50 |
| 2 | 20 | 30 |
| 3 | 30 | 50 |
| 4 | 40 | 0 |
SlaveTargetPosition [out]: the target position of the slave axis calculated by the cam table. Ramps are not taken in account for this value.
MinimumSlavePosition [out]: the minimum position the slave axis will reach while following the table.
MaximumSlavePosition [out]: the maximum position the slave axis will reach while following the table.
Return value
If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.
Example
N/A
Requirements
| RT | Win32 | |
|---|---|---|
| Minimum supported version | 4.0 | 4.0 |
| Header | ksmotion.h | ksmotion.h |
| Library | KsApi_Rtss.lib | KsApi.lib |
See also