Open loop motion control
12.6 Subroutines created by the Motion wizard for the Axis of Motion
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
633
12.6.12
AXISx_CACHE subroutine
Table 12- 26 AXISx_CACHE
LAD / FBD
STL
Description
CALL AXISx_CACHE,
START, Profile,
Done, Error
The AXISx_CACHE subroutine (Cache Profile) commands a caching of
a motion profile before the profile is executed. This allows you to pre-
cache needed commands before execution. Pre-caching reduces the
amount of time and provides consistency between executing a motion
instruction and starting the move.
Table 12- 27 Parameters for the AXISx_CACHE subroutine
Inputs/Outputs
Data type
Operands
START
BOOL
I, Q, V, M, SM, S, T, C, L, Power Flow
Profile
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *AC, *LD, Con-
stant
Abort, Done
BOOL
I, Q, V, M, SM, S, T, C, L
Error, C_Profile, C_Step BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *AC, *LD
C_Pos, C_Speed
DINT, REAL ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *AC, *LD
Turn on the EN bit to enable the subroutine. Ensure that the EN bit stays on until the Done
bit signals that the execution of the subroutine has completed.
Turn on the START parameter to send a CACHE command to the Axis of Motion. For each
scan when the START parameter is on and the Axis of Motion is not currently busy, the
subroutine sends a CACHE command to the Axis of Motion. To ensure that only one
command is sent, use an edge detection element to pulse the START parameter on.
The Profile parameter contains the number or the symbolic name for the motion profile. The
"Profile" input must be between 0 - 31. If not, the subroutine will return an error.
The Done parameter turns on when the Axis of Motion completes this subroutine.
The Error parameter (Page 659) contains the result of this subroutine.