The PDAT, LDAT, and FDAT variables, followed by calling BAS correctly (the call changes between LIN and PTP moves) will set the active accel, approximation, Tool/Base, and speed (also changes between LIN and PTP).
Or, you can write directly to $TOOL, $BASE, etc. BAS.SRC is open, you can learn much from examining it.
Once those parameters have been set, they do not change until a command is executed that changes them. Every ILF motion, for example, includes commands to do that. But a series of hand-programmed motions like
will not change the parameters, so you could just set them once at the beginning.