FUNCTION_BLOCK SMC_GetTrackingError
This function block may be employed to measure the current and maximum lag error compensating the dead time, which can arise from the communication via a field bus and will be given in number of cycles (byDeadTimeCycles). Similar to SMC_GetMaxSetVelocity a time stamp (dwTimeStamp) can be used to measure the time at the maximum.
InOut:
Scope |
Name |
Type |
Initial |
Comment |
Inout |
Axis |
|||
Input |
bEnable |
BOOL |
FALSE |
TRUE: Starts execution of the function block. |
byDeadTimeCycles |
BYTE |
2 |
Number of dead time cycles |
|
dwTimeStamp |
DWORD |
Optional time stamp input; can be used to find out when the maximum occured. |
||
Output |
bValid |
BOOL |
TRUE: Parameter is available. |
|
bBusy |
BOOL |
TRUE: Execution of function block has not been finished yet. |
||
fActTrackingError |
LREAL |
0 |
Current lag error |
|
fMaxTrackingError |
LREAL |
0 |
Maximum lag error |
|
dwTimeAtMax |
DWORD |
0 |
Maximum value of dwTimeStamp |