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.

Inputs

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

Execute

The command is executed with rising edge.

CamTableID

Table ID.

MasterPosition

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

Outputs


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

Done

Becomes TRUE, if the command was executed successfully.

Busy

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

SlavePosition

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

SlaveVelocity

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

SlaveAcceleration

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

Error

Becomes TRUE, as soon as an error occurs.

ErrorID

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