0021H is not listed as an Error Code, so a "User-Generated" code may be what you are seeing.
You may want to examine status words S:20 and S:21 in your routine to pinpoint the file and rung number where the fault occurred.
There you may find a SUS (Suspend) instruction, with 0021H or 33 decimal as the defined code.