Hello,
Unfortunately I couldn't simulate crash you've wrote about. I've studied your script and I don't understand why do you do so complex calculations. You can create tags for every register and also bind every bit to the tag. To understand the crash reason send log file in the folder where you installed TeslaSCADA2 Runtime.
Best regards,
Ruslan