:IDX=0 :RESET=1 b="\n" o=" Ore" c=" Crystal" k=100 s=" kV" v1=0 v2=0 s1="Scan." s2="Scan.." a="Analyzing" r="Result"+b :SCN=r+scn goto3+:Scanner :SCAN=1 :SCN=s1+b+scn goto5*:SCANNER if:RSLT<2 then:SCN=s2+b+scn goto4end :SCN=a :IDX=0 i=0 i++ goto6+(i>3) //wait loop for full volumes v1=:VOL v=(v1+0.05)/k*k m=:Mat l1=m-o-c+b+v+s :IDX=1 goto8+(:Mat!=m)+(3*(:SCANNER<1)) //IndexWait v2=:VOL v=(v2+0.05)/k*k l2=b+:Mat-o-c+b+v+s t=v1+v2 scn=l1+l2+b+b+t+s :Scanner=0 v1=0 v2=0 :IDX=0 goto1 t=v1+v2 scn=l1+l2+b+b+t+s :Scanner=0 goto1 scn="Cancelled"+b+l1 goto1 //Scanner Field Names //Field 1(andButton): Scanner //Field 2: Idx //Field 3: Rslt //Field 4: Mat //Field 5: Vol //Field 6: Scan //Field 7: Reset stacks s=" stks" V1=:Vol/1728 V2=:Vol/1728