Plc Library stAxesList : List of the Axis Ids for the Axis Coordinate System and the Machine Coordinate System stKinRefIn : Structure of the cyclic channel interface from the Kinematic Channel to the PLC. This structure is only accessed for reading. Return value UDINT : Error code. This function is valid from version 6 of the cyclic interface. If the version is correct 0 is returned, otherwise an error code. Example VAR stAxesList : ST_KinAxes; stKinRefIn AT %I* : NciChannelToPlc; nErrId : UDINT; END_VAR nErrId := F_GetAcsMcsAxisIds(stAxesList, stKinRefIn); IF nErrId=0 THEN ;(*Axes List is valid*) END_IF Requirements This function is valid from version 6 of the cyclic interface.
If the version is lower KinStatus_InvalidItfVersion (see E_KINSTATUS [ } 37] ) is returned. 5.3 Datatypes 5.3.1 ST_KinAxes This structure defines the axes, which constitute a kinematics. TYPE ST_KinAxes : STRUCT nAxisIdsMcs: ARRAY[1..8] OF DWORD; nAxisIdsAcs: ARRAY[1..8] OF DWORD; END_STRUCT END_TYPE nAxisIdsMcs : List of the Axis Ids of the Axes constituting the Machine Coordinate System. Normally the first three array elements contain the Cartesian axes (X,Y,Z), the following array elements contain rotation axes. nAxisIdsAcs : List of the Axis Ids of the Axes constituting the Axis Coordinate System Example VAR stAxesConfig : ST_KinAxes; io_X : AXIS_REF; io_Y : AXIS_REF; io_Z :
AXIS_REF; io_M1 : AXIS_REF; io_M2 : AXIS_REF; io_M3 : AXIS_REF; END_VAR (* read the IDs from the cyclic axis interface so the axes can mapped later to the kinematic group *) stAxesConfig.nAxisIdsAcs[1] := io_M1.NcToPlc.AxisId; stAxesConfig.nAxisIdsAcs[2] := io_M2.NcToPlc.AxisId; stAxesConfig.nAxisIdsAcs[3] := io_M3.NcToPlc.AxisId; stAxesConfig.nAxisIdsMcs[1] := io_X.NcToPlc.AxisId; stAxesConfig.nAxisIdsMcs[2] := io_Y.NcToPlc.AxisId; stAxesConfig.nAxisIdsMcs[3] := io_Z.NcToPlc.AxisId; TS511x 36 Version: 1.0