In this code, the case should go on false most of the time.
When the DI from the FP-330 CHANGES, one extra line is added to the log-file. I told you about that in my first reply.
And if there is something wrong in my code, it is the intention of these kind of fora to exchange ideas, not given somebody else a pre-cooked solution. In that way one gaines more knowledge, which should be the overall purpose of this forum.
If you want a tested vi, you can hire me.