diff --git a/StateMachineStati/1_BARCODE_MANUALE.rul b/StateMachineStati/1_BARCODE_MANUALE.rul new file mode 100644 index 0000000..09ccea1 --- /dev/null +++ b/StateMachineStati/1_BARCODE_MANUALE.rul @@ -0,0 +1,137 @@ +# +# Macchine MANUALE/BArcode di partenza +# +# +# 2023.07.25 S.E.L. +# +$DEFINITIONS + +$NAME : BARCODE_MANUAL +$IDX : 1 +$N_STATES : 15 +$N_EVENTS : 14 + +#definizione stati (MACRO) : obbligatorio iniziare da 0 --> select * from AnagraficaStati + +$STATE : 0 : ND +#$STATE : 1 : MacchinaPronta +$STATE : 2 : Attrezzaggio +#$STATE : 3 : CreazioneProgrammi +#$STATE : 4 : LavoriVari +$STATE : 5 : Guasto +#$STATE : 6 : MancaPezzo +$STATE : 7 : MancaLavoro +$STATE : 8 : Assenteismo +$STATE : 9 : Manutenzione +$STATE : 10 : Pulizia +$STATE : 11 : MacchinaSpenta +$STATE : 12 : FermoGenerico +$STATE : 13 : Lavorazione +#$STATE : 14 : CambioPezzo +#$STATE : 15 : AllarmeCN +#$STATE : 23 : RotturaNastro +#$STATE : 24 : Manuale +#$STATE : 25 : ScaricoPieno +#$STATE : 26 : NonDisponibile +$STATE : 27 : MancaRifornMPD +#$STATE : 28 : MagazzinoGrezziVuoto +#$STATE : 29 : Emergenza +$STATE : 30 : FermoOrganizzativo +#$STATE : 31 : ModificaProgrammi +$STATE : 32 : SostituzioneUtensile +#$STATE : 33 : RiempimentoVasca +$STATE : 34 : Riscaldamento +#$STATE : 35 : AnomaliaMacchina +#$STATE : 36 : AccensioneSpegnimento +#$STATE : 37 : Carico +#$STATE : 38 : Riserva +#$STATE : 39 : AVuoto +#$STATE : 49 : MancaAttrezzatura +$STATE : 50 : UsuraUtensile + +#definizione eventi : obbligatorio iniziare da 0 --> select * from AnagraficaEventi + +$EVENT : 00 : EMPTY +$EVENT : 01 : Barcode_Lavora +$EVENT : 02 : Barcode_Attrezzaggio +$EVENT : 03 : Barcode_Creazione_Programmi +$EVENT : 04 : Barcode_Riempimento_Vasca +$EVENT : 05 : Barcode_Guasto +$EVENT : 06 : NoBarcode_Riscaldamento +$EVENT : 07 : Barcode_Manca_Ciclo_Lavoro +$EVENT : 08 : Barcode_Assenteismo +$EVENT : 09 : Barcode_Manutenzione +$EVENT : 10 : Barcode_Pulizia +$EVENT : 11 : Bcode_Cambio_Pallet +$EVENT : 12 : Barcode_Macchina_Spenta +$EVENT : 13 : HW_init +$EVENT : 14 : HW_power_off +$EVENT : 15 : HW_PowerOn +$EVENT : 16 : HW_machining +$EVENT : 17 : HW_end_machining +$EVENT : 18 : HW_error +$EVENT : 19 : Barcode_cambio_operatore +$EVENT : 20 : Contapezzi +$EVENT : 21 : HW_start_pallet +$EVENT : 22 : HW_end_pallet +$EVENT : 23 : HW_rottura_nastro_abrasivo +$EVENT : 24 : HW_manuale +$EVENT : 25 : HW_nastro_scarico_pieno +$EVENT : 26 : Barcode_Manca_Riforn_MPD +$EVENT : 27 : Timer_timeout_tempo_ciclo +$EVENT : 28 : Timer_timeout_TURNO_by_tempo_ciclo +$EVENT : 29 : HW_magazzino_grezzi vuoto +$EVENT : 30 : HW_emergenza +$EVENT : 31 : Barcode_Modifica_Programmi +$EVENT : 32 : Barcode_Sostituzione_Utensile +$EVENT : 33 : HW_Allarme Macchina +$EVENT : 34 : HW_end_pallet_1 +$EVENT : 35 : HW_end_pallet_2 +$EVENT : 36 : HW_deposito_robot +$EVENT : 37 : Barcode_Riempimento_Vasca +$EVENT : 38 : Barcode_Riscaldamento +$EVENT : 39 : Barcode_Anomalia_Macchina +$EVENT : 40 : HW_WarmUp_CoolDown +$EVENT : 41 : HW_machining_SLOW +$EVENT : 42 : HW_Warn_Livello_Vasca +$EVENT : 43 : HW_Warn_Livello_Cell +$EVENT : 44 : HW_Warn_a_Vuoto +$EVENT : 45 : HW_Warn_Riserva +$EVENT : 46 : HW_Carico +$EVENT : 47 : HW_Mismatch +$EVENT : 48 : HW_preparing +$EVENT : 49 : Barcode_Manca_Attrezzatura +$EVENT : 50 : Barcode_Usura_Utensile +$EVENT : 120 : IncrementoPezzi +$EVENT : 121 : RettificaPezzi +$EVENT : 999 : Commento + +$RULES + +# state : event : next state + +ALL_STATES : Barcode_Lavora : Lavorazione +ALL_STATES : Barcode_Attrezzaggio : Attrezzaggio +#ALL_STATES : Barcode_Creazione_Programmi : CreazioneProgrammi +#ALL_STATES : Barcode_Riempimento_Vasca : RiempimentoVasca +ALL_STATES : Barcode_Guasto : Guasto +#ALL_STATES : NoBarcode_Riscaldamento : Riscaldamento +ALL_STATES : Barcode_Manca_Ciclo_Lavoro : MancaLavoro +ALL_STATES : Barcode_Assenteismo : Assenteismo +ALL_STATES : Barcode_Pulizia : Pulizia +#ALL_STATES : Bcode_Cambio_Pallet : CambioPezzo +ALL_STATES : Barcode_Macchina_Spenta : MacchinaSpenta +ALL_STATES : Barcode_Manca_Riforn_MPD : MancaRifornMPD +#ALL_STATES : Barcode_Modifica_Programmi : ModificaProgrammi +ALL_STATES : Barcode_Sostituzione_Utensile : SostituzioneUtensile +#ALL_STATES : Barcode_Riempimento_Vasca : RiempimentoVasca +ALL_STATES : Barcode_Riscaldamento : Riscaldamento +ALL_STATES : Barcode_Anomalia_Macchina : AnomaliaMacchina +#ALL_STATES : Barcode_Manca_Attrezzatura : MancaAttrezzatura +ALL_STATES : Barcode_Usura_Utensile : UsuraUtensile + +#-------------------------------------------------------------------------- + + + +$DO