home *** CD-ROM | disk | FTP | other *** search
- (defun calcu()
- (setvar "cmdecho" 0)
- (setq at "c")
- (while (and (/= at "S2") (/= at "s2"))
- (setq c (getstring "\nunit <U> or nonunit <N>: "))
- (cond ((or (= c "n") (= c "N")) (setq z "nonunit"))
- ((or (= c "u") (= c "U")) (progn (command "vslide" "\\house1\\sld\\s705") (getstring "\npress RETURN to continue: ") (setq z "unit")))
- )
- (setq a "0")
- (while (and (/= a "S1") (/= a "s1"))
- (command "vslide" "\\house1\\sld\\s706")
- (cond ((= z "nonunit") (setq cc (getstring "\ndevice No. <nonunit (1,2,3,4,5)>: ")))
- ((= z "unit") (setq cc (getstring "\ndevice No. <unit > (1,2,4,6,): ")))
- )
- (setq fname (strcat z cc))
- (cond ((= fname "nonunit1") (nonunit1))
- ((= fname "nonunit2") (nonunit2))
- ((= fname "nonunit3") (nonunit3))
- ((= fname "nonunit4") (nonunit4))
- ((= fname "nonunit5") (nonunit5))
- ((= fname "unit1") (unit1))
- ((= fname "unit2") (unit2))
- ((= fname "unit4") (unit4))
- ((= fname "unit6") (unit6))
- )
- (setq a (getstring "\nContinue or End<c/s1>: "))
- )
- (setq at (getstring "\nenter continue or end<c/s2>: "))
- )
- (check 'hd70 "hd70")
- )
- (defun nonunit1()
- (setq y (getstring "\nR=0 ? <Y/N>: "))
- (setq sj (getreal "\nsj="))
- (cond ((or (= y "n") (= y "N")) (setq dpd (getreal "\ndpd="))))
- (setq se (getreal "\nse="))
- (setq ud% (getreal "\nud="))
- (cond ((or (= y "n") (= y "N")) (setq Rnb (* dpd 0.001 (/ sj se se))))
- ((or (= y "y") (= y "Y")) (setq Rnb 0)))
- (setq Znb (/ (* ud% sj) (* 100 se)))
- (setq Xnb (sqrt (- (* Znb Znb) (* Rnb Rnb))))
- (setq Q "Xnb= ")
- (setq Xnb (strcat Q (rtos Xnb 2 4)))
- (print Xnb) (setq res Xnb) (w)
- (setq Q1 "Znb= ")
- (setq Znb (strcat Q1 (rtos Znb 2 4)))
- (print Znb) (setq res Znb) (w)
- )
- (defun nonunit2()
- (setq Ij (getreal "\nIj="))
- (setq Ue (getreal "\nUe="))
- (setq Ie (getreal "\nIe="))
- (setq Up (getreal "\nUp="))
- (setq Xk% (getreal "\nXk%="))
- (setq Xnk (/ (* Xk% Ue Ij)
- (* 100 Ie Up)
- ))
- (setq Q "Xnk= ")
- (setq Xnk (strcat Q (rtos Xnk 2 4)))
- (print Xnk) (setq res Xnk) (w)
- )
- (defun nonunit3()
- (setq Sj (getreal "\nsj="))
- (setq R (getreal "\nR= "))
- (setq Up (getreal "\nup="))
- (setq X (getreal "\nx="))
- (setq Xn (/ (* X Sj) (* Up Up)))
- (setq Rn (/ (* R Sj) (* Up Up)))
- (setq Q "Xn= ") (setq Q1 "Rn= ")
- (setq Rn (strcat Q1 (rtos Rn 2 4)))
- (setq Xn (strcat Q (rtos Xn 2 4)))
- (print Rn) (print Xn) (setq res Rn) (w) (setq res Xn) (w)
- )
- (defun nonunit4()
- (setq sj (getreal "\nsj="))
- (setq sdx (getreal "\nsdx="))
- (setq xnx (/ sj sdx))
- (setq Q "Xnx= ")
- (setq Xnx (strcat Q (rtos Xnx 2 4)))
- (print Xnx) (setq res Xnx) (w)
- )
- (defun nonunit5()
- (setq xn1 (getreal "\nxn1="))
- (setq sj (getreal "\nsj="))
- (setq sj1 (getreal "\nsj1="))
- (setq xn (/ (* xn1 sj) sj1))
- (setq Q "Xn= ")
- (setq Xn (strcat Q (rtos Xn 2 4)))
- (print Xn) (setq res Xn) (w)
- )
- (defun unit1()
- (setq ue (getreal "\nue="))
- (setq se (getreal "\nse="))
- (setq dpd (getreal "\ndpd="))
- (setq ud% (getreal "\nud%="))
- (setq rb (/ (* dpd ue ue 0.001)
- (* se se)
- ))
- (setq zb (/ (* ud% ue ue) (* se 100)))
- (setq xb (sqrt (- (* zb zb) (* rb rb))))
- (setq Q "Rb= ")
- (setq Q1 "Zb= ")
- (setq Q2 "Xb= ")
- (setq Rb (strcat Q (rtos Rb 2 4)))
- (setq Xb (strcat Q2 (rtos Xb 2 4)))
- (setq Zb (strcat Q1 (rtos Zb 2 4)))
- (print Rb) (print Xb) (print Zb)
- (setq res Rb) (w) (setq res Xb) (w) (setq res Zb) (w)
- )
- (defun unit2()
- (setq ue (getreal "\nue="))
- (setq ie (getreal "\nie="))
- (setq xk%(getreal "\nxk%="))
- (setq xk (/ (* xk% ue)
- (* 100 ie (sqrt 3))))
- (setq Q "xk= ")
- (setq xk (strcat Q (rtos xk 2 4)))
- (print xk) (setq res xk) (w)
- )
- (defun unit4()
- (setq up (getreal "\nup="))
- (setq sdx (getreal "\nsdx="))
- (setq xx (/ (* up up)
- sdx
- ))
- (setq Q "xx= ")
- (setq xx (strcat Q (rtos xx 2 4)))
- (print xx) (setq res xx) (w)
- )
- (defun unit6()
- (setq x1 (getreal "\nx1="))
- (setq up1 (getreal "\nup1="))
- (setq up2 (getreal "\nup2="))
- (setq R2 (getreal "\nR1= "))
- (setq x2 (/ (* x1 up2 up2) (* up1 up1)))
- (setq R2 (/ (* R2 up2 up2) (* up1 up1)))
- (setq Q "R2= ")
- (setq Q1 "X2= ")
- (setq R2 (strcat Q (rtos R2 2 4)))
- (setq X2 (strcat Q1 (rtos X2 2 4)))
- (print R2) (print X2) (setq res R2) (w) (setq res X2) (w)
- )
- (defun w ()
- (command "redraw")
- (setq p (getpoint "enter write table of point: "))
- (command "text" p 2 0 res)
- )
- (calcu)