SMC_GetCamSlaveSetPosition (FB)ΒΆ
FUNCTION_BLOCK SMC_GetCamSlaveSetPosition
This function block calculates the current target position of an axis (slave) in the case the axis is coupled via a cam to the motion of another axis (Master). The slave is not moved or otherwise affected.
The module can be used to determine the start position, velocity, and acceleration of a slave that is coupled to a master axis via a cam table.
Due to the fact that the corresponding value is calculated within
one cycle, the output Done
is not necessary.
Note
This FB can only be called once to determine the start conditions that the slave must have in order to avoid ramping in. It cannot be used cyclically to read the current slave values.
- InOut:
Scope
Name
Type
Initial
Comment
Inout
Master
Reference to master axis
Slave
Reference to slave axis
Input
Enable
BOOL
TRUE
: Starts the execution of the function block.MasterOffset
LREAL
Offset of master table
SlaveOffset
LREAL
Offset of slave table
MasterScaling
LREAL
1
Scaling factor for master profile
SlaveScaling
LREAL
1
Scaling factor for slave profile
CamTableID
Identifier of cam table, output of MC_CamTableSelect
Output
fStartPosition
LREAL
Slave position according to cam and current master position.
fStartVelocity
LREAL
Slave velocity according to cam and current master position.
fStartAcceleration
LREAL
Slave acceleration according to cam and current master position.
Busy
BOOL
TRUE
: Execution of function block has not been finished yet.Error
BOOL
TRUE
: Error has occurred within the function block.ErrorID
SMC_ERROR
Error identification