diff --git a/StateMachine/ColCom/1_Simple_Machine.csv b/StateMachine/ColCom/1_Simple_Machine.csv new file mode 100644 index 0000000..116e38d --- /dev/null +++ b/StateMachine/ColCom/1_Simple_Machine.csv @@ -0,0 +1,133 @@ +IdxFamigliaIngresso;IdxMicroStato;ValoreIngresso;IdxTipoEvento;next_IdxMicroStato +1;0;0;14;1 +1;0;1;24;2 +1;0;2;14;1 +1;0;3;16;3 +1;0;4;14;1 +1;0;5;22;-1 +1;0;6;14;1 +1;0;7;22;-1 +1;0;8;14;1 +1;0;9;18;4 +1;0;10;14;1 +1;0;11;18;4 +1;0;12;14;1 +1;0;13;18;4 +1;0;14;14;1 +1;0;15;18;4 +1;0;16;14;1 +1;0;17;24;2 +1;0;18;14;1 +1;0;19;24;2 +1;0;20;14;1 +1;0;21;22;-1 +1;0;22;14;1 +1;0;23;22;-1 +1;0;24;14;1 +1;0;25;18;4 +1;0;26;14;1 +1;0;27;18;4 +1;0;28;14;1 +1;0;29;18;4 +1;0;30;14;1 +1;0;31;18;4 +1;1;1;24;2 +1;1;3;16;3 +1;1;5;22;-1 +1;1;7;22;-1 +1;1;9;18;4 +1;1;11;18;4 +1;1;13;18;4 +1;1;15;18;4 +1;1;17;24;2 +1;1;19;24;2 +1;1;21;22;-1 +1;1;23;22;-1 +1;1;25;18;4 +1;1;27;18;4 +1;1;29;18;4 +1;1;31;18;4 +1;2;0;14;1 +1;2;2;14;1 +1;2;3;16;3 +1;2;4;14;1 +1;2;5;22;-1 +1;2;6;14;1 +1;2;7;22;-1 +1;2;8;14;1 +1;2;9;18;4 +1;2;10;14;1 +1;2;11;18;4 +1;2;12;14;1 +1;2;13;18;4 +1;2;14;14;1 +1;2;15;18;4 +1;2;16;14;1 +1;2;18;14;1 +1;2;20;14;1 +1;2;21;22;-1 +1;2;22;14;1 +1;2;23;22;-1 +1;2;24;14;1 +1;2;25;18;4 +1;2;26;14;1 +1;2;27;18;4 +1;2;28;14;1 +1;2;29;18;4 +1;2;30;14;1 +1;2;31;18;4 +1;3;0;14;1 +1;3;1;24;2 +1;3;2;14;1 +1;3;4;14;1 +1;3;5;22;-1 +1;3;6;14;1 +1;3;7;22;-1 +1;3;8;14;1 +1;3;9;18;4 +1;3;10;14;1 +1;3;11;18;4 +1;3;12;14;1 +1;3;13;18;4 +1;3;14;14;1 +1;3;15;18;4 +1;3;16;14;1 +1;3;17;24;2 +1;3;18;14;1 +1;3;19;24;2 +1;3;20;14;1 +1;3;21;22;-1 +1;3;22;14;1 +1;3;23;22;-1 +1;3;24;14;1 +1;3;25;18;4 +1;3;26;14;1 +1;3;27;18;4 +1;3;28;14;1 +1;3;29;18;4 +1;3;30;14;1 +1;3;31;18;4 +1;4;0;14;1 +1;4;1;24;2 +1;4;2;14;1 +1;4;3;16;3 +1;4;4;14;1 +1;4;5;22;-1 +1;4;6;14;1 +1;4;7;22;-1 +1;4;8;14;1 +1;4;10;14;1 +1;4;12;14;1 +1;4;14;14;1 +1;4;16;14;1 +1;4;17;24;2 +1;4;18;14;1 +1;4;19;24;2 +1;4;20;14;1 +1;4;21;22;-1 +1;4;22;14;1 +1;4;23;22;-1 +1;4;24;14;1 +1;4;26;14;1 +1;4;28;14;1 +1;4;30;14;1 diff --git a/StateMachine/ColCom/1_Simple_Machine.rul b/StateMachine/ColCom/1_Simple_Machine.rul new file mode 100644 index 0000000..62ca3cb --- /dev/null +++ b/StateMachine/ColCom/1_Simple_Machine.rul @@ -0,0 +1,91 @@ +# +# Colcom Macchina SEMPLICE +# +# 2019.06.04 +# +# +$DEFINITIONS + +$NAME : SimpleMachine +$IDX : 1 +$N_STATES : 5 +$N_BITS : 5 + +#definizione bit : obbligatorio iniziare da 0 + +$BIT : 0 : bPowerOn +$BIT : 1 : bRun +$BIT : 2 : bPallet +$BIT : 3 : bAlarm +$BIT : 4 : bManual + +#definizione stati : obbligatorio iniziare da 0 + +$STATE : 0 : ST_Init +$STATE : 1 : ST_Power_off +$STATE : 2 : ST_Machine_ready +$STATE : 3 : ST_Run +$STATE : 4 : ST_Alarm + +#definizione eventi : obbligatorio iniziare da 0 + +$EVENT : 00 : EV_00 +$EVENT : 01 : EV_01 +$EVENT : 02 : EV_02 +$EVENT : 03 : EV_03 +$EVENT : 04 : EV_04 +$EVENT : 05 : EV_05 +$EVENT : 06 : EV_06 +$EVENT : 07 : EV_07 +$EVENT : 08 : EV_08 +$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_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 +ALL_STATES : bAlarm : ST_Alarm : HW_error + +ALL_STATES : bPallet : ST_Cycle_end : HW_end_pallet + +ALL_STATES : bManual : ST_Machine_ready : HW_manuale +ALL_STATES : bRun : ST_Run : HW_machining +ALL_STATES : bPowerOn : ST_Machine_ready : HW_manuale + +#-------------------------------------------------------------------------- + +$DO \ No newline at end of file