From 70d4578a6725d4d94a0ed90f718288de2fb0c581 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 21 Jan 2019 14:31:49 +0100 Subject: [PATCH] Sistemata state machine Caber x Colcom --- StateMachine/ColCom/2_Caber.csv | 193 ++++++++++++++++++++++++++ StateMachine/ColCom/2_Caber.rul | 83 ++++++----- StateMachine/ColCom/Appunti Caber.txt | 6 +- 3 files changed, 243 insertions(+), 39 deletions(-) create mode 100644 StateMachine/ColCom/2_Caber.csv diff --git a/StateMachine/ColCom/2_Caber.csv b/StateMachine/ColCom/2_Caber.csv new file mode 100644 index 0000000..243823d --- /dev/null +++ b/StateMachine/ColCom/2_Caber.csv @@ -0,0 +1,193 @@ +IdxFamigliaIngresso;IdxMicroStato;ValoreIngresso;IdxTipoEvento;next_IdxMicroStato +2;0;0;14;1 +2;0;1;15;2 +2;0;2;14;1 +2;0;3;16;3 +2;0;4;14;1 +2;0;5;15;2 +2;0;6;14;1 +2;0;7;16;3 +2;0;8;14;1 +2;0;9;18;5 +2;0;10;14;1 +2;0;11;18;5 +2;0;12;14;1 +2;0;13;18;5 +2;0;14;14;1 +2;0;15;18;5 +2;0;16;14;1 +2;0;17;24;6 +2;0;18;14;1 +2;0;19;24;6 +2;0;20;14;1 +2;0;21;24;6 +2;0;22;14;1 +2;0;23;24;6 +2;0;24;14;1 +2;0;25;18;5 +2;0;26;14;1 +2;0;27;18;5 +2;0;28;14;1 +2;0;29;18;5 +2;0;30;14;1 +2;0;31;18;5 +2;1;1;15;2 +2;1;3;16;3 +2;1;5;15;2 +2;1;7;16;3 +2;1;9;18;5 +2;1;11;18;5 +2;1;13;18;5 +2;1;15;18;5 +2;1;17;24;6 +2;1;19;24;6 +2;1;21;24;6 +2;1;23;24;6 +2;1;25;18;5 +2;1;27;18;5 +2;1;29;18;5 +2;1;31;18;5 +2;2;0;14;1 +2;2;2;14;1 +2;2;3;16;3 +2;2;4;14;1 +2;2;6;14;1 +2;2;7;16;3 +2;2;8;14;1 +2;2;9;18;5 +2;2;10;14;1 +2;2;11;18;5 +2;2;12;14;1 +2;2;13;18;5 +2;2;14;14;1 +2;2;15;18;5 +2;2;16;14;1 +2;2;17;24;6 +2;2;18;14;1 +2;2;19;24;6 +2;2;20;14;1 +2;2;21;24;6 +2;2;22;14;1 +2;2;23;24;6 +2;2;24;14;1 +2;2;25;18;5 +2;2;26;14;1 +2;2;27;18;5 +2;2;28;14;1 +2;2;29;18;5 +2;2;30;14;1 +2;2;31;18;5 +2;3;0;14;1 +2;3;1;15;2 +2;3;2;14;1 +2;3;4;14;1 +2;3;5;15;2 +2;3;6;14;1 +2;3;8;14;1 +2;3;9;18;5 +2;3;10;14;1 +2;3;11;18;5 +2;3;12;14;1 +2;3;13;18;5 +2;3;14;14;1 +2;3;15;18;5 +2;3;16;14;1 +2;3;17;22;4 +2;3;18;14;1 +2;3;19;22;4 +2;3;20;14;1 +2;3;21;22;4 +2;3;22;14;1 +2;3;23;22;4 +2;3;24;14;1 +2;3;25;18;5 +2;3;26;14;1 +2;3;27;18;5 +2;3;28;14;1 +2;3;29;18;5 +2;3;30;14;1 +2;3;31;18;5 +2;4;0;14;1 +2;4;1;15;2 +2;4;2;14;1 +2;4;3;16;3 +2;4;4;14;1 +2;4;5;15;2 +2;4;6;14;1 +2;4;7;16;3 +2;4;8;14;1 +2;4;9;18;5 +2;4;10;14;1 +2;4;11;18;5 +2;4;12;14;1 +2;4;13;18;5 +2;4;14;14;1 +2;4;15;18;5 +2;4;16;14;1 +2;4;17;24;6 +2;4;18;14;1 +2;4;19;24;6 +2;4;20;14;1 +2;4;21;24;6 +2;4;22;14;1 +2;4;23;24;6 +2;4;24;14;1 +2;4;25;18;5 +2;4;26;14;1 +2;4;27;18;5 +2;4;28;14;1 +2;4;29;18;5 +2;4;30;14;1 +2;4;31;18;5 +2;5;0;14;1 +2;5;1;15;2 +2;5;2;14;1 +2;5;3;16;3 +2;5;4;14;1 +2;5;5;15;2 +2;5;6;14;1 +2;5;7;16;3 +2;5;8;14;1 +2;5;10;14;1 +2;5;12;14;1 +2;5;14;14;1 +2;5;16;14;1 +2;5;17;24;6 +2;5;18;14;1 +2;5;19;24;6 +2;5;20;14;1 +2;5;21;24;6 +2;5;22;14;1 +2;5;23;24;6 +2;5;24;14;1 +2;5;26;14;1 +2;5;28;14;1 +2;5;30;14;1 +2;6;0;14;1 +2;6;1;15;2 +2;6;2;14;1 +2;6;3;16;3 +2;6;4;14;1 +2;6;5;15;2 +2;6;6;14;1 +2;6;7;16;3 +2;6;8;14;1 +2;6;9;18;5 +2;6;10;14;1 +2;6;11;18;5 +2;6;12;14;1 +2;6;13;18;5 +2;6;14;14;1 +2;6;15;18;5 +2;6;16;14;1 +2;6;18;14;1 +2;6;20;14;1 +2;6;22;14;1 +2;6;24;14;1 +2;6;25;18;5 +2;6;26;14;1 +2;6;27;18;5 +2;6;28;14;1 +2;6;29;18;5 +2;6;30;14;1 +2;6;31;18;5 diff --git a/StateMachine/ColCom/2_Caber.rul b/StateMachine/ColCom/2_Caber.rul index 1a439fb..5208e07 100644 --- a/StateMachine/ColCom/2_Caber.rul +++ b/StateMachine/ColCom/2_Caber.rul @@ -1,15 +1,15 @@ # -# Colcom Macchine DOPPIO PALLET (es. Mori Seiki) - macchina PRINCIPALE +# Colcom Macchine CABER (singola + prototipi) # -# partenza da DOOSAN (Donati) +# partenza da state machine attuale... # # $DEFINITIONS -$NAME : MORI_SEIKI_main -$IDX : 5 -$N_STATES : 8 -$N_BITS : 4 +$NAME : CABER +$IDX : 2 +$N_STATES : 7 +$N_BITS : 5 #definizione bit : obbligatorio iniziare da 0 @@ -17,6 +17,7 @@ $BIT : 0 : bPowerOn $BIT : 1 : bRun $BIT : 2 : bDepPezzo $BIT : 3 : bAlarm +$BIT : 4 : bManual #definizione stati : obbligatorio iniziare da 0 @@ -24,13 +25,12 @@ $STATE : 0 : ST_Init $STATE : 1 : ST_Power_off $STATE : 2 : ST_Machine_ready $STATE : 3 : ST_Run -$STATE : 4 : ST_PezzoRobot +$STATE : 4 : ST_Cycle_end $STATE : 5 : ST_Alarm $STATE : 6 : ST_Manual -$STATE : 7 : ST_AlarmDoosan + #definizione eventi : obbligatorio iniziare da 0 - $EVENT : 00 : EV_00 $EVENT : 01 : EV_01 $EVENT : 02 : EV_02 @@ -44,41 +44,50 @@ $EVENT : 09 : EV_09 $EVENT : 10 : EV_10 $EVENT : 11 : EV_11 $EVENT : 12 : EV_12 -$EVENT : 13 : HW - init -$EVENT : 14 : HW - power off -$EVENT : 15 : HW - power on -$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 - deposito pezzo +$EVENT : 13 : HW_init +$EVENT : 14 : HW_power_off +$EVENT : 15 : HW_power_on +$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_Test_WU_CD +$EVENT : 41 : HW_run_slow +#$EVENT : 999 : Commento $RULES -# state : input : next state : event -ALL_STATES : NOT bPowerOn : ST_Power_off : HW - power off +# state : input : next state : event +ALL_STATES : NOT bPowerOn : ST_Power_off : HW_power_off -ALL_STATES : bAlarm : ST_Alarm : HW - error +ALL_STATES : bAlarm : ST_Alarm : HW_error -ALL_STATES : bDepPezzo : ST_PezzoRobot : HW - deposito pezzo +ST_Run : bManual : ST_Cycle_end : HW_end_pallet +ALL_STATES : bManual : ST_Manual : HW_manuale -ALL_STATES : bRun : ST_Run : HW - machining -ALL_STATES : bPowerOn : ST_Machine_ready : HW - power on +ALL_STATES : bRun : ST_Run : HW_machining +ALL_STATES : bPowerOn : ST_Machine_ready : HW_power_on #-------------------------------------------------------------------------- diff --git a/StateMachine/ColCom/Appunti Caber.txt b/StateMachine/ColCom/Appunti Caber.txt index a165fc8..ca7b8c1 100644 --- a/StateMachine/ColCom/Appunti Caber.txt +++ b/StateMachine/ColCom/Appunti Caber.txt @@ -1,7 +1,9 @@ -La Caber L001 SEMBRA avere una macchina a microstsati errata: aveva una gestione dei segnali 03 --> 13 come machining - end machining, mentre il 13 va probabilmente inteso come end + contapezzi. +La Caber L001 SEMBRA avere una macchina a microstati errata: aveva una gestione dei segnali 03 --> 13 come machining - end machining, mentre il 13 va probabilmente inteso come end + contapezzi. Modificata "di forza" manualmente la state machine ingressi (non creati rul/csv...) se va bene va eventualmente VA aggiornata Aggiornati su db gli eventi 17 --> 22 (cosė da fare contare pezzi) e ricalcolato il 2018.12.11 alle 23.00 circa -DI NUOVO problema il 21.01.2019: non va ancora bene (finisce in una state machine ingressi non valida, la 6) \ No newline at end of file +DI NUOVO problema il 21.01.2019: non va ancora bene (finisce in una state machine ingressi non valida, la 6) + +CREATO rul e csv NUOVI \ No newline at end of file