https://www.youtube.com/playlist?list=PLE1CU6EebvTCJCMIUOSWgMseMaW-2k5zH
The attached file is for a video series I created on youtube that teaches structured text programming on beckoff (and other) PLCs.
The solution is the project as of Episode 11. It should run on Twincat 3.1