MC_CamInfo

MC_CamInfo 1:

The MC_CamInfo function block obtains data relating to the current state and current parameterization of a cam plate coupling. The command assumes that the slave axis is coupled by a cam plate. If the AtMasterPosition input is TRUE the state is determined with reference to the quoted master position instead of the current state. The data obtained is placed into the CamInfo data structure.

Notice

If the coupled group of axes gets into an error situation (e.g. emergency off), the function block will return the most recent valid state of the coupling. The function block must be called before decoupling the slave. The data that has been obtained can be used to restore the coupling to the original axis position.

Inputs


VAR_INPUT
    Execute     : BOOL;
    AtMasterPosition    : BOOL;
    MasterPosition : LREAL;
END_VAR

Execute

The command is executed with rising edge.

AtMasterPosition

If AtMasterPosition is TRUE the data is determined with reference to the quoted MasterPosition. Otherwise the data refers to the current master position.

MasterPosition

Master position to which the data that is determined refers. This input parameter is not necessary if AtMasterPosition is FALSE.

Outputs


VAR_OUTPUT
    Done:    BOOL;
    Busy:    BOOL;
    Error:   BOOL;
    ErrorID: UDINT;
    CamInfo: MC_CamInfoData;
END_VAR

Done

Becomes TRUE when the function has been successfully executed.

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.

Error

Becomes TRUE, as soon as an error occurs.

ErrorID

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

CamInfo

The CamInfo data structure contains all the data determined about the cam plate coupling.

Inputs/outputs

VAR_IN_OUT
   Slave                : AXIS_REF;
END_VAR

Slave

Axis data structure of the Slave.

The axis data structure of type AXIS_REF addresses an axis uniquely within the system. Among other parameters it contains the current axis status, including position, velocity or error status.