MC_ReadCamTableSlaveDynamics

MC_ReadCamTableSlaveDynamics 1:

The function block MC_ReadCamTableSlaveDynamics can be used to determine the slave dynamics at a certain point of a cam plate table. The function evaluates the raw table data. Any scaling of the cam plate is not taken into account.

For older cam plate table types, not all dynamic parameters can be determined. The following overview shows the expected result:

MC_TABLETYPE_MOTIONFUNCTION: slave position, velocity and acceleration are determined.

MC_TABLETYPE_EQUIDISTANT: slave position and velocity are determined. The acceleration is always 0.

MC_TABLETYPE_NONEQUIDISTANT: the slave position is determined. Velocity and acceleration are always 0.

MC_ReadCamTableSlaveDynamics 2: Inputs

VAR_INPUT
   Execute        : BOOL;
   CamTableID     : MC_CAM_ID;
   MasterPosition : LREAL;
   Options        : ST_ReadCamTableSlaveDynamicsOptions;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge at Execute input.

CamTableID

MC_CAM_ID

ID of the loaded table.

MasterPosition

LREAL

Master position within the table for which the slave dynamics is to be determined.

Options

ST_ReadCamTableSlaveDynamicsOptions

Data structure with additional options:

SynchronousAccess

Writing takes place via synchronous access without a time delay. Should only be used for applications that are extremely time-critical.

MC_ReadCamTableSlaveDynamics 3: Outputs

VAR_OUTPUT
   Done              : BOOL;
   Busy              : BOOL;
   SlavePosition     : LREAL;
   SlaveVelocity     : LREAL;
   SlaveAcceleration : LREAL;
   Error             : BOOL;
   ErrorID           : UDINT;
END_VAR

Name

Type

Description

Done

BOOL

Becomes TRUE, if the command was executed successfully.

Busy

BOOL

The Busy output becomes TRUE when the command is started with Execute and remains TRUE as long as the command is processed. If Busy becomes FALSE again, the function block is ready for a new order. At the same time one of the outputs, Done or Error, is set.

SlavePosition

LREAL

Position of the slave within the cam plate table at the specified master position.

SlaveVelocity

LREAL

Velocity of the slave within the cam plate table at the specified master position.

SlaveAcceleration

LREAL

Acceleration of the slave within the cam plate table at the specified master position.

Error

BOOL

Becomes TRUE, as soon as an error occurs.

ErrorID

UDINT

If the error output is set, this parameter supplies the error number.