MC_CAM_REF
TYPE MC_CAM_REF :
STRUCT
pArray : UDINT;
ArraySize : UDINT;
TableType : MC_TableType;
NoOfRows : UDINT;
NoOfColumns : UDINT;
END_STRUCT
END_TYPE
The data structure MC_CAM_REF describes the data memory of a cam plate in a further PLC variable (ARRAY).
The first parameter pArray is a pointer to a data structure containing the cam plate data. The data structure depends on the table type nTableType. The number of rows is entered in the component nNoOfRows, the number of columns in nNoOfCols (usually 1 or 2).
Example 1: Position table structure description
Name | Type | Description |
---|---|---|
pArray | UDINT | Address of a two-dimensional array. The first column contains an ascending list of master positions. The second column contains the associated slave positions. The address can be assigned with the ADR function. Example: Table1 : ARRAY[0..360, 0..1] OF LREAL; pArray := ADR( Table1 ); |
ArraySize | UDINT | Storage capacity of the two-dimensional array, which can be determined with the SIZEOF function. Example: ArraySize := SIZEOF( Table1 ); |
TableType | MC_TableType | The table type is MC_TABLETYPE_EQUIDISTANT, if the master positions have the same distance or MC_TABLETYPE_NONEQUIDISTANT if the distance is variable. |
NoOfRows | UDINT | The number or rows corresponds to the number of table points. |
NoOfColumns | UDINT | The number of columns is 2. |
Example 2: Structure description of a motion function
Name | Type | Description |
---|---|---|
pArray | UDINT | Address of a one-dimensional array of type MC_MotionFunctionPoint. Each array element contains a description of a cam plate interpolation point. Example: MotionFunction : ARRAY[1..10] OF MC_MotionFunctionPoint; pArray := ADR( MotionFunction ); |
ArraySize | UDINT | Storage capacity of the one-dimensional array, which can be determined with the SIZEOF function. Example: ArraySize := SIZEOF( MotionFunction ); |
TableType | MC_TableType | The table type is MC_TABLETYPE_MOTIONFUNCTION. |
NoOfRows | UDINT | The number or rows corresponds to the number of table points. |
NoOfColumns | UDINT | The number of columns is 1. |