SetCamTable

Sets a cam table by setting the connections to a relevant table.

Syntax

KsCommandStatus SetCamTable(
     int Index,
     McCamTable Table,
     double* MasterPositions,
     double* SlavePositions,
     double* PointParameters
);

Parameters

Index [in]: the index of a cam table. Indexes are zero based. Aliases affect this parameter.

Table [in]: defines the cam table. See the McCamTable structure.

MasterPositions [in]: the array that stores the master positions in the cam table.

SlavePositions [in]: the array that stores the slave positions in the cam table.

PointParameters [in]: the additional parameter for the table points, depends on the interpolation type.

Linear interpolation: null.

Poly5 interpolation: it has four point types. "!=" means "not equal to."

Return value

Returns the KsCommandStatus structure.

Remarks

Example

BOOL DefineCamTable(INT Index) {
   McCamTable Table = { 0 };
   Table.MasterAbsolute = MASTER_ABSOLUTE;
   Table.SlaveAbsolute = SLAVE_ABSOLUTE;
   Table.Periodic = PERIODIC;
   Table.InterpolationType = INTERPOLATION_TYPE;
   Table.Length = TABLE_LENGTH;
   double MasterPositions[TABLE_LENGTH] = MASTER_POSITIONS;
   double SlavePositions[TABLE_LENGTH] = SLAVE_POSITIONS;
   double PointParameters[TABLE_LENGTH] = POINT_PARAMETERS;
   KsCommandStatus cam = WaitForCommand(5, FALSE, SetCamTable(Index, Table,
	 MasterPositions, SlavePositions, PointParameters));
   return TRUE;
}

Requirements

  RT Win32
Minimum supported version 4.0 4.0
Header ksmotion.h ksmotion.h
Library KsApi_Rtss.lib KsApi.lib

See also

SetAxisCam