~nwf6 ~V1 KEY INPUT ~V2 MAIN CASE ~V3 final feed cuttoff ~V4 fast feed cut off ~V5 current adjusted feed (feed-preact) ~V6 current preact ~V7 current fast cut off (feed - fast feed) ~V8 SCRATCH ~V9 zero range tolerance ~V10 zero tol. delay ~V11 auto tare enable ~V12 auto print enable ~V13 spare ~V14 start delay ~V15 discharge delay ~V16 cut off type 0=cascade 1=sequencial ~V17 discharge zero tolerance ~V18 return password status ~V19 delay after cut off ~V20 RETURN START STATUS ~V21 fill Count ~V22 EDIT DECIMAL ~V23 discharge enable ~V50 Preact ready ~V51 Preact size ~V52 Preact adjust ~V53 Preact pointer ~V54-V64 Preact queue ~V65 scrap ~V66 scrap ~V67 accumulator ENABLE ~V68 ACCUMULATOR ~V69 MOTION TOLERANCE ~V70 ready for resume ~ ~OUT 5 FAST FEED ~OUT 6 FINAL FEED ~OUT 7 DISCHARGE ~OUT 8 spare ~OUT 10 SPARE ~OUT 20 spare ~OUT 40 SPARE ~OUT 80 spare ~ ~IN 1 START ~IN 2 STOP ~IN 3 spare ~ ~ D10. V70=0 m=V69 iV22 > 3 { V22=0 } V16=0 V2=0 ~init case V1=0 ~init key input f1=0 ~background cut offs disabled f2=0 iV53>63 { V53=54 ~init preact pointer if out of range } L5 ~lock enter key D11. f1=0 f2=0 U1 U2 U4 iV70=0 { iV67=1 { P1@"(READY)CNT "V21.0.5" ACC"V68.V22.9@ } e { P1@"(READY)CNT "V21.0.5@ } } e { P1@"START=RESUME F4=ABORT"@ } V1=K ~read keypad to variable 1 CV1 ~go to case assigned by variable 1 [ c0. x2. b c4. V70=0 b c6. x19. iV18=1 { U7 ~unlock keypad } b c7. x20. b c8. x18. b c9. x19. iV18=1 { x9. } b ] iI2=1 ~stop off { O00000000 ~all off but ... iI1=0 ~if start input 0 & stop=1 start { L7 iV70=0 { ~start V2=0 G15. ~start the fill } e { ~resume x21. } G15. } } e { O00000000 ~insure all off- STOPPED } G11. D15. iI2=0 { V70=1 G11. ~CHECK FOR STOP } CV2 [ c0. P1@"START DELAY"@ w1=V14 x1. b c1. iw1=0 ~waiting for start delay { x1. } b c2. iV11=1 { iW10 { P1@"WAITING FOR STABLE WEIGHT"@ (V65=S&2) iV65=2 { V65=W0 iV65<0 { (V65=V65 * -1) } iV12=1 ~auto print if enabled { P4@V65.V22.8"\r\n"@ } iV67=1 ~accumulator enabled { (V68=V68+V65) } x16. x1. } } e { x16. ~preact x1. } } b c12. iV23=1 { P1@"WAITING FOR ZERO"@ OX1XXXXXX iW1>V17 { } e { x1. } } e { (V2=V2+3) } b c13. w1=V15 P1@"DISCHARGE DELAY"@ x1. b c14. iw1=0 { OX0XXXXXX x1. } b c15. (V21++) ~increment count V70=0 G11. ~ALL DONE b ] G15. E ~ ~ Begin subroutines D1. (V2++) ~increment state counter E D2. x3. P1@"ENTER SLOW FEED CUT OFF"@V3=kV22.8 ~get feed cut off x14. P1@"ENTER FAST FEED CUT OFF"@V4=kV22.8 ~get feed cut off x14. P1@"ENTER PREACT"@V6=kV22.8 ~get preact x14. (V5=V3-V6) ~calculate adjusted feed cut off (V7=V5-V4) ~calculate adjusted fast feed cut off x4. V50=0 ~INIT PREACT V53=54 E D3. P0@" "@ ~blank big display P1@" "@ ~blank disp 1 E D4. P1@" "@ ~blank all text P0@"\0"@P1@" "@ ~release big display E D5.TE D6. (V8=S&512) ~tare in process to variable 7 iV8=512{} ~if tare in process (do nothing) e{x1.} E D7. ~tare within zero tolerances ? iw3=0 { ~stable delay satisfied? V8=W0 iV8 < 0 { (V8=V8 * -1) ~abs wt for range compare } iV90 ~preact enbled { V65=W0 iV65<0 { (V65=V65*-1) ~MAKE SURE ERROR IS POSITIVE } (V66=V65-V3) VV53=V66 ~save cut off error (V53++) ~inc. save pointer (V8=V53-54) ~remove begginning preact offset iV8