Everyone encounters this type of problem from time to time. Rest assured that the PLC is executing the code properly. You can troubleshoot by placing an Increment function with an unused MI at strategic places on the suspect rungs. Here is how I would go about it:
First, perform a search to make sure MB 12 & MB 33 are not being used elsewhere by mistake.
Second, confirm the subroutine is being called by the Main Routine.
Third, place an increment function just after your MB 33 Set coil.
Fourth, place another increment function (different MI) at the end of your logic thread with the MODBUS FB.
Then download and go online and watch what happens.
I have one more question. You addressed how MB 33 was being Reset. How about MB 12?