; ;Declaration des E/S ;IS00: Entree de mise en regulation ;IS01: BP START ;IS02: BP STOP ;IS03: Capteur de POM ;OS00: Position atteinte ;OS01: ROT 0 ;OS02: Variateur pret %text(descripH) def H00=offset_pom def H01=num_prog def H05=cote_calc def H06=offset_recal def H07=posoffset def H10=V_operateur def H11=v_calcule def H105=mem_pos def H70=tps_offset def F106=actualpos end %P00 N001 CALL N200 ;appel sous prg d'initialisation N002 JMP(IS00=0)N002 N005 JMP(IS01=1)N005 ;attente impulsion bp start N006 JMP(IS01=0)N006 N007 JMP(IS01=1)N007 N010 GO 0 + H00 ;demande de POM + offset de position sur POM N011 JMP (STA_HOMATD=0)N011 ;attente POMOK ;*****************Boucle prinicipal du programme************************* N020 CALL N120 ;appel sous prg de gestion des cotes N022 CALL N050 ;appel sous prg de gestion des mouvements N029 CALL N240 ;appel sous prg affichage position courante N030 JMP N020 ;************************************************************************ ;**************Sous programme de gestion des mouvements****************** N050 JMP(IS01=0)N099 N051 JMP(IS01=1)N051 N059 SET H105=ACTPOS ;memorisation position actuelle N060 JMP(H05>H105)N080 ;verif de la pos afin de faire l'offset ou pas N062 SET H07=H05 N064 SET H07-H06 N070 GO A H07 V H11 N072 JMP(IS02=1)N095 N075 SET H105=ACTPOS N076 JMP(H105=H007)N079 N077 CALL N240 N078 JMP N072 N079 WAIT H70 N080 GO A H05 V H11 N082 JMP(IS02=1)N095 N085 SET H105=ACTPOS N086 JMP(H105=H005)N099 N088 CALL N240 N089 JMP N082 N095 STOPB ;arret sur BP STOP N099 RET ;************************************************************************* ;************Sous programme de gestion des programmes de cotes************ N120 SET C001=H001 ;Mise a l'echelle de la vitesse en E-4 m N121 SET F100=F[C001] N122 SET F127=F100 N123 SET F127*10 N124 SET F000=ROUND F127 N125 SET H005=F000 N130 SET H11=H10 ;Mise a l'echelle de la vitesse en E-4 m/s N131 SET H11*10 N199 RET ;************************************************************************ ;*************Sous programme d'initialisation**************************** N200 SET F106=0 N219 RET ;************************************************************************ ;********Sous programme d'affichage de la position courante************** N240 SET F105=PARA[754] N241 SET F105:10 N242 SET F106=F105 N249 RET ;************************************************************************ END