Hi Jerson,
When 2 phases are connected to a 3 phase transformer; there is enough magnetic field around to induce a voltage into the non connected phase, this is why it is traditionally very hard to detect a missing phase. I discovered quite by accident that this "induced" phase would always be out of phase. This is why i turned to the pic. I simply feed the 415 volt phases into the pic via 5 meg resistance, and use my code to do the test. For this reason my code does not hang.
Using while/wend certainly looks nicer than my effort, not shure if it is more code efficient.
Code:
if rot1+rot2+rot3 & 3 then ' either 1 or 2 is not acceptable
I like the idea, but the answer 0 is also acceptable, since the incomming mains may be either fwd or reverse, it is only if the results are both fwd & rev that there is a problem.
I'm afraid that your code would not work
unless i'm missing something.
temp would just be a snapshot of which phase(s) are high at any one time, not representing the rotation (or phase relationship) of the phases. Please correct me if i'm wrong.
Thank you for having a go tho 
Bob...
Bookmarks