Subject: Basic prog' to calc ohms/watts

From: altavoz <[email-masked]>
Date: Sun, 18 Aug 1996 15:33:19 -0700

Basic pgm to calc resistance, power, cir-mils in metal wires.
once entered , values need not be entered again unless you want
change them ( hitting cr many times will recalc all )

typical inputs :
W  cr		: "wire"
12   cr		: 12 gage, it now displays gage, dia, cir mils
cr		: it now prompts for "inches"
120 cr		: "   "   "        "    "   "amps"
2  cr		: displays rho for your selction . A "cr" will default to 
copper.
7E6  cr		: displays 330.3 milohms    .66 volts  1.32 watts  313 
cir-mils
______________________________________________________________
-.1		:displays gage, dia , cir mils
cr		:displays "inches"
12 * 10	cr	: input 120 inches , then displays amps
100		: displays 10.37 for copper . A cr defaults to 10.37
cr		: cr defaults to 0.0 htz
		displays 266 milohms ...oooopppps we didnt change the
		7 mhz back to zero .  s/b 10.37 milohms 1.037 volts
______________________________________________________
  zero ( 0 ) and  letter O
 :           separates multiple statements per line
;            is comments
C*3       is "C" mult by 3

4 n=0
5 set e5
6 r4=1e99
7 print"everything is in series,uf,uh
8 r=10.37
10 input "enter(serial)  Blkbox To-para-From   Ser+  Par+  Math  Coax
           Dbm  Wire";A$
25 if asc(A$)=13 goto 44
30 U=asc(A$) -64
44 cls
45 on U gosub,300,400,500,80,600,,,,,,,650,,,200,,,250,160,,,450
50 if A$ <>  " "	goto 25		; no space between  " "  
51 goto 10 
450 set f5
452 ifM$ <>  " "			;  "  "    "    "    "   "
453 N=val(N$)
455 if N > 0   goto 468
460 if N =0 goto 467		: N=zero, goto 467
461 D= -N   : C=(D*1E3)^2
462 N$=left$(str$((log( C*3.745223E-6)/(log(k))-4),7)  :  goto 473  ; 
lower case k
467 N=1-len(N$)
468 C=267006.8*k^(N+4)  :   D=1E-3 * sqr C   
473 Print "Gage= " ; N$ ; "    dia=" ; D ;
475 Print tab(0) ;  cir-mil = " ; C
477 Input "inches " , I
478 Input "Amps" , A
482 Print "Gld=14.7 Ncrm=600 Tng=33" tab(0) ; " ncl=47     constn=295" ;
         tab(0) ; "cpr=10.37   slvr=9.9    brss=39 " ; tab(0) 
483 Print "fe =71 al=17 rho=" ; R ;   :  Input R
484 if R <> 10.37 goto 493
485 f=0
486 Input "Freq " , F  : if f=0 goto 488  :   C=(sqr ( 1.724E3 / F ) / ( 
5.08* PI ))   
     :   if C < .5 * D goto 488
487 C=.5*D
488 C=4E6*C*(D-C)
493 O = I*R/.012/C  :   V=A*O    :    W=V*A            : UC letters I , R 
, V , A , O , W 
494 Print   O ; "m" ; chr$(133) ; "     "  ; V/100 ; "V" ; tab(0);      : 
UC O 
495 Print W/1000 ; "w" ; "    Cir-mil " ; C    :   return

[email-masked]

---

From: altavoz <[email-masked]>
Date: Sun, 18 Aug 1996 22:18:16 -0700

BUGS:

line 3 should read :
3  f=.01

delete line 485 and line 486 should read :

486  Input "freq",F
     : C=(sqr(1.724E3/F)/(5.08*PI))
     : If C < .5*D goto 488

This is the way it was for years, i dont know why i changed it!

--