Here is my program.
In the Main Program, it sets a bunch of things to 0 at the start. It starts the Program for the adjustable offset between the axis. Then it goes to Stage 0. This calls two programs. These are for each axis. The Programs Configure the axis, then it checks to see if the axis is already in the home position. If the axis is home, it sets the current position to 0 and proceeds to exit. If not, it jogs the axis to the home position and moves to the next portion.
There is a little difference in travel between my two axis. The Carriage has a lot more travel (before hitting physical stops) than the Stacker does. I set the prox switches on the physical limits. After going home, the Carriage needs to move in order to align itself with the Stacker. This moves a number of pulses to get aligned. Then the program exits. When the programs both complete, the Main program moves to $Main.S1, where the "RUN" portion of the program is located. This looks at an analog ultrasonic sensor (looking at very clear thin film, often as thin as .00001"). It takes that input, and guides with the film as it moves. It compares the output to the setpoint, and then runs both axis together to keep the carriage and stacker aligned with the edge of the film. If the machine is ever estopped, it jumps back to $Main.S0 which will realign the axis before allowing it to run.