'=================================================== '=================== TAILLE.BAS ==================== '===== commande de la machine … tailler PROXXON ==== '============= Sulka 19 octobre 2005 =============== CLS PRINT CHDIR "\QB45\taillage" FILES PRINT : PRINT : PRINT PRINT " Taillage de roue" debut: PRINT : PRINT INPUT "Nombre de dents ", nd INPUT "profondeur en 1/10 Š de mm ", prof INPUT "Avance en 1/10Š de mm ", av IF nd < 10 THEN st = 1: GOTO fichier IF nd < 100 THEN st = 2: GOTO fichier IF nd < 1000 THEN st = 3: GOTO fichier IF nd < 10000 THEN st = 4: GOTO fichier fichier: f$ = STR$(nd): f$ = RIGHT$(f$, st) f$ = "D" + f$ + ".dat" CLS : PRINT : PRINT : PRINT : PRINT PRINT "Nombre de dents "; nd PRINT " Profondeur = "; prof / 10; " mm" PRINT " Avance = "; av / 10; "mm" PRINT INPUT "On continue O/N "; R$ IF R$ = "o" THEN GOTO suite IF R$ = "O" THEN GOTO suite RUN suite: CHDIR "\QB45\TAILLAGE" DIM R(400) OPEN "i", 1, f$ d = 0 lecture: d = d + 1 INPUT #1, R(d) IF EOF(1) = 0 THEN GOTO lecture FOR t = 1 TO d PRINT R(t); t, NEXT t PRINT PRINT "Nombre de dents "; d PRINT " Profondeur = "; prof / 10; " mm" PRINT " Avance = "; av / 10; "mm" CLOSE PRINT : PRINT COLOR 2 PRINT " METTRE LA FRAISE EN MARCHE" PRINT : PRINT INPUT "On continue O/N "; R$ IF R$ = "o" THEN GOTO taille IF R$ = "O" THEN GOTO taille RUN taille: OPEN "COM1:2400,N,8,1" FOR RANDOM AS #1 FOR t = 1 TO d SENS = 1 'avance profondeur NP = prof * 100 MOT = 1 PRINT #1, "X", SENS, NP, MOT INPUT #1, R PRINT "phase 1" SENS = 1 'avance avance NP = av * 100 MOT = 2 PRINT #1, "X", SENS, NP, MOT INPUT #1, R PRINT "phase 2" SENS = 2 'recul profondeur NP = prof * 100 MOT = 1 PRINT #1, "X", SENS, NP, MOT INPUT #1, R PRINT "phase 3" SENS = 2 'recul avance NP = av * 100 MOT = 2 PRINT #1, "X", SENS, NP, MOT INPUT #1, R PRINT "phase 4" SENS = 1 'diviseur NP = R(t) MOT = 3 PRINT #1, "X", SENS, NP, MOT INPUT #1, R PRINT "taille dent "; t; " termin‚e sur ";d NEXT t PRINT "taillage "; d; " / "; nd; " dents termin‚" PRINT "ParamŠtres : ": PRINT PRINT "Nombre de dents", nd PRINT "profondeur = ", prof / 10; " mm" PRINT "Avance = ", av / 10; "mm" 'nouvelle passe avec une autre profondeur PRINT : PRINT Input "Nouvelle passe ? O/N ";P$ PRINT INPUT "profondeur en 1/10 Š de mm ", prof PRINT : PRINT IF P$ = "o" THEN GOTO npasse IF P$ = "O" THEN GOTO npasse END npasse: GOTO taille END END